hack-n-ship in bashrc
After reading ReinH’s post on hack and ship, two bash scripts allowing his team to streamline their workflow using git, I tried to put it in my .bashrc. Here it is
I can update the functions to use git shortcuts that are already there. Like using gc instead of git checkout. But I don’t think it’s worth the extra effort.
The unset commands feel itchy for me. Any suggestion ?
small-ish debate on BDD
Courtenay started it, stating that his team stopped using rSpec, saying
We wasted a day or two (three, maybe four developers) which equates to several thousand dollars in wasteage. It was also really infuriating — the culmination of a few years of frustration of rSpec’s weirdnesses.
They left rspec and used rr, context, and matchy instead. Many other favorite library proposed in the comments.
Josh Susser compared rSpec with shoulda and test/spec in his The Great Test Framework Dance Off.
David Chelimsky responded and stated that some of Josh’s criticism was true, but
What Josh didn’t know at the time, and this is definitely worthy of a ding for us not documenting things well enough, is rspec’s simple_matcher method that let’s you create simple matchers in just a few lines. Here’s the example in test/unit from Josh’s talk:
def assert_sorted(actual, message=nil, &block)
expected = actual.sort(&block)
assert_equal expected, actual, “Order is wrong:”
end
assert_sorted(tags) { |a,b| a.name b.name }And here’s the same thing with simple_matcher:
def be_sorted
simple_matcher(“a sorted list”) {|actual| actual.sort == actual}
end
[1,2,3].should be_sorted
Dan Croak from Toughtbot fame spoke up also, criticizing another BDD tool, Shoulda, stating that, like rspec, it adds complexity to achieve virtually no result, comparing it to test/unit that is already included in Ruby core library, faster, and simpler.
Later, Pat Maddox refutes it, stating that sometimes a tool is not just a tool. That is, TDD / BDD does do something important. Making him keeping his responsibility
It is my responsibility to keep existing code working, to improve existing code to make it more maintainable, and to write new code that functions and is maintainable. The best way I’ve found to do this is to do TDD. It’s not the only way, of course, just like GTD isn’t the only system for managing your workload. But it’s proven to be pretty damn effective.
C++0x is out. Yay.
Thanks to OSNews, I know that the new standard of C++ is already finalized. Having it at 2008, it doesn’t need to change base to Hex
Let’s wait for the compilers to catch on (GCC, I’m looking at you). I hope this will bring good news to Rubinius (which nowadays switched to C++ also) as well.
Pain
I found here a very touching video about the pain of developers. Watch it and then, please, go find a developer today.
Is the window of opportunity closed already?
I found at Giles Bowkett’s blog a link to a Silicon Alley Insider article titled “Sorry, Startups: Party’s Over”
It quotes
The message is simple. Raising capital will be much more difficult now.
You should lower your “burn rate” to raise at least 3-6 months or more of funding via cost reductions, even if it means staff reductions and reduced marketing and G&A expenses. This is the equivalent to “raising an internal round” through cost reductions to buy you more time until you need to raise money again; hopefully when fund raising is more feasible. Letting go of staff is hard and often gut wrenching. A re-evaluation of timelines and re-focus on milestones with the eye of doing more with less will allow you to live many more days, and the name of the game in this environment in some respects is survival–survival until conditions change.
UPDATE:
ReadWriteWeb reports about starts of layoffs. Sky is not falling, but earthquake is in horizon.
Rails Nested Resource Tutorial
Wandering many times, searching for good explanation and tutorial of nested resource, I found that currently the best explanation is here, written by Adam Wiggins at Heroku.
Go read it.
Converting a rspec generated scaffold to nested one, I broke so many specs. This is one of the places that rspec generated scaffold is more of a burden. Sigh.
Compiling rubinius c++ VM in Debian lenny
I have a habit to use testing branch of debian. Currently it’s Lenny.
The problem is, gcc package now is version 4.3. The g++ of that version is stricter (being transitioning to C++-0x), emitting errors when compiling rubinius c++ vm. The solution (workaround, actually) is installing the 4.2 versions, then replacing the gcc and g++ symlinks (prvided by gcc and g++ packages, respectively) to point to gcc-4.2 and g++-4.2, respectively. Yes, it’s a hack.
started using bort
Some days ago, I cloned bort, a prepared rails application template. It has restful authentication and roles already. It also had rspec. So far, so good.
But, because I copied my clone to my working directory, I had to manually sync it when it’s updated. D’oh. Oh, well. Another lesson learned.
Matz is nice
found here
Maybe I should wear JRuby T-shirt in public (as I did in Japan) to show my interest and sympathy for JRuby.