[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]

Why do guys have to make things more complicated for no reason?

This is a red board which means that it's strictly for adults (Not Safe For Work content only). If you see any illegal content, please report it.

Thread replies: 75
Thread images: 11

File: 1491010304157.jpg (226KB, 869x1776px) Image search: [Google]
1491010304157.jpg
226KB, 869x1776px
Why do guys have to make things more complicated for no reason?
>>
>>35936650
>//what the fuck? comment removed
fuck her
>>
>>35936650
>This is why more women should get into coding
>>
FUCKING MEN

AM l RIGHT LADIES?
>>
evil floating point bit level hacking
>>
>>35936650
>"The code on the left is bad! It is hacker code used to steal nude photos! Stay away!"
>Shalom Ayash
really activated those almonds
>>
>>35936777

>hacking trips

STAY AWAY FROM MY NUDE PHOTOS ANON
>>
>else if(a>b && b<a)

kek'd
>>
File: 1491005789892.png (560KB, 859x484px) Image search: [Google]
1491005789892.png
560KB, 859x484px
>>35936845

><html><body><h1>Women Empowerment</h1>
>How many times do I have to hit enter before this code empowers me?
>>
Think I might turn gay.
>>
File: 1470743205649.jpg (136KB, 960x1280px) Image search: [Google]
1470743205649.jpg
136KB, 960x1280px
>>35936650
But her function could've been written more succintly as:

return (a >= b) ? a : b;
>>
you should comment ur code tho
//faggot
>>
File: IMG_20170328_214648.jpg (274KB, 720x1280px) Image search: [Google]
IMG_20170328_214648.jpg
274KB, 720x1280px
im not a meninist or whatever the fuck but this shit genuinely bothers me because im disorganized as fuck and ive always gotten shit for it meanwhile basic ass stacy bitch gets all the praise and validation because she can follow a nice set of rules and do what she is told

fucking GAY
>>
>>35937112

She also didn't need to check if a>b && b<a since there can't ever be a case where one of those statements is true and the other isn't. She also implied the guy's code example is unnecessarily convoluted when it's actually a revolutionary algorithm for improving performance in rendering 3D graphics and is basically the definition of extreme efficiency.

https://en.wikipedia.org/wiki/Fast_inverse_square_root
>>
>>35937112
Her function also fails to find the max if the two numbers are equal. It just returns 5 cuz she is so le randumb XDDDDDD
>>
>>35937181
Her code is literally from a babby's first C++ class. They tell you to write your code like that. They make you comment the fuck out of it or they take off points.
>>
>>35937232
she didn't need to check for that second case at all because if a is not less than b, it must be equal to or greater than b. she needs a case testing for equal integers.

if a = b, return a (or b), else return a

>>35937181
she's obviously getting praise from people who have no idea what the code even says.
>>
Nothing stopping that guy from adding one short sentence of comment

Basic rule of thumb I follow is to comment what a function does, if it's not too obvious ( and if the name is vague )

Really good to leave comments for yourself when a few lines are complicated
or when you do a disgusting workaround
or just a TODO note that you know you'll revisit
>>
File: 1472742723007.jpg (34KB, 694x732px) Image search: [Google]
1472742723007.jpg
34KB, 694x732px
>why don't u guys just prepend a minus? XD
>>
>>35937365
Her code could be even short if she introduced a new variable called max.
max=b;
if (b<a){
max=a;}
return max;
>>
>>35937462
Wtf are u doing
Return a > b ? a : b
>>
>>35937517
She's in babby's first C++. They don't teach that syntax. Use your noggin you fucking degenerate.
>>
>>35936650
>coding

you're a bunch of fucking losers.

me? i did pure math and bank 250k a year
>>
>>35937420

Comments are a crutch. If you can't understand the code without them you should go back and try harder to understand the code without them. You have no guarantee the comments are going to accurately describe the code anyway. It's the code itself that'll actually get built and ran and will potentially screw something up, not some guy's opinion on what the code does.

It also takes you out of the programming mindset when you keep on stopping and switching to regular verbal thought, which I believe holds people back from fluency in writing. If you don't write any comments and just stay thinking in terms of the language itself you'll get better at knowing what to write on the fly from necessity.
>>
>>35937517
that's a false result though
what if they're equal? return b?
nah mate return 5!
>>
>>35937645
Comments are for other people you fucking retarded piece of shit. It's so I can read your fucking program quicker than trying to understand how your brain works by reading every single fucking line of code like it's a fucking book I'm writing a master's thesis on.
>>
File: sad_frog.jpg (87KB, 736x748px) Image search: [Google]
sad_frog.jpg
87KB, 736x748px
PLEASE someone tell me that someone called out that dumb bitch on her incorrect code. Please. I need this. Please tell me someone knocked her off of her undeserved pedestal.
>>
>>35937662

The function returns an int. If they're equal what else can you possibly return?
(I would also argue the biggest number out of 5 and 5, is 5)
>>
>>35937628
>I did a harder job and make a little more than you!!!

wow. congrats i guess?
>>
>>35937645

t. Bedroom coder
>>
>>35937232
actually didnt know about this, of course fucking Carmack is involved

love seeing some efficient algorithms
>>
>>35937712

I already mentioned they're bad for other people too, not just for the writer. If you're saving a significant amount of time through someone else's comments, it's probably because you're not actually reading the code and you're assuming those comments are accurate.

Unless it's assembly it's really not too much to expect that you actually read all the code and understand it in itself. The language it was written in was already made specifically to give you an easier time to express abstract ideas than the one to one machine code mapped tools you were forced to use before it was invented.
>>
>>35937759

I'm on salary and my code is used for life safety equipment.
>>
File: fefe.jpg (45KB, 450x470px) Image search: [Google]
fefe.jpg
45KB, 450x470px
>>35937734
No you fucking idiot, if you give you function ANY equal numbers (for example, 6 and 6, or 100 and 100) the function will fucking return 5. Literally if you go up to that program and say "Hey computer which number is larger: 100 or 100?" the computer will answer "5" because of that dumb cocksleeve and her shitty code.
>>
>>35937628
>250k a year
>didn't even make 300k starting
haha wtf u doing

>>35937731
it's not real
>>
>>35937925
It is. She's a supermodel. There's literally articles about her (((coding career))).
Just google Karlie Kloss coding
>>
>>35937645
you are literally retarded.

this comment is original
>>
>>35937971
Yes karlie kloss and the code meme is real, but this particular tweet is fake.
>>
>>35937860
If you can't go back and write comments that explain the purpose of the code or what it does AFTER YOU ARE DONE. You yourself don't understand the code and should not be coding. If you can't translate what your code does into English, what the fuck makes you think someone else will be able to debug your code or understand it?
>>
>grade 8 drop out HikiNEET
>haven't left room since 2001
I thought this entire board was retarded like me you're really bringing me down. Go back to your 50k+/yr jobs you fucking niggers.
>>
>>35938080

Not doing something doesn't mean not being able to do something. If someone wants to understand my code they can read my code.
>>
>>35937923

*give her function
>>
in all honesty I hate people who don't fucking comment on their code
>>
>>35938266

I hate people who do comment their code. If I have the time I'll just delete the comments out before working on someone else's shit because they're non-functional distractions.
>>
>>35938245
Dude fucking kill yourself. It's obvious you're a self taught faggot who has never shown his code to anyone else before. It's obvious you've never worked in the coding field other than from your bedroom and with yourself. You'll get fired quick if you ever leave your safe space.
>>
>>35936650
>^_^ in the documentation
>^_^
>this is done without a second though
>look at me i wrote sum code!!
>^______________^
SET PHASERS TO FUCKING END ME, CHIEF
>>
>>35938309

Your grandma's medical pedant might depend on code I've written. Also the systems people use to keep from dying in fires.
>>
>>35938309
Unironically this.
I worked with a literal fucking autist who wrote shitty"hax0r" code all the time and he didn't last a month
>>
>>35938400

>hax0r code

What is that even supposed to mean?
>>
>>35938305
t. someone who doesn't code anything important

I'm consistently working in groups for my imaging research and its always the retards who don't comment that have the sloppiest code
>>
God I hate fucking pointers, I mean I passed the class but its the only reason the class program design is considered a weedout class.
>>
>>35938417
Unnecessarily complex, uncommented code written to be short instead of readable.

Something like the left pic on OP.
>>
stray observation: its always the pajeets who don't comment on their code and everyone fucking hates working with indian people
>>
>>35938524

People will literally die if my code doesn't work as intended, it's plenty important. "YOU NEED TO ALWAYS COMMENT" is a stupid meme. I get it. Lots of people yelled that at you when you were in school. It's still stupid.
>>
>>35938584
>People will literally die if my code doesn't work as intended, it's plenty important.
no, someone else will correct your code before it fucking kills someone

stop acting like you actually do anything, your lies are hilariously bad
>>
>>35938566

>everyone fucking hates working with indian people

People hate working with indian people because they're usually brought in to save the company money by replacing you with cheaper H1B labor.
>>
File: 1433822927944.jpg (47KB, 854x539px) Image search: [Google]
1433822927944.jpg
47KB, 854x539px
>>35938584
>one programmer is the difference between life and death
>>
>>35938584
Oh fuck off, now I am 100% sure you've never written anything more complex than fizzbuzz.
Everyone creates bugs. Especially in industry when you're working on a blackbox that depends on other people's blackboxes.
>>
File: 1480500423363.jpg (29KB, 258x360px) Image search: [Google]
1480500423363.jpg
29KB, 258x360px
>>35937112
>>35937462
>>35937575
>only men can code correctly

This is EXACTLY why you don't get laid.
>>
>>35938613

>there are imaginary extra people who step in and rewrite your program for you if they don't work as intended and they will always find every case like that and no one will ever die from an alarm system not working

Yes anon, I'm the one who's lying.
>>
Can someone explain to me, a male with very little programming knowledge, what the issue here is?

Aren't you supposed to make those little notes to make the code clear to yourself and others? What has the woman done wrong here?
>>
File: meh.jpg (34KB, 600x450px) Image search: [Google]
meh.jpg
34KB, 600x450px
>>35938699
>What has the woman done wrong here?
she was born a woman
>>
>>35938699
The code is both terrible, inefficient and doesn't work properly. Too many comments, some of them being a waste of space.

It's amazingly bad in all ways
>>
>>35938639

I don't know why you're having such a hard time understanding how this works.

>2G sunset
>Systems will stop working, but you don't know for sure which ones
>You need to deactivate some of them to save money
>One of them belongs to a guy who goes on to die in a fire and it's proven the system's network still could have provided service

That exact scenario has happened as the result of a program that identified a population of systems and deactivated their service through a communication provider's API.
>>
>>35938759

>Too many comments, some of them being a waste of space.

Is there actually such a thing as too many comments, and wasting space in code, though?

I'd personally love to have code elaborated like this, it would make everything so much easier.
>>
>>35938699
>max(10, 10)
>returns 5
>>
>>35938699
The code on the right has an illogical result, but honestly, at least that behaviors is clearly documented.

That's literally the only thing wrong.
Anyone who says otherwise is dumb.
>>
>>35938829
>Is there actually such a thing as too many comments
Yes.

>wasting space in code
Yes.

>I'd personally love to have code elaborated like this, it would make everything so much easier.
A function needs a one-line description of what it does. The only other time there should be comments are for special cases or unusual bits of code that otherwise wouldnt be expected.

Well written code speaks for itself.
If you can't read the function on the left, programming isn't for you.
>>
>>35938829
>Is there actually such a thing as too many comments, and wasting space in code, though?
Yes. 1 extra line of useless comments is one less line of actual code in the screen. How can you defend stuff like //^_^? Or fucking explaining what an int is mid-program?

If you need a comment to understand what a < b means then you should be majoring in gender studies
>>
Do people actually enjoy coding?

Seems like its one of the most boring, shit tier jobs someone can have.
>>
>>35936650
>When you fucking have more comments then code
>Write 10,000 lines of code with a hundred different functions, subs, routines without a single comment/description of what the code does

I've never hated programmers as much as I did when I was a lead project manager.
>>
>>35938766
Sounds like you're not a real developer, you're just a ITT Tech tier sys admin who writes dirty one time use scripts.

Come back when you've worked on code bases over a hundred lines long kiddo.
>>
File: maxresdefault.jpg (226KB, 1920x1080px) Image search: [Google]
maxresdefault.jpg
226KB, 1920x1080px
>>35938047
>Code with Klossy
What the fuck am I looking at
>>
>>35939068

Do you even have a job? And you're really reaching for an attempt to make me look bad at this point.

>f-fine, you actually do work at a professional salaried position writing life safety contingent programs, b-but you're probably not very good at it and maybe have substandard educational credentials...

Like it or not, I'm actually a 30 year old professional with 8 years tenure and a nice corner office that has a door and a lake view and I get paid a nice salary to write code that isn't filled with a bunch of comments. The "you always need to write comments" meme isn't always bought into at every coding shop. There are actually perfectly valid and reasonable arguments for why it's better to focus on writing code in a way where others don't need to rely on comments than it is to explain everything in conversational language.
>>
>tfw I have no problem with women coding

It's forcing women that clearly have no interest in technology being forced into it because muh diversity.

But because some fields are so dominated by one (of the 2) gender, it can be intimidating to pursue a career in that field. i.e. nursing, teacher. So they make it "X for Women(tm)" so they have a chance to give it a try without the pressure.

I just wish it went both ways for these courses to exist for men to try things in female dominated fields. There's probably an argument for how men don't give a shit and will do whatever they want because they literally feel no pressure to not pursue a career in whatever field they want.
Thread posts: 75
Thread images: 11


[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.