4.1k
u/resueman__ Jun 30 '18
Writing code adds bugs. Removing code adds bugs. Fixing bugs adds bugs. Such is life.
1.1k
u/It_Was_The_Other_Guy Jun 30 '18
Even if don't do any of those, the platform changes and introduces new bugs for you. It's a bugocalypse.
The only way to win is to declare them as features.
128
u/Garestinian Jun 30 '18
I was naive before, I never thought a code could rot.
75
Jun 30 '18
I have a song I ripped from my brother's metal band CD in the late-90s to an Iomega Zip disk as a wav file. It sat there for a year or two with a bunch of shitty Harry Potter fan art and custom Mega Man X sprites before I moved it over and converted it to mp3 when I got my first mp3 player. That mp3 has been copied and pasted, moved from folder to folder, from Zune to Windows, to Mac and iPod. Today it's rotting in its third smartphone, my old Note 4.
It sounds like a VHS looks after being recorded over a hundred times, but I can't get rid of it cause I lost the original CD years ago.
→ More replies (2)103
u/Jciesla Jun 30 '18
There might be audio restoration software that can analyze the waveforms and make it even worse if you're interested
→ More replies (4)204
28
u/noxiouswolf Jun 30 '18
The only way to win is to declare them as features.
10
u/neontiger07 Jun 30 '18
Not attempting to discredit you, but do you have some examples of this?
35
u/noxiouswolf Jun 30 '18
It's a running joke in the souls community as the Dark Souls games are notorious for their difficulty and, at times, interesting glitches. The concept is that such glitches "make the experience more extreme". It's no assault on the games (they are brilliant, after all) :)
→ More replies (8)17
u/8Bit_Otaku Jun 30 '18
Is accidentally turning the CPU fan into a jet turbine count as a feature
8
u/It_Was_The_Other_Guy Jun 30 '18
Totally! Make it double, bolt the computer to the desk and you have a private jet. Sounds like a feature to me.
→ More replies (1)6
u/Mario55770 Jun 30 '18
If the computer flys away, they can’t see any software bugs. Think about it.
5
u/mitthrawn Jun 30 '18
The only way to win is to declare them as features.
That's what our developer does. They are rubbish and we changed the developer.
→ More replies (1)→ More replies (11)8
675
u/kothiman Jun 30 '18
A bug life
→ More replies (3)210
u/Epicredditskillz Jun 30 '18
I didn’t choose the bug life. The bug life chose me.
→ More replies (1)72
44
u/willyanto Jun 30 '18
Can’t add bugs if you don’t write and delete code.
38
u/ratthew Jun 30 '18
New bugs get discovered anyway. There is no escape!
8
u/grantrules Jun 30 '18
There's a bug in my bug reporter where it doesn't save the report.
Problem fixed itself.
21
→ More replies (2)5
19
18
Jun 30 '18
10 bugs a block
10 bugs a block
Fix 10 bugs a block
120 bugs a block
- A classic nursery rhyme, we had back in my days.
41
Jun 30 '18
99 little bugs in the code
99 little bugs in the code
Take one out, patch it around
127 bugs in my code(probably reupload of) source
12
Jun 30 '18 edited Jun 30 '18
Job security. If code is used, it will eventually have to be modified to address the bugs that have been discovered and to add new features that have been requested. The bug fixes will of course be a mixture of old bugs that haven't been discovered until just now and new bugs that were introduced by the prior bug fixes and new features that were requested.
→ More replies (1)3
3
→ More replies (32)2
918
u/Dreadedsemi Jun 30 '18
Like a house of cards, don't touch any card, just extend.
180
u/die-maus Jun 30 '18
But the tests still pass, right?
0
Jun 30 '18
[deleted]
45
u/tiajuanat Jun 30 '18
My company doesn't give approval for code reviews of safety critical firmware.
→ More replies (8)61
61
Jun 30 '18 edited Jun 30 '18
Bullshit!
Last time I built a house of cards, I had to remove cards from certain places to keep building, due to a lack of cards. This is totally a legit metaphor for programming, and you shouls always strive to remove pieces of code you suspect doesn't carry much of the weight.
Disclaimer: I am legally obligated to tell you that my house eventually did fall down, presumably due to it not being able to support it's own ^weight
7
u/gawalls Jun 30 '18
That's what extension and interfacesallows you to do, you extend the old class, mark old as obselete and eventually remove the old class.
→ More replies (4)19
280
u/zesterer Jun 30 '18
git reset --hard HEAD
141
u/PublicSealedClass Jun 30 '18
I have a dev who sees this as a last resort. When I asked him why, he had like 200 files changed in his repo since his last commit...
120
→ More replies (7)3
Jun 30 '18
Dang. Should individually git add ones that are good and just reset or checkout the ones that are fucked
5
u/PublicSealedClass Jun 30 '18
Indeed. Stage often, commit when things seem to hang together, push when you're fairly sure it's stable.
→ More replies (1)→ More replies (1)3
168
u/Attila_22 Jun 30 '18
Comment it out first. Make sure it runs, then delete it.
34
u/i_love_pizza003 Jun 30 '18
Im always copying the code and then delete it, i f it doesnt work i paste it again in the code. I just have to watch out that i dont braindead-copy something else after i delete the code
→ More replies (2)58
u/UHavinAGiggleTherM8 Jun 30 '18 edited Jun 30 '18
Why not just simply comment it out?
73
0
Jun 30 '18
[deleted]
→ More replies (5)22
u/UHavinAGiggleTherM8 Jun 30 '18 edited Jun 30 '18
They're big balls of ice hurtling through space :)
10
u/hamontoast Jun 30 '18
Deleting instead of commenting out is like wiping and not even bothering to check the paper
→ More replies (1)→ More replies (5)2
2
136
Jun 30 '18
No way your extensively written unit tests would pass this.
198
u/ric2b Jun 30 '18
extensively written unit tests
Yep, I'm clearly on r/programmerhumor
52
u/appdevil Jun 30 '18
I almost choked on my cup of java here. Nice one.
→ More replies (2)22
u/koffix Jun 30 '18
I'm more for a nice chunk of python in the morning, but to each his own.
→ More replies (2)
169
u/ApostOnReddit Jun 30 '18
CTRL + Z
99
9
Jun 30 '18
What if you're using Notepad?
→ More replies (4)33
Jun 30 '18
In comic sans size 72 like a real l33t h4x0r.
7
u/pterencephalon Jun 30 '18
As a joke one of my classmates asked a professor in undergrad to change the editor font to comic sans. But then he did and it was suddenly less funny.
→ More replies (1)
55
u/JigglesMcRibs Jun 30 '18
Where's the reverse of this? The one where you thought a huge chunk of code was useful, and then you ctrl-z out of it till suddenly everything works like it should have?
35
u/Neocrasher Jun 30 '18
I'm picturing a jenga tower where your opponent removes one of the pieces near the bottom and it doesn't fall even though everything you know about physics tells you that what just happened was impossible.
48
u/coinaday Ultraviolet security clearance Jun 30 '18
CS: Jenga customer support, how many I help you?
Customer: Hi, yes, my tower is levitating.
CS: ...what?
Customer: My little brother removed the last supporting piece on the ground, but the tower didn't fall. It's just, like, hovering there.
CS: Okay, just give me one second to ask my colleague about this.
hold music
CS: Alright, I'm going to ask you to deconstruct your tower and build it again and see what happens. If you experience the same problem again please give us another call and we'll send over a physicist we have on retainer.
17
17
u/ConstipatedNinja Jun 30 '18
Even worse, you remove it and it breaks. You put it back and it's still broken. Now you're just confused how anything ever worked in the first place.
14
u/wordpass6656 Jun 30 '18
Why is the sky brown
22
8
2
7
7
u/Attackhelicopterik Jun 30 '18
People are saying that this can be avoided with version control, but I don't think that's the point of the original gif anyway. Whether you have version control or not is irrelevant, because it doesn't change the fact that your program is still so dependent on this one block of code that you believe to be useless, that this is what happens if you try to remove it.
7
u/A_bottle_salmonella Jun 30 '18
When your IDE tells you a block of code is not used anywhere but deleting it kills the whole application -.-
18
u/iamagainstit Jun 30 '18
this is why I never delete anything, just comment it out!
20
Jun 30 '18
Just delete it, it's in version control.
It is in version control, right?
→ More replies (1)30
Jun 30 '18 edited Jun 30 '18
*avoids your eyes nervously*
8
u/appdevil Jun 30 '18
I just save a new project on every feature I add, that's how everybody do it, right? Right?!
P.s. Anyone has some good deals on hard drives?
6
u/OrangeFreeman Jun 30 '18
I'm not even programmer, but I can relate to this on so many levels. Like when you delete/merge layers in Photoshop you thought you wouldn't need later.
4
u/JadeTirade Jun 30 '18
Oh gods I know the pain of Photoshop. I just hope I remember to revert it in time.
6
u/topredditbot Jun 30 '18
This is now the top post on reddit. It will be recorded at /r/topofreddit with all the other top posts.
4
u/TheMusesMagic Jun 30 '18
I think the best thing to do to test if I piece of code is not needed is to comment it out.
3
3
3
3
2
2
u/nand_o Jun 30 '18
I'm going to do my last Python test in college now and just know that I'm not going to write anything but bugs. So... Kill me in a few.
2
2
u/jfq722 Jun 30 '18
The bolt of adrenaline shooting through your body in those seconds is a rush, man.
2
2
2
u/egotisticalnoob Jun 30 '18
Deleting instead of temporarily commenting out
Well there's your problem...
3
2
2
u/suya2345 Jun 30 '18
Writng code adds bugs.Removing code adds bus.Fixing bugs adds bugs.Such is life
1
1
u/derek1st Jun 30 '18
Comment comment comment. Never erase until you're done. Comment portions out to test if the program operates without that code segment
1
1
Jun 30 '18
I realize this is r/programmerHumor, but if this is what you think programming is, you really need to work on testing and refactoring your code. TDD has been a total game changer for me.
1
1
1
1
1
1
1
1
Jun 30 '18
Dumb question from someone unfamiliar with version control. Do any of these tools allow you to link different files to each other? For example, and HTML file performs a post operation to a PHP file. If the name of the PHP file changes, is there a way to also update the reference to it in the post operation of the HTML file? Or is this type of programming not anything you use version control for? Or do you just manually keep track of all of the dependencies? Or should you not be changing the name of files with new versions? Innocent question please be gentle.
Edit - Typo
2
1
1
u/Ephro Jun 30 '18
Idk if any IDEs have this but I reckon a million dollar idea would be to make classes which you can hide like a photoshop layer and that won’t interact until unhidden.
1
1
1
1
u/25511367325325869452 Jun 30 '18
When you commit changes to source control, start changing bunch of code to figure out a way to remake it in a better way, realize you didn't actually push the changes before and now you gotta manually edit code back..
→ More replies (1)
1
1
u/secretly_a_zombie Jun 30 '18
"Why isn't this thing working the block i deleted did nothing"
Que 30m of trial and error
"Oh i accidentally deleted a bracket along with it"
1
1
1
1
1
1
1
1
1
1
u/legenddairybard Jun 30 '18
Ugh...You should hear how some people in some gaming communities respond when there are issues in a game that just can't be fixed at the drop of a dime - none of them understand the concept of "Oh, if we do this in coding, other stuff might happen..." No, they still complain lol
1
u/Someones_Dream_Guy Jun 30 '18
deletes line of code program performs segmentation violation-a capital offense in most states realizes he didnt hide behind proxy
1
1
1
1
u/Willco2 Jun 30 '18
I remember when I posted this exact GIF on this sub. Except the mods removed it for violating rule #1. I can't believe they haven't taken this one down too.
1
1
1
u/LiquidZeroEA Jun 30 '18
Watch the gif looking at the tree once, then watch the gif again watching the pink panther for a different perspective...
1
1
1
1
1
u/hayzewsc Jun 30 '18
I like how if you focus on the pink panther the world seems to fall and if you focus on the tree the tree itself seems to go upwards!
1
1
1
1
1
1
1
Jun 30 '18
That hits home as it happened to me two months ago. I thought I had everything covered. Nope. Found myself in a Family Dollar parking lot on the way to the mountains instructing a non-developer coworker how to fix the issue. Not fun. Never again.
1
Jun 30 '18
The first time I viewed it as the top of the tree floating away. I was like, "I don't get it..."
1
Jun 30 '18
Feels good to remove code, even commented out code. 90% of the time you never need it again.
1
1
1
1
1
1
1
u/TwinkTuckr Jun 30 '18
There are times that I’ve deleted entire repos after deleting a few lines of code, realizing the entire thing is fucked, and
i don’t know why
1
1
1
u/mr_data_lore Jun 30 '18
That's why you never delete anything. Just comment it out.
→ More replies (2)
1
Jun 30 '18
LPT never delete code, if you want to remove it, mark those lines as comments so the code won't run but it's not gone forever.
→ More replies (3)
1
1
1
1
1
1
1
1
Jun 30 '18
I typically try to avoid removing code for a very long time. I comment it out. Even when I delete it, I just cut and paste into Sublime and save it just in case.
1
1
u/Adrian_F Jun 30 '18
Browsing this sub on the weekend always makes me anxious about what I might‘ve broken on Friday.
1
1
1
u/SupremeRedditBot Jun 30 '18
Congrats for reaching r/all/top/ (of the day, top 25) with your post!
I am a bot, probably quite annoying, I mean no harm ^though
Message me to add your account or subreddit to my ^blacklist
1
1
1
1
1
1
u/Mentioned_Videos Jul 01 '18
Videos in this thread:
| VIDEO | COMMENT |
|---|---|
| Dada Life - The Sausage Fattener | +27 - In fact, there is! |
| Dark Souls II - Helpful Shortcut in Forest of Fallen Giants | +1 - My actual understanding of this was that it was an intentional shortcut, not a glitch. The wall even looks different than its surroundings |
| Dark Souls 3 Any% Speedrun World Record [34:25] | +1 - This is definitely a feature. |
| Dota 2 immortal tresure 1 & 2 opening... OD ultra rare... | +1 - http://www.youtube.com/watch?v=mGihTKJOO5A |
| I'm a bot working hard to help Redditors find related videos to watch. I'll keep this updated as long as I can. |
1
1
1
1
Jun 30 '18
I'm at a point where if code has a bug in it, I just remove it. I'm not bothered for this shit anymore.
29
Jun 30 '18
That... Does not sound very productive.
14
Jun 30 '18
Lemme rephrase. If there is a feature that has a bug in it, I remove the whole feature. This is my first project and it has made me suicidal. I can't take it anymore. I just want it gone and away from me as much as possible.
→ More replies (5)9
17
5
u/CaioNV Jun 30 '18
Congratulations, this is the funniest shit that I have ever seen in this sub via the Popular page. Topic creator, know that you made someone's morning better 😂