[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>mfw QA rejects my work because I didn't put any comments

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 204
Thread images: 18

File: face whore4534.jpg (84KB, 1280x720px) Image search: [Google]
face whore4534.jpg
84KB, 1280x720px
>mfw QA rejects my work because I didn't put any comments in it

Why is this allowed? If you aren't smart enough to read a simple 50-line python program then you have no business working with intelligent people.
>>
>>60520082
>not doing a trivial amount of additional work in order to make someone else's job easier

What kind of autistic retard does this?
>>
>>60520082
Just make some troll comments like.
return 53412; // could have returned 0 but didn't feel like it XD
>>
Was QA female?
>>
>>60520082
just add em fag
>>
You could just add em and be released from this torment.
>>
>>60520297
My job is to produce functioning code, not "make someone else's job easier."

>>60520318
No. It's some hipster fuck who doesn't even have a degree. Typical codemonkey faggot. Also he rejects anything with recursion outright because it isn't "scalable."
>>
>>60520404
>recursion isn't scalable

Yeah I'm triggered.
>>
File: 1484661686053.jpg (150KB, 1440x810px) Image search: [Google]
1484661686053.jpg
150KB, 1440x810px
>>60520404
Is this your first time working in a team environment?
>>
>>60520404
> My job is to produce functioning code, not "make someone else's job easier."

Silly wagecuck, your job is to produce value for your employer.

Working code that goes unused is not producing value.

> No. It's some hipster fuck who doesn't even have a degree. Typical codemonkey faggot. Also he rejects anything with recursion outright because it isn't "scalable."

Something tells me looking for a better job would do you more good than shitposting on /g/.
>>
Honestly OP tell this guy to go fuck himself. Why is he even in a position to tell you how to do your job? Says a lot about how much your employer respects its developers. I'd start looking for another job.
>>
>>60520404
>My job is to produce functioning code, not "make someone else's job easier."
No, your job is to produce code that works as intended and is as cheap as possible for the company. Most of the cost isn't in the development, but in the support during the life of the software. Proper documentation reduces the cost because it makes maintenance take less time. You're a dumb idiot.
>>
File: 1489790251663.png (154KB, 330x327px) Image search: [Google]
1489790251663.png
154KB, 330x327px
Maybe sit together with the guy and walk him through the code. That's what i usually do when something similar happens to me. Also the social interaction will help you keep the autistic superiority in check. At least it works for me
>>
>>60520946
>A bunch of inane comments that explain every line of code
>making maintenance easier

You have to be banging bits in order to justify that.

It's just yet another case of a company blindly following a process with no idea what it's doing. Last time I worked for a shitty company they wanted 3:2 test:code ratio. Making these QA people happy just wastes people's time
>>
>jobless neets giving advice
you want proper advice? put comments in tour fucking code; something your dumb ass would have done if you ever had experience working in a group
>>
>>60520404
>Not having the common courtesy to assist others in understanding your code with a simple comment

How do you even call yourself a programmer?
>>
File: 1297540059335.jpg (773KB, 1249x1991px) Image search: [Google]
1297540059335.jpg
773KB, 1249x1991px
>>60520082

Don't argue with people about shit like that. You can be doing something productive instead of wasting time having useless arguments.

It takes fuckin' 10 seconds to amend/add a commit with a comment. Just do it.

As a rule of thumb I comment any line that could take more than 1 seconds to figure out. Or when it's effect might influence some of the following steps in the code but not in a clear way.

Writing a simple sentence is not expensive, but could save someone(or you yourself int he future) hours.

The core idea to understand is that comments are not supposed to explain code, unless you've made something really obscure and hard to read. Comments are supposed to explain INTENT behind the code.
>>
>>60521168

Example:

def do_stuff(data):
# we need to get rid of X to save time when doing Y later
data = data.replace(/SOME_COMPLEX_REGEX/, '')
...
>>
>>60520082
>not commenting your code

In my university they would have failed you for that.
>>
>>60520082
Only pajeets fail to comment their code, because they want to keep their job for as long as possible before they get replaced
>>
>muh commenting

This is cargo cult science.

If you cannot read other people's code you shouldn't be maintaining it. I know it's hard, but a bunch of comments taking up space in the middle of functions don't really help.
>>
File: 1273282638434.jpg (13KB, 375x360px) Image search: [Google]
1273282638434.jpg
13KB, 375x360px
>>60521378
>If you cannot read other people's code you shouldn't be maintaining it.

That's not how jobs work honey.
>>
>>60520082
>QA
He fell for the wage slave meme.
>>
>>60520404
it sounds like he rejected your application because he got butthurt over how he failed to read your code and felt outsmarted or embarrassed and blamed it on you instead of his shit programming skills. Seek another job anon
>>
>>60520082
Who is this seamon demon? And what peruvian cartoon is she in?
>>
>>60520404
>Also he rejects anything with recursion outright because it isn't "scalable."

Did you explain why recursion was needed? Maybe you should talk to the lead developer.
>>
>>60521378
>>60521378
This. Comments are the sign of an inferior intellect.
>>
my lead dev actively discourages us from writing comments, even requesting that they're deleted from pull requests... he says "good code should be self explanatory". I think has a point, in that we should be striving for readability and simplicity rather than just slapping comments on shitty code, but the caveat is that not all code is good and I often find myself trawling through shitty, commentless code because of the culture he's imposed.
>>
>>60521378
>>60521568
That is why you write comments at least 80 columns to the right, dumbass.
>>
> tfw started new job but dev team doesn't comment any code
> can understand everything fine but can take a while due to obscurely labelled variables or code blocks that seem to have no immediate use in current function

Again the code isn't crazy complicated but given the size of the application a few comments here and there would make my life a lot easier. I'm constantly going between one file and the other but a comment explaining what the function call does would be a nice replacement for that.
>>
>>60521501
She’s Hanabi, the MC from Kuzu no Honkai (Scum’s Wish)
>>
>>60521697

Then you should try adding comments to the codebase in places where you found them lacking.

It's a great way to learn, because you have to formulate your understanding into sentences that will be CRed, and you start quickly contributing to the team and their software.

If your team rejects your comments just ask which ones are incorrect and fix them. If they reject them without good reason raise that with your team lead/manager.
>>
>>60521406
I'm sorry if your job sucks. My company values it's developers, it hires life-long learners who aren't afraid of other people's code. They don't waste our time with retarded bullshit like frivolous comments. They trust us. Just because your company thinks you're a code monkey who needs to be watched 24/7 lest he burn the place down doesn't mean every job is like that.

>>60521697
>obscure variables

Refactor them. Renaming is a simple operation. Figure out what they're for and give them an appropriate name.

>code blocks with no apparent use

You do know what a scope is, right? Do you understand the concept of a call stack? C-style languages typically allow you to create a block without any control flow or anything; it just creates a new scope/stack frame. It's especially useful in C++ due to the way RAII works.

Sounds like you need to learn the computer science being employed here by your peers instead of making them waste their time writing comments to spoonfeed you knowledge you should already know.
>>
>>60520404
>using recursion outside an university and personal projects
kys
>>
>another anime poster is retarded and can't understand basic communication skills thread
>>
>>60520404
>My job is to produce functioning code, not "make someone else's job easier."

did you even read your contract of employment before signing?
>>
>>60522772
When you're designing algorithms recursion is the rule not the exception kiddo. The fact code monkeys can't wrap their heads around it is a plus. Together with pointers, recursion is great for weeding out crappy programmers.

And don't bullshit me about stacks either. You need extremely large N to overflow the stack. Chances are your algorithm is going to complete much, much earlier.
>>
>>60521063
If it's complicated then sure comments would help but its 50 lines. Besides he shouldn't be prosecuted for not adding comments. Encouraged to do so sure, but not attacked
>>
>>60520082
Google on how to write clean code, anon. Also, you should put your comments only on the top, stating what purpose is this program and what does it do. If there are questionable lines of code that can't be read by normies, comment on top of the line.
>>
>>60520404
>Also he rejects anything with recursion
I would too, faggot.
>>
>>60522006
you must be great fun at parties anon
>>
>>60520082
>hanabi
>whore

kys
>>
>>60520404

>My job is to produce functioning code, not "make someone else's job easier."

My job is to produce functioning code, just trawl through your spaghetti garbage trying to figure out what you're trying to do because you didn't comment
>>
File: 1495377303530.jpg (84KB, 1100x619px) Image search: [Google]
1495377303530.jpg
84KB, 1100x619px
I had a programmer who though wrote good code wouldn't leave comments or name variables appropriately

If you're not going to take the time to make your code easy to understand for the rest of the team thereby saving time and money then you don't deserve a job
>>
>>60520404
>he thinks he's better than someone who didn't get a degree

No, you're the dumbass who got yourself in debt and wasted 4 years of your life when you could have entered the market after 1 or 2 years of self learning.
>>
>>60520404
>My job is to produce functioning code, not "make someone else's job easier."
This isn't your college/uni assignments, anon.
>he rejects anything with recursion outright because it isn't "scalable."
Better stick with for loop, anon. He doesn't know how to read recursion codes without comments.
>>
>>60522876
Do your inhouse standards say comments are mandatory? Usually whether you are correct in this scenario is determined long before you have an opinion. Team programming is hard to coordinate and I would rather bang my ego off a rule book than someone else's judgement
>>
>>60522956
I am.
>>
>>60520082
Doesn't use comments or object oriented languages, shit coder confirmed.
>>
>>60521570
>good code should be self explanatory
He means right. Can't argue about that.
>Not all code is good
There are reasons how, why and when comments are best used. You need to talk to your lead dev.
>>
>>60523021
Maybe he should be fired

>>60523015
Tell him to name variables and functions properly and comments won't be necessary

If he keeps naming things like doWork you can fire him
>>
>>60521502
>Did you explain why recursion was needed?
Clearly not since he added no comments to the code whatsoever.
>>
>>60522006
>Just because your company thinks you're a code monkey who needs to be watched 24/7
There's KPI. Monitoring 24/7 doesn't mean much. Results do.
>>
>>60522847
I don't think contract of employment requires programmers to write clean codes, anon. I assume that you're saying about how his codes becomes the company's asset an in order to do that, it needs to be human readable.
>>
>>60523201
Amount of comments has absolutely nothing to do with programmer performance.
>>
>half of /g/ are a pack of retards who don't understand recursion
>>
>>60523427
This. Recursion is probably the most useful tool that a programmer than use. Only plebs avoid it. There is literally no downside to using it.
>>
>>60523427
Most programmers don't. They think Java protects them from pointers, too.
>>
>all these people who think that writing comments is for chumps

If You Didn't Document It, It Didn't Happenâ„¢

Seriously. If you can't talk about your code, then you're no better than the Pajeet copy/pasting Stack Overflow code into their project. Both get the job done.
>>
>>60523427
>hurr using recursion means i'm smart
>>
>>60523448
There are no pointers in Java. Everything is a reference.
>>
>>60520082
Because tbqh famalam if we didn't you programmers would literally destroy the company with your shitty code and bugs.

if you don't want us to reject your shit than do it right the first time, no excuses.
>>
>>60523457
A bunch of comments that paraphrase the code isn't documentation. Code is self-evident, you just have to read it. Documentation is for the interface.

>>60523462
It's the same thing: indirection. A name that stands for an object stored in some far away place. Not being able to do pointer arithmetic doesn't change the concept that much. Even Java calls then pointers when push comes to shove: NullPointerException.

People still discuss pass by value/reference semantics. They can't grasp the simple concept of a pointer.
>>
>>60523509
>do it right the first time

That's hilarious.
>>
>>60523289
You misunderstood. It's the quality of it. Commentless doesn't mean much if you include obscure codes and expect people to understand it.
>>
>>60523584
If you consider a simple recursive function call "obscure code" I'm so sorry.
>>
>>60523608
>If you consider a simple recursive function call "obscure code" I'm so sorry.


Most non-Indian people would consider that a "liability" actually.
>>
>>60523616
Recursion is a natural fit for so many problems it's not even funny. How the hell is it a liability?
>>
>>60523616
>recusion taught in stage one computer science
>a number of tasks are naturally suited to it
>duh, it's obscure and a liability, and here's a racial slur to prove my IQ
>>
File: no comments.jpg (39KB, 384x503px) Image search: [Google]
no comments.jpg
39KB, 384x503px
OP
>>
>>60520082
just write multi-line comments after every line of code. explain even the simplest of shit like variable names and definitions in absurd amounts of detail.
>>
>>60523712
That's what I'd do too. I'd write nested comments to explain the comments and leave them to choke on the C compiler errors.
>>
>>60523677
>>60523690
>muh natural fit

That's not how the private sector works. Maintainability and scalability trump "elegance" every time.
>>
>>60523677
>recursion natural fit for so many problems

Anon, contrary to what you learned in CS 102, writing functions to generate the Fibonacci sequence isn't what everyone does all day.
>>
>>60523786
How is recursion not maintainable?
>>
>>60523786
It's maintainable. The base case logic is clear and explicit, counters aren't needed. It's scalable. Most compilers can optimize away tail calls, regardless of whether they're recursive or not, eliminating the usual function call cost even in normal code. Stack overflows aren't really an issue.

There's nothing wrong with it.

>>60523820
>I don't know ANY algorithm

Someone didn't do his quick sort exercise.
>>
>>60520082
> my code is self documented
your code is probably a turd, and I bet it has been a maintenance nightmare before
you're costing your employer money in the long term
>>
>>60523887
because most people are too stupid to understand recursion. Most people think it is magic and is really slow and will cause the stack to overflow.
>>
>>60523912
Most people should be fired and blacklisted from the industry.
>>
>>60523888
>Most compilers can optimize away tail calls,
Not really, most compilers don't implement tail call elimination. It really only functional programming languages. JavaScript is suppose to support it in the latest version of the spec, so hopefully more languages begin to support it.
>>
>>60523577
Than don't complain when stuff gets sent back. A lack of comments is a sign of a lazy programmer.
>>
File: 1495259639971.jpg (97KB, 809x792px) Image search: [Google]
1495259639971.jpg
97KB, 809x792px
>>60520082
>code monkey submits program without any documentation
Why is this allowed? If you're too lazy to annotate a simple 50-line python program then you have no business working with professional people.
>>
>>60520082
Just invite him for a friendly boxing match at the gym after work hours. Then rekt the fuck out of him. Then see if he still rejects your work.

That's what I did to my stupid "revision-fetishist" """"""supervisor"""""""""
>>
File: 1495233108.png (50KB, 200x100px) Image search: [Google]
1495233108.png
50KB, 200x100px
>>60520082
>mfw dev doesn't comment his own code and can't read it a week later

Why is this allowed? If you're not smart enough to make something as simple as a 50-line python program readable for other people, let alone yourself, then you have no business working as a professional developer
>>
>>60520404
>>60521040
>My job is to produce functioning code, not "make someone else's job easier."
>A bunch of inane comments that explain every line of code
If you're writing comments for every line then you're commenting wrong. Comments, essentially being the documentation of your software, should describe the functional purpose of each method or function within the program. Good methods should follow the rule of encapsulation; ie, your comment gives what the input(s) of a method should be, and the expected output of that method. How it completes the task should of course not matter at all to the outside world, but no one wants to read through a 100 or more line function just to see what it does; they only care about the input and output. By this definition an uncommented function that works is useless because no one will know how to use it and they're not going to bother figuring out how to use it, they'll just use properly documented functions instead.
>>
>>60523963
GCC does it.

-foptimize-sibling-calls
Optimize sibling and tail recursive calls.

Enabled at levels -O2, -O3, -Os.


https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

>>60523968
You think laziness is bad?

>>60524002
>blah blah

OP's manager doesn't know any of this nor care. He just counts comments and rejects if below threshold.
>>
>>60520082
If your python function dont have docstring you should start reading python tutorial from the start.
>>
>>60520082
Tell him that you're doing work for the client,and not him. He's just wasting the productivity time of the company.

Productiion time wasted = money wasted. Tell the CEO you don't need a fucking QA. You know what you're doing
>>
>>60524074
Laziness is bad if it means that you're writing worse code due to leaving things out of it. Laziness is good if it means that you're writing code well enough to get a job done without frills
>>
>>60524137
>Tell the CEO you don't need a fucking QA. You know what you're doing
Lel
>>
>>60524148
The job is done, it's just that some retard keeps raising his "concerns" about non-issues. Laziness is great because it lets people correctly identify what a waste of time that is.
>>
>>60524183
Your code is ephemeral, anon
>>
>>60524227
It's not, really. Code doesn't rust. Look at all those banks using their old ass Cobol systems since forever.
>>
>>60520082
They say good code is self documenting, so when I work with strong developers I don't mind if they dont comment.

The fucking issue, probably with you too, is that every degenerate moron think their code is "good code" when in reality its a fucking steaming pile of garbage with bad list comprehension like we are playing code golf or some shit.
>>
File: question.png (200KB, 229x686px) Image search: [Google]
question.png
200KB, 229x686px
Is "documenting" just a fancy word for commenting your code or is there something more to it?
>>
>>60520946
>You're a dumb idiot.

Are there any smart idiots?
>>
>>60524291
Documenting is saying clearly what your function takes as input and what it outputs, as well as any side effects it has. Preconditions, postconditions, assumptions. That sort of thing.

It's not this:

// declare integer x and initialize with 0
int x = 0;

// if x is less than (bot not equal to) 10
if (x < 10) {
// set x to 10
x = 10;
}
>>
>>60524301

A lot of liberal arts professors.
Some of them are so well versed in whatever insane ideology they've become obsessed with in their little university vacuum that they have to be pretty smart.
>>
File: shibe msi.jpg (737KB, 1280x962px) Image search: [Google]
shibe msi.jpg
737KB, 1280x962px
>>60524291
What are
>readmes
>manpages
>wiki pages
>requirements documents
>statements of work
>UML diagrams
etc etc
>>
>>60520082
you should lose the attitude
code monkeys have little job value in the first place
>>
>>60522006

> Renaming is a simple operation.

But with enterprise level software? That I don't fully understand yet since it's not even properly documented? It's not as simple as changing a variable in a single scope, everything is everywhere and even if I feel 100% certain that I found all uses for that variable it's still rather difficult to be sure that I really covered all the bases given how large the code base is. In fact I've already done exactly what you suggested, but it ended up creating a problem as unknown to me it caused an issue in the back-end; all the code there relied on the exact naming of the variable as it was in the front end.

As a note in the backend we're working with groovy. And I'll tell you it's not fucking fun to spend 30 minutes figuring out what 'def roo' means (what data type do you think that is?) when, again, said issue could have been fixed with a short comment or at least more regimented coding standards.
>>
File: 1470458329415.png (372KB, 525x525px) Image search: [Google]
1470458329415.png
372KB, 525x525px
>there are wagecucks ITT siding with the QA brainlet
>>
>>60524501
>code relies on the name of variables

That's Ruby on Rails tier. Looks like your hands are tied then. Write a comment explaining what it is where it is declared and leave it at that.

Enterprise code my ass.
>>
>>60520082
Comment. Your. Fucking. Code. Somewhere down the line someone smarter than you is going to have to look at it and no way in hell are they gonna get the retard logic you used in writing it.
>>
>>60524997
>smart programmer
>can't understand some simple code

k
>>
code documentation is a common pool resource. everyone has to do it even if not everyone needs it. if you're too stupid or even just too shortsighted to understand the imperative to document code for the rest of the developers (both now and in the future), then you shouldn't be allowed to modify the codebase.

and that's fine. some people are just not smart enough to do development work, and there's nothing inherently wrong with that. everyone has a calling, and for some people it's not information work.
>>
>>60524255
Do you code in Cobol for a bank? Or are you doing something in web dev?
>>
>>60525046
I work with medical equipment and electronic health records software.
>>
>>60525144
You never have to revisit a piece of code?
>>
It's good practice for when you have much larger projects. Also you're dumber than you think, kid
>>
>>60521378
Are you fucking retarded? Have you never worked with a large project or anything remotely complicated before?
>>
>>60525184
Given the ransomware is hitting, I'll say he doesn't.
>>
>>60520082
For every five or so lines of code you should have some comment explaining what the fuck you are doing

>it's le obvious xD
said everybody who has ever written code ever in their fucking life thinking there was no reason to ever comment that.

That's a pajeet mindset and is how you end up with Windows 10 anon
>>
>>60523912
What. Most people I work with can understand functional languages just fine, which only uses recursion. Are you sure you don't work in some shitty 2 week coding camp or something
>>
>>60525184
I revisit my own code and other people's code all the time. I constantly get and give feedback regarding the code and it's always being improved. Our test suite prevents massive breakages like the one described above; if it happens I just revert the change. Because of this it's easy to refactor code and make it more readable and structured.

Reading other people's code is hard. Most engineers don't care. They come to some codebase and want to bulldoze the whole place and build something grand. That's why you think you need endless comments to explain everything.

Turns out if you know the language you can actually understand what's written.
>>
>>60525287
Well maybe not 5 because I thought about that and that's really stupid

but just section off your code into things where you can be like "hey I'm doing this lol". You don't have to write a fucking paper in your report.
>>
>>60525296
Yeah, rule of thumb is if you personally can't understand it after coming back to it, then document it. Something that just explains a function or steps in an algorithm is good. Of course, if the code is extremely simple, it's not necessary, but if that's the case then what are you even doing
>>
>>60525296
Yeah you're stupid, just like everyone who insists on obligatory comments. Let's leave it at that.
>>
>>60525323
Why don't you revisit this topic after getting an actual job in the industry; you sound like some hotshot freshman
>>
>>60525295
>Turns out if you know the language you can actually understand what's written.
this kind of mentality works when you're talking about course assignments and stuff, but frankly i don't believe for a minute that you work in a company with a codebase even ranging a few thousand lines of code. knowing the "contract" of what should be passed to a function, what should be returned, etc... fundamentally requires more than knowledge of the language, but knowledge of the project itself. if you're not popping out occasionally to give the reader/developer a 10,000 foot view of the code and that block's role in things, you're hobbling your development team.

then again, i've seen tons of industry teams crippled by years of poor development standards, so maybe you *do* work in industry.
>>
File: Selection_001.png (26KB, 659x435px) Image search: [Google]
Selection_001.png
26KB, 659x435px
>>
>>60525323
not an argument

QA doesn't have time for your bullshit pajeet. Take the five fucking minutes to type out 4 or 5 lines explaining your logic and call it a day. There are people who would take your place in a heartbeat and have always commented their code on some basic level
>>
>>60520082
Imagine how unemployed you have to be to think QA even has access to source code
>>
>>60525011
> Implying your code is simple and not a spaghetti monster of horrid logic
The fact that you don't comment already shows that you have poor practices. Stop being an autistic retard and take this as an opportunity to improve yourself.
>>
>>60525344
Jumping in and understanding the codebase - including the unwritten knowledge people hold in their heads without realizing it - is what I do best actually.

I'm the guy who wrote the documentation for new hires. I wrote the README that gives an overview of the system and how things relate to each other, so they know where exactly they will work and what other parts they will deal with and how it works. You know, the kind of docs open source project devs won't ever write because they enjoy preaching the idea that you can contribute and change things while simultaneously not making it easy.

That's real documentation. Not a bunch of idiotic comments in the middle of actual code. It took a lot of time, a lot of exploration in order to do it. I had to read a lot of code I didn't write. Why can't other people do it?
>>
>>60520082
>simple 50-line python program then you have no business working with intelligent people.
>he writes python

do as the adult asks you to do.
>>
>>60525426
Because that shit takes too much fucking time and it's easier to have everyone take the 5 seconds out of their day to comment their fucking code
>>
>>60525446
It doesn't take a lot of time. My team has no issues with it. We just don't feel the need to pepper the code with comments. We have proper documentation for everything important.

I took a lot of time to do it because I was reading everybody's code. The entire codebase.
>>
>>60520082
Consider it this way instead.
Write comments like you expect to pick up and use 6 other languages for the next 4 years,then come back to this program at the end of those 4 years, drunk; and need to know what's going on.
That way it's less about other peoples B.S. and more about "This might be useful to me later on."
>>
>>60525487
Wait, if you have proper documentation for everything that's important, then there's no problem. Obviously, you shouldn't have "//creates a new array", but if you explain the complicated parts of the code, then you are commenting properly.
>>
>>60525509
Yes. My point is this QA is just a guy following some rules to the letter, as I said in >>60524074. Note it's not "you have to have proper docs", it's "you need X comments", just like the idiot above suggested 1 comments per 5 lines of code.
>>
>>60525567
Eh, OP probably has some random shitty job. In this case, he should probably be smart enough to just follow the fucking rules and not get fired.
>>
>>60525589
Yes. If I were him I'd start looking for another job. Leverage.

If OP was smart, he'd have gotten summer internships while in school and graduated with solid job experience and network. Doesn't seem to be the case.
>>
>>60525624
Excellent, so we are in agreement that OP is a dumbass
>>
>>60520404
>My job is to produce functioning code, not "make someone else's job easier."
I hate coding but that sounds wrong on all levels.
>>
>>60525634
His entire company staff is a dumbass too. Having QA vetting development is backwards, the managers are dumbasses for allowing that. People should be working together on actual quality issues based on measurements and evidence, not being adversarial over bullshit comments.
>>
>>60525670
Well, that's just the nature of the industry. OP should be glad that he has a job, anyways
>>
>>60525670
It may make sense if they are outright selling the code as a product.
>>
>>60525670
>together on actual quality issues based on measurements and evidence

comments are often required. its not managment that reviewed his code but other people who program. people wtih autism lack empathy, maybe thats your and OPs problem?
>>
>>60520404
I honestly hope you get gang raped by niggers. You are absolutely scum.
>>
>>60525704
Yeah, who knows? Maybe everyone there is brain damaged and thus unable to figure out why the code is the way it is without a ton of comments.
>>
>>60523447
>There is literally no downside to using it.
STACK OVERFLOW
>>
>>60525812
>company policy states that you shouod comment code
>OP does not comment
>gets asked to comment
>autismo throws a hissy fit
>>
>>60525826
Nah. You need absurdly large inputs in order for that to happen, you can simply increase stack size and the compiler will likely optimize the stack away anyway.
>>
>>60522772
>what is dynamic programming
Unless you're in a farm, like a javashop, it's not just a meme.
>>
File: 1476316288114.jpg (77KB, 680x680px) Image search: [Google]
1476316288114.jpg
77KB, 680x680px
>>60522853
>Chances are
>>
>>60520404
>My job is to produce functioning code, not "make someone else's job easier."

What do you think that you're there for? I hope you lose your job to an Indian.
>>
File: 1491169247478.png (41KB, 926x694px) Image search: [Google]
1491169247478.png
41KB, 926x694px
>>60520082
>>60520297
>7 years ago
>Land internship at an unimportant software company that made retail systems, just "simple" bughunting to help the actual employees
>Every other piece I looked at had no comments, which meant walking through thousands of lines just to figure out what they're even supposed to do
And then I saw my first goto. My CS1 teacher's horror stories about the goto were true and it was the crux of several problems because it was going to the wrong section.
>>
>>60520404
>He rejects anything with recursion
As he should. It's bad coding practice and not instantly understandable.
>>
>>60526179
Nothing wrong with goto. It's an excellent way to handle errors in C, especially when you have multiple resource allocation steps in the same function, each depending on the previous one and all susceptible to failure. If any of then fail, you just goto the error handling code.

Just because you heard that "goto considered harmful" doesn't make it right. Did you actually stop to think why that guy even wrote that text on why goto is harmful? You probably didn't even read that original text and are probably just parrotting stuff other idiot parrots are parrotting. You "hear" other people's hot opinions and suddenly they're your hot opinions as well. That's the problem with you code monkeys. That's what you fucking monkeys do. You "hear" things and start repeating them without knowing the why, without even an ounce of critical thinking. It's like this with goto, with comments, with recursion, with pointers, with anything you people don't understand. Look at this moron >>60526201, he can't even articulate why he doesn't like recursion. It's just "bad practice", as if the industry itself was behind him. Recursive algorithms are used all the time. He doesn't understand it so how could anybody else understand it? Boom, it's "not instantly understandable". That's just idiotic.

It's just pitiful really. I feel sorry for the people who have to deal with idiots like yourselves. I hope they're all dumb too because ignorance is bliss. I for one don't have patience for this idiocy.
>>
>>60521378
Saying comments don't help is literal autism... That's like saying the picture doesn't help you solve a puzzle.
>>
>>60526436
So code you wrote is a puzzle you'll have to solve later? Says a lot about your programming skill.

Sit down and just read the thing.
>>
>>60520082
>not explaining how your code works
I seriously can't believe you would do this.
How the fuck are you even still employed?
You should be fucked, raped and penetrated by big long niggerbull cocks until the rape turns into snuff by penetration while Richard Stallman talks about GNU/Linux and has an autismal fit because the equipment streaming your abuse and death penalty is not GNU enough for his brain that is occupying his cheetos encrusted, fatty, swarty body he has neglected so much, which it is a testament of his lack of self worth, self respect and regard to his body.
>>
>>60526504
(You)
>>
>>60520404
>My job is to produce functioning code, not "make someone else's job easier."
That's literally what your job is. Any company that hires you as a developer wants you to produce functioning code that others can read. Your job involves making someone else's job easier.
>>
>>60526524
No amount of (you) of this world and universe can't compensate for this atrocity.
>>
>>60520404
The Python maximum call-stack size is ridiculously low and the language doesn't have TCO. Turning a recursive function an iterative one is easy in most cases. There's really no excuse here.
>>
>>60526378
Those who do use goto properly know in which cases it is proper and in which cases it isn't, so they will disregard the general rule about not using goto. Most people don't know when it is proper to use goto, and so a good general rule when teaching people to program is to teach them not to use goto at all. Goto is by far the most intuitive method of making loops and the control flow for beginners, and if you do not restrict them from using goto they will use it for everything which will make the code incomprehensible and prone to errors.
>>
>>60520082
It's funny you use a picture of that anime character since she constantly got laid off for not fitting her workplaces culture.
>>
>>60526599
>incomprehensible

Bullshit. So many times I've reverse-engineered code of conpetitors, staring at the interactive disassembler, at the control flow graph, it was literally a goto orgy and I figured it out. Other people can too if you give them the chance.
>>
>>60520404
>2 years down the line
>try to patch something into your old code
>something breaks
>what was this function doing again?
This will be you.
>>
>>60526613
>laid off

Why can't management just let this meme die? Fire us like the good old days.
>>
>>60526652
Read the code and find the answer.
>>
File: the it crowd - facepalm.jpg (60KB, 1020x716px) Image search: [Google]
the it crowd - facepalm.jpg
60KB, 1020x716px
>writing maintainable code? what's that?! that's something losers do! HAHAHA

Whatever you say Pajeet. Whatever you say.
>>
>>60520404
>Also he rejects anything with recursion outright because it isn't "scalable."
Do you even understand what he means? Most recursive problems aren't scalable at all, especially in Python where your stack frames are fucking gigantic.
>>
>>60522853
Recursions usually only pay off when they can be tailcalled, otherwise it's a waste of space and time.
>>
>>60526751
Try measuring things before caring about minor issues like that. Also, like I said before, even GCC optimizes tail calls, recursive or not.
>>
>>60526789
OP said he's using Python. Recursion isn't a minor issue in Python.
>>
>>60526795
A recursive factorial in C will overflow the integer before the stack is even close to overflowing. I can't imagine Python having such a small, non-configurable stack and so much function call overhead that it matters.
>>
>>60524501
renaming etc is automated, why would you do that manually
>>
>>60526789
>Try measuring things
That's what I do. Sadly I'm away from my PC right now, so I can't provide you a benchmark.
>minor issues
It was you who claimed that recursions make algorithms run faster magically.
>GCC optimizes tail calls
I'm sure every compiler nowadays does. However, whether a recursive function can be tailcalled by itself depends on how the function is called.
>>
>>60523711
>write unmaintainable code
>company can't fire you
le epic coding trickster faec
>>
>>60526645
Lol, I obviously don't mean incomprehensible in the literal sense. If it were, the program obviously wouldn't run at all. But why produce code that you have to figure out when you can have code that is immediately clear? Why make the code more complicated instead of making it simple? In 99% of the cases there's no advantage whatsoever of using goto, but a whole bunch of disadvantages.
>>
>>60521570
His logic is flawed: "good quality should be self explanatory" does not mean that code quality can be influenced or judged by the amount of code.
>>
>>60520082
You sound like a fucking dumbass who hasn't actually worked on anything meaningful to not understand why they threw your shit in the trash.

No one fucking has time to read through each line of your shitty function. Instead of reading 50 lines of Python you could write a 2 line comment summing up everything someone would need to know to support your garbage code.

Kill yourself.
>>
>>60526906
I didn't claim they were faster. I claimed they were a natural way to solve many problems, and that whatever speed impact if incurs, if any, probably doesn't even matter.

Below 10% difference in performance is the kind of speed up that compilers do and also the kind that doesn't really matter in the grand scheme of things for most applications. Real performance improvements come from choosing the right data structures and algorithms and the figures are pretty much always absurd, always over 100% improvement in performance. You get these by doing things fundamentally differently than your original approach, not by eliminating some minor function call and stack management overhead. It's the difference between calling the read system call in a loop to process things byte-by-byte, and passing it a big ass block of data to read into and then looping over that block instead. Compiler optimizers can't fix the broken system call pattern. Who cares if I used a loop or a recursive function? Result is the same: a program so utterly dominated by the cost of the system calls all other concerns fall away.

>>60526953
I just don't like the idea of banning an entire control flow tool just because some idiots might misuse it because they didn't learn the other ones. It's like banning while because for exists. Might as well ban fucking everything because continuations exist.

If there is such a thing like proper uses for goto, then teach them. Don't hide goto from beginners and wait until they grow up so you can have the talk about the bits and the bytes with them and finally teach them about goto after decades of telling them to avoid it like the plague.
>>
>>60526692
Exactly. You waste time reading through the code, working out what actually gets passed to it and what is done with it, what it shits out at the end and why, when you could have just put two fucking lines at the beginning of the function in 30 seconds when you coded it.
>>
>>60522772
recursion is great for traversing trees
>>
>>60527328
The code is the truth. Documentation is based on the code, but it is not the code. Sometimes documentation is out of date.

Get used to it. That's the real world.
>>
>Python
>using the language of nu-males
>>
>>60527369
>that's the real world
It's not.
>>
File: 1450479718856.gif (15KB, 300x186px) Image search: [Google]
1450479718856.gif
15KB, 300x186px
>>60520404
>My job is to produce functioning code, not "make someone else's job easier."
Wrong mentality. Others will need to read your code too, and commenting, even if it is a bunch of shitty 2liners, is better than nothing.

>Also he rejects anything with recursion outright because it isn't "scalable."
Your teacher is a massive faggot though.
>>
>>60520404
lmao not a team player not gonna make it
>>
>>60527369
Comments and documentation aren't the same thing.
If you update the code you add or update the comment.
>>
If you didn't include PEP-257 compliant docstrings I would reject your code as well.

Same with including jsdoc comments, if it's something your team does then you fucking do it.
>>
>>60527447
Good luck. Your error is thinking people read comments. They forget they exist. People don't even read error messages.
>>
>>60527482
But you read error messages, don't you?
>>
File: 1469047555240_zps716o4tcu.jpg (4KB, 229x220px) Image search: [Google]
1469047555240_zps716o4tcu.jpg
4KB, 229x220px
>>60523040
>>
>>60520404
>recursion is not scalable
kek, what is quicksort
>>
>>60527146
Each level of subtlety makes things more complicated. There's no reason for a beginner programmer to use goto. You may want to tell them that code isn't automatically garbage just because you see a goto in it at some point, but teaching them the very special cases where goto is appropriate when they don't even know what control structures are seems fruitless.

And no, it's not like banning while, because while is useful and appropriate even for beginner programmers.

This is hardly a unique problem to programming. 2+2 = 10 isn't incorrect in base 4, but kids need to learn (at least with our current educational system) base 10 before they learn more complicated, non-standard things. It's the same even in sports. When you learn skiing you learn to lean forward and bend your knees all the time, but later you understand the cases in which it is appropriate to break this rule. When you learn tennis you first learn to always keep your eyes on the ball. Later you understand when this rule should be broken.

Unfortunately in the field of programming the unique issue is that there are 10 beginners for every expert, and there's no obvious way (at least for a beginner) to distinguish between the beginners and the experts.
>>
>>60520082
Wait why would qa be looking at code? Usually they test against requirements, not implementation. Your fellow devs should be rejecting your shitty code not qa
>>
>>60520082
I like to speak and write that doesnt require punctuation because nonidiots can understand perfectly well
>>
>>60520404
>Also he rejects anything with recursion outright because it isn't "scalable."
Joke's on you, in Python it isnt.
>>
>>60524183
>>60524227
his job is ephemeral, anon
>>
>>60520082
>50 line python program
>50 lines
>python
You are not actually working are you?
It's just an internship right?
Real programmers are not as retarded as you and also DON'T USE PYTHON YOU FA GG OT
>>
>>60528212
Real programmers use whatever gets the job done.
Python is remarkably good at getting jobs done.
>>
>>60527959
>Recursion can't have proven upper bounds
Retard
>>
>>60528237
Real programmers use perl but i bet you are too retarded to use it :^)
>>
>not writing non-sensical or plain incorrect and false comments
It's like you people don't want to keep your job
>>
>>60527894
We tend to look at all the info we can get to help understand what we're supposed to be QAing and why it goes wrong, and so we can support business users during the UAT without putting them in direct contact with the developers
>>
>>60527873
Fair enough. Most programmers suck.
>>
>>60528212
Found the unemployed NEET.
>>
>>60530087
t. NEET
>>
>>60523540
>Documentation is for the interface.
No, all work you do has to be documented. It's how the people who pay your wages justify your wages. Your manager needs as much documentation as possible. I'm surprised you even have a job.
Thread posts: 204
Thread images: 18


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.