If software developers were construction workers

Here is the diary of a construction worker that works in some enterprise construction company (let’s call it Concrete-Harderware (r) inc)

March 1 Huray! We got the contract to build a twelve story high commercial building. We’re all enthusiastic about the new job. We drank seven or eight six-packs of beer, celebrating.

March 2 The client doesn’t appear to like the expression “when it’s done it’s done”. He wants us to use more accurate deadlines. Poor sap. He obviously doesn’t understand high-technology.

March 3 We discussed the deadlines. We drank about eleven six-packs. Peterson said that we will probably be ready in four months. So – eight months. We wrote twelve months in the contract but we’ll probably be done in sixteen.

March 6 Peterson returned the beer-cans for recycling.

March 8 We celebrate the International Women’s Day. There are no women in the company, so nobody spoils the party.

April 2 Peterson said that we had better start working. What’s wrong with that guy? Anyway, we cleared the construction area and hung nice posters saying “The construction is performed by Concrete-Harderware inc. (www.concrete-harderware.com)”. Now having fulfilled our duties we play Quake.

April 20 The client came to ask how things were going. We had him play Quake with us and let him beat us all.

April 21 We discussed the project. Michaels says to use pre-made concrete blocks. Peterson insists that we must build it the old-fashioned way – with bricks. Alex – the new guy – came up with a rather radical approach – to build a few dozen wooden shacks and connect them with tunnels. It was the new thing everybody was talking about. We had to remind him that the client wants a twelve-story building. We tried to settle to a solution with 1vs1 matches in Quake. Alex and his bungalows fell quickly but Peterson and Michaels tied. We decided that each of them should build half a building with his method and then connect the two halves.

April 30 The first floor is ready. We showed it to the client. He inquired why the ceilings in different rooms are at a different height, why there are bricks falling from the walls, and why there is no door and you have to come in through the windows. We explained that these are shortcomings of the beta-version. Proud of ourselves, we went celebrating.

May 10 Peterson got sober and cursed a lot. We thought that Alex had drunk all the beer but it turned out to be worse. We had forgotten to put the foundation. It was written in the project files but who reads specs nowadays?

May 11 We demolished the first floor. Que sera, sera…

July 11 We are working hard! Peterson is finishing the second floor, Michaels is working on the sixth. Alex has build the elevator shaft up to the ninth floor but it shakes menacingly when it’s windy. We had to put some wooden scaffolding around it.

July 17 Alex is building the roof and the terraces. On the ground. We will use a crane to lift them later.

August 13 Michaels’ concrete blocks don’t meet up. There are a few holes three feet wide. He asked Peterson for help but Peterson said he had already more than enough to do and, besides, without knowing the internal architecture of the concrete blocks, one cannot do anything.

August 14 We broke up a few concrete blocks so Peterson could study the internal architecture. Peterson cursed a lot and said that the developers of the blocks are complete idiots.

August 17 Peterson plugged the holes between the concrete blocks with some bricks. The blocks are now a little crooked and there are a lot of little holes instead of few big ones. Peterson put some duct tape on the holes and said that it’s fine as long as it isn’t raining.

September 1 The concrete block company released some new blocks – more stable and robust and with built-in file cabinets on the walls. But the truth is that they are incompatible by form with the old ones and are three times as heavy. Who makes these stupid mistakes?

September 16 Alex came in, full of ideas. He suggested making all windows with different sizes. The client was going to love them. We told him to shut the f*** up.

November 2 Peterson reached the fifth floor. He is proud of himself. We drew his attention to the fact that the walls are in a forty degree angle. He cursed a lot, then he said that we were idiots and don’t understand anything. He promised to think about it.

November 3 The client came in today. He asked why the walls were in a forty degree angle. We explained to him what the Coriolis Effect is. He listened to us and said the he isn’t a building expert but next to his house there was a building just like this and the walls were straight. Then that moron – Alex, started talking to him and explained to him the idea for the different-sized windows. The client, naturally, liked it. God damn it!

November 4 We asked Alex if we had to break everything up because of his windows. He assured us that there is no need. The concrete blocks had an undocumented feature.

November 5 Peterson finally admitted that there is something wrong with the walls. He said that he had laid some brick not the way it was supposed to be, but to find out which he needs to check them all. He said that it’s easier to build everything from scratch.

November 6 We tried to convince Peterson that there is no time to build everything from scratch. We showed him calculations made with a computer. Peterson cursed a lot. He said that the computer was designed by idiots.

November 7 Peterson agreed to make everything from concrete blocks and then went to drown his misery in alcohol.

November 8 We demolished the brick part. We damaged some parts of the concrete part. The whole building creaks and shakes menacingly. We put some wooden struts on it and went to play some Quake.

November 17 Peterson came back from the drinking. We are working hard.

November 11 We celebrate Remembrance Day. There are no Canadians in the company, so nobody spoils the party.

November 15 We remembered that the crane goes up only to the eighth floor. We sent Michaels for a new one. We are playing Quake. Alex just beat Peterson. There is a new generation growing…

November 24 Michaels came back. He hasn’t found a crane but he has brought an excavator. He suggested that we dig a hole and finish the building downwards. He said that in the contract it’s not said that all the floors should be above the ground.

November 25 We brainstormed the crane issue. At last can of beer we found a solution. We put off the main construction. We will build a four-story building and then put the crane on top of it.

December 25 We celebrate Christmas. Santa doesn’t work in the company so nobody spoils the party.

January 14 I don’t remember anything. My head hurts.

February 4 We are ready with all twelve floors. Tomorrow we put the roof that Alex built.

February 5 Alex is an idiot! The roof keeps falling. We propped it up with the crane for now. We’ll think what to do.

February 6 Alex said he’s innocent. It’s just that Michaels’ twelfth floor is 10 feet wider and 8 feet longer than Peterson’s twelfth floor. Obviously they’ve been using different concrete blocks. But Alex is an idiot nevertheless. His damn roof doesn’t fit any of the floors. The elevator shaft, too.

February 7 We glued the roof. Peterson said that it’s fine as long as it isn’t snowing.

February 8 It started snowing…

Advertisements

12 Steps to Better Code – The Joel Test

Have you ever heard of SEMA? It’s a fairly esoteric system for measuring how good a software team is. No, wait! Don’t follow that link! It will take you about six years just to understand that stuff. So I’ve come up with my own, highly irresponsible, sloppy test to rate the quality of a software team. The great part about it is that it takes about 3 minutes. With all the time you save, you can go to medical school.

  1. Do you use source control?
  2. Can you make a build in one step?
  3. Do you make daily builds?
  4. Do you have a bug database?
  5. Do you fix bugs before writing new code?
  6. Do you have an up-to-date schedule?
  7. Do you have a spec?
  8. Do programmers have quiet working conditions?
  9. Do you use the best tools money can buy?
  10. Do you have testers?
  11. Do new candidates write code during their interview?
  12. Do you do hallway usability testing?

Credits: http://www.joelonsoftware.com

Using GitHub

GitHub is an open source version control system (VCS) called Git*. Created by the same team that created Linux.

Using Git Hub on other platforms like Windows or Linux has no such difference you just need to download the respective binaries for your platform with platform dependent Git.

Here are some steps you need to use Git Hub:

Setting Up Git Hub

  1. Download Git Hub for windows (check above links for other platform): http://github-windows.s3.amazonaws.com/GitHubSetup.exe
  2. Download Git: http://git-scm.com/download/win
  3. Create an account on Git Hub
  4. Open Git Shell or use Git GUI
  • Using Git Shell:
    1. git config –global user.name “Your Name Here”
    2. git config –global user.email your_email@example.com
    3. Done

 Create a Repo

  1. Go to this url to create a new repo https://github.com/repositories/new
  2. Put a name for a repo and create it. (this is on remote server)
  3. Done

 Setup a local git

  1. Open Git Shell
  2. Change path to working directory (Assuming you have some working directory)
  3. Type git init
  4. Done

Commit your code

  1. Add files to your local git. git add someFile.someExt or git add some directory
  2. git commit –m “Some description what has been commit and why”
  3. Done

Push your commits to remote

  1. git remote add origin https://github.com/username/name-of-your-working-git.git
  2. git push origin master
  3. Checkmate! // Note that “origin” is a remote name

 Forking a repo

  1. Go to a project page
  2. Click on fork button
  3. Clone this project to local by running: git clone https://github.com/your-username/recently-added-git.git
  4. This will add to current working directory

 Up-streaming a git

  1. Go to project directory using shell
  2. git remote add upstream https://github.com/octocat/Spoon-Knife.git (forked git url)
  3. git fetch upstream

Pull in up-stream changes

  1. git fetch upstream
  2. git merge upstream/master

Creating a Branch

  1. git branch mybranch
  2. git checkout mybranch
  • or
  1. git checkout -b mybranch

To switch

  1. git checkout master
  2. git checkout mybranch

Merging back the branch

  1. git checkout master
  2. git merge mybranch
  3. git branch -d mybranch