Archive for erlang

Code Review 4: Bowling Kata, Erlang edition

Posted in erlang with tags , , , , , on August 25, 2010 by moffdub

Yeah, yeah, I bet you thought that I had slipped into my familiar “I don’t have enough time for this” mumbo bugspit of the hiatus. “Oh, it’s been three weeks since the last time he posted any code, he must’ve stopped.”

False.

Simply put, I had to weather our organization’s usual two-pronged quarterly software release, which involved a fifteen-hour day and two 3 A.M. wake-up calls. On with the code.

I’m not sure where to start. I was going to try to order this code review by the changes I made, but there have been so many, so I’ll just do this by module.

Read more »

Code Review 3: Bowling Kata, Erlang edition

Posted in erlang with tags , , , , , on August 4, 2010 by moffdub

It has been nearly a fortnight since we last reviewed my spare-time attempt at learning Erlang and functional programming in general. Let us take a look, shall we?

Actually, I am going to follow up on my search for an Erlang IDE. At last check, I was in love with Erlide, a plug-in for Eclipse. It seemed to be working all nice and good… up until I started to resume development. Erlide is not stable. It seems that if you do anything that invokes any sort of syntax re-highlighting, even to the point of pressing the return key to open up some space in the middle of your module, Erlide will freeze up. I never did get it to work.

So, I moved on to a different Java-based IDE called Netbeans, and its Erlang plug-in, called Erlybird. This was an even larger fail than Erlide because I couldn’t install the damn thing. Netbeans was very proficient at telling me that Erlybird had a dependency on the Common Scripting Language plug-in. Go ahead and try to find a download for that plug-in. I dare you. There is a reason why I am not linking anything, because I spent at least two hours looking. Fail.

Read more »

Code Review 2: Bowling Kata, Erlang edition

Posted in erlang with tags , , , , , on July 21, 2010 by moffdub

Well, despite my pleas to Miss Reina to have her use my face for her personal enjoyment, I am here reporting on my progress on learning Erlang and practicing my programming prowess by implementing the Bowling Game kata.

I left the first code review pondering which route to take in order to score the games. My main goal was to attack this logic.

Doing so involved an update to the frame’s data structure:

-record(frame, {
	first_roll = 0,
	second_roll = 0,
	value = 0,
	score_has_been_updated_due_to_spare = false
}).

Read more »

Follow

Get every new post delivered to your Inbox.