Live data from Hacker News

The worst program I ever worked on

jacquesmattheij.com

41–50 of 136 posts

Re: The worst program I ever worked on

#41
I met the guy who wrote this bit that I had to maintain:

  for(a=0;a
What really pissed me off was that he was such a nice guy.

He still works a lot. Makes a lot of money. And his customers love him. (No, I don't think they review his code.)

Re: The worst program I ever worked on

#42
I once took over some work that was previously the domain of our most highly paid ($150-200k a year) "architect"/contractor. Imagine my surprise when I actually examined his code and realized that it looked like it had been written by a student in an intro-level C101 class. At one point, I asked him what his approach to program design was...he replied "brute force and ignorance" and walked away laughing. We fired him shortly thereafter.

Re: The worst program I ever worked on

#43
post #5

It does not need to be that complicated :) When a company I worked for was bought the new companies tried to lay of some (most) of the employees. At this time our team was working on a product that was to a large degree implemented in Scheme (because management didn't really care about the programming language). I quit at the company (for unrelated reasons) soon thereafter, but it seems that my colleague (with whom I…

I can't tell if the number of parentheticals in your post is a pun about using Scheme or not.

Re: The worst program I ever worked on

#44

A project I worked at during an internship had an unmanaged C++ portion for rendering complex typography, which was written when every letter in a variable cost $10 (or so it seems). The result was that "pointer to a metadata character" became the variable "pmc", and that was just the beginning of it. I never quite did understand what the variable lpmnoics meant, and debugging the C++ was quite the drag and the task…

I went back to the code repository (happens to be open source now) and found a few (real) examples: - prgpttp: paragraph pointer to "TextProps" - prgpvwvc: pointer to the root something something view controller

Re: The worst program I ever worked on

#45
post #26

Earlier quoted context omitted.

That sounds kind of funny. Where do you go on error? One time I had to debug this incredibly obfuscated Word Basic subroutine. It was such a mess of gotos (deliberately so) that the company that wrote it for us thought they had us over a barrel and could charge us like a wounded bull. That is, until I showed my cow-orkers the superior technology of "paper, scissors and sticky tape".

ON ERROR GOTO REDMOND

Redmond wasn't even on our mental map in those days; Windows was still at 3.11, and NT hadn't been released. The only thing we used PCs were good for was to hold our 5250-emulation cards...

Re: The worst program I ever worked on

#46

I've watched enough "programmers at play" and read enough code to happily believe that this guy was just letting his sense of humor have its day. I'm not at all convinced that things like this are deliberate obfuscation. Of course, I'm not the one who had to disentangle it all. We've all read bad code with bad names that nonetheless "works" (except perhaps for the occasional minor glitch). This is perhaps just one th…

True enough. In the 7th grade, I once divided some number by 100,000 by writing out the long division, and writing 03=0, 7-0=7, 07=0, etc. The teacher came by and was completely baffled where I had gone wrong in my education, but I was just bored :)

Re: The worst program I ever worked on

#47

I've watched enough "programmers at play" and read enough code to happily believe that this guy was just letting his sense of humor have its day. I'm not at all convinced that things like this are deliberate obfuscation. Of course, I'm not the one who had to disentangle it all. We've all read bad code with bad names that nonetheless "works" (except perhaps for the occasional minor glitch). This is perhaps just one th…

I agree. Tomato and Pizza aren't any less silly than Foo, Baz and Bar, and certainly much less offensive than Fubar... ... It's not just programmers that do this either, also network admins name their computers R2D2 and C3PO, Shodan, Skynet etc.

Oh, yes......

My previous employer, you could work out the function of a server and its platform from its name; it was embedded within the name. There were index numbers when we had more than one which wasn't ideal, but....

My current employer, it helps if you know your nature taxonomies in some detail. We may have more to keep track of and so more namespace clashing, but I can't help but feel it's a suboptimal solution.

Re: The worst program I ever worked on

#48
The legacy system that I'm working on now has about 20-30 distinct classes/data types that it needs to manage and persist to the database. The previous developer chose to implement all of these different data structures in one uber-table named 'object' and in the application code with one uber-class named 'Thing'. Relationships between 'Things', regardless of meaning or type, are simply dumped into a 'relationship' table. It wouldn't be so bad except for the meaning and nature of relationships is often inferred based on the order or 'direction' of the relationships in the database.

So pretend that I have a 'Thing' representing a table, and another 'Thing' representing a column. If the relationship was from the table to the column then that might indicate that the column simply belongs to the table. However, if the relationship is from the column to the table, then that might indicate that the column is a primary key.

There are also other gems deep within the bowels of the system. Many functions named things like 'doItForRealThisTime' and 'reallyDoIt'.

Re: The worst program I ever worked on

#49
post #11

I worked with a guy (I won't name the company) who wrote Java code in one, huge, static class as much as possible. In fact, everything was largely in one function too. He decided to name his fields alphabetically. static int a static int b static String c static float d static int e... What, I wondered, would happen when he ran out of letters? Scrolling down further I saw this: static int aa static float ab static St…

He's not a person, he's a compiler! I know single static assignment when I see it.

Re: The worst program I ever worked on

#50
post #40

Earlier quoted context omitted.

To really bork up the Java, you need a pattern fanatic. Once you stand working with Handler Adapter Handlers you know you should have taken the other colour pill.

Yes, i remember working for a company (java devs) where at some point we ended up having wrappers around wrappers around wrappers delegating stuff around, factories of factories ... It made your head spin.

Yes. APIDelegatorInvocationHandler and APIAbstractFactoryFactoryProvider. (actual Java class names)
Post reply on HN