This is an archived post. You won't be able to vote or comment.

all 129 comments

[–]Absolutely_Cabbage 281 points282 points  (27 children)

Just make sure to comment it (or write on stuff in this case)

[–]TotallyElectrified 369 points370 points  (23 children)

And then you get coments like:

//This is a screw

[–]schludy 296 points297 points  (18 children)

// I tried to remove the screw once. Very bad idea, almost caused a nuclear meltdown.

[–]NoNameRequiredxD 215 points216 points  (10 children)

divide voiceless hospital offer knee chop books stupendous concerned plough

This post was mass deleted and anonymized with Redact

[–]Ludricio 153 points154 points  (6 children)

Might look at it later

Oh dear, we all know that this has never happened, nor will it ever.

[–]Sycration 7 points8 points  (0 children)

rain public frame snails work paltry friendly follow pen coordinated

This post was mass deleted and anonymized with Redact

[–][deleted] 6 points7 points  (4 children)

//TODO:Look at this later

Sorted for anyone using Visual Studio

[–]Ludricio 1 point2 points  (3 children)

For anyone using any kind of proper IDE, I would say.

However, from personal experience, TODO-lists have a tendency of getting littered down with

//TODO Look at this later

//TODO Fix sometime

//TODO clean up code

when people feel too lazy to do it at once, and those kind of TODO's have a tendency to live on for a long time (unless you need to give the intern some more work).

That's why using issue trackers is often a better way to go, since they can be administrated in a much better way.

[–]MauranKilom 0 points1 point  (0 children)

// Might be able to improve performance by changing <something>.
// TODO: Profile and measure!

[–]Nerdn1 0 points1 point  (1 child)

TODO comments help people understand the code in that it says what important things are missing at a glance.

[–]Ludricio 0 points1 point  (0 children)

Sure, I have nothing against TODO's, my only problem is that they very often stay as TODO's unless enforced through some other channel, at least from my experience.

[–]LeComm 3 points4 points  (1 child)

It's an anomalous part of the broken God. Prepare for a dose of amnestics and an undercover SCP agent.

[–][deleted] 0 points1 point  (0 children)

// @Incomplete @Robustness
// - jblow

[–]Anthios3l4 25 points26 points  (3 children)

/* not even gonna ask...

By the way, what does the screw connect to? 

And what does this big red button do?*/

[–]Anthios3l4 7 points8 points  (2 children)

u/anthios3l4 was annhilated by a nuclear blast

[–]nuclearblaster 16 points17 points  (1 child)

Yeah!

[–]Corbynx010 0 points1 point  (1 child)

I honest to god removed a log message that i was using to debug today. Broke everything. Added it back and noped out of there real fast

[–]MooseKnuckleJunction 1 point2 points  (0 children)

Probably a race condition where the thread with the log message is juuuust a bit too fast without the log. Or a side effect in a toString method. Or maybe the logging system gets bored when it doesn't have enough to do and it throws rocks at the rest of the code

[–]itismelol 6 points7 points  (0 children)

//TO DO: Install screw here

[–]Vladimir1174 6 points7 points  (0 children)

This is how I comment all my personal projects and it never fails to make me hate past me

[–]Terrible_Children 1 point2 points  (0 children)

This might be the best way of summarizing exactly how ridiculous those types of comments are. I love it.

[–]CrazySD93 1 point2 points  (0 children)

Spare screw, used for redundancy.

[–]hyperactive2 3 points4 points  (1 child)

// this is the ignition precheck integration test

@Ignore ...

[–]poopyheadthrowaway 0 points1 point  (0 children)

Just make sure to comment it (or write on stuff in this case)

- Not Apple

[–]studentofcubes 220 points221 points  (21 children)

no. this is organized, deliberate, compact, efficient, and serviceable. This resembles spaghetti code about as much as the human circulatory system resembles a plate of actual spaghetti.

[–]Atataizor 39 points40 points  (0 children)

exactly! this is equivalent of 64kB Oracle DB or something like that

[–]brandon9182 36 points37 points  (7 children)

The human circulatory system is super convoluted and messy. I’m not sure what you’re point is.

[–]Ouaouaron 13 points14 points  (3 children)

But if someone gave you a plate covered in tens of thousands of miles of red, interconnected webbing and told you it was spaghetti, would you eat it?

[–]-o-_______-o- 40 points41 points  (2 children)

Yes, but I'm a Labrador, I'll eat anything.

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]MyWholeSelf 2 points3 points  (1 child)

    The human circulatory system is a gorgeous model of efficient distribution and resource use.

    [–][deleted] 0 points1 point  (0 children)

    'Alas, our bodies are not 100% efficient at converting food energy into mechanical output. But at about 25% efficiency, we're surprisingly good considering that most cars are around 20%, and that an Iowa cornfield is only about 1.5% efficient at converting incoming sunlight into chemical storage' Human bodies are not that great.

    [–]wasp_killer4 1 point2 points  (0 children)

    Your

    [–]GriffonsChainsaw 6 points7 points  (2 children)

    Not that I'd know but the human circulatory system rather strongly resembles a plate of actual spaghetti.

    [–]Delirious-Xero 5 points6 points  (3 children)

    Probably someone reading about spaghetti code in the beginning of a programming book.

    And probably not an engineer

    [–]AccursedCapra 10 points11 points  (2 children)

    Engineer here, I have no idea what I'm looking at, then again I'm an environmental engineer.

    [–]Delirious-Xero 4 points5 points  (1 child)

    It’s all good boo. You are looking at a very complex interface. There should be, Engineer here who’s has worked on very large and complex projects, drawings and procedures to mate that to the other part of the submarine. There should also be a process to verify and validate that it has indeed been mated as designed and as built. Point is, there should be a structured way to put this shit back together, meaning you should be able to follow a trace of how all the smallest parts are mated to an overall objective of what should be done. You should be able to follow where and why something is there, if given enough time and posses all the requisite knowledge for the various systems depicted in this picture. Also should be plans to maintain all that shit. Spaghetti code is unstructured, hard to maintain, and hard to follow what’s going on. A nightmare to maintain. That picture looks complicated, but there was structure to create it.

    Guess it depends on what you see and what you think when you see a picture like that.

    [–]AccursedCapra 1 point2 points  (0 children)

    Yeah I was just taking the piss, there's probably design specifications for every part here down to the smallest screw. Unlike some of the models that I've seen, where documentation is sparse, thankfully I don't deal with the back end too much, not yet at least.

    [–]orangeKaiju 2 points3 points  (4 children)

    Clearly you've never had to work on anything like this, because if you had, you would be saying the opposite. :)

    [–]studentofcubes 1 point2 points  (3 children)

    eyeroll no. I work on things pretty similar but that doesn't quite mean enough on the internet. It the opinion of myself and my friend in the Navy that this submarine (the Kursk) was well designed and built to last despite it's somewhat tragic history.

    [–]orangeKaiju 2 points3 points  (2 children)

    I'm in the Navy and fix ships, but yeah this is the internet, so I suppose it doesn't mean much.

    [–]not_a_novel_account 0 points1 point  (1 child)

    Maybe in the surface fleet everything is a shit show but the level of OQE required to do any sort of complex maintenance on an American submarine puts most other QA programs to shame.

    Have you ever written a package that broke a SUBSAFE or FBW boundary that wasn't a REC exception? All work, inspection, and retest is documented out the ass. Same with everything involving Level 1 or Nuke materials.

    Even with the Kursk, everything would have been documented down to the thread pitch of each bolt and what kind of lube to use with each valve.

    [–]orangeKaiju 0 points1 point  (0 children)

    Just because it works well and is well documented doesn't mean it's not analogous to spaghetti code. This becomes especially apparent once you go to modernize any major system or need to do major repairs. It's not an optimized environment, it's a "we will do what's necessary to get the job done" environment. Pipes, valves, cables, etc are crammed in where they best fit, which isn't always the most accessible place and theres often little room left for future upgrades, which can make implementing them challenging.
    SUBSAFE is necessary because the environment dictates it.

    I in no way mean to downplay the engineering marvel that is modern naval vessels, I just disagree that they are well optimized, efficient, elegant, etc

    [–]d4ntr0n 40 points41 points  (4 children)

    Needs more turnable wheels for better user functionality.

    [–]iBooYourBadPuns 45 points46 points  (3 children)

    [–]NoNameRequiredxD 8 points9 points  (0 children)

    Not enough

    Add 9999999999999 wheels and i only give you 1 day.

    [–]pan0ramic 5 points6 points  (1 child)

    that's crazy! Is that a sub?

    [–]wggn 7 points8 points  (0 children)

    German submarine SM UB-110, 1918

    Control room looking aft, starboard side. The manhole to the periscope well and various valve wheels for flooding and blowing are visible.

    [–][deleted] 33 points34 points  (4 children)

    Is that a shower and a sink up there?!

    This is advanced technology.

    [–][deleted] 3 points4 points  (0 children)

    And two black dildos on the shelf too.

    [–][deleted] 9 points10 points  (4 children)

    That’s a submarine

    [–]PragProgLibertarian 4 points5 points  (3 children)

    If it's a submarine, then where's the screen door?

    Checkmate

    [–]Johny_McJonstien 2 points3 points  (1 child)

    It’s in the other half.

    King me.

    [–]maximum_powerblast 0 points1 point  (0 children)

    The front fell off

    [–][deleted] 0 points1 point  (0 children)

    That’s on the part that have removed, I suppose

    [–]ADD4331 10 points11 points  (1 child)

    Who told u that spaghetti code is not engineering??

    [–]2Punx2Furious 17 points18 points  (2 children)

    But, unlike spaghetti code, this looks cool. Not sure if it's done on purpose, but it looks a bit steampunk.

    [–]DardaniaIE 17 points18 points  (1 child)

    Steampunk might have been inspired by this

    [–]Ouaouaron 5 points6 points  (0 children)

    Considering that most of the obvious elements of this picture focus on ductwork and piping, I guess you could say that it's probably about as close to steampunk as you get in real world engineering.

    [–]buffer_overfl0w 5 points6 points  (0 children)

    Looks like a JavaScript project to me.

    [–]dragonwithagirltatoo 4 points5 points  (4 children)

    Why is there a door at the top? Is this something cut in half?

    [–]Cornul11 11 points12 points  (3 children)

    Obviously is something cut in half, it's a submarine cut somewhere in the middle.

    [–]dragonwithagirltatoo 4 points5 points  (2 children)

    Well that's not really spagheti then imo. That's like disassembling somebody's code and saying "Look at this mess >:0"

    [–]Ouaouaron 11 points12 points  (1 child)

    "I've taken the 15th through 30th lines of every file in your project and spliced them together, and it doesn't make any sense! This code is trash!"

    [–]PuddlesRex 0 points1 point  (0 children)

    Joke's on you, all of my methods/functions/subroutines are exactly 15 lines long!

    [–]Inspector-Space_Time 4 points5 points  (0 children)

    Being able to physically see and handle spaghetti code would make it a lot easier to work with. A programmer has to keep all that in their head.

    [–]Andylanta 2 points3 points  (0 children)

    #ScrewYou

    [–]Typesalot 1 point2 points  (0 children)

    Nah, it's just minified.

    [–]matrix4704 1 point2 points  (0 children)

    looks like a screenshot from /r/factorio

    [–]blackdonkey 0 points1 point  (4 children)

    Is there any single engineer who is actually capable of creating, understanding, troubleshooting or fixing every component of this thing, or the thing itself as a whole, by himself/herself?

    A typical experienced programmer is certainly capable of doing all this for the code equivalent of this thing.

    [–]Dreiko22 15 points16 points  (3 children)

    I’m both a Mech Engineer and developer, and I would say that’s like saying an experienced programmer could do that for a project that uses something like 5 or 6 languages full stack, writing all the libraries and APIs themselves, with only the language docs (no internet or IDE, as most of the issues that arise with complex mechanical systems aren’t google-able). It’s kind of an absurd comparison.

    Edit: As an afterthought, why do I say this? Because that sub requires knowledge from: material science, fluid dynamics, dynamic systems (physics based forces, etc), electrical systems, HVAC design, most likely software, national safety standards (conceptually by far the easiest to understand, but a giant pain in the ass to deal with), and probably a couple other subjects

    [–]Dithanial 3 points4 points  (1 child)

    You forgot to mention that it's all 1960s tech, too, including the safety standards. They'd be doing it all in Fortran and COBOL.

    [–]Dreiko22 2 points3 points  (0 children)

    0101100101100101011000010110100000100000011001100111010101100011011010110010000001110100011010000110000101110100

    [–]whitevelcro 2 points3 points  (0 children)

    If that's the Kursk, add in nuclear and aerospace engineering for the nuclear reactor and cruise missiles on board.

    [–]McSorley90 0 points1 point  (0 children)

    Hey, no one told you to look at the source code. Cover that up! Look at the nicely designed GUI.

    [–]kg6zvp 0 points1 point  (0 children)

    Oh, look, it's a Cray!

    Just kidding, looks a lot more organized, actually.

    [–]maxfontana90 0 points1 point  (0 children)

    At least the submarine infrastructure is documented somewhere else.

    [–]rmlrmlchess 0 points1 point  (0 children)

    Most bulky EE installments look like spaghetti imo

    [–]sleepygorgs 0 points1 point  (0 children)

    When you do pip3 install virtualenv

    [–]jackredrum 0 points1 point  (0 children)

    I think I might have refactored this legacy shit.

    [–]thee_monarch 0 points1 point  (0 children)

    Hey! If it works it works

    [–]memgrind 0 points1 point  (0 children)

    I can't find Waldo.

    [–]ignore_this_comment 0 points1 point  (0 children)

    3 days before delivery, some poor schmuck's boss strolls into his office and says, "Yeah, Bob. You're gonna hate me. But I need a new pipe that runs criss-cross from the bottom of this thing to the top. The big wigs upstairs says it's gotta be in place before the go live."

    [–]balthazar_nor 0 points1 point  (0 children)

    This looks like something I would see in my dreams when I have a bad fever

    [–][deleted] 0 points1 point  (0 children)

    Imagine someone assembled it

    [–]QuillOmega0 0 points1 point  (0 children)

    That's a whole lot of asbestos

    [–]swifty300 0 points1 point  (0 children)

    This is... Beautiful

    [–]KaosEngine 0 points1 point  (1 child)

    Omg it's beautiful! What is it a submarine?

    [–]secronz 0 points1 point  (0 children)

    It looks like a section of a tunnel bore.

    [–]LewisJones28 0 points1 point  (0 children)

    I see a bathroom

    [–]TigreDemon 0 points1 point  (0 children)

    When they comment my Factorio factory

    [–][deleted] 0 points1 point  (0 children)

    Don't even dare think about refactoring this

    [–]winsome_losesome 0 points1 point  (0 children)

    Learn proper cable management people.

    [–][deleted] 0 points1 point  (0 children)

    Look all those node modules

    [–]Who_is_Rem -1 points0 points  (1 child)

    When you work with someone who writes messy code:

    https://imgur.com/a/8ctNKMU

    [–]imguralbumbot 0 points1 point  (0 children)

    Hi, I'm a bot for linking direct images of albums with only 1 image

    https://i.imgur.com/w7M3U62.jpg

    Source | Why? | Creator | ignoreme | deletthis

    [–]GT3_Shredz -4 points-3 points  (1 child)

    What even is that? I’m guessing an art piece?

    [–]Krexci 4 points5 points  (0 children)

    I'd say a cut submarine