Skip to navigation
   
Dave F's Blog
Code Evolution

By Dave F in Reader

Posted in Coding on December 18, 2006 at 9:37 pm

Permalink | Author Profile

I’m integrating some old code into a new product (again). Wouldn’t you know the guy that did the new stuff has indexed all the data from 1. Obviously all the old stuff is from 0. Not that hard you say - but under certain conditions the we ignore the first one (or two) and last one (or two) elements. And of course it can be accessed two dimensionally - the old way, none of that
var[x,y]

when you can
var[x*maxy+y]

So I’ll spend the day randomly adding (or taking away) 1 (or 2 or 3) on to the wrong variables until it comes right. I’ve been here before and I know empirically (from too many times) that the random approach is quicker than trying to figure it out with any degree of logic. If it’s good enough for Darwin it’s good enough for me…

12345
Not yet rated
Loading ... Loading ...

Previous Post | Next Post

 
 
Comments
This article has no comments yet.

Make a comment

* required

* required

We stop spam using reCaptcha.
Type the words below and click Submit Comment.

Advertisement