Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long does code last?

I'm in the process of going back over some of the more minor TODO's in my code. One of them is in a class that handles partial dates, e.g. Jan 2001. It works fine for dates that will be seen in our system (1990 - 2099) and gracefully fails for other dates.

The TODO that I've left for myself is that I don't handle dates in the century 2100 and beyond. I don't really think it worth the effort fixing this particular problem, but I am cognisant of the Y2k bugs. If we were in 2080 already I think I'd be thinking differently and would fix the bug.

So how long does code last for? How far ahead should we plan for our systems to keep running for?

Update

Ok, thanks for all your input. I think I'm going for the option of leave the TODO in the code and do nothing. The thoughts I found most interesting were:

  • @Adrian - Eternity, I think that's the most correct assumption, your point about VM's is a good one.
  • @jan-hancic - It depends, yes it does.
  • @chris-ballance - I'm guessing I'll be dead by the time this restriction is hit, so they can come defile my grave if they want, but I'll be dead, so I'll just haunt his ass.

The reason I decided to do nothing was simple. It added negligable business value, the other things that needed looking at did add value so I'll do them first and if I get the time I'll fix it, but really it'll be nothing more than an academic exercise.

like image 417
ilivewithian Avatar asked Dec 14 '09 12:12

ilivewithian


People also ask

How long should I code a day?

It is very hard to estimate how many hours you should code each day. Some people suggest to keep it short and sweet. 15 minutes is good enough. On the other side of the spectrum, I've also heard people got into the development field within a year or so by coding 9 or 10 hours a day.

How many hours should one code in a day?

On average, you should spend about 2 – 4 hours a day coding. However, efficient coding practice isn't really about the depth of time spent writing or learning codes but rather benchmarked on the individual's consistency over a given time.

How long does it take to write code?

Most coders agree that it takes three to six months to be comfortable with the basics of coding.


2 Answers

Eternity.

Given the trend that old system keep running in virtual machines, we must assume that all useful code will run forever. There are many system that run since the 60ies, eg backend code in financial sector, and there seems to be no indication that these systems will ever get replaced. (And in the meantime, the frontend is being replaced every other year with the latest fad in web technology. So, the closer your code is to the core of your system, the more likely it will run forever.)

like image 40
akuhn Avatar answered Oct 03 '22 14:10

akuhn


Longer than you expect.

like image 66
Michael Borgwardt Avatar answered Oct 03 '22 13:10

Michael Borgwardt