Finally got a job at big company in ${home_town}

>finally got a job at big company in ${home_town}
>first task was to fix some trivial issue
>git cloned the repository
>opened the editor
>no comments in the entire file
>oh I guess it's just this one, lets check another file
>no comments either
>oh no
>started opening random files in search for comments without success
>no comments in the entire source code
>fuck fuck fuck
>ok, whatever, I can do this
>pushed a merge request with the bug fix
>rejected
>why.jpg
>"sorry, user, we don't allow comments in our source code. If your class name and method correctly describe what you intend to do then you need no comments"
>mfw

Attached: 5LYzTBVoS196gvYvw3zjwBzlFdrDhMEo_uZSij8uidI.jpg (1920x1346, 121K)

>work on school project with friends
>user im not going to comment the code because i know what im doing its 'trivial'
>unit test app
>subtle logic bugs and edge cases that break the code are everywhere
>mfw

when will the tech bubble burst and people that actually have the mindset of an engineer dominate the field again?

Attached: index.jpg (263x192, 6K)

Be careful OP, don't try to outsmart your boss even if he's dumb he still can fire you

I wish this was a school project. This job I've got has 100tb of client's personal information and ZERO unit tests...

>home_town is not defined

If we had unit tests this wouldn't have happened

What language?
A lot of code these days isn't commented and his reasoning is pretty close to true. Even if code isn't written clearly, if it needs a change you can just use unit tests and rewrite the whole section fast enough that it's not a big deal.
A project I worked on recently was for a very large ecommerce platform. Their code was mostly PHP, and had comments but not any within functions or classes, just header comments stating the general purpose of a file or class, then it had things like 900-line functions (not even fucking kidding) that had not a single comment, along with compound conditional statements that referenced variables or functions in such a way that you had to investigate like 13 other files before you could actually understand that single statement. I didn't waste a single damn second making my code clear or commented, even when I had to rewrite those functions that were hundreds of lines. I did, however, break up and modularize a lot of code because even if no one else could understand it, I didn't want to end up spending days rewriting my own shit down the line.

by the way, these days comments explaining code can be effectively replaced by good git habits. Not that I expect your company does that either.

>What language?
Javascript w/ Angular

>if it needs a change you can just use unit tests and rewrite the whole section fast enough that it's not a big deal
We also don't use unit testing because (((good code needs no testing)))

But holy shit user, did you at least was recognized by fixing this mess?

At least we do. Fork the main project, and send merge requests to the developing branch. Unfortunately we have no CI&CD

>Their code was mostly PHP, and had comments but not any within functions or classes, just header comments stating the general purpose of a file or class, then it had things like 900-line functions (not even fucking kidding) that had not a single comment, along with compound conditional statements that referenced variables or functions in such a way that you had to investigate like 13 other files before you could actually understand that single statement.
One project I'm working on at work is like this, it's fucking hell

Last day by coworker said to me it's "wrong" to use else statements, as they add complexity to the code. Nigga what?

Wtf? else{} is literally syntactically immaculate, its just whatever the opposite condition of the if block is.

What this thread looks like to me is more that old coders are certifiably autistic and aren't fit to make important decisions.

Maybe it's just Gen X coders.

>no CI/CD
>2019

How?

I'm genuinely curious how that happens. How many people are working on the codebase? How big is the codebase? Who runs the manual builds? How often are builds done?

He's right you nigger codemonkey, comments in code should be the exception not the rule.
Use good git commit messages, unit tests and fill out the confluence documentation if you need to.

Crazy right. I guess those motherfuckers just want to make code harder to work with so our boss will be afraid if ever firing them.

This is pretty much my company but it's never really been a problem. It's not that we don't allow comments but in most cases they're not necessary. I've had to code features into projects written by others teams and never really had much of a problem figuring out what to do without comments. For the most part everything is pretty self-explanatory and the only comments that exist are around trickier sections which are few.

100k lines, 10 modules. Mainly 4 people editing the source code. According to our statistics they need 2 weeks to apply bug fixes because all testing is done manually by a single guy running on his local machine.

>He's right you nigger codemonkey
Yeah, good luck fixing bugs when the guy who wrote this uncommented 1000 LoC function was fired two years ago and no one dares to touch his code because it's mission critical

Forgot to quote

>100k lines, 10 modules. Mainly 4 people editing the source code. According to our statistics they need 2 weeks to apply bug fixes because all testing is done manually by a single guy running on his local machine.
This is the frontend btw. The backend is >1m LoC divided in 7 microservices

I don't want this to be real. Holy fuck. I code programs for myself only and I still comment everything and it saves me hours.

Attached: 1447720807997.jpg (306x331, 69K)

I do the same but with optimisations using languages and patterns nobody else in the company really understands. They get faster code and I get job security.

5 million comments hidden across 500 files wouldn't save you. You don't have any test or documentation strategy.

> But holy shit user, did you at least was recognized by fixing this mess?
yeah, well recognized, but honestly I only made decent money on it by billing more hours than I worked, which they were happy to pay but they wouldn't have given me anything special if I didn't bill them. At one point I was recording like 4x my actual hours worked and they were happy to pay it without questions, because A) no one there had the apparent capability to fix the shit I was working on, and B) their alternatives to me probably would have been more expensive regardless, and I got it done quick, basically I'd put in a couple hours a day and record a full day then work on a different project.

> Javascript w/ Angular
well at least javascript is easy enough that it's not a big deal to rewrite stuff that doesn't make sense, that's my attitude anyway. I always ask "whats faster, to figure out how the hell this works, or to just rewrite it?" It's kind of a shotgun approach, especially without unit tests, but it's worked for me... which...

> We also don't use unit testing because (((good code needs no testing)))
jesus dude, I now have indians that code for me for less than $10/hr to do javascript shit and even they write unit tests

it's not within the scope of totally pure functional programming. I've gotta say that this is one of many examples in this thread that show what I see as a bigger problem: code standards that aren't communicated or are made up on the fly. There are many different ways to skin a cat, but if I'm getting paid to do it with no specific method being a condition of pay, then imma pull out my knife and when I'm told "Hey, at this company we use our teeth to skin cats" imma turn my knife on the manager instead of the kitty

Attached: 1522077318537.jpg (600x800, 123K)

>I only made decent money on it by billing more hours than I worked
I wish I could do that, but it's a office job

>well at least javascript is easy enough that it's not a big deal to rewrite stuff that doesn't make sense, that's my attitude anyway. I always ask "whats faster, to figure out how the hell this works, or to just rewrite it?" It's kind of a shotgun approach, especially without unit tests, but it's worked
That's what I'm doing. It's also getting me a good rep because I'm the "refactor guy" now. Next month I will be working on the major refactoring of the code, so time for a promotion I guess

>jesus dude, I now have indians that code for me for less than $10/hr to do javascript shit and even they write unit tests
Welcome to my reality. I live in a the land of samba and soccer.

>I've gotta say that this is one of many examples in this thread that show what I see as a bigger problem: code standards that aren't communicated or are made up on the fly
I wholehearted agree! Our standards are "asking the oldest guy", to which he replies "I dunno, copy what I did in $file"

Most of the code at my job isn't commented.
Just read the code.

What are you doing that needs 1m LoC? How much of that goes away if you use 1 service instead of 7?

This. Anyone other answer is Pajeet tier.

If there's comments in spaghetti code, about 99% of the time they're wrong anyway. Massive commenting of your code is useless and just creates noise.

>tfw coworkers fell for the self-documenting code meme

do what is necessary to get paid, but continue looking for better opportunities if it really bothers you that much.

i've been working at the same place for almost 5 years and no one on my team (or greater team) does anything that would be considered good practice (speed for "visibility" is prioritized). i've known this for years, and i'm still too lazy to leave because the pay is so good for the amount of effort i've put into it.

>things that never happened: the thread

Sounds familiar, except I'm the newer team member disgusted by the ennui of the 5 year oldheads. There's a good chance somebody is sick of your shit, they just aren't in a position to fire you.

Keep your commented version locally and run remove-comments.sh on a separate copy before committing.

i don't doubt it. we have lay offs roughly biannually so i suspect it will eventually happen. i would try to keep in mind that for many people it's only a job and not a passion and many folks will prioritize other issues over work if they can get away with it.

if you are disgusted by your situation i'd definitely recommend trying to get away asap.

comments are not useful anyways, the code speaks for itself. You can run code in your head, right?

You're not the only lazy person here.