Posts tagged with " advice"

Code reviews, feel that squirming feeling?

Code reviews at their best

For the past year that I have been working within this company I have found myself with a number of significant applications that have fallen under my mandate.  Some of these applications have been designed by myself, others by third parties external to the company and some I have inherited as legacy applications.  There is not one set framework between all these applications, some are coded in Ruby, others in Java, PHP, VB, Rails...the list is pretty much endless.  So as you may know I have handed in my required notice for the company and with about 1 and a half months of notice remaining here I have begun the unenviable task of documentation.

Yes, yes, I hear your cries of procrastination, yes much of the documentation should have been completed with their original owners, however times have changed.  This company is no longer a startup, processes are beginning to mature and documentation must be completed at all costs.  So now as I sit before the lists of applications which must be handed over I'm discovering all sorts of pesky yet vital applications which I have had some impact on in some form or other this past year.  Apparently I am the technical owner for all of these applications, some of which I have never heard of before.  Most modern IT companies are like this, back 5-10 years ago it was natural to fire up access and pull up an application that does a bit of importing of raw data, tidies it all up and shoots off a pretty looking report full of breakdowns.  

Much of the code is well written, others not so much.  Not all of the code contains comments and some code contains such horrors that leave me wanting to gouge out my own eyeballs after viewing it.  Such treats that I talk about should never be mentioned or ever see the light of day.  Code reviews are vital however are not as common as perhaps they should be within many companies.  I will be facing a number of code reviews whilst doing these handovers over the coming weeks and came up with some thoughts on the process

Review the code, not the developer.

Let's face it, people can be assholes at least some of the time during their life.  Don't be one during a coding session, everyone makes mistakes but it is how they learn from them that counts. 

Short regular sessions

Don’t make it too long, an hour is ideal per session.  Reading code at the best of times can be a tedious exercise, reading other peoples code can be even more so.  Remember that this should be an on-going process and is a vital necesscary part of creating productive and efficient code.

Be prepared

I had this sudden image of the scouts motto there.  Anyhow most of your time should be spent in preparation. Of course, you want the handouts, program listings, documentation, diagrams, flipcharts, and other meeting necessities prepared in advance so as to not waste people’s time.

Own your code

Don't be afraid to stand by your code. It is a learning experience and these sessions will make developers write better code in the future.  All participants in a review should feel that they can speak openly. As a reviewer, give comments in a constructive and positive way. As the developer, don’t take comments personally. You’re all there for the same purpose.

At the end of the day, laugh about screwups, don't take it personally and learn from the experience.  Everyone wins!

2008-07-03 by Jonathan Clarke - Comments: 0 | New Comment

Office Necessities 101

So I've been thinking quite a bit about what facilities should be provided within a company to it's employees.  So for a startup company I kinda figure that it should be minimalistic to the extreme. As I kinda figure that for an IT company, I would initially be bootstrapping the operation I have for the past year been thinking about different areas vital for the success and happiness of the company and employees. Making your employees happy does not have to break the bank, it just has to show you care about their wellbeing.  Remember, it's the small things that count.  I've narrowed it down to the following items for a small startup:

Fast Internet Access

Fast - Credit to Malingering

In this day and age, Internet access is a necessity.  Browsing the web may be regarded as a hinderance in some industries however in mine it is often regarded as sources of inspiration, discovering new techniques and methods for problem solving.  I really do figure that a sure sign that a company is dying is when they start sending their employees on extremely expensive training courses to learn for example a new programming language or tool.  It seems very strange to me to waste large amounts of money on those courses especially when all the required material that is taught on these courses are available directly from the web.  I should emphasise that the access should be as fast as possible.  Many interesting resources are now coming over in screencast form which requires decent bandwidth to watch, besides, if an employee is waiting an age to do something like this, you are losing money due to lack of productivity.  

Having lived in China for some time I was often quite annoyed by some of the speeds outside of the mainland, this was due to mainly government filtering however I can imagine many others were in a worse situation than me.  Having worked in this Chinese company for some time I can only imagine the difficulties their IT department encountered daily to get direct stable connections to the United States for rapid development, testing and deployment of large solutions. 

A Clean Comfortable Adjustable Environment

Environment - credit to Corsiworld

I don't know how many times I have heard about people complaining about bad backs, sore eyes and migraines.  I myself notouriously suffer from extreme cases of migraines however I am often spending 16+ hours a day in front of a monitor.  Solutions such as enforcing breaks between coding sessions, comfortable erogonomic chairs, correctly positioned monitors and desks, really do make life a lot easier for your employees.  As I said, it's all about the small things.  Having coffee at hand 24x7 is vital.  Startups do not keep regular working hours, it is often a case of working hard all day, working hard all night.  It is not something I recommend to everyone but some people need more in their life. They need to be part of an idea and seeing it through. So back to the office, having clean facilities makes a huge difference.  Working in a logistics company for a time I noticed that for an office of 5 people they had a maid come in every morning, just to empty garbage, clean floors, freshen up desks and take away stale cups of coffee.  It's really worth noticing the smiles on the staffs faces when they were smelling fresh scents around their work environment, it really does make a huge difference.  

My personal favourite was when I was working in Dalian, every evening without fail during the winter I was privy to some of the most epic sunsets of my lifetime.  Having a great view from where you do your daily slog is extremely beneficial, especially when you just need to take 5 minutes out of your day with your jaw open, gaping at it's beauty.  The chances of this happening in a small startup are remote as hell with the likelyhood of working from your parents basement much more plausabile.

An Efficient Storage Solution

Investing in hardware at the start while working on a prototype is probably a venture doomed to deadpool hell, spending over 5 grand on a server is a bit much initially with zero capital coming in so I would think about perhaps using a third party solution like say slicehost to manage a virtualised solution.  Extra machines can be daisy-chained together to provide quite an efficient clustered environment.  Alternatively leverage various clouds that are in existance through their API's, such as Amazon and the upcoming Google Apps service.  I have had first hand experience working with companies who have not thought far enough ahead to anticipate these types of issues, they are a nightmare to workaround as once employees get comfortable with one insufficient solution, it is a difficult challenge to break their mindset and habits. 

Backup your Junk

The reason I really do mention storage solutions is that it is incredibly annoying when that piece of code you wrote 2 weeks ago was not correctly backed up, or the drive that it was on crashed out.  I have seen companies rely on one storage system, there was never a backup of that backup. I myself have lost over 1 TB of data this past month with not just 1 drive failing, but both, simultanously.  I think there was a gremlin and coffee involved.

So I'm coming to an end with this blog post, in future episodes I'll be talking about the main requirement of a startup - incredibly smart people.  Also, coming up with an idea will be something I'll be also dwelling on too.  If you have any other suggestions I'd love to hear from you, as always, comments are extremely welcome.  

   
2008-06-26 by Jonathan Clarke - Comments: 0 | New Comment