6 ms·
I think true spaghetti code requires teamwork. I mean that seriously. You need at least 3 people all with different incomplete and incorrect mental models tryin
by beala 9y ago
I think true spaghetti code requires teamwork. I mean that seriously. You need at least 3 people all with different incomplete and incorrect mental models trying to modify the same codebase at the same time.
- russellbeattie 9y agoI agree. But then again, I'm like a completely different programmer than I was a few years ago, and even more different than I was years before that. I've got some long running personal scripts and projects I tweak every so often, and the end result is pretty much the same. "What the hell was I doing here? Whatever... I'll just add a bit of code and get it working. Done."
- davisdude 9y agoThat describes my experience with some of my GitHub projects fairly accurately. Actual commit I did a few days ago: > Begin rewrite of rewrite of rewrite
- worldsayshi 9y agoYeah, that sort explains why it's so hard to get anywhere with vaguely defined free time projects.
- davisdude 9y agoYeah. The trouble is, I have a very clear idea of what I'm doing when I start it, but then I get busy and drop the project for weeks to months at a time, only to pick it back up again. Sometimes I remember exactly what was going on. Most of the time, though, I look at the code, think "This was done horribly! Why are there so few comments?" then proceed to do the exact same thing. It's a vicious cycle...
- zokier 9y agoInstead of having everyone working at the same time, stretch out the team over longer time with some overlap. This ensures both the "broken telephone" effect and discourages any major improvements.
- eric_h 9y agoI disagree. I inherited an app that I'm maintaining that was written by one person over ~12 years. When requirements were added, he just cloned the app and started making the changes so the new app would meet the requirements. Repeat 2 more times, and you get to now, where there are 4 similar but not identical versions of the same code base, with inconsistently applied fixes to various bugs. All 4 still need to work for the organization to function. It's old school PHP, with sql queries mixed in with markup mixed in with php business logic - if that's not spaghetti code, I don't know what is. (I'm replacing it, but it's a very slow process).
- iaw 9y agoMy inherited spaghetti codebase took only 24 months for my predecessor to build. I was told: "don't worry, it's in SVN and all of the important switches are clearly laid out at the top." Well, it was in an SVN repo... with a single commit. It did have all the important switches at the top, none of them but the ones that were set actually worked. Man, I "miss" that job.
- quickben 9y agoWas the comment of that commit 'initial commit'? :)
- koolba 9y agoNot GP but probably: “Here be dragons”
- taw55 9y agoI actually did that once. It was a wordpress site for a company written by some 16 year old intern. Terribly fun. No version management. The main folder had multiple older copies of itself in seemingly random subfolders. It went deep. The CSS was stored partially in CSS files, of which there were 20 (!) loaded from the theme folder, partially in one of the 40+ plugins used (not an exageration). But there was also plenty of CSS in the templates, the database and seemingly random third party servers. The favicon was 20MB large. It used like 4 plugins for “custom fields” all of which had infected large swathes of the database, and all of which did... something. Much like the root folder had nested copies of itself there was something similar going on in there... I simply didn’t bother by the time I understood what the hell was going on. The templates were basically this premium theme of “customized” php, the fun part was that in some page templates it basically rendered a bunch of different pages inside the template (the guy apparently didn’t understand the concept of closing tags, yet somehow made it work. It was incomprehensible.) and then used custom css to hide the pages that shouldn’t be visible. Basically the entire thing was some satanic equillibrium of bugs cancelling eachother out. It was a work of art.
- contravariant 9y agoNah, just the one incomplete and incorrect mental model will do just fine.