Archive for February, 2010

So you wanna be a programmer?

Programming is anything but easy. Programming is hard work. Programming is one of the most difficult things you will ever do in a life time. Programming is not trivial. On a scale of 1 to 10, programming is probably on 8 or 9 as far as difficulty is concerned. The geeks are also not making things easier, they have all these terms that are just there to make you as much more confused as you can be. An example SaaS, XML/RPC, REST. A closer look and a better understanding will reveal that those three terms are so closely related that some other profession could have just named them all as ONE. But not so here, you must be confused, you must know the distinction between a plus and a positive sign!!

Programming has a mystic quality that makes almost everyone wants to do it, or at least wants to be identified as a programmer. Programming has a mystic quality that makes everyone think they can do it. Programming has a mystic quality that makes everyone think those who do it are super humans on steroids. gods like Linus Torvalds aren’t making it easy at all.

Programming can not be learnt in 24 hours, nor can you grasp it in 7 days. Think of learning programming, think of a 10 year course! Even medical students spend 7 years learning the profession. And I am saying 10 years if you started early, if you started late? we are looking at say 15 years or more. You can not do programming as a part time job. You can not learnt it as a part time study. Most programmers I know don’t have a life outside the programming box.

You can not afford to make mistakes here. It’s like an incantation that must be said precisely as it is. Else the magic won’t work. Your code won’t compile, if they do compile, they won’t run, if they do run, they will have bugs. You talk of debugging? you are looking at a job that will cause you more headaches than a troublesome wife, especially if the code belongs to someone else. You won’t be happy all of the time, most of the time your code will depress you. You will sit at it far far late into the night, only to find out that you have spent 6 to 7 hours looking for a misplaced comma, or semi colon.

Code monkeys will come at your code while you sleep, things that have been working before you go to sleep will suddenly stop working. At times you won’t even know where the error is. And you will be forced to waddle through the code from the beginning. At times your codes will have ideas of their own, different from what you intended. You will be frustrated at times. You will spend the better part of your life not developing applications like Monster Truck, or GMail, or Facebook. The better part of your programming life will be spent writing, testing and debugging codes that may never make it out of your box. If you are lucky, you might have one project that will be widely used.

So you wanna be a programmer? These are few of the things they won’t tell you in college. Things that I think you should know before you start on this path. Things that “learn this and this in 24 hours” won’t tell you. Things that books won’t tell you. You want to be a programmer? Think again!


Comments (42)

Open Letter to Governor Raji Fashola: BRT

I write as a concerned lagosian who believed in the mantra “eko o ni baje oo”. Who believed in all reforms and attempts at making Lagos a mega city and putting her at the top echellon which is where she rightly belongs

To be frank, we are not there yet. But our believes, hopes and faith in the possible which I know drives you as much as us gives us a drive that pushes us forward like a freight train. We know that there will be obstacles but we are no longer afraid of them. In fact those obstacles should be afraid of us because this freight is not stopping until we get to the finish line. This I say to encourage and appreciate all your efforts and to let you know that “you are not alone”.

So many things are still not where they should be, but my concern today are brt buses. What a wonderful idea. For some of us we know that brt buses are about to change the way we view transportation. Months down the line, we are yet to realize this. I am going to itemize my concerns and views on brt buses, I am also going to try and identify some areas which I think his excellency should intervene.

  1. Most of these buses are in a delapitated state. I can not imagine that these buses are so young yet look so old. My first call of action therefore is to his excelency to please check out the states of these buses himself. Some of them are in such a pitiable state that they are no longer worthy of the name brt. They should be re-christened “molue”. So many have lost their in-built Air Conditions, some have been bashed here and there, some of them even emits smokes!
  2. Most of the brt drivers/ticketing officers are plainly rude. I know that the “customer is always right” anthem has never been song by government officials in the past, I think this should change. The managers of these buses (I mean the driver and the ticket officer) need to be taught this. We customers are always right. Even when we are wrong, we want to be told so in so diplomatic a way that it seems we were still right. As a provider of service myself, I should know what I am talking about.
  3. Third, I walk past ojota and Ikoyi and Berger and I see a lot of these buses sitting there while we still have numerous “danfo” buses that I wonder if  these “danfos” have been excluded from road worthyness test(that is definitely talk for another day). I believe we should have more of the brt buses plying Lagos routes and less of danfos and molues. I also will like to implore his excelency sir to pls look into the issue of road worthiness for our commercial vehicles, even the brt buses.
  4. I beleive it’s time we have a unified billing system for the brt buses. In my estimation, millions if not more go into the printing of those brt tickets whose lifespan is usually always less than 6 hours. Lagos I think is matured enough to have a card billing system. His excellency could call his consultants on technology matters to advice him on the usefulness and cost effectiveness of this card billing system.
  5. Last but not d least, if there is ever a monitoring committee for brt buses, i believe they are asleep. Maybe we should call on our friend Yo to help us wake them up. Please pour them water and after they are awake give them like six six strokes of the cane. I hope that will pass the message across

Thank you once again sir.

Concerned lagosian.

Comments (2)

clox: My Latest Invention

This is how clox works.
This is a Language Agnostic Chat Server…..Basically, You should take clox and write any client for it. I have successfully written chat clients for both Desktop and Mobile using clox as the server. This is an effort to simplify writing chat applications. The bulk of the Server side work has been done in clox.
The server is written in java, but you can have clients in any language you want as long they obey these protocols
  1. connect to the server (the port is 1981, make the ip address configurable since the server can be hosted anywhere)
  2. send a message to the server, the format of the message is “details:port=” + socket.getLocalPort() + “:sname=” + username + “:saddress=” + socket.getLocalAddress() + “\n”; The “:s” is a delimiter that separates the values.
  3. The server then starts sending you messages.
    • If you are just connecting, the server sends you a list of connected clients. The format is “clients:clientName1:sclientName2:sclientName3:setc\n”
    • If you already got the list of connected clients, the server keeps updating this list, so u must continually listen for incoming messages matching this format.
    • Also when someone sends you a message, you get the message in this format “message:from=sender:s” + “to=recipient:s” + “date=longvalueofdate:s” + “msg=message\n”; The “:s” is a delimiter that separates the values. The date is a long value(System.getCurrentTimeInMillis()).
    • When someone sends you a file, you get it as a stream of bytes.(a byte can easily be casted to an integer). The first thing you recieve is a filename in this format “file:filename:sport:port\n”. The “:s” is a delimiter that separates the values. This means that the server has opened a new port for you to start sending files. The new port is neccessary so that we dont congest the chat port in case the file is large. Connect to this port and start reading the bytes sent to you. All you need to do is write these bytes directly to the file you created with filename.
  4. When you want to send a message to the another client, use this format
    • “message:from=sender:s” + “to=recipient:s” + “date=longvalueofdate:s” + “msg=message\n”; The “:s” is a delimiter that separates the values. The date is a long value(System.getCurrentTimeInMillis()).
    • When you want to send a file, you do three things
      • send the filename of the file you want to send. The format is “file:filename=filename:sto=recipient\n”. You must include the name of the recipient in this command.
      • The server then sends you an “ackfile:filename=filename:sport=port\n”. This means the filename has been recieved and the server has opened a port for you to start sending the file as bytes. The new port is neccessary for reasons given in 3d. above.
      • Send the file itself to server (as bytes) through the port opened to you by the server. The server reads the bytes send and reconstruct the file on the other end
  5. Also note that the server will read messages from you until it encounters a new line. So all messages between you and the server must terminate with a newline. The server already observes this when sending messages to you.
  6. The server doesnt take care of duplicate users. Your client application should take care of that. Your client should have a log in of some sort such that only truly registered clients are sent to the server and there are no duplicates.
  7. The server has a gui for management(Starting,stopping and the likes).
  8. I also have a cloxclient project to give you a feel of what the client should look like.
    • From Server:
      • clients:csv  see 3a. aboove
      • message:msgstring see 3c. above
      • idle:fromclient, toclient
      • typing:fromclient, toclient
      • sms:fromclient, toclient, smsmessage //not yet implemented
      • file:fromclient, toclient, filename
    • To Server
      • String_clientDetails //this must be send at the point of connection. see 2 above
      • message:string //see 4 above
      • idle:fromclient,toClient
      • typing:fromclient,toClient
      • sms:fromcleint,toClient,smsmessage //not yet implemented
      • file:fromcleint,toClieint,filename

The code is open source, hosted on GITORIOUS, the URL is CloxServer and the desktop client is CloxClient

Happy Cloxing

Comments (2)