Programming Joke

A wife asks her husband, a programmer, “Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?”

A short time later the husband comes back with 6 cartons of milk and his wife asks, “Why did you buy 6 cartons of milk?”

He replies, “They had eggs.”

I find this to be the most unfunny programming joke in the dozens of programming jokes I’ve heard since I started programming. It’s even worse than the “Why is Halloween the same as Christmas?” joke – at least that one’s a cute coincidence for number systems.

At first glance, it looks like a straightforward joke: a direct translation of the statement make the husband buy six cartons of milk:

milk_to_be_bought = 1
if they_have_eggs
  milk_to_be_bought = 6
end
buy_cartons_of_milk(milk_to_be_bought)

But that’s not even a direct translation! A direct translation would be:

buy_one_carton_of_milk
if they_have_eggs
  buy_six_cartons_of_milk
end

This results in the husband buying 7 cartons of milk!

But no, the conversion from command to program is still incorrect. Here’s a much more direct translation:

buy_one_carton_of_milk
if they_have_eggs
  get_six
end

get_six what?

That’s the thing: no self respecting programmer would do what the husband did in the joke. A joke computer scientist would not do anything until the linguistic ambiguity is resolved, while a joke software engineer would also refuse to do anything until the unclear requirements are clarified, documented, and signed off.

Now if the joke went like “A wife asks her husband, who just started Codecademy last night…“, it would probably work.

Project Araro – Bigas Hackathon

In a C-Cup meeting the week before the IRRI/Smart Bigas Hackathon, MRTtrackr‘s Michie suggested I do a Farmville type game for the event. I originally didn’t want to do it, instead favoring more relevant apps for IRRI. However, two things convinced me to go with making a game:

  • If I was to participate, I needed to have a team. The only teammate I could get was Alvin who was there mainly as an observer. For those who don’t know Alvin Chan, he’s a game designer.
  • IRRI actually needs a game: their educational rice growing simulation was written in True Basic and badly needed a port/update.

Long story short, we made a game and we won the game category.

You can play the game now at araro.karaniwan.org. The source code is also available on Github.

Here’s a video of our “winning presentation”:

If you want to learn more about how we did the app, attend the Pre-Hackathon meetup for the 4SQHackPH. I’ll be there to talk about hackathon stuff.

September Meetup Videos and RailsFTW 0.11

Just a couple of quick Ruby related updates.

Last Thursday we held our September meetup at the Friendster office in Ayala. Here are the videos of the event:

More pictures are posted at the Facebook group.

Rails FTW

In other news, I got around to updating RailsFTW to Rails 3.2.8, putting the installer ahead of RailsInstaller by a bunch of mini-releases. (LOL)

Updated installer can be found on the RailsFTW site.

Baguhan Biyernes: Pag Natanggap sa Trabaho

Congratulations, natanggap ka na sa una mong trabaho! Pwede ka nang mamahinga at makakuha ng limpak-limpak na salapi mula sa iyong pinagtatrabahuhan!

Sa kasawiangpalad, hindi nagtatapos ang kwento mo sa pagtapos ng kolehiyo at pagkakuha ng trabaho. Marami ka pang kailangang gawin (at bigas na kakainin) bago ka maging isang ganap na software developer.

Continue reading “Baguhan Biyernes: Pag Natanggap sa Trabaho”

Producers and Consumers

Last week, a tweet from @webgeekph got me thinking about the current state of local “tach” scene:

Please don't send us press releases that talks about Telcos, Mobile Phones & Gadgets. We're a bit different to other tech blogs :D

Looking at the top local technology blogs, you’ll see that almost all of them are geared towards Consumers i.e. they do previews and reviews of products, press releases, and events that showcase products. This is not unexpected, when you write about things that people want to buy, your visitor count will be pretty high.

Unfortunately, we are not a nation of rich people. Focusing too much on consuming other countries’ products will not help us in the long run.

That said, we need to focus more on the Producers: the developers, designers, and business people. We need more coding and design-related blogs. We need sites and events that showcase the works of local talents. We need more groups like DevCon and WebGeek that promote and empower local developers. We need more events like Startup Weekend and Hack2Hatch to kickstart establishing a more dynamic local tech industry.

I’m just as excited as you when it comes to the latest games and gadgets, but until we shift some focus from Consumers to Producers, that mentality will only lead our country to lag further behind our neighbors.