r/learnjavascript • u/Aggressive-Nail7816 • Sep 05 '26
3 engineers spent 40 minutes on my code and none of it was praise
My code worked. That was the only good thing anyone said about it. Nested conditionals 4 deep, no error handling, everything in one function. I have been writing javascript for a year and nobody had ever looked at it before. Self taught through Boot.dev and DataCamp, and nobody had read a line of my code before that call. How did you learn the part that is not making it run.
40
Upvotes
91
u/bonnth80 Sep 05 '26
Sounds like you just did it.
That's great feedback. Nobody is telling you that you can't be a programmer. They're telling you exactly how you can improve. That should excite you.
14
u/ninedeadeyes Sep 05 '26 edited Sep 05 '26
There is a large difference between professional and hobbyist code.. There are certain standards that professional code need to adhere too before it will be approved since other people has to work on it and it has to operate in a professional environment. I would recommend leaning SOLID principles to write clean code and learn about error handling and testing.
6
u/guidedhand Sep 05 '26
Go read refactoring.guru and the code smells
5
u/janithaR Sep 05 '26
Don't nest conditionals 4 deep, yes error handling, nothing in one function.
2
u/Any_Sense_2263 Sep 05 '26
Standards and best practices. Plus eslint.
2
u/DeFcONaReA51 Sep 05 '26
No error handling is a red flag. Plus it would make debugging production issues hard. But take it as a good feedback
2
u/LeatherDude Sep 05 '26
LLMs make decent code reviewers. Don’t use it to write code for you while you’re learning, but the feedback is usually pretty good.
1
u/Different_Pain5781 Sep 05 '26
Working code and good code are two different things. A lot of self teaching is basically just focused on getting the thing to work. The bigger problem is nobody is looking at the code and telling you what sucks about it. Boot dev is pretty good for this since it checks the structure too, and Educative does some of that as well.
1
u/Aggressive_Ad_5454 Sep 05 '26
Hey, you got it to work! That’s big.
And you got a code review with some advice from people with more scar tissue than you. That’s good too.
You could have read six books on error handling and still not quite understood. It was you actually writing that code that put you in a position to make sense of the advice you got from your reviewers. We do error handling because we’ve learned the hard way not to trust input. If something gacks at midnight in production we want to know what and why
Nested conditionals, same dealio. People who’ve been doing this work for a while have all had to debug gnarly logic like that. It makes us scramble to simplify it, so the next person can understand it and see at a glance that it’s
wrongright.You’re doing this right. Welcome to our great trade.
1
u/bonerfleximus Sep 05 '26
Nice you got a job after a boot camp with real developers looking at your code. Next few years will feel less comfortable than even when you were struggling through the boot camp, but then youll look back and see how much youve improved since. Keep at it!
1
u/traplords8n Sep 05 '26
First code review? Not bad dude.
I didn't learn to stop creating horrid nesting debacles and create effective functions until later on.
If your code works then you're doing fine at this stage. Your code will become more elegant with practice.
1
u/chikamakaleyley helpful Sep 06 '26
a lot of devs would kill to have this direct feedback of their code.
I think something you should practice is reading other's code, and also , when you come up with a project or even small feature to build, try building it with different approaches. Helps w flexibility
You're gonna run into code that produces the same result as yours, but looks very different, its better to understand why someone would use that approach, rather than settle for yours because its the one you understand
1
u/TheRNGuy Sep 06 '26
I learned myself, without feedback from others.
These days, I ask AI to review.
1
u/Early-Lingonberry-16 Sep 06 '26
After enough changes and updates, it becomes painful to do it, so you learn things that make it easier to do.
Their advice just gets ahead of your own discovery process.
You'd eventually get there. People's feedback just makes it faster.
1
u/hylasmaliki Sep 07 '26
How is it possible that you been doing it for a year and never thought to use ai as a tutor?
1
u/TheZintis Sep 11 '26
Lots of devs are NOT good teachers. Good teachers show you where to go, they make the path clear and appealing. When working with a good teacher, you WANT them to show you the way. And you can't wait to get there so you can start on the next path.
So in this case, you do have a bunch of knowledgeable devs (it sounds like) and they DO care about the quality of your work, but they didn't know how to show that to you in a way that motivates you.
So while not the best case (good devs good at teaching), it's also not the worst (bad/apathetic devs bad at teaching).
Also, as you put your work out there more often you'll get more used to feedback, and also the variety of ways feedback is presented (harsh, soft, direct, etc...).
One piece of advice I have for you is to try and navigate yourself into a good mentorship situation. Be clear that "hey I don't quite understand this piece of feedback, can we get on a 15 minute talk" or "hey, would you mind giving me a code review before I do my next PR?". If you are hungry for growth (and it sounds like you are), then they'll see the improvement and know that a little time spent with you will pay dividends in the long run.
Bonus:
Some years ago I taught a JS course for complete beginners, where I tried to answer what is good code:
It doesn't need to be all of these things (except the first), but the more the better!
1
u/TakenNaLahat Sep 16 '26
that review was the best thing that happened to my career and it did not feel like it for about a week
1
u/DrShocker Sep 05 '26
Why would people have anything to say? Did you ask for notes?
Regardless you need to start with projects that'll take a day, then a week, and so on. Ideally on a team.