Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@D--M There are tons of null checks at the top. I've got a long hard day of refactoring this horseshit of a codebase ahead of me. Sigh..
-
@electrineer I expected displayAlert puns and I was not let down.
Btw I prefer white theme as it's easy on my eyes. There, I've said it. -
tokumei21256yYeah, I do like light theme in cases where I'd have to constantly be switching tasks with an app or site that only has light theme. The transition is worse than the prolonged brightness IMO.
-
I would love a picture of how you refactored that code just for the comparison.
-
as someone who is partially blind for best practice cause noone ever told him
what would be better?
for a while i resorted to do a code style that more or less looks like
[condition that would mean altert] -> return error
[next condition that should not be broken]
instead of doing
[condition that needs to be fullfilled] -> doStuff()
[ELSE] Alert() -
Rename4806y@hamido-san Gross, but i agree :) as i myself is lead. and really i don't know where to lead :)
-
First of all, indeed, the code is painful.
Apart from that, two remarks:
- A team lead is not supposed to be the best programmer. He is more of a manager, that is supposed to make sure things happen when they got to happen and make sure the team stays together. If he has some spare time, he can code too, but that is not his main task.
- He might not have seen better versions of this. Just show him how he can improve it, and he probably will. Give it some time and attention ;-)
I am kind of the de facto team lead at my job, which means I talk to the managers, keep the discussions going when needed, and write some code :-)
(Okay, there are only 3 developers and we are in the same room as the direct manager, but still...) -
Rename4806y@TempestasLudi Well I am more of a programmer then a manager :) didn't wanted the role.
-
@nkhan Ah, that's tough. How big is the team? And how many teams does your manager manage?
-
Rename4806y@TempestasLudi Now i have to program as I used to and manage my self and the team, well most the time team do it them selves(thumbs up to those guys) and i can do what i love.
-
@gowtham-sai Years of minimal oversight, total apathy, and seniority-based hiring structures. :)
-
@csizemore how does such organization runs?
How do they survive?
Sorry, don't mind. I know, too many questions. But that's how I learn. -
There are two really easy ways to don’t do finish with this mess.
1) Catch an custom exception class made for this purpose.
2) Conditions are executed from left to right, so sometimes you can just do things like if(o != null && o.element != null) { ... } else { ... }
Or you can just avoid doing a big function. It works too. -
BobRock116yHe probably values other's and his code by number of lines. Why use oneliner CASE when bunch of IFs make so rich and elegant code π
-
As well as the obvious wtf on branching logic.... the casing issues on the method!!! Triggered me straight away. I was like no bro!
Maybe he is drinking magners irish cider so i will give him a pass on the shitty code for 5 seconds but java naming conventions on methods.
Code review fail!!! -
This is all the code a Microsoft programmer needs...
UNIX - assumes ahead of time you are intelligent and know what it is that you want to do.
Windows - assumes ahead of time you’re retarded and have no clue what you’re doing.
It's never a good sign when a team lead writes code like this
rant