Signs you are a bad programmer

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.

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

>you are not wearing cute socks (○>﹏

umm i didn't give u permission to use my squiggly face

>not self documenting code (without comments)

>You re-use code by copy and pasting it
What? Boilerplate code you need to copy shit Everytime.

You just go hit by emoji piracy

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

just learn how to write clean, maintainable code and you'll be better than 95% of "programmers"

>copy pasting my own boilerplate is bad
This is why you're a dropout.

...

>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

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

>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?

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.

...

>self documenting code meme

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

int result = a;
for(int i=0;i

ebin xD simply ebin what a master trolle.

I tip my hat to you mister sir!

>It only took a few seconds.
that shows

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.

>Creating a new variable just to do the same counting for is already doing

Just quit pleb. Declare I and return the same shit

>Calculate a and b's product without using the operator *

> 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

>implying your code does that
I sincerely hope you're trolling.

Bump

>Programming
haha faggots u will never get good that way

Do you know what a product is? Hint: it's normally done using the * operator.

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.

Can't you just create a small library that does the boilerplate and include it?

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

Which is why you must use an isomorphism.

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.

>result++;
should be
>result+=a;

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;

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

I see nothing wrong here.

You shouldn't have told him.

What the kek

Yeah I take issue with that one too. It shows you have some practical experience imo.

"value" is never used.

>It's not your code, it's the compiler.
This can actually be a legit problem. compilers aren't perfect.

Did you actually read the image?
Literally the entire point of the exercise is to NOT use the * operator.

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

And? Is it a problem user?

I've actually had issues where simply recompiling the code worked.

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.

what a showoff

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.

It's wasted space that does nothing.

wow... brilliant...........

not
using
code
blocks
for
posting
codeplebs

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

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);
}

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.

You dumb niggers
(define (product a b)
(apply + (build-list a (λ (x) b))))

Feel free to hack and improve it. Maybe you can use a modified version of EXPAND.

return GetResult(a,b);

Nonsensical.

(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);
}
}

This is C#, not PHP. You should probably quit programming.

result = 0
while b != 0:
result += a
b -= 1

D-did I pass girl test..?

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

>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?

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

>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))

You can't divide by 0 fag.

And what do you think that 'if' is for you cockgoblin

>!= instead of >

Why?

Definitely not there to check if (1/b) == 0. Even though types went specified.

>Product(10, -2)
No

I don't comment anything in my personal projects, even if I release them, but I do it at work.

Proper way would of been a/(1.0/b).

I'll add another
>You call people cockgoblins

Step asside boys

int product(int x, int y){
if(y==0) return 0;
return x + product (x,y-1)
}

>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