What the hell happened??

Nov 13, 2019 10:13 AM

UnfundedBus

Views

124487

Likes

3133

Dislikes

39

I'm more like. "Who wrote this piece of garbage?!".

6 years ago | Likes 8 Dislikes 0

Every week

6 years ago | Likes 37 Dislikes 1

Any time I walk away from my writing.

6 years ago | Likes 2 Dislikes 0

While loop with addobjects set to stop at 0 does not stop at 0 and i am boutta fucking give up (greenfoot

6 years ago | Likes 1 Dislikes 0

How about shoe - shoe - underwear that's it

6 years ago | Likes 1 Dislikes 0

Ah the old "i was workin on something important but don't know how i did it to start off with" issue.

6 years ago | Likes 1 Dislikes 0

THE NUMBERS, MASON - WHAT DO THEY MEAN? Also I implant explanations in .txt files and reference them in code for later

6 years ago | Likes 1 Dislikes 0

The aged locked away in large alzheimer's housing complexes being lead by their phones through complex instructions just ended our lifestyle

6 years ago | Likes 1 Dislikes 0

You're supposed to leave a note to yourself, telling what to do next.

6 years ago | Likes 1 Dislikes 0

Classic "that's future me's problem"

6 years ago | Likes 3 Dislikes 0

“I’ll finish this Monday.” *Computer updates restart over the weekend.

6 years ago | Likes 1 Dislikes 0

It seems to work, sooooo.

6 years ago | Likes 1 Dislikes 0

If you don't use descriptive variable names then you should not be coding at all.

6 years ago | Likes 1 Dislikes 0

Ever tried understand someone else's Matlab code where they went for minimal var name length? Used up the whole alphabet. l+1 hurt my eyes.

6 years ago | Likes 2 Dislikes 0

I swear, it was like reading code from someone who thought "How to write unmaintainable code" is a legitimate coding guide.

6 years ago | Likes 2 Dislikes 0

// stopped here

6 years ago | Likes 1 Dislikes 0

This totally happened to me this week with a budgeting template for a freelance gig that I haven't touched in a few weeks

6 years ago | Likes 1 Dislikes 0

I'm a designer, and this still rings true. You're in a completely different mindset between sessions, notes won't always help.

6 years ago | Likes 1 Dislikes 0

Credit: https://www.reddit.com/r/ProgrammerHumor/comments/dvoo34/none_of_this_makes_sense/?utm_medium=android_app&utm_source=share

6 years ago | Likes 38 Dislikes 7

This belongs in the post

6 years ago | Likes 20 Dislikes 0

How are you supposed to double dip on imaginary internet points that way?

6 years ago | Likes 12 Dislikes 0

Me when I see the credit in the comments and not in the post

6 years ago | Likes 3 Dislikes 0

If you don’t fucking comment your code or even sudo code, you’ll get lost and not know what’s the real issue or how to properly progress.

6 years ago | Likes 15 Dislikes 0

I've tried piecemeal coding, the calling the projects and executing just to watch it fail because No fail over response. I need coffee now.

6 years ago | Likes 1 Dislikes 0

What does sudo have to do with this o_O

6 years ago | Likes 3 Dislikes 0

sudo comment that shit

6 years ago | Likes 2 Dislikes 0

sudo make me a sandwich

6 years ago | Likes 2 Dislikes 0

teebob21 is not in the sudoers file. This incident will be reported.

6 years ago | Likes 2 Dislikes 0

alias please = sudo !!

6 years ago | Likes 1 Dislikes 0

alias fucking = sudo

6 years ago | Likes 1 Dislikes 0

I can barely mess around in python and I comment the crap out of anything I write. Has saved me hours!

6 years ago | Likes 5 Dislikes 0

I remember reading the code for Sage Math (a Python-based math software) like 75% of it was comments/docstrings. That was fine.

6 years ago | Likes 1 Dislikes 0

I also remember writing a 5-line comment justifying why I was casting a char to unsigned char just to convince future me not to remove it.

6 years ago | Likes 1 Dislikes 0

I routinely write complete code explanations. I figure that’s better than staring at it for 40 minutes trying to figure it out.

6 years ago | Likes 2 Dislikes 0

It is. (Specially—but not exclusively—if someone else is gonna deal with your code.)

6 years ago | Likes 1 Dislikes 0

Yep: looking at you GitHub!

6 years ago | Likes 1 Dislikes 0

That's my problem with video games, i always come back after too long and forget where I was

6 years ago | Likes 424 Dislikes 4

Or you start too many games and the different controls start to mess with you

6 years ago | Likes 6 Dislikes 0

Yeah, I've now made a personal rule for myself. One main game, one multiplayer FPS, one racing game, and maybe one wildcard at a time, max.

6 years ago | Likes 2 Dislikes 0

Lol dude i havent finished witcher 3. Metal gear phantom pain. Zelda botw. Dragon age. Skyrim. I try again but i cant grind through.

6 years ago | Likes 4 Dislikes 1

Sameeeeee. I've replayed the start of witchery five times. I think I left dragon age with one three quests left. I just cant finish

6 years ago | Likes 1 Dislikes 0

That happened to me 3 times with New Vegas, twice because I played it right after FO3 and got burned out, and once because I messed up 1/

6 years ago | Likes 2 Dislikes 0

a quest that prevented me from getting the endgame I wanted, and didn't have a good previous save. I finally finished though, great game.2/2

6 years ago | Likes 2 Dislikes 0

Me too. I also forget the controls. There's always some "extra" feature or ability for my character that I totally forget I have.

6 years ago | Likes 1 Dislikes 0

Happened with Red dead 2, I'm like 30% done and haven't played it in months

6 years ago | Likes 2 Dislikes 0

Getting back into an RTS savegame like "Hmm... did I wanna conquer these people, or confederate with them?.. "

6 years ago | Likes 2 Dislikes 0

If I'm on a pc game where I can name my save file I'll write a note to myself so I remember what to do next

6 years ago | Likes 2 Dislikes 0

I keep doing that with State of Decay...

6 years ago | Likes 1 Dislikes 0

For me that's usually the next day, I restart my games daily. Even writing my progress down doesn't help much :(

6 years ago | Likes 1 Dislikes 0

I started Planescape Torment 3 times. Never reached even half. Few years break between sessions. Always had to start from scratch.

6 years ago | Likes 1 Dislikes 0

That game is so fucking convoluted.

6 years ago | Likes 1 Dislikes 0

Yeah games need to include both a summary of the story AND a control overview on demand. Some do. Most don’t.

6 years ago | Likes 18 Dislikes 1

Problem is some controls get so complicated by endgame that you need the ramp up to muscle memory or you’re just fucked.

6 years ago | Likes 8 Dislikes 1

Well...the control overview certainly isn't stellar but the story summary is immaculate and happens on every startup in Witcher 3.

6 years ago | Likes 7 Dislikes 0

Then you start it over again and get bored because you’ve played the first 20% of the game 300 times.

6 years ago | Likes 135 Dislikes 0

Borderlands 2 for me. Start a game with friends and get to sanctuary then it's "let's take a break". Never gets finished.

6 years ago | Likes 2 Dislikes 0

That has happened with a few people I've tried to play that game with, but fortunately my main gaming buddy was just as interested in the 1/

6 years ago | Likes 1 Dislikes 0

game as me and we completed like 3 games all the way to level 72 (now the cap is 80). I have like 1500 hours in that game haha. 2/2

6 years ago | Likes 1 Dislikes 0

this is why nowadays I try to finish games before starting another one....but it's hard since I have hundreds of games

6 years ago | Likes 2 Dislikes 0

Me with Nier. It took me 9 times to get through the first 2 hours. I just don’t think it’s nearly as good as people say but 2B booty

6 years ago | Likes 2 Dislikes 0

I'd have to agree. I "beat" it once aka got one ending. Haven't touched it since.

6 years ago | Likes 1 Dislikes 0

Or, y'know, the entire game is the same as the first 20% and it took you a few years to realize that.

6 years ago | Likes 9 Dislikes 1

Don't Starve has entered the chat.

6 years ago | Likes 5 Dislikes 0

*Skyrim intro intensifies*

6 years ago | Likes 75 Dislikes 0

Me 100%

6 years ago | Likes 1 Dislikes 0

If that bothers you, check out the "Alternate Start: Live a Different Life" mod. It's pretty great.

6 years ago | Likes 22 Dislikes 1

6 years ago | Likes 6 Dislikes 0

YEP. When I built my PC and started modding Skyrim, I saw that in a mod guide and was like nah I don't mind just playing the normal game, 1/

6 years ago | Likes 3 Dislikes 0

until I discovered that you cannot skip the intro at all and in order to test the dozens of mods I was installing, I would have to wait 2/

6 years ago | Likes 3 Dislikes 0

6 years ago | Likes 6 Dislikes 0

Always comment your code, kids.

6 years ago | Likes 1013 Dislikes 18

// add 1 to surefang.points

6 years ago | Likes 1 Dislikes 0

// Loop unrolling. Here be dragons.

6 years ago | Likes 17 Dislikes 0

I knew a guy who would just write //comment to remind himself to comment on the code.

6 years ago | Likes 1 Dislikes 0

Once saw some crazy x-ray diffraction math code with a single comment “// It's Howdy Doody time!”

6 years ago | Likes 20 Dislikes 0

You made that coder's day, and he/she doesn't even know it.

6 years ago | Likes 3 Dislikes 0

I'm not a programmer. I don't work with code. This still applies, so hard xD

6 years ago | Likes 1 Dislikes 0

I hated commenting in college, I'd always add it in later. Comic happened too many times. Also psuedocode / flow diagrams? Made em after.

6 years ago | Likes 1 Dislikes 0

// Pretty obvious, just finish this on Monday

6 years ago | Likes 8 Dislikes 0

I comment on imgur ##this comment is to reply to surefang

6 years ago | Likes 1 Dislikes 0

I was gonna suggest 'write a note' bc I didn't know you could comment on code

6 years ago | Likes 1 Dislikes 0

I comment on the code, then link to a YouTube video on what a section of code does for other people.....not me...never me.

6 years ago | Likes 8 Dislikes 0

I always put my entire code on one single line so I can away find it.

6 years ago | Likes 10 Dislikes 0

lol

6 years ago | Likes 1 Dislikes 0

Minify without extra steps

6 years ago | Likes 2 Dislikes 0

Perl is wonderful.

6 years ago | Likes 1 Dislikes 0

I'll comment it when I'm done!

6 years ago | Likes 1 Dislikes 0

And keep a list of what needs to be done still

6 years ago | Likes 1 Dislikes 0

I like to //batman my code

6 years ago | Likes 1 Dislikes 0

I just copy/paste mine from stackoverflow.

6 years ago | Likes 1 Dislikes 0

“It’s 5:00 on Friday Night, and I am young with an Elephant’s memory” — the Young n’ Dumb

6 years ago | Likes 1 Dislikes 0

Yeah yeah. I'll comment it when the projects done. Right now I just need it to work.

6 years ago | Likes 6 Dislikes 0

This needs a lot more upvotes

6 years ago | Likes 1 Dislikes 0

I too like to explain things when I no longer remember what they are for.

6 years ago | Likes 2 Dislikes 0

You think that if someone can't express their intent well enough in their code, they somehow magically gain the ability to do it in English?

6 years ago | Likes 21 Dislikes 4

My favorite thing to do with comments is label different areas of my code. Makes it easier to find what you are looking for.

6 years ago | Likes 3 Dislikes 0

Worse: those type of coders' comments don't even match what the code is doing.

6 years ago | Likes 7 Dislikes 0

If your code is CSS and one line fixes a weird formatting issue then yes.

6 years ago | Likes 10 Dislikes 0

CSS aka the shadowlands :D

6 years ago | Likes 3 Dislikes 0

I code about 1 line per section, but some coders are crazy about the whole WET vs DRY... to me it’s just about what works best for project

6 years ago | Likes 11 Dislikes 0

As a coder, I have literally no idea what you mean by WET vs DRY, so, huh?

6 years ago | Likes 14 Dislikes 0

Dry = things like purposeful variable and function makes || Wet = things more casual with a focus on commenting. at least this how I see it

6 years ago | Likes 1 Dislikes 0

Write Every Time or Don't Repeat Yourself. Some people where to these too strictly. I generally try and follow ease of understanding.

6 years ago | Likes 13 Dislikes 1

Ease of Readability, which generally means more dry than wet in my book, but depends on the project

6 years ago | Likes 2 Dislikes 0

I would certainly agree. But sometimes it's better to repeat something once than create a function to handle it.

6 years ago | Likes 1 Dislikes 0

DRY ‘till I die. If you have to repeat the same logic, your design is wrong, period.

6 years ago | Likes 3 Dislikes 0

Entirelly project dependant. For personal projects I agree. For entreprise projects with thousands of customers you really need a.. 1/2

6 years ago | Likes 1 Dislikes 0

2/2 extensive risk analysis before choosing strategy.

6 years ago | Likes 1 Dislikes 0

The only helpful code comment I ever saw was 'increase this counter if you tried refactoring this method and gave up: 6' saved me time.

6 years ago | Likes 5 Dislikes 0

Nah, write clean code that's easy to understand even for future you. Comments lie, code just confuses.

6 years ago | Likes 1 Dislikes 0

//no

6 years ago | Likes 3 Dislikes 0

fucking true

6 years ago | Likes 1 Dislikes 0

Comment any process that is put on pause or passed off to another, code or not!!!

6 years ago | Likes 3 Dislikes 0

What kind of evil fucks downvoted this?

6 years ago | Likes 1 Dislikes 0

Selenium.

6 years ago | Likes 2 Dislikes 0

If it ain't in git it doesn't exist, and write as if you're dying tonight and someone else needs to take over

6 years ago | Likes 2 Dislikes 0

Noobs comment. Write clean code and commit properly

6 years ago | Likes 2 Dislikes 0

/* put comments here before the weekend */

6 years ago | Likes 2 Dislikes 0

If you comment your code, other people can understand it. The goal is code that works but that no one else understands. = job security!

6 years ago | Likes 3 Dislikes 0

Stop reading "how to write unmaintainable code"!

6 years ago | Likes 1 Dislikes 0

Yeah ive taken over a project like this. Ive never been so filled with rage in all my life xD

6 years ago | Likes 1 Dislikes 0

Always code your kids, comment.

6 years ago | Likes 3 Dislikes 1

You're not my real dad!

6 years ago | Likes 1 Dislikes 0

Only good if you or the other person two years down the line actually bothers to read them!

6 years ago | Likes 1 Dislikes 0

Code so you don't nees comments.

6 years ago | Likes 1 Dislikes 0

Commenting is deodorant, if you need them to understand your code, your code smells :)

6 years ago | Likes 1 Dislikes 0

The worst is when someone believes they don't need it but they actually do.

6 years ago | Likes 1 Dislikes 0

I comment when I need to explain why this seemingly stupid code is here. (Because scale, because product, because time constraints, etc) >>

6 years ago | Likes 1 Dislikes 0

>> If you need comments to explain how the code works and/or flows, your code works badly and/or your flow sucks. Code reviews help (if >>

6 years ago | Likes 1 Dislikes 0

>> the reviewer doesn't find your code obvious, you may need comments and/or refactoring).

6 years ago | Likes 1 Dislikes 0

I always comment my code as if a clueless idiot were going to read it later, which is often the case (the clueless idiot being future me).

6 years ago | Likes 1 Dislikes 0

##does variable stuff

6 years ago | Likes 1 Dislikes 0

Inwas a designer. I had to take programming. Used to wrote code that worked. Professor had NO idea how it worked until he stared for

6 years ago | Likes 3 Dislikes 0

Half an hour. Neither of us had a clue. He'd eventually figure it out and explain MY OWN CODE back to me and I'd stare at him like he had

6 years ago | Likes 3 Dislikes 0

2 heads. And he'd look at me and just sigh. At least he knew I never cheated

6 years ago | Likes 3 Dislikes 0

That's called "write-only code" and is only good for job security.

6 years ago | Likes 1 Dislikes 0

Commenting your code only works if you have any idea of what you are doing.

6 years ago | Likes 211 Dislikes 0

Copy paste from stackexchange? Also irresponsible, at least learn from what you copy.

6 years ago | Likes 1 Dislikes 0

That can be a comment //If you understand this code please email me at...

6 years ago | Likes 51 Dislikes 0

Javadocs

6 years ago | Likes 1 Dislikes 0

Write simple documentation along the way and refactor the documentation with the code.

6 years ago | Likes 4 Dislikes 0

#I don’t know why this block of code works but it does. Do not alter

6 years ago | Likes 6 Dislikes 0

Sometimes it's the only way

6 years ago | Likes 2 Dislikes 0

Da vinci code... my shit's protected from everyone, myself included

6 years ago | Likes 13 Dislikes 0

/*this code magic*/ and other cryptic phrases

6 years ago | Likes 45 Dislikes 0

5am code comments are the worst. I think my favorite 5am code comment I wrote was "this churns the butter"

6 years ago | Likes 4 Dislikes 1

This guy gets it

6 years ago | Likes 7 Dislikes 0

i = 0x5f3759df - ( i >> 1 ); // what the fuck?

6 years ago | Likes 9 Dislikes 0

I understood the reference

6 years ago | Likes 2 Dislikes 0

#this works, I wish I knew why

6 years ago | Likes 2 Dislikes 0

For those who aren't aware, this is the actual line of code in Quake used in the fast inverse square root" function.

6 years ago | Likes 8 Dislikes 0

It isn't even too crazy if you know how floating point representation works, but it seems that they found that 0x5f… by trial and error.

6 years ago | Likes 3 Dislikes 0

Loose explanation: IEEE754 floating point representation works more or less like a logarithm, so you can do arith with it to get powers.

6 years ago | Likes 2 Dislikes 0

>Well, a logarithm plus a bias. So -(i>>1), aka -i/2, is sort of equivalent to x^(-1/2), i.e. the inverse square root. 0x5f… is a bias.

6 years ago | Likes 2 Dislikes 0

Neat

6 years ago | Likes 2 Dislikes 0

It came to me in a dream

6 years ago | Likes 2 Dislikes 0

Did they ever explain how they came up with it? I vaguely understand it had something to do with how the x86 handled floats, but it seems

6 years ago | Likes 1 Dislikes 0

like it would have taken some extreme mathematical analysis to not just figure out what numbers to use, but to even consider it an option.

6 years ago | Likes 1 Dislikes 0

Or use proper TDD and Clean Code procedures

6 years ago | Likes 79 Dislikes 6

Don’t tell me how to live my life ok???

6 years ago | Likes 1 Dislikes 0

Both? Can we please do both.

6 years ago | Likes 32 Dislikes 2

Comments are a sign that the code is lacking.

6 years ago | Likes 11 Dislikes 17

As long as they are not used as a crutch I vehemently disagree. They should be used to describe why code is there, not how the code works.

6 years ago | Likes 1 Dislikes 1

That is not true.

6 years ago | Likes 8 Dislikes 4

Nope, they're for easy readability.

6 years ago | Likes 15 Dislikes 4

Omg noooooo - they're exactly for when your code is _not_ easily readable enough.

6 years ago | Likes 2 Dislikes 1

It depends on the situation. I personally like comments, but I don't find the need to use them at work, because we clean up our code nonstop

6 years ago | Likes 5 Dislikes 2

or that you are constantly teaching less able coders in a team

6 years ago | Likes 3 Dislikes 6

Or that you realize you'll probably need to come back to it at some point and it'd be really nice to know what everything does at a glance

6 years ago | Likes 15 Dislikes 0

How do u learn that, is there a guide book or some sorts for this

6 years ago | Likes 4 Dislikes 0

What the others said. Clean Code is a great book, as are all of Martin's books

6 years ago | Likes 2 Dislikes 0

Thanks everyone , this was educational

6 years ago | Likes 3 Dislikes 0

Other than thr ones listed here, check out "Code Craft" by Pete Goodliffe. It discusses style, testing, comments, self-documenting code, etc

6 years ago | Likes 3 Dislikes 0

Most of it comes with experience, but a good start for me was "Clean Code" by Robert Martin.

6 years ago | Likes 9 Dislikes 0

I can vouge for this. Good resource for anyone serious about learning good coding principles. It is not limited to TDD.

6 years ago | Likes 2 Dislikes 0

I consider this a must-read and probably the best book you can read as a starting developer, both for your sake and that of your colleagues

6 years ago | Likes 2 Dislikes 0

Not everything should be followed by the letter but if you become aware of the most common pitfalls it already pays off.

6 years ago | Likes 2 Dislikes 0

Yes, an absolutely fantastic book for any budding programmer. It does take principles a bit far at times, but overall it's extremely solid.

6 years ago | Likes 2 Dislikes 0

.

6 years ago | Likes 1 Dislikes 0

Lol TDD is not a magic bullet

6 years ago | Likes 17 Dislikes 1

If you only look at the code vs comments thing it's the best choice. But I agree it comes with caveats. Certainly towards time and budget

6 years ago | Likes 2 Dislikes 0

A lot of developers are elitists who feel bigger by dropping buzzwords. Anyone with experience knows TDD is just a tool not THE solution.

6 years ago | Likes 20 Dislikes 0

This.

6 years ago | Likes 3 Dislikes 0

100% agree

6 years ago | Likes 1 Dislikes 0

Wow, this

6 years ago | Likes 1 Dislikes 0

Yeah, you need a holistic approach, high quality on all ends, in order to be able to be readable without comments.

6 years ago | Likes 1 Dislikes 0

I don't know what the obsession is to not use comments. Comments are fine. Unnecessary comments are where issues exist. Code is meant 1/*

6 years ago | Likes 1 Dislikes 0