snoofle

After surviving 35 years, dozens of languages, hundreds of projects, thousands of meetings and millions of LOC, I now teach the basics to the computer-phobic

Nov 2013

Obviously!

by in CodeSOD on

T. L. has a co-worker, Taran, who was obviously the best there was, is, and ever will be. Taran had a penchant for using the word obviously. In almost every sentence. Of every paragraph. Of everything he ever wrote and said. Even in his comments. Most folks tried to ignore it, but after hearing it umpteen-thousand times, it began to wear a bit thin.

To his credit, Taran was a fairly bright person. This made their boss think that the other team members were obviously less than adequate, what with them needing obvious things explained to them all the time. To rectify this, he started replacing the lay-folk with people that Taran felt were obviously more qualified. After about a year, most of the team had been rotated out for people who were obviously better suited to their assigned tasks.


Breaking Delphi

by in CodeSOD on

Delphi, like all languages and tools, has its uses. Some folks use it for good. Others use it for evil. Still others somehow manage to break the language itself.

Oliver T. has been using Delphi 7 for the last decade. In particular, he has a DLL that has worked quite well during that time to produce a variety of MS Word document for his clients to send to their clients. With the advent of new requirements, he imported the Word Type Library for Office 2007, and compilation failed. Puzzled, he clicked "Find Declaration" on break, and saw this:


The Nephew Way

by in CodeSOD on

Who among us hasn't had to scan a list looking for particular items? Sometimes, as you discover more and more items of interest, you need to explicitly resize the target list to hold them.

From the Bible of MSDN:

Array.Resize
"This method allocates a new array with the specified size, copies elements from the old array to the new one, and then replaces the old array with the new one."