3 ms·
I'm currently working in a system that seems to have been written by neanderthals. Global variables everywhere, non-descriptive variable names, functions 500 LO
by orangethirty 14y ago
I'm currently working in a system that seems to have been written by neanderthals. Global variables everywhere, non-descriptive variable names, functions 500 LOC long, no main program loop, etc. It is written in Python, but my god, at this point its fucking Latin to me. Have spend two days trying to decipher it in order to bring an offline system back online (the system is what makes the company money). Realized its just easier to re-write this pile of shit into a program that's less than 500 LOC. Yes, from 5000+ LOC, to around 500. It will now be maintainable, and modular (and fucking readable). Tell me now, how much more is that worth?
PS. It was written by bad PHP code monkeys who lied about knowing Python (much less how to program).
- lifeisstillgood 14y agoAny chance of a looksie at the code? Off the record?
- orangethirty 14y agoDoing so would mean that I value your curiosity more than I value my client, their business, their employees, my family, and the well being of everyone who depends on that system. So, no. And it's not cool to ask, either.
- j2bax 14y agoSeemed like a harmless enough request with an easy yes or no answer. I find him asking a lot cooler than your response. If the situation is so sensitive to everyones well being, you shouldn't even be discussing it on a public forum. Get over it.
- lifeisstillgood 14y agoIt was an unfair request and one I made off the cuff. With more time I would have either rephrased or not asked. I withdraw the request and apologise to both the above posters. I don't particularly care about the sensitive portions of the poor 5000LOC but I am interested in how these things get so out of control. I was some time ago trying to start a MSc in software engineering - focused on just these differences in productivity - and the biggest stumbling block is finding examples of bad code and coders to study. People who want to be part of a study tend to be in the upper quadrant and from my point of view boring. Anyway, long story short, I posted before thinking Take care
- gngeal 14y agoWhy unfair? I have a friend who is an extremely competent programmer (and a very prolific writer) and he sends me - of his own initiative - snippets of code written by his cow-orkers (or at least he did, until he switched jobs and went into a company with much more respectable peers, so there's no fun to be had in that). You wouldn't believe what some people are capable of attempting to write. (Except, of course, you would, if you visit thedailywtf.com with any frequency.) Let's just say that, for example, an awful lot of people believe these days that they are competent enough to rewrite date-handling libraries in the Java ecosystem. Of course, the correctness of the result fails horribly.
- lifeisstillgood 14y agoBut je is your friend and you don't ask him to drop the code on HN. I really want to use the codebases of the bottom three quarter to help drag up the quality bar - but like I said it's a hard thing to arrange. Added to this is that the lack of code literacy means these proprietary places can swim for years in the same circles never actually getting out from under. If companies want competitive advantage from their technology they need to invest in software and code bases - reducing the pressure on delivery (CI or just cut back on the expectations) and focusing on getting better code. I mean no-one argues that a novel written by two hundred teenagers will be less intelligible and workable than something by Salinger. Why the hell would we expect different from code. Not sure where I am going with this - other than writing good code is a big deal, and stuff that prevents it needs to get out of the way