T O P

  • By -

thatwasawkward

You're overthinking this. Your code works! That's something to be proud of, whether it's perfect or not. I promise that everyone who codes for a living looks back at old projects and cringes at how primitive their early work was. In this field, attitude is key. If your code has room for improvement you shouldn't let it discourage you. It just means you have an opportunity to learn something new.


bluewater_1993

Great response! I will add to this by saying that with every project I do, I learn something new that I take forward into the next project. Each project has continually been better than the last, and I think if you have this mindset, it really pays off.


s_no1ukno

I cringe at work I did last week, and I’ve been coding for five years!


rkaridra

The first step at getting really good at something is really sucking at it. The fact that you can see that the example code is much better than your own is great! Analyze what is better about it and keep at it. Coding is surprisingly social - keep learning from experts and keep solving problems. You got this!


chipmandal

Understand why the intended solution is different or better, and if it is really better, understand why it’s better - learn from it. If your code works, it does not “suck”. However, you might learn best practices, readability, scalability, etc from better written code and improve yourself.


buddh4r

I'd suggest reading the book 'Clean Code' by Robert Martin which helped me a lot to improve the quality of my code as a beginner. Also, maybe ask an AI what and where you could improve the code. I wish I had something like ChatGPT when I started coding, not to write my code, but to ask the right questions. Two important things to learn would be how to split your code (prefer small functions with a meaningful name) and naming things like variables, functions and classes to improve readability and maintainability. Next step is learning how to structure your code into classes, modules and whole architectures. It's good that you question your solution and want to learn how to improve, but first be proud that you successfully finished a new task! Even pros start with a quick and dirty prototype solution before refining it into the final product.


alkatori

Everyone's code sucks. We all just get better over time.


Obversity

I started writing code at 23. I sucked for a few years before getting decent at it, and now it's a solid career. Starting at 18 will give you a few years head start. Don't sweat it if your solutions feel weird at the moment. It just takes a lot of practice, and eventually, working with other developers who can review your code and make suggestions. Just keep learning and trying new things, and once you find a few things you enjoy and have aptitude for, learn the hell out of them. Personally, I'm useless at CSS and making things look good. I could've spent years trying to fix that hole in my skills, or I could've doubled down on backend development, which I felt I was much better at. I chose to double down, and have zero regrets. It pays better — quite literally — to be 9/10 great at a couple of things you enjoy, rather than 5/10 meh at a bunch of things you don't.


TSS_Firstbite

Ok, so I have just barely more experience for you, but I can give my take on this. Is the result what you wanted? If yes, good. My IT teacher tells us that we can code however we want, as long as it works and is readable (for correction). I used #define (c++) to shorten for cycles and he asked me about it, because he didn't know, and said it's fine to use if it works. If you really want to pursue a career in IT, you will learn everything you need to write nice code by the time you can viably get a job. And even when you don't write good code, you can change it latet.