C# => Ruby Culture Shock #1: ‘Private’ Methods Ain’t So Private

This is the first in what I hope to be a series of little posts about the little flashes of ‘culture shock’ that I experience as I start to move from C# to Ruby as my day-to-day programming language.

Here we’re going to look at the subtle yet significant difference in how method access modifiers work in Ruby and C#.

Continue reading “C# => Ruby Culture Shock #1: ‘Private’ Methods Ain’t So Private”

DataMapper: A Better ORM for Ruby

One of the things that’s always irritated my about rails’ ActiveRecord framework is the way that the domain model lives in the database.Don’t get me wrong: it’s very clever, and a great showcase for ruby’s metaprogramming features, which will blow average C# / Java mind the mind when they first see it.

In rails, you build a database of your domain model, and create empty classes with the names of the domain entities (conventionally the singular of a database table name) which inherit from ActiveRecord. ActiveRecord then looks at your database, and using the magic of metaprogramming, hydrates your object with a bunch of properties that map to the database fields.

But I prefer to write my models in the code, and if you do too, you might want to take a look at DataMapper.

Hire Me

I bring you good news and bad news, dear reader.

The bad news is that it looks as if my present client may be running out of interesting work for me to do, for the time being, which is a real shame as I’m greatly enjoying working there.

The good news though is that this means I’m now available for hire again! If you need an experienced, charismatic programmer, technical architect or coach to join or lead a team of programmers, and you’re serious about that team producing high-quality code that delivers maximum value to its users and enjoying it as they do so, then I think it’s time we had a little chat.

Read more here: http://mattwynne.net/work/cv/programmer/

Fetch and Parse HTML Web Page Content From Bash. Wow.

Okay, this is another one of those linux newbie posts where I tried to figure out how to do something that’s probably really obvious to all you seasoned hackers out there.

Anyway here I go clogging up the internet with a post that somebody, somewhere will hopefully find useful.

Are you that person? Well… have you ever used the shell command curl to fetch a web page? It’s cool, isn’t it, but you do end up with a splurge of ugly HTML tags in your terminal shell:

Eugh!

So… how about we parse that HTML into something human-readable?

Continue reading “Fetch and Parse HTML Web Page Content From Bash. Wow.”

Browser History That Doesn’t Suck?

I just came across this post from Kevin Lim about a cool new tool for the (Apple-based) Safari browser called SafariStand.

A bit like HistoryHound, this plug-in allows you to quickly search your browser history, review it as thumbnails, and has a killer, iTunes-style cover-flow view of your history called History Flow:

Like Kevin, I’m still not satisfied with this, and would like to see something more like TrailBlazer, that allows me to visualise my browsing history as paths and branches.

Ideally I’d also like this data to be shared so I can socialise with other people who hang out on the same bits of the internet as I do.

Maybe it’s time to dig out that firefox extension tutorial again..?

WatiN Goes Cross-Browser

The WatiN (Web Application Testing In .Net) framework, a port of the popular watir framework in ruby, has recently announced support for Firefox. This should make it a compelling alternative to selenium, especially as it looks to be a good deal quicker.

Sweet. Now if only I had a way to serve up an ASP.NET web application from code. Could this be what I need?

Automating Javascript Unit Tests / Specs – Part 1

I’m building an Adobe Air application at the moment, which basically means loads of javascript development.

We’re building it pure test-first, and have kicked off using jsUnit to get us started with something simple, flipping to the browser when we make a change and hitting the ‘run’ button in the jsTest testrunner HTML page.

I’m starting to find this quite unsatisfactory, however.

Continue reading “Automating Javascript Unit Tests / Specs – Part 1”