Reply to post:

If you fire someone, don't let them hang around a month to finish code

GlenP Silver badge

The code also had to be as small as possible so many tricks were used to reduce bloat

But sometimes reduced bloat and "clean" programming caused more problems than it solved.

Back when I was an analyst/programmer on DEC VAX at the local college we had a simple game, written by one of my predecessors, set up as part of the new student inductions as many of them hadn't used a computer before. It was noted from the monthly logs that this one game was causing more page faults than everything else put together. I got the job of trying to reduce this, which turned out to be quite simple.

The program was very well written and, as was considered "good programming", an operation that was carried out twice per iteration was called as a subroutine. The trouble was that the subroutine was only about 3 lines of actual code and the overhead of calling it was sufficient for the VAX to page fault every time, twice per iteration, every few seconds, with a lot of students...

The answer? Just in-line the operation, twice, the code fit nicely into one page, everybody happy.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon