September 2010
1 post
A list of some sites I follow to keep up in my...
http://www.google.com/reader/bundle/user%2F12740622692005399469%2Fbundle%2FRuby%20JS%20and%20other%20dev Posted via email from a timocracy of one | Comment »
June 2010
1 post
2 tags
Git sub-tree merging back to the subtree for...
While git sub-tree merge strategy works great for merging a library into vendor (when you want to pull HEAD on that library instead of waiting for releases), I had trouble finding documentation on pushing back to upstream. This is annoying because one of the most obvious times you may want to use subtree is when you manage the library yourself, so can just pull straight from the repo, and want...
May 2010
1 post
2 tags
Our vows and pre-vow speeches
Roula I am honored that you have chosen me to be your wife. You: the best person I know, my dearest friend, the highlight of my day. I may have doubts and questions about life, but of you and this marriage I have none - it is the most fulfilling work of my life. The sounds of your voice and the touch of your hand assures me that I am, at last, home, and I cannot wait to spend the rest of my...
April 2010
6 posts
The Tea Party is Racist
http://politicalirony.com/2010/04/27/the-tea-party-is-racist/ Posted via email from a timocracy of one | Comment »
Unobtrusive JavaScript vs. Kool-Aid
Great response to @jamis’ UJS == Kool-aid posts. Welcome to the post-2005 era of web dev. ;)
Unobtrusive JavaScript vs. Kool-Aid via DailyJS on 4/26/10
This article is a guide to writing unobtrusive JavaScript. It’s not always easy for people to transition to writing JavaScript this way, so I’ve tried to address common concerns. The techniques presented here should enable you to think...
4 tags
Following up on how to test a config.ru, an actual...
http://github.com/timocratic/rack-test/commit/dd5324627890b4632c07deed1fc2528… Posted via email from a timocracy of one | Comment »
4 tags
Testing a rackup (config.ru) file with Rack::Test
The ever useful rack-test gem let’s you easily integration test any rack project. All you have to do is include the Rack::Test::Methods and define an app method that returns your rack app. So people usually have a config.ru that just references their my_application.rb that they reference in their config.ru and then in their test file they can also reference that app and return it....
Just making sure it fits before...
Posted via email from a timocracy of one | Comment »
3 tags
Beware respond_to format with redirects in shared...
If you use an authenticated_system on your Rails site, with global before_filters for things like requiring login to access pages, be careful of missing formats in the respond_to. I just tracked down a bug on an app where we were getting DoubleRenderErrors because of unauthenticated request directly to a csv file. We had a before_filter that was denying request and redirecting them to login,...
March 2010
2 posts
Simplicity *does* mean simple, readable methods
Following a link from @raganwald I came across an article where Mike Taylor was debating wether the concept of simplicity, as it pertains to the length and complexity of methods isn’t subjective. He read a decent chunk of Fowler’s Refactoring, found himself disagreeing with the tendency to composable, well named methods, in favor larger methods with the low-level implementation in...
2 tags
The trouble with bash colored prompts munging your...
Basically, you just want to be very careful properly escaping and ending color sequences in your bash prompt. If you mess them up, when you try to use spiffy bash tricks that mess with your current line, such as control-r to search through your bash history and then left of right arrow to edit that line, you’ll get a partially overwritten line that is impossible to read or edit properly. ...
February 2010
10 posts
2 tags
Using open3 in ruby to call an interactive shell...
Apparently when using the three standard pipes (stdin, stdout, stderr) in your own programming, it is REALLY easy to block or deadlock on them. At first I figured there were problems in the ruby *open3 library, but this is not ruby specific, I found message board discussions about similar problems using perl open3 libraries.
Trying to figure out these quirks is made harder by the fact...
3 tags
Call a custom jar from ruby in jruby
1 2 3 4 5 6 7 8 9
#javac HelloWorld.java && jar cvf HelloWorld.jar HelloWorld.class
require ‘java’
require ‘HelloWorld.jar’
import ‘HelloWorld’
puts HelloWorld.new.hello
#=> “Hello cruel world”
#jruby hello_world.rb
Posted via email from a timocracy of one | Comment »
Call a custom jar from ruby in jruby #ruby #tech...
1 2 3 4 5 6 7 8 9
#javac HelloWorld.java && jar cvf HelloWorld.jar HelloWorld.class
require ‘java’
require ‘HelloWorld.jar’
import ‘HelloWorld’
puts HelloWorld.new.hello
#=> “Hello cruel world”
#jruby hello_world.rb
Posted via email from a timocracy of one | Comment »
2 tags
Making config.gem in Rails 2.3.x allow you to...
If you are on Rails 2.3.x (pre-Bundler) and want to organize some of your shared functionality into gems, but they are for internal use only, you could set-up a private gem server and point the :source at this server. And then you could deal with authentication, and then… Or as a quick hack you could just allow for config.gem to reference the gemfile directly, which would then mean...
3 tags
"Object is not missing constant XXX" and "A copy...
If you have a Rails metals that has enough code to have its own subdirectories that live in your Rails load_paths you can get stuck in dependency hell. The combinations of autoloading, rails reloading on development, and running through the metal can intersect in nasty ways: on the first request you get “Object is not missing constant XXX” and subsequent requests kick off “A...
"Object is not missing constant XXX" and "A copy...
If you have a Rails metals that has enough code to have it’s own subdirectories that live in your Rails load_paths you can get stuck in dependency hell. The combinations of autoloading, rails reloading on development, and running through the metal can intersect in nasty ways: on the first request you get “Object is not missing constant XXX” and subsequent requests kick off...
4 tags
Tagging a git release with current branch name and...
Either add this to your .git/config [alias] datetag = !git tag `git name-rev --name-only HEAD`-`date \"+%Y%m%d%H%M\"` or run it in your project folder to add it to the config for that project: git config alias.datetag '!git tag `git name-rev --name-only HEAD`-`date "+%Y%m%d%H%M"`' Posted via web from a timocracy of one | Comment »
Tagging a git release with current branch name and...
Either add this to your .git/config [alias]: datetag = !git tag `git name-rev --name-only HEAD`-`date \"+%Y%m%d%H%M\"` or run it in your project folder to add it to the config for that project: git config alias.datetag '!git tag `git name-rev --name-only HEAD`-`date "+%Y%m%d%H%M"`' Posted via web from a timocracy of one | Comment »
4 tags
Setting RAILS_ENV on Dreamhost when running...
It may depend on which server you are on, but mine has mod_env enabled, so it’s a simple matter of setting the ENV[‘RAILS_ROOT’] in an .htacess file SetEnv RAILS_ENV staging Posted via email from a timocracy of one | Comment »
Setting RAILS_ENV on Dreamhost when running...
It may depend on which server you are on, but mine has mod_env enabled, so it’s a simple matter of setting the ENV[‘RAILS_ROOT’] in an .htacess file SetEnv RAILS_ENV staging Posted via email from a timocracy of one | Comment »
December 2009
1 post
3 tags
http://g.raphaeljs.com/
http://g.raphaeljs.com/
A sweet javascript charting/graphing library. Soon there may be no need for flash/flex every again?
Posted via email from a timocracy of one | Comment »
November 2009
7 posts
3 tags
Avoiding some of the negative trade-offs in the...
So my buddy Tammer’s recent post about the Gang of Four’s Template Pattern reminded me of some code I saw recently. A start-up’s greenfield project had it’s authorization done in a pretty clean way using the template pattern. Basically every object determined what could be done to it, something like this:
After continuing this approach to fully cover CRUD you make a...
Maus hanging out in bed
Posted via email from a timocracy of one | Comment »
So after trying both I like posterous better than...
It just seems easier to use and they seem to be making more improvements, while tumblr seems sort of stalled. Since it’s so easy to post to multiple services with posterous I’ll just keep my tumblr around as a back-up, but I’m redirecting the feedburner feed to here instead. I’m sorry if this causes duplicate entries in feedburner, but this is the last time I swear. The...
3 tags
My Favorite bash Tips and Tricks
which produces the same result. However, brace expansion becomes quite useful when the brace-enclosed list occurs immediately before, after or inside another string:
$ echo {one,two,red,blue}fish onefish twofish redfish bluefish $ echo fish{one,two,red,blue} fishone fishtwo fishred fishblue $ echo fi{one,two,red,blue}sh fionesh fitwosh firedsh fibluesh
Notice that there...
2 tags
SSD degradation due to software development usage...
http://macperformanceguide.com/Storage-SSD-Reconditioning.html
“Six months of experience with the Intel X25-M solid state drive (SSD) on the Mac Pro revealed the severe degradation of write speed to roughly 1/4 of the original speed, with unpredictable pauses. This behavior was induced by intense usage of the SSD for software development, an inappropriate use for an SSD, because over...
1 tag
A great photo essay by THomas Hoepker of East...
http://inmotion.magnumphotos.com/essay/pictures-vanished-country
Posted via email from a personal timocracy | Comment »
2 tags
interesting new ruby, redis-based background...
http://github.com/blog/543-new-resque-web-ui http://github.com/defunkt/resque
Yet another queuing system, but I do like the look of the included Sinatra mini-app for managing it. And isn’t redis all the hot thing now? Or is that a negative?
Posted via email from a personal timocracy | Comment »
October 2009
18 posts
2 tags
Maybe hiding initialize in your abstract parent...
Or the wrong one. It just seems like over-inheriting is definitely one of the bigger maintainability nightmares I have had; and pulling the constructor entirely into the parent…. Well it better be exactly the parent, and cleanly done.
It’s like those overly abstracted resource_controllers. They seem like a great idea, but once you start deviating at all, you spend more code and more...
3 tags
A pretty good overview of ruby's Structs
http://blog.rubybestpractices.com/posts/rklemme/017-Struct.html# including the oft under-documented passing of a block to new
2 tags
Art in Store Fronts
An interesting use of empty store fronts in rundown areas of SF, with the hopes of rehabilitation. Go Arts Council + Newsom
2 tags
Mislav's git shortcuts for resolving conflicts
via gist.github.com
4 tags
Creating Your Content - Nesta – a CMS for Ruby...
http://effectif.com/nesta/creating-content
2 tags
Using posterous to manage crossposting and tumblr...
I am late to this game, but shortly after deciding to switch my blog over to Tumblr, I discovered the joys of Posterous. As you probably know, Posterous is a microblogging service primarily aimed at posting via email. This may sound awkward at first, but to be honest, it seems a lot less awkward than logging in and using some textarea on a html form. I do most of my (non-coding) writing in an...
Success!
I seem to have gotten all my old posts imported and the feedburner moved over
The beginnings of a successful import
So I got the first 12 articles imported before tumblr choked. I wonder if I need to put in a sleep in my tumblr import script.
Still working on the migration. After I import all my old posts, I’ll switch feedburner to pull from here.
32 Rack Resources to Get You Started | Jason... →
Importing Typo to Tumblr - Being Tony Buser →
bag-a-tell online inquiry form | bagaboo →
Gist on your Tumblr - GitHub →
Bamboo Blog - Migrating our blog from Mephisto to... →
mxcl's homebrew at master - GitHub →
SyntaxHighlighter - Alex Gorbatchev →
3 tags
Moving on →
An imported post from my old blog. Hopefully the title is self-explantory.
August 2009
1 post
4 tags
Compiling Flex apps with external swc libs and... →
An imported post from my old blog. Hopefully the title is self-explantory.
June 2009
1 post
4 tags
Workaround for has_many :through overriding the... →
An imported post from my old blog. Hopefully the title is self-explantory.
April 2009
2 posts
6 tags
Another ticket on Rails Metal loading/requiring... →
An imported post from my old blog. Hopefully the title is self-explantory.