Archive

Hello! Today in this blog you can read my interview to Gianfranco Alongi. Gianfranco is a Senior Software Developer at Ericsson with a strong passion for Erlang, Extreme Programming and Agile Methodologies. I am sure you will enjoy his answers 😀

Erlang, TDD, XP, agile….what else?

Paolo – Hi Gianfranco! It’s a pleasure to have you here today. Can you please introduce yourself to our readers?

Gianfranco – Hi, and thank you! I’m honored to be interesting enough to be mentioned in this blog!My name is obviously Gianfranco, but my full name is Gianfranco Franco Alongi, the middle name is a relic from the laws regulating concatenation of first names.I have always felt a deep satisfaction in programming and problem solving involving abstraction through rule sets. I get a feeling of emotional purification when crystalizing a concept, or even a crude feeling of something into a formalization that can be analyzed, executed and mechanized. I can only imagine this is what Vulcan[1] ‘enlightenment’ feels like, when you see a clear path through reality, a sense of very vivid focus and understanding.

I am a Senior Software Developer at Ericsson, doing Erlang and other things, such as lecturing about good Design, Clean Code, TDD and Software Craftsmanship. I get paid to do Erlang, but my cognitive breath mint equivalent is APL, Haskell or CLISP. I have lately got totally hooked on APL, and will travel to Florida the 19th to hold a workshop on TDD and present a Testing Library[2] I developed for the APL community.

To me, programming is a hobby, and I get paid to do this hobby during the day, but do my hobby without pay during the rest of the day (don’t tell my managers: but I would probably do the same thing even if I was not paid ; ))

My mind is to intellectual challenges what a husky is to physical exercise, I need it every day, and a lot of it. If I go without it for too long, I get restless and depressed.

Paolo – Would you like to tell us something more about your personal experience with programming and especially with Erlang? How did you start using it?

Gianfranco – Ah, yes. I got into contact with programming through my father. He worked as an IBM mainframe developer for many years, and we always had lots of books and stuff at home. He had a whole shelf with RPG, Assembly and instruction sets for different architectures. However, none of this was interesting to me. I got going with Quick Basic in 7th grade (I must have been 12 at the time), and wrote some useless stuff like text adventures.

From there, it moved on quite steadily, and in high school (Gymnasiet in swedish) – I had a math teacher who handed me a (gasp!) Pirated Copy of a Redhat enterprise edition. This is where I got serious with C++ for a while. I was now 15 and got a lot of help by this man. I knew that this was what I wanted to do! This felt so right. The programming.

When I later moved to Gothenburg, and studied at Chalmers, I met John Hughes, a very influential man with a keen sense for Functional Programming.During this time I did a lot of Haskell, it was the main weapon of choice, but in one of John’s courses, we just happened to glance at Erlang and this was enough to catch my interest. I got hooked. And since that day, I’ve been doing it. For some reason, I have never felt that C, C++, Java, or C# has the right ‘feel’.My cognitive mind has chemistry issues when it comes to those languages, but Haskell, Erlang, CLISP and now APL has been like hanging out with a really good friend. It’s a silent understanding between two friends. It is beautiful.

Leaving Chalmers, I was contacted by Ulf Wiger, and I started working for Erlang Solutions.

Paolo – You had the opportunity of being an Erlang developer in two of the biggest Erlang companies out there: Ericsson and ESL. Can you tell us something more about these two experiences?

Gianfranco – Erlang Solutions is a company with a lot of young talents and a lot of opportunities. You can be sent to Mexico, work with people in the USA, and basically see and do anything, as long as you are willing and able. This was a fun and interesting time, moving to London, leaving Sweden and meeting a lot of new friends. As ESL is mainly a contractor company, you get to work on a lot of different projects, this suited me well, and I loved the high pace. It is an environment where the fast movers and strong fighters can grow quickly, accumulating a strong CV with various technologies.

Ericsson is different from this. It is a corporation, thus, by default, the pace is lower. Much lower. Ericsson does not attract the passionate developers as well as smaller companies like ESL, and there can be a lot of bureaucracy which prevents the fast movements I was used to. However, Ericsson, being a large corporation, has the money to support and lift the passionate developers on its strong shoulders, and it can be a very different experience based on different managers. All my managers have been great, and value skill and craftsmanship, giving me the opportunity to act with a lot of freedom – and the accompanying responsibility to go with that freedom.

At the end of the day, it is us, the developers who form the culture we live in, the wrong people can make gold turn to lead even in the best places. If we are willing to change ourselves, we can do anything.

Paolo – In your current position at Ericsson you are also teaching Extreme Programming values and principles. Even though I know Ericsson has a solid story on agile methodologies I have to ask: is it difficult sometimes to advocate agile principles in such a big company?

Gianfranco – Yes.

Like most large corporations, the ‘Agile Transformation’ is first hand an adoption of ceremonies and not really about the governing values and principles. What should be a common understanding and discussion on values and goals, becomes quickly an act of doing the right things, instead of reflecting on why we do things, and how we do them. My belief is that part to blame for this, is that Agile is being pushed down from the top, and not being something perceived necessary from the largest part of the organization.

I have yet to meet a developer who is positive about Agile. Few have even heard the term Agile Software Development, and even fewer know about XP. We have a large legacy of Telecom experts, and a dwindling few who are Software Developer Experts. As a result of this, few care how things are done, the majority cares for doing things. And, as you know – the price is paid in sweat, bugs, and blood.

The only way to go fast – is to go clean.

Paolo – In the company where I work, Kent Beck’s book on XP is a must-read book. Beck states that XP helps developers to deliver better software. What do you think about this sentence?

Gianfranco – I agree.

My only remark is that we must never get stuck in one particular school of thought and shall always explore, educate ourselves and invest in our own career as Software Craftsmen. It is not only a matter of professionalism, but also a matter of survival. By learning new practices and principles from others, if I can reduce my own cognitive load by using a certain technique[3], and therefore spend more time optimizing for maintainability, it is definitely worth the time and effort to learn.

We all leave a legacy behind us, daily. If I take an extra hour refactoring my code, after passing all the tests and removingduplication, it may seem like a large cost, but I know that in my unit, with ~200 developers, if I can reduce the time they spendreading to comprehend it, there is an economy of scale that makes a good case to optimize for maintainability.

To me, XP is a lot about being a good developer with great practices[4], delivering value and being a pleasant man to work with.The ‘team’ is very important to me, and I believe the best place to work at, is a place where you feel that you go to work with friends, the kind of people you feel would have your back in a Zombie Apocalypse.

Paolo – Another great book by Beck is Test Driven Development By Example. When I read it I really appreciated the part about eliminating the fear using tests. I know you also appreciate this approach, so how would you encourage a developer to start adopting TDD?

Gianfranco – My best tip to learn anything, is to do it during dedicated practice time. Children are fearless learners, they just do, and fail, and do, and fail. Eventually the feedback mechanisms allow us to tune ourselves, and we start succeeding more than failing.

With dedicated practice time, there is absolutely no pressure to succeed, and so, we loose the fear. Fear is the mind killer that puts the mind into an accelerated mode of anger and self pity, instead of the relaxed state necessary to tune properly on the feedback.

Therefore: – Do a Code Dojo together with team mates – or just book a 2 hour slot alone, at home.

Start by reading about TDD, and then choose a small practice problem, maybe a Kata[5][6] or any other problem you can think of.The main point is that it is not the problem in itself that is important, it is the practice.

It does not matter that you do not finish anything, is it the journey, and the act of noticing what you notice, that is the important bit.

Once you feel that you have a grip on TDD, then you can apply it on production code.Because if you have to get stuck, if you have to fail, do it in a safe place, don’t do it during work time.

Paolo – I appreciated very much your blog posts about TDD and Erlang. What are in your opinion the best tools an Erlang developer can use for testing his code? EUnit? Common Tests? Something else?

Gianfranco – I do not have a favorite, to me they are tools which apply well for their respective tasks. The only thing I am very careful about, is the feedback time the tool gives me.

I always use EUnit for Unit Testing.

Then I can use Common Test for Function Testing, but if the specific test case would take 20 minutes to get into place properly with CT, and I can do the same thing in 2 minutes using a bash script with netcat, then I go for the speed choice.

In my unit, we have a different tool which is based on top of CT, but with it’s own syntax. Mostly I try to avoid it, and the straw that broke the camels back, was when I could test a certain use-case by manual configuration and some bash’ing, in just under 10 minutes, and we had tried achieving the same thing using this tool, for 3 days.

Paolo – What do you think about continuous integration and continuous development? Do you recommend any specific framework or service for Erlang code?

Gianfranco – I think they are necessary practices that give a lot of value and make life easier. By exposing complexity early, and dealing with stress up front, we remove the pressure of doing integration and delivery later in the project.

No recommendation, sorry.

It is the doing of the work that exposes what needs to be done.

Paolo – Last question: emacs, vim or what else? 😀

Gianfranco – Emacs, and vim when there is no emacs. I use this together with Tmux, and the no-mouse environment I use, enables a very high bandwith between my brain and the computer.