Tag Archives: erlang

Requirements, a true story.

4 Aug

Dont sweep documentation under the mat (by londonmatt@flickr)

Don't sweep documentation under the mat (by londonmatt@flickr)

During my summer internship at Erlang Training and Consulting Ltd I’m co-developing a tool for tracing, debugging and checking correctness of large distributed system. The tool, which hasn’t got a name yet, is built on another application part of the Erlang/OTP called Inviso. The task itself is part of a large research project called ProTest where several parties are involved (one of them is the IT-university).

However, something struck me today. The lack of formal documentation, especially that of requirements. What is it that is expected of the tool? And in turn from me? As it turns out, I spent most of yesterday (read: Monday) contemplating, tweaking, experimenting, crushing many many ideas. It felt as I were getting nowhere. I certainly didn’t if we’re counting lines of code produced (except for some ridiculously simple QuickCheck tests and some cleaning of previous work). Yesterday wasn’t really the first day with a similar feeling, the “where is this supposed to be heading” question has been with me almost from start. Would it have helped with some formal documentation? Most certainly!

Although I don’t necessarily suggest that formal documentation means long boring documents covering endless of pages, but having externalised the goals certainly improves to someone else’s ability to contribute efficiently to a project. Documenting your work may be stealing your time, but in the long run, it allows you to excel past your first goals.

In my opinion, documenting:

  • helps you think through your work
  • enables other to contribute
  • allows everyone to stay focused on the task at hand
  • and acts as a back-up, a knowledge base

But there’s a balance to everything. Someone said it before me: software development is hard, but jolly good fun!

The no-name tool is to be demonstrated at a meeting in October, more than a month after my internship here finishes. But before that much more has to be done and days are flying fast!

Finally, to the students, don’t fall asleep when the teachers are talking about documentation, please.

* Coincidentally I also found this article through Hacker News today about why software engineers doesn’t document.

** The image is a photo of a grafitti work by an artist’s calling himself Bansky, no one knows who he is, but his work is cool!

Ready, set and go!

19 Jul

The Gun Pub by Surprise Truck@flickr

The Gun Pub by Surprise Truck@flickr

Ready!

My hungarian room mate is usually eating breakfast after me. For some reason I’m always first to use the shower, which of course is the fastest way to get me from Ready to Go! Cereals, there’s raisin in there too, some dried fruit mix I suppose. Downs a glass of orange juice and forget it on the living room table. We don’t have a kitchen table, or any other proper place to eat. Not that it matters, it’s morning after all.

Atilla, yes it is spelled with one t and double l*, fumbles with the last few things before we leave. I’m of the impression he isn’t used to my Swedish efficiency which my Indian friend always speaks wholeheartedly about. Morning routine: get a shower, possibly eat something, and have coffee. The latter, here, always has to wait until reaching office.

Eventually we head out and I think to myself that if someone would observe us, they’d think we’re two really confused young men who hasn’t settled in yet. The thought drifts away.

Set!

As we exit the yard on to Goulston Street we’re faced with a storm of odours. The Chinese and Thai wagons are usually getting ready for their first customers. Across the road the curry from the Indian wagon soon reaches us and then someone quickly obstructs our path. Somehow there’s a market on everyday except Saturday. There are boxes being unloaded today. Presumably boxes of clothes. The smell of food vanishes.

Down the road there’s some construction going on. Nido Student Housing it says on a sign. You stretch your neck as you’re quickly realising that it is the tallest building around. Alas, not finished. Rents are expensive as they are, how on earth is a student going to afford a room here? Atilla and I contemplates this every morning on our way to office. One day we’ll get our heads around it.

Around the corner, also the corner of the office’s afterwork pub called The Gun, there’s more people. Most of them are dressed in suits and everyone looks very business like as they carry their coffee or chatting on their smartphones. There’s an endless stream of people filling the street and my other daily morning thought to work strikes me: it seems as though this city revolves around work. “Good morning” we politely greet the guard in the entrance and then we’re set.

Go!

Whilst my computer is booting up I stroll over to the kettle, fills it with water and puts it on. Instant coffee in the morning isn’t usually a good idea, but I cannot be bothered, it is better than no coffee at all. SUSE boots quickly, a user name and password later and then goes the standard apps: Firefox, a bunch of terminals, Emacs, Pidgin and Skype.

Despite always having the feeling of coming late to work, around nine, we’re among the first people there. Frank and Joanna, sometimes Sean, are often there though. The office is located not far from Liverpool Street. It is a large shared office space but has a kind of nice feeling to it. Definitely not like the IBM cubicles I’ve seen in Dublin or in their South Bank London office. Not at all like that, no ours is less corporate. In fact, Erlang Training and Consulting has a great office, and for a student like me, taking an internship for the next two months, it couldn’t be better.

I’m ready, set and I go!

* For those of you who don’t know most Hungarians spell it Attila.

Last day of Erlang Factory

30 Jun

Erlangers outside Old Session House

Erlangers outside Old Session House

Even though every newspaper in every stand featured Michael Jackson’s death on the frontpages Magnus and I were more excited than ever. The second day of Erlang Factory were two hosts a new round of many exciting talks and it all began with the two keynotes: one by Simon Peyton-Jones and another by Kenneth Lundin.

Haskell and Erlang: Growing up together
For those of you who don’t know, Simon Peyton-Jones is one of the fathers of Haskell. He quoted his daugther saying “I know I’m not your first child. It’s ok.” Simon, an awesome rhetoric, filled the main hall of Erlang Factory with ease. His talk demonstrated Haskell’s and Erlang’s interdependent relationship since their inception which also happened to occur at roughly the same time. Haskell came from a university world, Erlang on the contrary originated from industry (read: Ericsson) and Simon pointed out some of the challenges that Haskell faced due to this. Of course Erlang faced other challenges. Challenges which offers many laughs today!

Erlang/OTP and Multicore Performance in Particular
Kenneth’s talk, compared to Simon’s, focused on the fine details of the inner core of Erlang; the virtual machine. For me, most of the things we’re hard to put in relation to anything else. Surely, most of the terms were familiar, but to really understand their work (which I’ve been told by a trustworthy source is awesome) I guess you either a) need more Erlang experience or b) have attended previous talks by Kenneth so that you can put the improvements he addressed in perspective. The one thought that struck me after this talk is Usain Bolt’s quote “Hard work and dedication.” That’s what the OTP team is for you, and the Erlang community!

Afterwards three new tracks kicked off, I attended the following two presentations and they “did it right”, i.e the presentation in itself.

Campfire loves Erlang
Mark Imbracio changed the polling service in Campfire, essentially what is underneath the Ruby front-end of 37signals messaging service, to use Erlang instead of C. By investing time in benchmarking Mark could show the impact of reducing the code base, adding extensibility, improving maintainability (1 OS process in Erlang compared to 240 C processes) and still being equally responsive! The talk contained a practical almost tangible discussion on where Erlang really shines.

An introduction to F#
Though not being an Erlang talk, Don Syme, managed to impress even Joe Armstrong with some of the stuff that they’ve built into F#. That would be the unit measurements in case you wonder. What Don did right was demonstrating the language in its relation to .net. Basically, a .dll of a F# program is usable by any other .net application. Through visual comparisons he efficiently high-lighted the large differences between C# and F#, and although the talk seemed to persuade C# programmers to use F#, he did a great job meeting the Erlangers.

Editor’s note: this post was written at Heathrow terminal 5 waiting for the plane sometime during the night between Saturday and Sunday.

Wrapping Up Erlang Factory Day 1

26 Jun

It’s been an intense day. There were so much interesting talks that summarizing them would be s feat. There were those that were in a fairly familiar domain but were so dense that one could not possibly digest the content and come up with a question in time for QA.

Other talks opened your eyes for what is a “practical” application of Erlang, cross platform support for MIDI or a blog editor with support for English quotation marks, anyone?

Here are our thoughts on the two most intriguing talks that Magnus and I covered during the day.

RabbitMQ

How do you implement a high performance message broker/middleware? And how do you save/dump messages to disk as efficiently as possible? RabbitMQ is what we(?) who has to work with tightly coupled psuedo-queue designs dream of. It is open source and based upon an open standard, AMQP, and there is at least one alternative implementation available. Freedom, within limits.

Tidier

I have many times been coming back to old code of mine and realised, like a lightning strike, that “OMG DID I WRITE THIS?!” Any programmer who has some kind of distance to him or herself will admit to this. Kostis Sagonas takes self-insight to the next level by extensive analysis of Erlang programs and by formalising so-called best practices the Tidier tool reshape your code to look awesome. In turn, you as a programmer have to kneel to your previous mistakes.  At least you wont make them again, or will you? Afterall, isn’t better to do it “right” from the start? Impossible.

The day ended with an Erlounge in the Crypt with lightning talks, snacks, beer and great possibilities for networking! Due to the Erlang community’s openness and still rather limited reach the Erlounge provided an arena in which two excited students got to meet the core people behind the language.

Looking forward to another day (unfortunately without Michael Jackson)!

Day 1: Keynotes at Erlang Factory

25 Jun

Hans Svensson at Erlang Factory

Hans Svensson at Erlang Factory

First day at Erlang Factory with two interesting keynotes, two talks and a lunch has already passed. Time flies! Here’s a recap of the two keynotes.

Keynote 1: Joe Armstrong

Instead of talking about the greatness of Erlang, Joe gave an enlightening and engaging talk about what is wrong in Erlang. As Joe is one of the creators behind the language, it was obvious that he has thought quite a lot about this, and has a lot of ideas. To quote @jonromero “Insanity leads to innovation” – I can only agree! Erlang has an interesting journey ahead and with the attraction it is getting, who knows where it will end? Not Joe at least. :)

Keynote 2: Bjarne Däcker

In contrast to Joe’s talk, Bjarne (if I understand correctly was Joe’s boss at Ericsson) talked about the history leading up to and around the Erlang development. The CSLab at Ericsson had the task to research software technologies that could enhance the telecom products that the company was developing. Thus, it seems to me that the team were doing a lot of fun research “playing with cool technologies” to see how it could be applied in reality. In the end, as you might know, the ended up designing their own language. Bjarne talked a lot about the sources of inspiration for Erlang, such as Ada, Lisp, Chilli, Prolog, C-wire and some other obscure names I have never heard of before. The mix is what constitutes the Erlang! Easy huh?

More to come later!

Ready for Erlang Factory

25 Jun

Erlang Factory

Erlang Factory

Magnus, a classmate of mine, and me just arrived safely to the YHA* youth hostel in London. It is situated close to Great Portland Street, which we in turn hope is not that far from the Old Sessions House. What’s taking place there you wonder? Erlang Factory!

If you haven’t heard about Erlang before, I don’t blame you. It is one of those programming languages that has just recently begin to gain some real traction. Instead of me rambling about it here, head over to Wikipedia and read about it. In short, Erlang is a “really cool” (editors note) functional programming language suited for fault-tolerant and distributed systems.**

In term 3 of the SEM programme the language is taught to students in a five day highly intensive course by Mr. F***. It starts out with the basics, and then slowly introduces the three big hurdles of the language: recursion, pattern matching, concurrency (message passing). It’s a tremendous educational, fun and exciting journey if you are only used to object oriented programming languages such as Java, Python, C# or anything similar. C programmers wont recognize a lot either. Which all makes it very interesting!

Over the two day conference, Magnus and I will try to report our thoughts regularly on the speakers and their concerns. For a full list of speakers check this page.

For more information about Erlang and Erlang Factory check out the following sites:

- http://erlang.org
- http://trapexit.org
- http://erlang-factory.com

Follow mljungblad at twitter (http://twitter.com/mljungblad/) and also check out searches on “Erlang Factory” and #erlangfactory.

* The have free Wifi and what seems to be an awesome young atmosphere, already liking it.

** If that went over your head too, then at least remember the excitement. ;)

*** Mr Francesco Cesarini is the founder of Erlang Consulting Ltd