In today's episode of "Rob gets stuck with fucking amateurs", Amish decides to comment out my 13 line function and replace it with his 38 line abomination, including his signature move - the while(true) loop with an if-else condition containing only "break;" inside it. He also makes his own type called "StringArrayWithSize", containing, yes you guessed it, an "arrayOfStrings" and a "size"
I hope he doesn't step up his game because he could do serious damage.
There's nothing wrong with that code
Did you let him know what you think?
>>54756981
People won't improve unless you tell them why what they are doing is wrong. Don't be passive aggressive and just help the guy be a better coder.
>>54756981
>the while(true) loop with an if-else condition containing only "break;" inside it
Absolutely disgusting
>>54756981
His version is shitty but at least it's correct.
>>54757328
>>54757372
Yeah I just told him it was shit and I was reverting his changes. Then I took a bunch of photos on my phone of relevant pages from "Clean Code" by Robert Martin and sent them to him
>>54757535
>>54757015
They both pass the tests but that's not the what craftsmanship is about. One is good and the other is an affront to common decency.
>>54757620
I'm actually incredibly shit at C, I started learning 2ish weeks ago.
But writing nice looking code is independent of language, nice code is nice because of the way the intention of the author is clearly expressed and the variable names are pronounceable and aren't filled with superfluous garbage like "str" and "array".