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
-
Navigatr9377y@Alice Because of the lack of spaces? Claustrophobic bracketing, could that be a thing?
-
I see a lot of "my code use to suck" posts, is that visually speaking, functionality, optimisation or all? I'm relatively newbie and to me a working code = good code. (I know about some of the conventions of good code writing, that's why I am curious of the reasoning of most posts).
-
Navigatr9377y@securiter I'm fairly new myself so I can only say so much, but I think it's a bit of all of the above. The readability is important, but also being able to cut down on unnecessary code, D.R.Y. (Don't Repeat Yourself)
The more code there is, the more data there is for the computer to go through, and the slower the program is going to be. For small programs it doesn't matter as much, but when you get to the big projects it can make a world of difference. -
enoon4317y@Navigatr also apart from explicitly repeating yourself, having good (concise) conditions that encapsulate the majority of the scenarios you might encounter eliminates the need for excessive/redundant handling (like it seems in your code). It all goes back to readability as you mentioned.
Although sometimes, readability can be forsaken for performance. But it’s rarely ever the case that these two are mutually exclusive.
Also, please refactor this if you still have access to it. I saw up to 3 semi-colons on the same line. Please give them each their line. 😭 -
@Navigatr Focus on readability unless you actually know that you can make the program run faster. The code is optimized at compile time anyway if a good language is used.
-
So the company you did intern didn't use any sort of prettier, beautify, eslint, jslint at all?😨 Interesting
-
I've been working at the same place for 20 years. When I see some of my early code I just wanna laugh at myself until it hurts.
-
@kinginthenorth cool. I don't think I can code 5 years ago. Was focusing on making pizzas in domino's 🍕
Related Rants
So embarrassed to see my code way back from my internship period 🙈🙈🙈🙈
rant
internship memories
shitty code