|
how!! posted:I call it How!!'s rule of software complexity: As software complexity increases, bugs and features become indistinguishable.
|
# ? Jan 17, 2013 02:12 |
|
|
# ? Apr 27, 2024 17:53 |
|
how!! posted:Hows that any different than a new manager coming on board and noticing that %0.13 is being shaved off all transactions. He asks the programmers why that is. None of the programmers have any idea. Three days later a programmer finds that on line 63463 theres a bit of code that subtracts %0.13 off all transactions. Manager asks why it is doing that. Programmer has no idea. No other manager has any idea. Manager tells programmer to remove that code. Company is then fined. I call it How!!'s rule of software complexity: As software complexity increases, bugs and features become indistinguishable. If you believed in source control, you could use blame functionality to find out who wrote that code, when, associate it with a commit message that may explain things, or a way to contact the original programmer. But you don't believe in source control.
|
# ? Jan 17, 2013 02:13 |
Every loving word he posts should be bold, you mean.
|
|
# ? Jan 17, 2013 02:14 |
|
Did How!! get a job?
|
# ? Jan 17, 2013 02:16 |
|
how!! posted:I've never understood the need people have to sperg out about commit. How often do you *really* have to go back over your history to find a particular commit? It seems it "negatively effected" you here. Since you didn't document your change and the rationale for it, you just delete code.
|
# ? Jan 17, 2013 02:17 |
|
fritz posted:Did How!! get a job? Better question is How!! did How!! get a job(!!)
|
# ? Jan 17, 2013 02:19 |
|
Hamled posted:I once threw out an entire authentication system because it was an undocumented, unreadable piece of poo poo and I suspected it was full of bugs and security holes and other nasty poo poo. It turned out that we did actually use that system to allow users to log in. The fact that you threw out something without having the replacement ready is the coding horror, right? And was that SQL injection in your "clean, well-documented, understandable" code?
|
# ? Jan 17, 2013 02:19 |
|
ymgve posted:The fact that you threw out something without having the replacement ready is the coding horror, right? I think that was the point of that post, yeah.
|
# ? Jan 17, 2013 02:20 |
|
how!! posted:The fine we had to pay is the price it costs to improve the business. Holy poo poo.
|
# ? Jan 17, 2013 02:21 |
|
how!! posted:I call it How!!'s rule of software complexity: As software complexity increases, bugs and features become indistinguishable. Indistinguishable to people who are too loving stupid to read the code.
|
# ? Jan 17, 2013 02:22 |
Jewel posted:Better question is How!! did How!! get a job(!!) lol if you think he is employed.
|
|
# ? Jan 17, 2013 02:24 |
|
Smugdog Millionaire posted:Rewriting code because you don't understand it may not quite be as insane as it sounds. I read a Kent Beck blog post (I think, could've been some other notable person) wherein he claimed that refactoring was a useful technique he used to understand new codebases: he'd take a look at existing code and refactor it until he understood it. But of course he doesn't destroy 100% of the functionality in the process. That's actually what I did to get a grip on the code posted. If you make two versions, one where test_availability is true and one where it isn't, you end up with two ~200 line methods with a lot of duplicated code. When test_availability is true, it's clear that data never gets used outside of the method. On further inspection, the only times it's read in the method are for values which wouldn't change from self.data. Replace all those with the self.data equivalents and the method's less than half the size of the original just from cutting out middlemen and removing dead code. The code that's remaining contains a large amount of obvious duplication and if I cared to go further, it should be no problem getting below 100 lines: code:
|
# ? Jan 17, 2013 02:38 |
|
Python code:
Python code:
|
# ? Jan 17, 2013 02:47 |
|
how!!, do you have a blog? If not, you should start one. I'd love to read it.
|
# ? Jan 17, 2013 02:54 |
|
how!! posted:Hows that any different than a new manager coming on board and noticing that %0.13 is being shaved off all transactions. He asks the programmers why that is. None of the programmers have any idea. Three days later a programmer finds that on line 63463 theres a bit of code that subtracts %0.13 off all transactions. Manager asks why it is doing that. Programmer has no idea. No other manager has any idea. Manager tells programmer to remove that code. Company is then fined. I call it How!!'s rule of software complexity: As software complexity increases, bugs and features become indistinguishable. The manager in your example is an idiot for asking for a change without first understanding why the change is being made. If the code is doing something, you don't know why it's doing it, no one else has any idea why it's doing what it's doing, and nothing is broken, you leave it the gently caress alone.
|
# ? Jan 17, 2013 03:04 |
|
Ithaqua posted:The manager in your example is an idiot for asking for a change without first understanding why the change is being made. If the code is doing something, you don't know why it's doing it, no one else has any idea why it's doing what it's doing, and nothing is broken, you leave it the gently caress alone. What makes you think nothing is broken. A bit of undocumented code that seems to subtract %0.13 from all transactions seems to be broken to me. Maybe it was added by a programmer many years ago for debugging purposes and was left in by accident. Maybe it was put there to solve a problem that has since been solved some other way. You could be throwing money down the drain for no reason. This is why lovely, complex, undocumented code is bad and should be eliminated at all costs.
|
# ? Jan 17, 2013 03:16 |
|
Maybe trying to understand it or document it could be a better investment than dropping it and waiting for the bad consequences to come up.
|
# ? Jan 17, 2013 03:20 |
And the first step to documenting the code is finding some actual data in the production system that's affected by the strange code. Then when you've found it you run the input and output past the appropriate departments who should know about the business procedures and they should be able to tell whether it's correct or not, and why. If you can't find any data that seem to be affected by it then you instrument the gently caress out of the code and have it log stuff, then come back a month or two later and see what it caught. If still nothing, then it might really just be dead code. Of course that's only after checking the source control system and bug tracker you naturally have the the thing. At this point you've probably spent some 100 man-hours adding zero value. Congratulations on being useless. E: gently caress why did I even bite on this poo poo discussion. Please just shut up how!! and go flip burgers or something.
|
|
# ? Jan 17, 2013 03:22 |
|
GrumpyDoctor posted:how!!, do you have a blog? If not, you should start one. I'd love to read it. Subject: Not updating for a while I broke the Kwijybo Act of 1873 code during a rewrite, and as it turns out that the Kwijybo Act of 1873 is an important part of Kwijybian environmental conservation law. Long story short, I'm now being prosecuted under the Lacey Act and I will probably go to prison. - how!! Current mood: apprehensive Current music: ~ One Winged Angel ~ Nobuo Uematsu
|
# ? Jan 17, 2013 03:35 |
|
I'm going to go ahead and register freehow.com right now fake edit: gently caress it's already something else
|
# ? Jan 17, 2013 03:37 |
|
how!! posted:What makes you think nothing is broken. A bit of undocumented code that seems to subtract %0.13 from all transactions seems to be broken to me. Maybe it was added by a programmer many years ago for debugging purposes and was left in by accident. Maybe it was put there to solve a problem that has since been solved some other way. You could be throwing money down the drain for no reason. This is why lovely, complex, undocumented code is bad and should be eliminated at all costs. So is your solution to just stop subtracting the .13% in your unsolicited Django rewrite? It sounds like you're not at all interested in even asking anyone at all why a decision in that "massive" code base was made. I'm sure if you actually started asking questions, someone would have a reason. Making the assumption that it's a mistake, or even/especially someone's test/correction code, is bold as poo poo, and your belief that the company is at fault because you didn't ask why something existed is just insane. Even the best of the best developers/anyone will make mistakes, and it unfortunately means you basically have to be them to know why they made them. Don't assume you're smarter than those 50k+ lines. Edit: Maybe How!! should become my first ignore on SA ever.
|
# ? Jan 17, 2013 03:47 |
|
Maybe if you used real commit messages in your version control you'd be able to find out why that code was added. But then it's not like anyone would ever have a need to look at their commit history, right?
|
# ? Jan 17, 2013 03:51 |
No Safe Word posted:I'm going to go ahead and register freehow.com right now It's...a search engine...that removes spaces and puts in dashes instead edit: nevermind apparently it doesn't do anything. It is a php page though, so it's still apropos.
|
|
# ? Jan 17, 2013 03:52 |
|
Manslaughter posted:It's...a search engine...that removes spaces and puts in dashes instead Something deep inside me is telling me this is as the universe indented.
|
# ? Jan 17, 2013 03:54 |
|
how!! posted:What makes you think nothing is broken. A bit of undocumented code that seems to subtract %0.13 from all transactions seems to be broken to me. Maybe it was added by a programmer many years ago for debugging purposes and was left in by accident. Maybe it was put there to solve a problem that has since been solved some other way. You could be throwing money down the drain for no reason. This is why lovely, complex, undocumented code is bad and should be eliminated at all costs. Well that's not the only thing that can go wrong. I work on software that displays medical images. Long story short, a complaint comes in from another country that they can't use a navigation feature that tries to scroll together images that are parallel if you have images that have multiple orientations linked together. They bitch it's a safety issue, lots of smoke is blown. We sit down, we think about it, we're like "I know, let's not scroll together images that have different orientations." So we roll that out and suddenly a whole new set of doctors start bitching because they're trying to view two copies of the same stack of images in two different views and linking them together, and the scrolling is hosed up because we're excluding images with different orientations. The point is that sufficiently software can have unintended use cases. Like, we never designed the navigation aid feature to be used to link together images that weren't parallel, people just decided they were going to do that and decided that the current behavior is a safety risk! Then we tried to fix that, and we broke a completely unanticipated use case that we hadn't even imagined when we designed the goddamn feature! I work on a project that is six million LOC. It's so complicated that no single person has it in their own head just from a code standpoint, let alone requirements, and I just spend all day in meetings being like "oh, I think we put that patch in 2004 to make it so powerpoint would work if you copy pasted an image in because of some bullshit with the clipboard formats. Of course you don't need the option if you have an updated version of powerpoint because ms changed the way clipboard formats are handled but there's this one hospital that wouldn't update past that service pack and it's still in code because people would complain." It kind of sucks but we have enough trouble fixing the actual problems without putting ones in ourselves by mucking with stuff we don't need to muck with.
|
# ? Jan 17, 2013 05:02 |
|
how!! posted:What makes you think nothing is broken. A bit of undocumented code that seems to subtract %0.13 from all transactions seems to be broken to me. Maybe it was added by a programmer many years ago for debugging purposes and was left in by accident. Maybe it was put there to solve a problem that has since been solved some other way. You could be throwing money down the drain for no reason. This is why lovely, complex, undocumented code is bad and should be eliminated at all costs. Then you type <sourcecontrol> blame or hit the blame button the IDE and you see: "Added for Kwijybo Act of 1873 compliance" and are illuminated. But then again you'd probably just feel it should be eliminated anyway even if the cost is a fine equal to a month revenue because gently caress the business there's code to be eliminated.
|
# ? Jan 17, 2013 05:27 |
|
The next time that "everyone should learn to code" meme sweeps through hacker news, remember how!! exists and shudder.
|
# ? Jan 17, 2013 05:50 |
|
Hughlander posted:Then you type <sourcecontrol> blame or hit the blame button the IDE and you see: Remember, this is How!!, he thinks that using commmit messages is an unconscionable waste of time that could be better spent removing code (because no-one can figure out what it's for because there are no commit messages).
|
# ? Jan 17, 2013 05:52 |
|
*Deletes entire codebase* See perfectly clean look at that line count 0 lines 0 bugs and I didn't even have to check the specs
|
# ? Jan 17, 2013 05:59 |
|
It's not exactly code itself, but as much a horror as anything else. I saw it come up on the WordPress mailing list yesterday, and the How!!-chat reminded me of it. otto posted:Call me "ad-hoc" if you like, but when you say "structure", what I see No version control and Cowboy coding at it's finest from a core WP dev. The entire thread is pretty terrible. http://lists.automattic.com/pipermail/wp-hackers/2013-January/045129.html
|
# ? Jan 17, 2013 06:39 |
|
ultramiraculous posted:Edit: Maybe How!! should become my first ignore on SA ever. You'll get more wisdom reading a single How!! post than a dozen from anybody else on these forums.
|
# ? Jan 17, 2013 06:47 |
|
hepatizon posted:Indistinguishable to people who are too loving stupid to read the code. To be fair, I know of a couple cases (including one that was my fault) where we've had numerous customer complaints because we fixed a bug.
|
# ? Jan 17, 2013 06:59 |
|
Zhentar posted:To be fair, I know of a couple cases (including one that was my fault) where we've had numerous customer complaints because we fixed a bug. We fixed it and immediately received bug reports "Hey, a feature we were using stopped working, can you fix it? I used to be able to drag the window off the left hand side of the screen and still use it but now I can't!".
|
# ? Jan 17, 2013 07:09 |
|
That reminds me of a feature-as-bug where the product stored certain client state such as the window position on the server based on their account. For development purposes many developers just used the same account rather than creating new ones, so that meant everyone would get the window position as set by someone else. There was one guy who both thought that this was stupid and had the only multi-monitor setup so when they refused to change the behavior every night before he went home, he'd open the client, drag the window onto the right hand monitor and then close it. They fixed it shortly later.
|
# ? Jan 17, 2013 07:52 |
|
I've never understood applications that do that, or what thought-process happens to think it's a good feature. If you're storing that value server-side (maybe it's software used on a machine that doesn't keep any permanent state) then as soon as the resolution changes the settings should be invalidated. You wouldn't believe the number of support calls I got at a small business because of that "feature". Someone would log in and the window would be slightly larger than their resolution, making some buttons inaccessible. The software vendor basically told us that the best solution was to never resize the window to larger than our lowest resolution, which happened to be less than 640x480 on some touchscreen PCs used on the factory floor.
|
# ? Jan 17, 2013 08:07 |
|
how!! posted:I call it How!!'s rule of software complexity: As software complexity increases, bugs and features become indistinguishable. i found this thread from the lepers colony. this is probably the funniest thing i've read all day. THINGS ARE HARD. YOU CANT JUST NOT BREAK THINGS. NO ONE KNOWS ANYTHING.
|
# ? Jan 17, 2013 08:16 |
|
Please don't ban how!! he's the funniest horror in this entire thread (or any other) and his title gives fair warning to anyone reading his posts
|
# ? Jan 17, 2013 10:09 |
|
how!! posted:
It has a ton of identical or nearly identical copy-pasted code, and the whole thing is a switch statement. It's as if this monster method already has tear lines ready for you. I'd wager it would take a good Python coder a hour to make this code readable/testable while keeping the behavior identical.
|
# ? Jan 17, 2013 11:17 |
|
fritz posted:You'll get more wisdom reading a single How!! post than a dozen from anybody else on these forums. Maybe you're right... Not that I was ever the worst committer in the world, but I've been way more vigilant about making sure my commits and their messages since How!! started posting. I think long and hard before typing "git commit -am" and I'm way better at making sure the commit messages match up to the lines that got changed. Maybe How!! is really just here as a lesson to all of us. pigdog posted:I'd wager it would take a good Python coder a hour to make this code readable/testable while keeping the behavior identical. No, you're wrong, it's clearly a problem with the web framework/ORM they're using. Just trash it and start over.
|
# ? Jan 17, 2013 11:45 |
|
|
# ? Apr 27, 2024 17:53 |
I've honestly learned a lot by watching people make fun of how!!, putting him on ignore would be a monumentally poor decision on my part.
|
|
# ? Jan 17, 2013 11:48 |