Categories
Development General

Code Reviews

One of my month-end deliverables this month was to have finished reviewing certain portions of code that my team has written.  I have spent the last two hours going throug 20 printed pages of code. (I print the code out because I find it a lot easier to reference multiple sections of code at once using paper than I do using a monitor)

I feel like I’m back at varsity marking pracs and tuts (which I did for 3 years) or like I’m back doing my 1 year of part time Computer Studies teaching and I’m marking the Grade 12 tests.  The 20 pages I have looked at are almost more covered in ink from my pen than in the pigments from the laser printer.  (ok, so that’s a slight exaggeration)

The code I have to review is probably 30% mine and 65% developer A, and 5% developer B.  All of us are pretty pedantic, but I’m quickly seeing trends.  I think I can now make out Developer A’s code at a distance, wearing a blindfold, with both my hands tied behind my back.  I don’t think I’ve seen any of Developer B’s code yet, but we have recently been through a rather large “refactoring” of our OO heirarchy so I think there are bits of his code which I’ve looked over tonight. And I’m still amazed at how my own code sucks.

A lot of our development has been evolving as we’ve gone along so there are some cases of really old and BAD code, right along side really new and slick code.  Then there are cases of really old and BAD code being copied and pasted into really slick and new code without even changing the comments to match their new location!

There are cases where one developer built one way of getting access to a list, and then a few months later built another way of getting access to the same list and put it right next to the first way in the code and didn’t pick up on it.  I’m not sure if I am that aware of the code that surrounds my current coding task, but I’m sure as heck going to start trying to be in future.

One of my pet peeves has been comments in the “///” comment portions ahead of method/field/property/class/etc declarations which are written assuming a fair amount of knowledge of how our system works, instead of written to explain to a new developer how the system works (I’m guilty of this too).  One of the things we’ve discussed many times is the fact that eventually we want to produce NDoc/DoxyGen documentation from our code so having comments that are not helpful is really a waste of time in the long run.  (Worse, in my mind is repeatedly starting sentences with lower case letters – something that is uber evil when you consider how many members of the the grammar police are in our team)

Fortunately, after our recent OO Architecture “Refactoring” Marathon, most of the code I am reviewing is consolidated into three main base classes, and I’ve completed the review of two of the three.  So after the next class I should have very little code left to review.

I’m still rather suprised about the amount of silly bugs we have in our code… I’ve been watching Scrub’s recently and I keep saying to myself (in the voice of Dr Cox) “Oh, my goodness barbie!  How do you get your bra and panties on in the morning all by yourself!”

I guess that’s why we have code reviews.  We try to have “debriefing” (after my “bra and panties” comment, I must say – “No, not that kind of de-briefing!”) sessions where we all try and learn from the mistakes made in code that is reviewed.  So I have LOTS of content for our next session, and hopefully I won’t see these mistakes ever again.  (I can dream, can’t I?)

 

So after that general badmouthing about the quality of our code, I must just say that we have a great team.  If(when) we make mistakes we learn, and code better.  The other guys are super bright and really capable (which is probably why some of th bugs shock me so much) and I’m really happy to be working with them.

Categories
Uncategorized

PDF Converters & customer contact

Where I work, we’ve had some experience with PDF converters.  Mostly abysmal. But we’ve found one crowd that seems to be on top of the game – WebSuperGoo.  Most of these converters totally mess up HTML to PDF conversion, especially when you have CSS involved.

We have one client that we have written the HTML to PDF converter for and we have had so many problems with other PDF converters we have eventually changed to using ABC PDF.  We’ve had some minor hassles, but WebSuperGoo have been excellent at responding to the questions.

In my small hosting business (DigitalTinder.com), I have written a simple acounting application that keeps my billing going.  Up till now I’ve been creating HTML files, printing to PDF and e-mailing them off by hand.  Today I downloaded a free copy of ABC PDF to test out an automated e-mailing of invoices as PDF after they have been created.  It was great, took about 15 minutes to do what used to take me about 2hrs previously.

The only down side is that as a small business, I can’t afford the $325 (R2500) for a license. Its actually pretty easy to use it, I still have to wait to see if the PDF’s get through the firewalls and mail filters and spam filters, or even if they make a better impression on my clients.

There’s a fine line between efficiency and and customer contact.  It saves me time ot use the PDF generator, but I lose the ability to have a personalised message for each client.  I can try and make a mail-merge’d email sound personal, but I don’t want to become an “impersonal machine” of a business.

My last post mentioned Grant from FusionReactor and how he’s got a great handle on PR in the web 2.0/social networking world.  I don’t have the same customer base that Grant has.  The majority of my customers actually don’t know about the inner workings of the technology underpinning their websites, whereas there are a number of tech savy people who use FusionReactor’s services.  Not that I’m saying that my customers are “clueless”… most of them are great entrepreneurs.  Their focus is on their businesses, not the technology and blogging/social networking is not at a mature enough phase for people like them to be using those tools.  In fact, in SA I doubt that there are many great businesses blogging and seeing business value coming from their blogs.  Its probably in the process of changing as I type this.  But I think it will be at least 6-12 months away.

So for now, I’ll have to keep some “offline” way of connecting with them.  Possibly SMS’s, or phone calls.  Keep efficiency up, but maximise personal contact with my customers. 

Its a learning curve for me and I’m looking forward to the journey.

Categories
Uncategorized

Moving and linking

In 1 week’s time we’ll be in our new place. We’ll be minus iBurst and DSTV… mainly it is for cost saving purposes but I’m sure it will also have plenty other benefits – less sitting passivly watching tv, typing on laptops (like I’m doing now) and more talking and socialising.

The big pitties are the cool series that are starting on DSTV, and missing our PVR.  (Pausing live TV is such a life changing feature for any Series watchers)

And since I’m in a linking mood, we’re using SA Movers for our move, MortgageSA for our bond, and ABSA are our new lords and masters (aka the bank that gave us the loan).

More linking – my connection to iBurst is organised via FusionReactor. I LOVE their service, although I’m not always quite as fond of their Account’s section (late invoicing of purchases plays havoc with nice neat budgetting and forgetful memories).  Recently Grant from FusionReactor recently posted a comment to my blog about their new service – In Page Ads.  His comment went along the lines of suggesting that I’d possibly like it since I’ve raved about their services before.

My official comment is that its an old concept redone… You put their system on your site, and every time a user clicks on a link they get shown an advert before they get taken ot the new page.  Its been done before, and has failed, so I’m not sure what is different about their system.  But Grant is a bright cookie and seems to know his social networking/web 2.0 pr implications, so I’m guessing there is something that I’m missing.

So since he’s been great to me, I thought I’d link to their In Page Ads system, and maybe someone who reads this blog can comment on it?