28

Whew, I made it out at the other end. With a true birthday to boot. Yay!

Posted in Uncategorized | Leave a comment

Playing with BDD

No, a different capybara (Picture by PanBK)

I spent some time recently playing with Ruby on Rails and BDD (Behaviour Driven Development), using Cucumber and Capybara. I have generally not done much testing when writing code, except for some classes in university. I can see the usefulness of it, but I never really got in the habit. Time for a change.

Playing around with Cucumber was a lot of fun. I like the shift from thinking about what your software should do and describing it in plain text, to actually writing software. That way there is no idle time where you’re thinking about what you should be doing, but you are writing those thoughts out, making them more tangible. I think that way the whole testing workflow does not necessarily take up more time, when you look at it that way.

Defining steps (using Capybara) was a nice exercise in Ruby programming, which I am really enjoying. Python, which I mostly use, is very nice as well though, so I’m not getting rid of that anytime soon. Ruby software does read nicely though. If only the syntax was indentation based…

A problem I ran into is what should I be testing with what tool. As I am just getting started, I guess that is something you learn while doing. But trying to find an article or guids with some best practices was not easy. I ended up checking out some very helpful examples on Github, with extensive tests (models, controllers and views), and replicated that, only to later run into the claim that testing views is a bad idea. This makes sense to me, but it would be nice to run into something like this sooner. I would like to write something like this later, when I have some more experience.

Right now I am just trying to find the balance between testing and coding, probably going too heavy on the testing, but that is a good learning experience. That is why I started the exercise, so I am happy. So far BDD gets a thumbs up from me.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

That whole PIPA/SOPA thing kind of sucks man

You Americans are managing to get it all wrong again*. Read more here:

* Just recently us Dutchies have been hard at work getting it wrong as well. I guess you should set a good example for us.

Posted in Uncategorized | Tagged , , , | Leave a comment

Pollution

Oxford Paper Company Mill at Rumford. in the Foreground Is A Pile of Bark ... 06/1973

I recently came across this set of photos taken during the 1970s. They document the pollution that was going on at the time. They do not paint a pretty picture, and if anything should inspire us to make sure this is prevented as much as possible.

The NY Times has some more background.

Posted in Uncategorized | Tagged , , , | Leave a comment

2012 US elections I

So it begins. The greatest mud slinging contest in the world. The US elections. I will surely be watching it all with excitement, like the soap opera that it really is. Of course the outcome will affect me to a lesser degree than the voters, but without any influence I will just gleefully watch the whole thing happen.

What saddens me though is that already there are accusations of miscounting. Corruption? Or just incompetence? Both are bad, but it brings back the memories of Florida back in 2000.

Now I’m sure Obama will win. You can make fun of me if he doesn’t. I just don’t see any of the candidates (especially Romney, since he will win the Republican nomination) go head to head with a skilled speaker as Obama. And while my enthusiasm for him has diminished somewhat, he still is the lesser of the evils. It’s just sad that that is the best you can hope for from the most important country.

Posted in Uncategorized | Tagged , , , | 2 Comments