Monday, 27 August 2012

Morning meeting - is it the evil?

Agile methodologies says that the team should have a regular daily meeting, where the team members can exchange information. The rules are very simple: everybody must talk, and have to touch tree topics - what did I accomplish yesterday, what is the plan for today, do I have any obstacle on my way.

We should have the morning meeting sharp 9:00 every morning. We involve remotely working colleagues as well. My boss used to initiate the call sharply and that was a sign to the local guys the meeting starts. As far as I see, he stopped this activity couple of days before, and now observing the team. Since he doesn't initiate the meeting, it never starts at 9:00. The developers are chatting, eating and around 9:02 they realize something is missing. They start to come together to the meeting place. Today that small conversation happened between a lead developer and the boss.

LD: Do we do the meeting today?
B: Why shouldn't we?
LD: I thought since you don't come we don't do it.
B: I think it is your business to have the meeting on time, since you are interested in information sharing.

I don't understand them. At 8:59 I'm prepared and excited to tell the team what's with me. I'm proud of my achievements form yesterday and dare commit on task to perform today. Furthermore I like to share my doubts and questions with the team.

The problem is twofold. People usually think that it is a reporting meeting - but it definitely shouldn't be. You don't report to a particular person - you talk to the team. Reporting meetings always have a negative feeling. The second problem is that we can't make visible progress on most of the items we develop due to the nature of the project - and hard to commit to things for the same reason. That's why the developers think the meeting is the evil.

I'd like to attend good stand-up meetings, what shall I do? How can I explain to them the how can we make it different? Don't know yet...

The Fish

Friday, 24 August 2012

Know the target environment of your application

As a software developer, I believe my job is not only to write source code. I like to know what is around my application, how it will be operated, etc.

There is a fragment of a discussion flew above the table today. Participants are a lead developer (LD), developers from another team (D), and the boss (B):

LD: Guys, on which version of JBoss do you run BlazeDS service?

D: On JBoss 4.2.3GA
...
B: Are you sure guys? I'm sure you don't use that version. Actually you run BlazeDS using the downloadable turnkey distribution, what is a Tomcat packed together with BlazeDS and samples...

D, LD: [fried fish]

D: uh, you are right...

Imagine a situation, that a scuba diver uses not suitable gas mixture for diving. The chance of injury or death is high in that case due to decompression sickness or oxygen toxicity. If you deploy your application to a non-suitable environment it will lead to its injury or death - and that happens, when the developers has no clue about the target environment.

The Fish

Wednesday, 15 August 2012

Ticketing and Neverending Meetings

Have you ever participated in a conversation with a manager/stakeholder, who really liked to hear his voice and could talk forever? Did you check your colleague's face during the meeting? Were they bored?

The manager thinks he (or she) is the hero of the day because he knows the customer. The customer told the manager all their requests which the manager surely understand (evil smiley). From the managers point of view it is compulsory to involve the developers into any kind of meetings which are even slightly related to the development of the product because they were told in MBA that the more they share information with developers the better for the product (=> for the manager).

The developer on the other hand is usually looking for something to work on. Depending on how much of a geek somebody is there levels to which a developer is interested in the projects management. Obviously there are some information that you simply have to have in order to actively develop an application. I believe maximum 10 % of all the tasks related to a project can be worked on without having a hint on what the project is all about. Security issues, connectivity issues etc. But do we really need to have developers spending half of the day banging their heads to the desk (while skype is muted...)???

So how is this connected to ticketing? Ever since I started out as software engineer I can say roughly 75 % of all the meetings i participated in were a complete waste of time. Please note I don't count tipical daily standups here.

Why? Developers are generally smart people. They like to start on something on their own and ask when they are lost. They are also very pragrammatic. Get the ticket, read the spec, ask for details which are not clear, implement, return for testing. Done.

My biggest problems with neverending conference calls and meetings is that very often there is no takeaway (maybe a coffee). The things we said or heard are never transformed to paper (spec, ticket). So you have to start working on something out of what you remember. That was one of the things (i don't say there were many) I hated in my previous job.

It is acceptable if the specification changes to some extent. But it is highly unacceptable to try to account a developer for something that was (maybe) mentioned in a meeting. I believe it is everybody's best interest to spend that few minutes to write down what has to be done.

As always we at IT Blame are very curious to see what you think about the subject so please leave a comment. 

How do you cope with spread by the word tasks?

Happy coding!

Generalization at all cost?

I'm participating in a long chat - yes that is usual to use chats to discuss long-long, sometimes useless things (let me rephrase: rarely useful things).

The topic is a new module - what requires advanced data storage approach due to amount of data to be stored. The head of operation decided to use a partitioned approach.

The developer in charge doesn't like this, since it makes his life difficult. They are using Liquibase - a database migration framework, and it doesn't support this on an elegant way. It uses an XML based DSL to describe database changes, and with this offers a database implementation independent solution. The second changeset the developers have to implement breaks this dream - because cannot be described with the DSL, and native SQL queries must be written. I understand that breaking a dream hurts - but that's life.

In my opinion, it is a fairy tale that a software can be database implementation independent. Well, if you use 3 tables, only for CRUD operations, it can be true - but seldom to have such database structure in enterprise environment. I've never seen it to happen - and I don't believe in it. I don't believe in Liquibase DSL approach too - it is a not necessary abstraction layer. I like Flyway. There is another fake promise from Liquibase what I don't like: you can do painless database downgrades. Flyway guys thinks differently - worth to read this. There is no free lunch.

The discussion in the chat is now like a flame war. The developer tries to get numbers from operation to proof their truth: the partitioned schema is performing better. That is not necessary - they took the responsibility to define the data storage method. That's it. The developer's task is to implement that.

Too much democracy hurts.




Use a tool or write some code

I was in the kitchen, preparing some coffee - fish needs it to swim...

Joined an ongoing discussion some performance related topic as a listener. The boss and two senior developers were talking.

DevA: We should examine what happens if we put a certain load to that component.

Boss: Great, can you separate it from the system, start it and feed it with certain amount of objects? How does it communicate with the rest of the system? I suppose via a JMS. So you can put objects into a queue with a certain frequency to simulate the load.

DevB: We have a demo component, what can be used as a feeder. And we should create a dummy implementation of a component to relay those objects.

Boss: Jmeter is the tool to accomplish those kind of tasks. It speaks JMS, and knows so many other things...

DevA, DevB: [fried fish]

DevA: I don't know Jmeter, it is not necessary, since we can write code ourselves...

DevB: I don't know Jmeter either...

Boss: You should check it. It has a comprehensive documentation. And it is open source, and easy to extend.

DevA: I don't know how can generate testdata with it. We can write own code...

Boss: To accomplish this testing you must use Jmeter, because it is not only feeds the app, but can monitor several things... And it is a tool specialized to performance testing. Please use it...

At this point, the senior developers stared the boss - they might think that: "This is an idiot, use an unknown tool, when we could write code?"

In my opinion, software development is not only coding - but using the tools and practices provided by others. The approach "I write everything from scratch" is out-of-fashion since 80's...



Monday, 13 August 2012

Do you like to read others code?

Two of my teammates are struggling to get a framework working.

I caught the following discussion in the air, we are all sitting in a big "island":

Developer: oooh, it was pain in the neck to find how to use this maven plugin, we had to look into the source(!) to see how it works

(their task is to research, they don't have strict deadline)

Boss: fortunately you're developers who understand Java source code

Lead: this sucks...

I would be happy in such a situation, it's amazing to explore something new.

In my opinion, it is a big personal success, when you understand others code, and the framework in use - even you don't have any documentation...


Saturday, 11 August 2012

Seven sins of the programmer - Part 1: (code) documentation

In this post when i say documentation i refer to documentation that can be found in the source code. Still the things i examined are related to general system documentations (specially in case of agile methodologies).

Comments vs Documentation

Comments are generally added next to some logic the developer created to solve a specific technical issue, iterating over the posts that had the most views, or accumulating taxes, etc. Comments can occur multiple times in a methods body. And they can do a good job to help others understand how you solved a problem (hopefully not when they are debugging your code...).

Documentation in my interpretation are coming from a higher POV and can/should not necessarily discuss how the actual function is implemented. Than what should it discuss?

a.) The contract for the method

This is the rule which developers violate the most times. So what are we talking about here? Let's see how Andrew Hunt and Davis Thomas described this in their book (yes you can click the word book or this link).
A contract defines your rights and responsibilities, as well as those of the other party. In addition, there is an agreement concerning repercussions if either party fails to abide by the contract.
What are the rights? Your rights define what parameters you can pass to a method, whether they can be null, or simply have value or not, what return values can you expect from the specific function

What are the responsibilities? Your responsibilities define what parameters you should pass to a method and what type they must have. The contract should define what error messages you should expect (in Java these are the @throws declarations).

Why do we need this? Tipically developers have a look a methods signuture and they see what they should use as parameters and what results they should be expect. Anyway the methods name will tell you what it does! If life were that easy. Also many times i hear people saying: "I believe a good code is documenting it self". Okay fine. That can be true why not to do comments. But how could that be an excuse to write documenation (i.e. javadoc)? Good or bad code it is other people will not necessarily have your code at hand maybe only the interface of your module.

Let's see a bad and a good example here.

The bad example:


As you see i am trying to use a method called calculate because a developer told me it can be used to calculate what money i will have left after paying the taxes. So far so good. I have a variable which holds the amount and another one which is the VAT. As percentage because this is how i represented it. I see the calculate method gets the VAT as a second parameter. But in what format? 25% ? 0.25%? How should i know? It's easy! I can check the methods code. That's cool. If it's my code or some code which is close to the code i'm developing. But if it's another module it is less likely that i would like to check my self. I might not even be able to. As simple as that I like to look other people's code as an API. Not to mention if it is really an API coming from a 3rd party tool. And we all know that an API needs the following attributes:

  • the interface should not change
  • it should be easy to code against
But how do you code against a method which you don't even know how to use?

The good example:


In the scenario above you can see the evidences that my brain capacity is limited. I can't even remember how to use a StringTokanizer (okay i can rember, but i still like to double check). But i hardly need to. Since the creator of the StringTokanizer created in a proper API concept. I could check the source code to see how it works (generally it is good to see how the Java API works) but i don't need to. I read the documentation (javadoc) to see what i should pass in and what i should expect.

Bottomline: it is mandatory to create documentation for your methods so the users will be able to know how to use it. And this leads us to end up with proper method contracts.

b.) The contract for the class (module) 

Same applies to classes. In my previous job i was responsible for a group of developers. Generally i tried to follow where the code goes by browsing through the nightly build. Once i opened the error listing for a particular class. The name of the class told me nothing about what the class was actually doing (my intention was to see what business function could be broken). So i opened the class in Eclipse. Guess what? No javadoc of course but five thousand line of diverse functions. How can an earthling possibly find out what this class is doing? I had to ask a senior developer to summarize me what is the purpose of that module is. I was shocked to realize that it was clearly breaking the single responsibility principle. How could this happen?

Whenever you create a class or a module it worth to stop for a moment and have a think on the following items.
  • By selecting a proper name you inevitably making a decision on what the class supposed to do. By just another GeneralServiceManagerHelperFactory class you are just adding complications. What does a GeneralServiceManagerHelperFactory do?
  • By creating some short javadoc for the class you are making other developers life easy. Because they can see if this module is useful for them or not.
Every now and then we all fall into the trap of trying to add too many functionalities to a class. So that is something you want to avoid as much as possible. But that is not part of our topic. I found the two points above to help me subconsciously make a plan upfront. It will result in many smaller classes with limited responsibilities instead of having a bunch of monster classes.


Okay so that's all what i had in mind on contracts and documentation. This summary was trying to be practical. If you are interested to learn more on the principles i strongly suggest reading this book:


As always i'm very curious to see what you think about the subject so please leave a comment.

Happy coding!

Friday, 10 August 2012

The mythical GC

Today my boss stood up, and asked everyone:

Boss: Guys, I have an issue - at one of our clients there is a problem with garbage collection. All experts are on holidays, who can help me?

Everyone looked to the boss - including me - but since I'm not experienced in that topic I just watched what happens. Nobody answered. My boss is not a developer - but he understands many things well at some degree.The Fish

Boss: Do you know  what is garbage collection, right? I know that it is a scheduled process, which runs periodically, and get rid of unused objects.

Dead silence in the room. The developers looked suspiciously to my boss. They might thought that this is an exam and they can fail...

Boss: I know that there are object generations. Hands up, who knows how many are...

He raised his hand. Everybody was looking at his monitors - someone told loudly: "three".

I hoped that there will be a small conversation, and I can learn something new about garbage collection. Unfortunately it didn't happened, since my boss gave up - because everybody was sitting like a fried fish - without any intent to participate in the discussion.

I don't know who screwed up - the boss or the team that the conversation has been ended before it could have been started...

Intro

Hi everyone,

I'm an IT professional, working for a software development company. I friend of mine invited to post on his blog - documenting my challenges facing day-to-day. 

Stay tuned, you'll understand my name soon.

Saturday, 4 August 2012

What are the characteristics of a bad software engineer?

A friend of mine sent this link to me: What are the characteristics of a bad programmer?

The author mentions a few things which really made me remember some of my old colleagues. Especially this part:

They indulge in voodoo debuggingBad programmers will often shoot from the hip about why certain issues are happening, without proper disciplined investigation into surgically identifying what is going wrong. They will blame other people's code, 3rd party libraries, hardware and what not else without actually pinpointing issues.
Their coding algorithm is:
while (1) {  change_something();  if (whatever you changed works) {    break;  }}
Rather than the one pass:
do_something_right();