DEV Community

Discussion on: JS Coding Patterns that give you away as a Junior Developer

Collapse
 
allenmiller304 profile image
Allen Miller • Edited

In my case, and my case only, the older I get the more details I want to see, and when I see very condensed code on one line that usually goes on many, I know that it is very likely written by someone who a few years in programming only.

Collapse
 
tfrick47 profile image
Terri Fricker

While learning html, css, and javascript, keeping apart the separate functions of each was stressed immensely - markup, style, function. But I'm seeing the value of having some of the style right in the html after working with bootstrap a little bit. It sure made it easier for me to move blocks of code around when I didn't have to chase down css properties. Could you tell me your thinking on that? I'm a ultra-junior developer.

Collapse
 
allenmiller304 profile image
Allen Miller

Here is an advice, my thought only! others will disagree 😊

When someone tells you “Everything must be …” then just ignore the rest of his/her words because they are pointless.

Software development is about comfort, if I put the markup in one file, and the code in another file, will it be more comfortable for me to continue building the App or Website? If yes (for that project and technology), then it is a good idea, if no, then it is a bad idea.

What you normally see in some companies stuff like “Rule nn, all validation must be done on the server side” or some rule like that, and because some big manager wrote that rule, tons of additional code and workarounds are added so the app can follow that rule.

Now think about the next developer who will change the code, will he or she quickly get up to speed and modify it, ideally, the next developer should open Visual Studio, open the project, and be able to debug it with zero additional steps.
Then when he / she looks at the code, should be clear and easy to understand, regardless if the CSS is mixed with the html or JS or not, that absolutely should not matter.

Comfortability is not just the developer, it is the all the people end to end, will the end user love the App? If slow? Unlikely, if instant, oh yes, they will love it, but having the app to run instantly may also mean less comfort on the development side, but unhappy client may also mean no income and that results in no development at all.

I can continue wiring for hours, but at the end, It is just balance 😊

Thread Thread
 
tfrick47 profile image
Terri Fricker

Thank you so much for sharing your thoughts! I really appreciate it.