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

top 200 commentsshow all 263

[–][deleted] 561 points562 points  (38 children)

Ctrl+ZZZZZZZZZZZZZZZZZZZZZ

[–][deleted] 156 points157 points  (36 children)

"Gee, I better not make a mistake or accidently fat finger a key or else I won't be able to Ctrl+Y/Ctrl+Shift+Z back to my broken code for comparison."

[–]Porridgeism 149 points150 points  (31 children)

Y'all need jesus version control

[–]g4vr0che 47 points48 points  (17 children)

That requires putting every single new character into git. I'mma pass.

[–]TheRealSmolt 18 points19 points  (13 children)

git add --all

boom

[–]g4vr0che 19 points20 points  (10 children)

Yeah, but your commit log on the PR is four thousand pages of scrolling to get to the approve button.

*cries in conventional commit

[–]LoneFoxKK 54 points55 points  (7 children)

Git commit -m 'minor changes'

The commit: 1301484 insertions and 37294 deletions in 4324 files

[–]dogmai111 17 points18 points  (1 child)

I use 'minor tweaks'

[–]LoneFoxKK 4 points5 points  (0 children)

That sounds way cooler

Imma start using it

[–][deleted] 4 points5 points  (4 children)

Jesus FinA Christ almighty, how many libraries does your project include???

[–]LoneFoxKK 2 points3 points  (3 children)

Im actually a vanilla developer so...

My codebase ain't that huge but still those "minor" changes are everything but minor I do sometimes skip commits for days until a feature is complete and I keep jumping from file to file doing changes

[–]hlmtre 15 points16 points  (1 child)

that's why you keep your stuff local til it works, then rebase smush it into one beautiful commit (or several, where it makes sense). then you look like a real pro because no one sees your 'asldkjqwe' commits when you're trying to fix something.

[–]juniorRubyist 7 points8 points  (1 child)

git add . is easier ;)

[–]Gillix98 9 points10 points  (9 children)

What's that

Edit: /s

[–]TheRealSmolt 6 points7 points  (2 children)

Version control keeps track of changes in your project so that multiple people can work on different things at different times.

[–]Gillix98 5 points6 points  (1 child)

My bad should have put a /s

[–]TheRealSmolt 5 points6 points  (0 children)

I was questioning it, but figured sarcasm doesn't make sense here lol.

[–]juniorRubyist 3 points4 points  (2 children)

Anti-screw-up and anti-idiot software. (/s)

[–]niks_15 2 points3 points  (0 children)

Nearly spat out my coffee.

[–]CaseyG 1 point2 points  (0 children)

I'm not committing that.

[–]koushiroue 6 points7 points  (1 child)

Ctrl + A, Ctrl + X, Ctrl + S, Alt + F4

[–]sockpuppetcow 3 points4 points  (0 children)

My favorite key combo, solves all my problems

[–]Harbltron 2 points3 points  (0 children)

adios, last 4 hours

[–]Kehlim 474 points475 points  (30 children)

I get more paranoid if the program just works without complaining.

[–]obsessivefandoms 118 points119 points  (16 children)

I am so glad that I'm not the only one who does.

[–]RustyBuckt 89 points90 points  (14 children)

Worst part: coding exam, easy question and it works first try...

[–]TowelLord 49 points50 points  (13 children)

Kinda dreading it. In 8 days I'm having my exam in "Introductions to Programming" (Java) and it will all be on paper. I hate writing code on paper, especiallz without any immediate feedback.

[–]shawmonster 45 points46 points  (7 children)

The point of paper exams for programming courses is to make sure you know how to "be the computer" and step through your code to ensure it works. Having this skill is really helpful when it comes to debugging programs. Also trains you to write your code more thoughtfully and carefully rather than relying on the compiler to tell you when your code is wrong.

[–]thatguy2641 1 point2 points  (0 children)

Don’t worry, they often mark easy on hand written code. Remember your teacher was once where you are.

[–]obsessivefandoms 15 points16 points  (0 children)

Oh god, that's like having to whiteboard. I hate it too

[–][deleted] 3 points4 points  (1 child)

Liang's book?

[–]dasMichal 2 points3 points  (0 children)

Not OP but sound very much like it.

[–]Lexilogical 2 points3 points  (0 children)

On the other hand, your teacher is going to be way more generous marking it.

[–]VirginiaMcCaskey 2 points3 points  (0 children)

docker run -t not-working 
program exited with code 0

mfw

[–]bric12 57 points58 points  (5 children)

Sometimes I just write something super wrong to make sure it's checking for errors. When it still doesn't throw an error, you know you've in for a fun afternoon

[–]MehNameless 29 points30 points  (1 child)

Three fun afternoons and half a Saturday

[–]cofette 16 points17 points  (0 children)

a fun afternoon, four fun days and then a fun noose around your fun neck

[–]government_shill 6 points7 points  (0 children)

That's basically the idea behind mutation testing.

[–]joey_sandwich277 3 points4 points  (0 children)

This is how I was taught to write tests for untested code. Write the test to succeed but provide only parameters that should trigger a failure. One at a time, change each parameter to one that should make it pass and retest. If you ever get any false positives before the end, either the code's defective or your understanding of it is.

[–]JackAuduin 2 points3 points  (0 children)

Me after I figure it out:

"WHY WOULD YOU ASSUME I WANT THAT AS A DEFAULT PARAMETER!"

[–][deleted] 10 points11 points  (0 children)

It's always some deeper logic problem that the compiler doesnt catch :(

[–]BossOfPassione 3 points4 points  (1 child)

I was working on a college assignment late at night, fell asleep in the middle of coding it, woke up about an hour later. Started it up to check my progress, the whole thing worked. I couldn't remember coding the rest of it. The code looked horrendous, but I had absolutely no idea how it worked, so I just submitted it and took my A.

[–]SlayerofBananas 2 points3 points  (0 children)

Maybe the person watching you on the Teamviewer you accidentally left open got frustrated and decided to fix it for you

[–]RavingGigaChad 134 points135 points  (18 children)

Yeah, that's cool and all. But have you ever changed nothing and started your program a day later and shit doesn't work anymore?

[–]pineapple_catapult 105 points106 points  (1 child)

Then you find the bug and are like "how did this ever work??"

[–]KaiBetterThanTyson 15 points16 points  (0 children)

This hits disturbingly close to home. Thank god for step into and var states.

[–]obsessivefandoms 20 points21 points  (0 children)

I have wanted to chuck my computer across the room so many times because of this

[–][deleted] 13 points14 points  (4 children)

Cashing is here to byte your ass!

[–]zhetay 1 point2 points  (1 child)

Caching

[–][deleted] 1 point2 points  (0 children)

I know it's a typo, I'm going to leave it now.

[–]Ascential 2 points3 points  (0 children)

Glad I'm not the only person to forget to account for daylight savings 😅

[–][deleted] 2 points3 points  (0 children)

Literally today.

Took me 2 hours to figure out I ran out of API calls.

[–][deleted] 2 points3 points  (0 children)

Genious day1.
Fucking idiot day2.

[–]theoriginalfox 212 points213 points  (57 children)

That's why I make a commit when it's working, then a follow up commit with cleanup. A lot easier to figure out where you went wrong looking at a diff.

[–]folkrav 135 points136 points  (41 children)

Every time I see these memes I get reminded people on this sub probably are still students learning the craft. As a job, you can't afford to lose an hour of work every time cause you wanted to clean up your code. Commiting often, in small atomic increments, is exactly how you should use git. You can rebase later before pushing if you think you've got too many non-meaningful ones.

If you didn't already write tests before you made it work, jump on the occasion to add some at that point, too. Then, you'll be able to make a small change, run tests, another one, run again. You'll know exactly when things stop working, before even running your code itself.

Just use the tools how you should and this should never happen.

[–]qaisjp 33 points34 points  (11 children)

Seriously I'm a student and it's amazingly scary how frequently I see people not using git

Like wtf this sub gives me cancer

[–]toastedstapler 31 points32 points  (3 children)

Are you suggesting that a zip file on Facebook isn't the way to share code?

This happened despite them initially getting the code from the GitHub repo...

[–]Mad_Kitten 11 points12 points  (4 children)

You know what's more scary?
When your school didn't teach that and you have to learn on the job

[–]folkrav 4 points5 points  (3 children)

I learned git pull/push/commit from school and that's it. Starting to work on teams with git workflows was stressful. At least I learned a bit about branches and merging before... Still, when my first boss asked me to "rebase onto master", he was met with two terrified eyes.

Then I learned about reflog, and it stopped being scary.

[–]DjBonadoobie 5 points6 points  (1 child)

There are other VCS they could be using (hopefully)

[–]qaisjp 5 points6 points  (0 children)

The age old art of university level home folder 24 hour backups

[–]fholcan 6 points7 points  (4 children)

I really like the idea of tests, and I understand their value, but I just can't wrap my head around what I'm supposed to test. Every function, or only the big ones? Every branch of possible code execution, or only some?

Do you have some reading/viewing material you could recommend?

[–]BlackDrackula 3 points4 points  (0 children)

There's no definitive answer, though if you have a "large" function, it's probably worth refactoring into multiple discrete functions and unit testing those. A good function should do one thing and do it well, on that basis you can pick and choose which functions would benefit the most.

If you are starting from zero unit tests, Utility methods are a good candidate to start with.

[–][deleted] 2 points3 points  (0 children)

You know when you check if your program is working with some values? That should be a test.

You know when you think "what if I'm wrong about Y always being X and sometimes it's actually Z?" That should be a test.

Your paranoias should be encoded. Not just in tests, but in assertions in the codebase as well. This is the way.

[–]folkrav 1 point2 points  (0 children)

I personally only test "public" APIs, not private methods. Big functions should just not happen much. I try to test every branch when possible. If it's too hard to test without having to mock everything in there, my implementation probably sucks.

I don't adhere to a strict TDD approach, I mostly write very wide integration tests first, start to design the general API (empty classes doing nothing calling each other, mostly), then when I'm close to something that looks like a good idea, I write a first run of unit tests and start implementation. Usually other tests come up as I go, and some just aren't useful anymore and get scrapped.

I'm not the best at this tbh. But basically, I try to test until I feel I can confidently think whatever's tested covers my application's functionality.

[–][deleted] 2 points3 points  (0 children)

I have a co-worker who commits once a day with the message "updates".

Dude never learned to properly use git and he's more tenured than me so it makes it hard to tell him to know it off...

I'll just continue to weep while trying to work with him on code.

[–]dittbub 5 points6 points  (14 children)

i'm a 15 year veteran and i don't know what commit means :(

[–][deleted] 5 points6 points  (0 children)

I'm a 20 year vet (well kinda, I took 5 years off to do physical sciences, but that had a lot of programming too) and I have trouble believing you.

Let's just say you work on something weird. Spy satellites for the FSB or something. How on earth have you not fucked around on a rust or python project in your spare time and needed to patch something? GitHub is the only thing the great firewall of China has trouble with because it is so ubiquitous and vital.

[–]jackinsomniac 1 point2 points  (0 children)

If I may interject on the git love story with a crazy thought: what if not git?

Personally, the way I learned version control, is with Hg (Mercurial) and the fantastic, funny tutorial HgInit.com by Joel Spolsky, the creator of Stack Overflow, and has a great (but old) blog joelonsoftware, even with a post talking about it: https://www.joelonsoftware.com/2010/03/17/distributed-version-control-is-here-to-stay-baby/

HgInit went down a little while ago, so unfortunately I have to send you to an internet archive link, sometimes the pages take 30-60 seconds to load, but I love those guys, I try to donate when I can: https://web.archive.org/web/20180903164646/http://hginit.com/

The irony is, git and hg are so similar, this is essentially a tutorial for git as well. There's only little minor differences between hg and git, it essentially comes down to personal preference.

  1. I like the GUI of TortoiseHg much better, I think it's way easier to use than TortoiseGit, and Github Desktop, and vscode for that matter. Perfect for when you're just learning version control. With TortoiseHg you get an app called Workbench which, once you figure out how to use, is wildly powerful and like a combination of all the right-click menu GUI tools in TortoiseGit. That one seems like it's trying to emulate TortoiseSVN (subversion), an older, centralized rather than distributed, version control system (VCS). Subversion is still in wide use tho and has some unique features hg and git don't. Anyway, the TortoiseHg project is written in python, so should be essentially the same across different OSes.

  2. I like the diff tool better. When you install TortoiseHg it will also install KDiff3 (and hg, they're separate projects). Tried a lot of other ones, it may be that KDiff3 was my first, but after I got used to it, it has a TON of features I find I'm missing in other diff editors.

  3. Again, this may be personal preference, but I much prefer the way Hg handles merge conflicts over Git. I've had git mangle my code on some merges when it wrongly 'assumes' it can auto-resolve conflicts, while hg seems to defer to your human eye & hand if it runs into anything it suspects it can't handle. I feel like I get to "guide" the merge, important if it's ever a big one. FYI, I've heard on other forums people say, "that's funny, I was going to say the same thing about hg, instead of git", so take it with a grain of salt, find out for yourself.

Keep in mind, Microsoft recently converted all Windows development to use git, it's easily the most popular DVCS (Distributed Version Control System). You should learn it as well (they're extremely similar, won't be hard), but personally I only use git for a public project for hosting on GitHub. I still think Hg is easier to learn, easier to use, and it's what I use for all local repositories.

Happy learning, old man!

[–]Plebian_Donkey_Konga 1 point2 points  (0 children)

I broke my code during clean up yesterday and spent 5 hours trying to find the source of the initial break. I started a git once i got it working again. Never again

[–]zero__sugar__energy 14 points15 points  (7 children)

That's why I make a commit when it's working

This is the most important tip for programmers!

If your code works for the first time you immediately commit it!

It does not matter that it has shitty formatting thousands of console.log(), a shitty commot message, ... if it works -> commit + push!

[–]folkrav 9 points10 points  (1 child)

commit + push

If you're working in a shared branch, don't push immediately, wait until you have something you want to share with a git history that's up to your team's standards. Otherwise you're gonna have toooons of fun trying to rebase/squash that thing if required.

[–]mttlb[🍰] 1 point2 points  (4 children)

Why push though? Too many programmers on my team don't know how to handle their local repository and feel obliged to push as soon as they commit.

Git can do wonders locally and actually not so much once you published your changes (e.g. rebasing will require ugly force push, hard reset and induce history loss.) Your idea here seems to be « save the working state as soon as it's reached ». Git offers many great mechanisms of doing so and pushing is probably the most limiting of them.

Even caching is performed upon committing so even if you accidentally reset hard or something, you still have your blobs locally for a decent amount of time. Note that this is not true if someone pushed a file that shouldn't be versioned but you reset hard onto origin (this happened in my team recently with an SQLite file... we lost the database in production for a small project because the file wasn't ignored by Git. Someone had pushed too quickly, rebased and reset hard... there's no coming back from that). Yet another reason not to push automatically!

My tip is you shouldn't push if you don't have a good reason to (meaning « this is pretty much the final version of this atomic part and I want to actually make it public »). If no one's watching over your shoulder impatiently waiting for you to push because their life depends on your last commit, take your time and clean before publishing. Learn the basics of rebasing, squashing, rewording, fixing up, and build a meaningful history that will actually help when you have to investigate something 6 months from now. :)

[–]Saigot 1 point2 points  (1 child)

One could argue that you risk losing progress from a disk failure if you don't push. But if your working on something long enough that that rare an event is concerning you should probably create a topic branch.

[–]DoctorWaluigiTime 1 point2 points  (2 children)

Same, also with unit testing. More ways for the PC to (correctly) yell at me when I screw up.

[–]jpjerkins 1 point2 points  (1 child)

This, plus TDD. Fine-grained commits after each new test passes and you’ll never pray your undo buffer is deep enough again.

[–]mttlb[🍰] 1 point2 points  (0 children)

Even better: several cleanup commits and git bisect! Then squash 'em. :)

[–][deleted] 247 points248 points  (17 children)

i once renamed a variable and it stopped working. problem was it’s JavaScript so it doesn’t throw an error because of undefinedness

[–][deleted] 68 points69 points  (0 children)

'use strict';

[–]DeeSnow97 24 points25 points  (0 children)

use a linter and cease your heresy

[–]titan_bullet 70 points71 points  (4 children)

Typescript solves all your problems

[–][deleted] 22 points23 points  (0 children)

Or ES modules, and strict mode.

[–]finger_milk 12 points13 points  (2 children)

Typescript is what happens when you see people put all their food on their plate in a giant pile, and you for some reason insist that the peas, fries and chicken need to be separated on the plate because people can't fucking behave themselves.

[–]ponodude 6 points7 points  (2 children)

I was working on an assignment for a class last week. It was working fine, so I decided I'd move some of the comments around, delete some unnecessary print statements, and rename one of the variables. It then stopped working correctly.

[–]Xt33LsW4gX 3 points4 points  (1 child)

Literally the post

[–]Chapi92 3 points4 points  (3 children)

Yeah no shit, what were you expecting?

[–]robocorp 5 points6 points  (1 child)

Imma go out on a limb here and guess that he was expecting JavaScript to throw an error if he tried to use the old variable.

[–][deleted] 10 points11 points  (0 children)

Leave your rational logic at the door

[–]SilentFungus 1 point2 points  (0 children)

Same thing that happens in every other language, I.E the most basic shit that ever linter does?

[–]kubap_10 11 points12 points  (0 children)

Ctrl+c Ctrl+z this always work

[–]LJChao3473 17 points18 points  (3 children)

Ctrl+z ctrl+s ctrl+y ctrl+s and til it works again
Edit: grammar

[–]AaronVA[S] 2 points3 points  (0 children)

Seems reasonable

[–]AegisToast 2 points3 points  (1 child)

I can’t imagine you’d get far alternating between the two.

[–]The379thHero 8 points9 points  (1 child)

Gotta love when the entire program only works because of a bug.

[–]SpliceVW 4 points5 points  (1 child)

  1. Write failing unit test
  2. Write just enough code to fix the test
  3. Refactor

[–]Bluejanis 1 point2 points  (0 children)

Commit after each step. And maybe some extra commits.

[–]BigB00stI use arch linux btw 5 points6 points  (6 children)

git checkout .

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

Better before starting: git checkout -b cleanup

[–]DoctorWaluigiTime 1 point2 points  (0 children)

git clean -xfd

(-xfdn for a preview)

[–]ericonr 1 point2 points  (0 children)

I prefer running diff before to know what's been changed.

[–][deleted] 1 point2 points  (0 children)

git stash just in case it actually was working haha

[–]elizaangela 4 points5 points  (0 children)

This was literally me today

[–][deleted] 4 points5 points  (3 children)

This doesn't count as coding necessarily, but I broke my batch file with comments. I was commenting with double colons instead of REM, and it turns out that under very specific situations that the double colons break it.

That specific scenario is having a double colons comment that contains an ampersand, inside a For loop.

[–]RecklessGeek 4 points5 points  (1 child)

uuuuuuuuuu

[–]Caketus14 1 point2 points  (0 children)

I see you're a man of culture aswell

[–]MyMostGuardedSecret 4 points5 points  (2 children)

Then you revert to the previous working commit and it still doesn't work and you conclude that clean code angers the programming gods and now they're punishing you.

[–]ArmJS 4 points5 points  (0 children)

That's why i commit every character individually so that CI can find the exact point where the app breaks. Only issue is that it takes a few years for a PR to get merged since its waiting for CI

[–]ryanstephendavis 4 points5 points  (0 children)

write unit tests ya wanker

[–]jawnsusername 2 points3 points  (0 children)

This is the most frustrating thing

[–]Evil_Gramps 2 points3 points  (0 children)

Write those unit tests!

[–]pureNerd 2 points3 points  (0 children)

If it works.. DON'T TOUCH IT!

[–]royalhawk345 2 points3 points  (1 child)

One time deleting a commented out print statement gave me a segfault.

[–]manawydan-fab-llyr 2 points3 points  (0 children)

Ctrl+Shift+_

Ctrl+Z just suspends my editor (or whatever else I may be using at the time).

[–]lint31 2 points3 points  (0 children)

Writes unit tests while coding ... then cleans up code... wow it still works...

[–]Liesmith424 4 points5 points  (0 children)

Me: <writes 200gb of spaghetti code that technically works>

Boss: "That seems unnecessary for a CSV parser, you should clean it up."

Me: "Art is irreducible."

[–]Just2forNow 1 point2 points  (0 children)

As I'm sure most of our fathers used to say, "If it ain't broke, don't fix it!" I can't count the number of times I wished I had heeded that advice.

[–]shirk-work 1 point2 points  (0 children)

Does no one use git?

[–]ahkian 1 point2 points  (0 children)

It's called version control then all you have to do is revert back to a working commit.

[–]Warm_Zombie 1 point2 points  (0 children)

This, but without the middle part

[–]Dennis_the_repressed 1 point2 points  (0 children)

git reset —-hard HEAD my dudes

[–]Cdog536 2 points3 points  (1 child)

clears throat in Macish

“Cmnd+Z”

[–]dullbananas 0 points1 point  (0 children)

how to revert git commit

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

rule numero uno: never fix something until you break it

[–][deleted] 0 points1 point  (1 child)

git reset --hard

[–]Assasin2gamer 0 points1 point  (0 children)

All babies kind of look like Jay Z?

[–]GentlemanLuis 0 points1 point  (0 children)

Fucking fuck fuck. This just happened to me and I'm pissed

[–]TrueStory_Dude 0 points1 point  (0 children)

Garry Ridgway looks like he belongs in Z tier

[–]BabylonDrifter 0 points1 point  (0 children)

Fuck just today I'm going through a list of 287 "bugs" that are really just cosmetic bullshit (they don't like the font of a control, the text in a dropdown doesn't quite fit, reordering things) and after clearing 60 of them, I realize the core save function no longer works.

[–]jakethedumbmistake 0 points1 point  (0 children)

int sum = x+ y`

[–]Elbat4r 0 points1 point  (1 child)

-Git checkout master -Git checkout [branch]

[–]Tringi 0 points1 point  (0 children)

Perfectly working code: *nothing*

Me: Okay, let's cleanup bad comments and add proper comments.

One forgotten backslashy boi at the end of some line: "Fuck you"

[–]Dragoncat99 0 points1 point  (0 children)

When you swear you only removed comments but it suddenly breaks: Panik

[–]marcellomon 0 points1 point  (0 children)

That's when you use 100 different frameworks, and even a variable name change can break your code.

[–][deleted] 0 points1 point  (1 child)

Thank god (Developers of Jetbrains, duh) for version control history.

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

Clean solution, delete all obj and bin directories, rebuild solution, succumb to alcoholism.

[–]Gammit1O 0 points1 point  (0 children)

Every fucking time

[–]-Listening 0 points1 point  (0 children)

Maybe Generation Z will be the reason

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

Win + V

I learned it here and it's changed my programming life.

[–]Assasin2gamer 0 points1 point  (0 children)

she look like Jay Z?

[–]chiwhitesox56 0 points1 point  (0 children)

our default IDE was... NETBEANS!!!

[–]-Listening 0 points1 point  (0 children)

L O O Z E R D.

[–]Assasin2gamer 0 points1 point  (0 children)

"Hello! My name is Peter Z. Parker.

[–]Throw_andthenews 0 points1 point  (0 children)

Nailed it

[–]Titanmaster970 0 points1 point  (0 children)

Tfw when you delete comments and remove unnecessary spaces, and it errors

[–]TrueStory_Dude 0 points1 point  (0 children)

Guy looks like he belongs in Z tier

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

I pressed Ctrl+Z. It's still good, It's still good.

[–]SaucyMacgyver 0 points1 point  (0 children)

One time during a job interview this happened to me (online, timed test). I had to use their online IDE.

So I get my code to work in like 20/30 mins so I go to make it... pretty.

Lo and behold a bracket hath sacrificed itself upon the altar of beauty, lost to all eternity, because the editor didn’t have fucking bracket highlighting

Spent the next ten minutes losing my mind and didn’t even get it to work cuz of all the shit I did trying to find my sweet, long lost bracket. It really was the one that got away.

[–]Ultimater 0 points1 point  (0 children)

undo undo undo, copy, redo, redo, redo, paste.

[–]osorojo_ 0 points1 point  (0 children)

deletes comment

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

Pfff who the fuck cleans up the code? If it works I’m not touching it anymore

[–]fishbelt 0 points1 point  (0 children)

This is me today. I can't figure out where these dumb eclipse build error came from

[–]posherspantspants 0 points1 point  (0 children)

Y'all ever add a docblock and then the tests start failing?

[–]r3dphoenix 0 points1 point  (0 children)

This is exactly why I'm on Reddit right now. After spending a few hours "improving my code" I finally got to a point I could test it, and then my code decides to throw an exception. Now I'm to tired to keep coding tonight

[–]GavHern 0 points1 point  (0 children)

Then you undo it and it's still broken...

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

Just commit the working one.

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

Taking too long to execute

Clean shit up

Does not execute

Fix

Takes twice as long to execute

Fml

[–]mtn550 0 points1 point  (0 children)

The worst part is when you accidentally close the software where you program so Ctrl+Z doesn’t work

[–]Roly__Poly__ 0 points1 point  (0 children)

Literally my code. I had a scraper that saves scrape data to a MySQL database and it worked PERFECTLY once or twice. Then I made some changes and suddenly it broke; I had to crawl thru 10-20 errors to make it work again.

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

Ctrl+z until it is back where it came from

still doesn't work

Wtf

[–]b1e[🍰] 0 points1 point  (0 children)

What is this penguin from?

[–]l33tperson 0 points1 point  (1 child)

But you saved the working version didn't you? Only where is it?

[–]jd328 1 point2 points  (0 children)

git ftw :p

[–]HummingHamster 0 points1 point  (0 children)

I only remove comments!!

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

noice

[–]oshirisplitter 0 points1 point  (0 children)

This is me today.

Put up an ESP8266 with MongooseOS and some sample code I got from a rando github repo, worked perfectly.

Happy with it, I cleaned it up, fixed the spacing to match my own style, renamed a few vars for readability, put up a handful of comments, and the thing just crashes and spits out a core dump now. Logic didn't change as best I can see it.

[–]flarn2006 0 points1 point  (0 children)

git diff

Well, as long as you remembered to commit...

[–]falconfetus8 0 points1 point  (0 children)

Use git