I really need to get my frustrations out and this seems like the perfect place.
I'm a uni dropout and landed my first programming job. I at least have some knowledge of OOP and design patterns. The more I learn about coding, the shittier I think I am at coding. However my Co-worker who graduated "top of his class" believes he is a programming God and doesnt want any advice from anyone. I just refactored his code to change a 60 line function into 8 lines, it's as if he's hard coding everything. I'm trying to help him, but he's stubborn as hell, I wish I had a co-worker who's more experienced/better than I am so I can learn something. Here's some signs you are a shitty programmer
>It's not your code, it's the compiler. >You re-use code by copy and pasting it >You don't comment (I'm also pretty guilty of this one) >You don't close any readers/writers >You store values inside a Gui's label instead of a variable. >You think you are a good programmer.
Feel free to add some more.
Josiah Wood
>"it's like he hard codes everything" >he doesn't know that lookup tables are faster for complicated computations
you really are a shit programmer.
Leo Cook
>you are not wearing cute socks (○>﹏
William Martin
umm i didn't give u permission to use my squiggly face
Noah Allen
>not self documenting code (without comments)
Dylan Gray
>You re-use code by copy and pasting it What? Boilerplate code you need to copy shit Everytime.
Nathaniel Rodriguez
You just go hit by emoji piracy
Jonathan Miller
>However my Co-worker who graduated "top of his class" believes he is a programming God The education system in general is shitty at teaching programming, so "top of the class" isn't really much of an accomplishment.
I've never even taken a programming class, yet people with degrees are always asking me for help.
Anthony Gutierrez
just learn how to write clean, maintainable code and you'll be better than 95% of "programmers"
Jaxon Ross
>copy pasting my own boilerplate is bad This is why you're a dropout.
Wyatt Robinson
...
Christopher Morgan
>not documenting by obviousness >if coworkers don't understand then they're not worthy to use it >then run it through an obfuscator to save disk space
Matthew Barnes
> You don't try to do FP or use efficient algorithms
>"top of his class" Well, where? MIT, EPFL, CMU or such a rather demanding institution? An average university?
Or some bum shit fuck diploma mill that somehow is even allowed to be academia in the USA.
Thomas Perez
>Girls Who Code All I know about them is that their promotional campaigns go like this: >We're girls! We code! We're not introverts! We do normie stuff by day and code by night! Coding is fun! Did we mention we're not introverts?
Aiden Brooks
Indeed, it was some bum shit fuck diploma mill. He works really hard though (probably because his code is shitty), so I can't complain/do anything about him, because management knows nothing about coding and they see him working hard.
Ayden Campbell
...
Mason Evans
>self documenting code meme
Asher Wood
>Land of the free >Where the quality of your education depends on how much money you have Well, that, or you are some minority that gets scholarships for diversity quotas.
Thomas Cooper
int result = a; for(int i=0;i
Connor Perry
ebin xD simply ebin what a master trolle.
I tip my hat to you mister sir!
Henry Foster
>It only took a few seconds. that shows
James Kelly
Most programmer monkeys are average people doing a shit of a job, not shit on their own necessarely but dealing daily with management, poor requirements, poor tools or too much constrained in that it frequently lead to overtime and stress. It's not a girls world due to the constant shit show that is delivering code and make it work on customer.
Christian Taylor
>Creating a new variable just to do the same counting for is already doing
Just quit pleb. Declare I and return the same shit
Dominic Sanchez
>Calculate a and b's product without using the operator *
Cooper Johnson
> he is talking shit about an obvious scam that preys on the insecurities of females and is actively harming the software industry as a whole by inflating the job training of its graduates while simultaneously reinforcing sexist hiring practices.
> he must be a total neckbeard XD
Luke Watson
>implying your code does that I sincerely hope you're trolling.
Liam Ross
Bump
Justin Moore
>Programming haha faggots u will never get good that way
Leo Lopez
Do you know what a product is? Hint: it's normally done using the * operator.
Lincoln Lee
kindly stop nerdsniping me, I'm on the fourth way of doing it now, and I can't stop. > Recursion > for m * n build an n tall stack of ms, and then pop them onto an accumulator > build the list of ms and fold them > Instead of recursion go full retardterprise and make a class of Computation, that you can call to reduce the amount of mathematics work you have to do, and you just keep calling it until it's done. (The absolute worst so far.)
There's just so many weird ways to implement multiplications.
Oh yeah, also, take the logarithms of both numbers, sum them, and translate back.
Jonathan Nelson
Can't you just create a small library that does the boilerplate and include it?
Noah Davis
you suffer from white syndrome, just tell him that he is a incompetent faggot and leave him alone. Treat him like a bitch and he will come back at you asking for help when he gets stressed out, let him reach those stress levels first, at the moment you just being his personal whore.
Sup Forums human interactions in chief
Lucas Anderson
Which is why you must use an isomorphism.
Liam Ramirez
I'm sure there are plenty of women who make good coders. GWC, going by their marketing campaigns, clearly aren't examples of them. They're either talking about how "fun" coding is or boasting about how "normal" they are in all other ways.
Jaxon Sanchez
>result++; should be >result+=a;
Ian Thompson
Here you go dinguses
int value = a; int result = 0; int array[b]; for (int i = 0; i < b; i++) { array[i] = a; } for (int i = 0; i < b; i++) { result = result + array[i]; }
return result;
Brandon Diaz
>Declare I and return the same shit No they don't. If you look closely, the default value of result is not 0, it's the value of a. And before you (or anyone) goes "but you could have just used a", modifying a parameter value is considered bad practice, and would say more about YOUR programming ability than anyone else's.
Bentley Green
I see nothing wrong here.
Cameron Turner
You shouldn't have told him.
Isaac Ortiz
What the kek
Christopher Young
Yeah I take issue with that one too. It shows you have some practical experience imo.
Bentley Adams
"value" is never used.
Isaiah Young
>It's not your code, it's the compiler. This can actually be a legit problem. compilers aren't perfect.
Jaxson Green
Did you actually read the image? Literally the entire point of the exercise is to NOT use the * operator.
Samuel Moore
>don't reinvent the wheel lmao >proceeds to import 20 megs of deps to do extremely trivial stuff
>I don't need someone to hold my hand >start implementing everything from the standard library by himself
>You don't comment (I'm also pretty guilty of this one) Good code should be self-documenting and the only comments should be above dense blocks of code so that whoever is reviewing the code shouldn't lose his focus by digging too deep. Having a lot of comments also means that at one point or another the code may not do what the comment says it does.
Elijah Young
And? Is it a problem user?
William Brooks
I've actually had issues where simply recompiling the code worked.
Jacob Cox
I refactored someones ~750 lines of code to 42 lines. I've also meme'd in /dpt/ at people's shitty C code and memory leaks.
Robert Murphy
what a showoff
Jayden Rivera
Yes. To calculate the PRODUCT without using the * operator. But the posted code was not calculating the product, but the sum. So I tried to help him by saying what a product is.
Adrian Ramirez
It's wasted space that does nothing.
David Davis
wow... brilliant...........
Carson Anderson
not using code blocks for posting codeplebs
Jordan Stewart
>This can actually be a legit problem. compilers aren't perfect. It can be. But if you have less than ten years of programming experience, are using a standard compiler for a standard language, and you think the problem is with your compiler, you can bet a hundred to one that it isn't.
David Roberts
int add (int a, int b) { while (b > 0) { a++; b--; } return a; }
#define EXPAND(op, id, a, b) \ do { \ int n; \ n = id; \ while (b > 0) { \ if (b % 2 == 1) { \ n = op (n, a); \ } \ a = op (a, a); \ b /= 2; \ } \ return n; \ } while (0)
int mult (int a, int b) { EXPAND (add, 0, a, b); }
int mexp (int a, int b) { EXPAND (mult, 1, a, b); }
Aaron Powell
Nice one on the logarithmic implementations of multiplication and exponentiation, but that addition algorithm is a travesty -- it still invokes addition hardware, and is needlessly slow. It can be implemented with a bit manipulation loop much more efficiently.
Austin Sullivan
You dumb niggers (define (product a b) (apply + (build-list a (λ (x) b))))
David Clark
Feel free to hack and improve it. Maybe you can use a modified version of EXPAND.
Nathaniel Wood
return GetResult(a,b);
Sebastian Phillips
Nonsensical.
Jason Reyes
(me) i was just doing a trolle, but here i go for real you brainlets
function multiply(a, b) { if (a == 0 || b == 0){ return 0; } else { return a / (1 / b); } }
Wyatt Gonzalez
This is C#, not PHP. You should probably quit programming.
Robert Ortiz
result = 0 while b != 0: result += a b -= 1
D-did I pass girl test..?
Nolan Cooper
I was thinking of something like this: int add (unsigned int a, unsigned int b) { unsigned int bit = 1; unsigned int output = 0; while (a || b) { if (a & bit) { if (output & bit) { output &= ~bit; output |= (bit
Wyatt Gonzalez
>I just refactored his code to change a 60 line function into 8 lines Did you check to see if your shorter code was actually faster or less memory intensive?
Ayden Foster
The original post had >function multiply(a, b) it's not my fucking fault that people are brainlets out there you knobhead, plus i wouldn't have used {} but i'm never sure if [$code] works properly so it is easier to comprehend if it fails
Grayson Adams
>You store values inside a Gui's label instead of a variable. I would think this is funny if I hadn't seen it myself. It looked something like this: this.healthLabel.setText(String.valueOf(Integer.parseInt(this.healthLabel.getText()) - damage))
John Howard
You can't divide by 0 fag.
Christopher Thomas
And what do you think that 'if' is for you cockgoblin
William Reyes
>!= instead of >
Why?
Matthew Cruz
Definitely not there to check if (1/b) == 0. Even though types went specified.
Parker Cook
>Product(10, -2) No
William Morris
I don't comment anything in my personal projects, even if I release them, but I do it at work.
Brody Foster
Proper way would of been a/(1.0/b).
I'll add another >You call people cockgoblins
Levi King
Step asside boys
int product(int x, int y){ if(y==0) return 0; return x + product (x,y-1) }
Tyler Perry
>you think whatever you just did works before you wrote any unit tests or worse yet you don't feel the need to write them >you will not talk to people before you work with their code (most of the time ends up with someone hacking new features in instead of doing it properly) >you give variables retarded names that don't help to understand the code