r/reactjs • • Oct 29 '26

Needs Help How do I learn to judge code quality and code without AI?

I use Node.js and React, but I rely too much on AI. When I look at code it generated, I can’t confidently tell whether it’s well designed or just happens to work.

I want to learn to spot bad decisions and write good code myself. How do you build that judgment? What helped you most?

1 Upvotes

44 comments sorted by

30

u/Adrima_the_DK Oct 29 '26

Only way to achieve that, is to manually coding

-4

u/B0NKB0Y Oct 29 '26

But where do I look for proper examples of code?

4

u/Adrima_the_DK Oct 29 '26

You don't look for "code" for exercises. Make a project. A simple one. A web page, a simple game, a simple REST API. Whatever helps you solving a problem. Figure out what does it need. How can it improve. You will find hundreds of errors and you will start getting knowledge about architecture, design patterns, anti-patterns. security. The whole package. But you need to start coding it yourself.

3

u/ORCANZ Oct 29 '26

Absolute nonsense. Some people have coded for 10+ years manually and still sucked. You don’t “just” figure it out.

There are books, blogs, conferences where people share knowledge. Learning it all by yourself is only for a handful individuals.

Once you have enough understanding, then sure coding something and see it fail in the real world is a great way to find a better solution and learn something.

3

u/neitz Oct 29 '26

Proper examples of code helps but it is not enough. You won't know what is good or bad about the code by looking at it without experience. The main way to learn is the try, fail, learn loop. Which is ironic because AI is currently completely missing that itself which is why it is seemingly intelligent until it isn't.

1

u/ORCANZ Oct 29 '26

It does do that in a session in a way, but it doesn’t learn anything. Best it can do is keep some memories in the repo or your machine as plain text.

1

u/boobyscooby Oct 29 '26

Honestly why are u trying to get in it when ur at such a basic level ur asking this question. 

1

u/averagebensimmons Nov 02 '26

Patience, young grasshopper. Create a project and get in the thick of it. Get in the weeds. There is no short cuts for mastering a discipline. The thicker you get into it, the better your questions will be. The more you will learn.

19

u/Anahkiasen Oct 29 '26

Writing code without AI

0

u/B0NKB0Y Oct 29 '26

But where do I look for proper examples of code?

6

u/ghostwilliz Oct 29 '26

You don't really need examples

You need to understand why the code is written the way it is and how it could be written better

6

u/B0NKB0Y Oct 29 '26

So I need to develop my own judgment process?

5

u/ghostwilliz Oct 29 '26

Yes, you need to gain a deep understanding of programming and even more so, the project in which you are evaluating code

Without your own skills to judge code and think about it deeply, you don't really have any reason to review the code

2

u/runescape1337 Oct 29 '26

These answers are ridiculous. Everyone thinks they know what good code looks like. Most people write bad code. Particularly when they're trying to write "good" code.

Look for examples, read the explanation of why it is good code, and evaluate that. Not all examples of "good code" are good code.

Learn about patterns. Identify them while you're looking at code examples, and decide why they do or do not work.

1

u/New-Reality9702 Oct 29 '26

*shocked face*

1

u/SeymourDuncanJB_Sr Oct 29 '26

The goal being?

4

u/jrkridichch Oct 29 '26

Why would you not want examples of good code as a new dev? Even before I had some great mentors, I drastically improved reading dan ambramov and kent c dodds blogs.

2

u/ghostwilliz Oct 29 '26

Well I guess my point was more about learning how to write code will help you read code If you just read good code, but you don't know why it's good, it's not really gonna be helpful

2

u/jrkridichch Oct 29 '26

I see. I just had flashbacks of all the garbage code I wrote before finding better examples. You can get so far without knowing anything that I only realized it was bad when i compared it to something good

3

u/Lowerfuzzball Oct 29 '26

Documentation of the languages and tools, learning coding paradigms, learning how to determine time/space complexity (big O notation) if performance is a concern.

Study open source projects or documentation on other codebases coding standards.

Some of "clean code" is subjective. Really, it comes down to how quickly your team can reason about code and implement together without fucking things up. If you update the color of a button and suddenly all your forms break, it's safe to say your code is seriously fucked.

Best way to learn is by doing. Looks for ideas online or have AI give you a project to build and add features to, you can try to have it cater to projects that rely on having well-defined and clean architecture.

Also, a bit of an odd suggestion here, but play Factorio. Factorio is how I got into programming, the similarities are actually quite shocking in terms of learning higher-level principles.

0

u/comoEstas714 Oct 29 '26

Does stack overflow no longer exist?

1

u/fredkreuger Oct 29 '26

I saw yesterday that SO now gets less than 1000 questions a month. It's been dropping precipitously since wide adoption of AI agents.

0

u/comoEstas714 Oct 29 '26

Wild age we live in.

0

u/torts56 Oct 29 '26

Take a properly programming course and then data structures and algorithms course

7

u/ZwillingsFreunde Oct 29 '26

You learn to code.

5

u/Chicharoh Oct 29 '26

How do I know if a sentence is well written in Russian? Yeah… you learn Russian

2

u/somebody-2027 Oct 29 '26

I have literally no idea how anyone is supposed to do this anymore. I learned by writing by hand, making tons of mistakes and learning from it. I don't know how you learn this today

1

u/New-Reality9702 Oct 29 '26

I don't know, have you tried actually coding? jfc

1

u/inverted-tuxedo Oct 29 '26

did you learn to code without AI? if so it's very easy to tell lol. human-written code is far easier to rationalize

1

u/cazzer548 Oct 29 '26

If you don’t understand something, do some research to figure out how it works. If you don’t know how to assess the sensibility of how it works, do more research. Eventually you should be able to understand everything and assess whether it’s the right way to meet the requirements.

1

u/AnUninterestingEvent Oct 29 '26

Spending years manually coding is the only way to learn.

We're in such a weird interim stage right now where knowing how to code is extremely useful, but for newcomers who just want to build their own software, it's not worth the tradeoff of spending years training by manually coding. It really depends on your end goal. Are you just trying to make money with a software business you build and run? Or are you trying to become hirable? If the former, just get some good prompts for security, scalability, and maintainability, get your business off the ground and then hire a dev as soon as possible. If the latter, spend years manually coding since it's the only way to truly learn.

1

u/skidmark_zuckerberg Oct 29 '26

It's built up over years of coding by hand, doing code reviews while also having your own code reviewed by your peers. It's a hard thing to build in a vacuum while not working with other developers and also writing code by hand. Basically read a lot of good and bad code, have your own code reviewed by someone who knows more than you, and write code by hand.

I feel bad for any developer who came after AI for this very reason.

1

u/FloKmc Oct 29 '26

I don’t agree at all with the other comments saying you don’t look at good code, you just learn by coding yourself. You don’t get that much better doing the same mistakes and bad practices over and over.
I learnt a lot by watching tutorials, releases, trends, etc. Often you learn a thing you weren’t even there for.

1

u/but_good Nov 01 '26

By being able to do whatever the ai does. If it does more than you are capable, then you won’t be angle to review the code, just the functionality, so you are a product manager. To do what you want you need to learn to build software yourself. No shortcuts.

1

u/blokelahoman Nov 02 '26

React is just a JavaScript framework. Typescript transpiles to Js. Learn Js and the dom. When you understand the fundamentals and the concepts the framework matters less. Meanwhile read the Clean Code book as the rules are universal. There’s so much more but you have to start somewhere.

1

u/Nimal0 29d ago

And then its me, a Junior that learnt before AI to code, patterns and basic concerns such as separation of concerns the one who cant find a job because of AI bros who thought that it was a good idea promoting that "anyone can code".

Searching for stuff on the internet should be considered a basic life skill nowadays ffs.

1

u/ccfreem 28d ago

Start with the docs and follow the examples. They do a great job with breaking new features down into bite sized code snippets.

AI generated code produces so much so fast that it’s a bit exhausting to do human review after a certain amount.

I would suggest tackling a single file with a single new concept and use the docs as the example. React and nextjs do this as guides for agents and most production grade AGENTS.md file will reference the docs. https://nextjs.org/docs/app/guides/ai-agents

1

u/jrkridichch Oct 29 '26

I'd say 80% of what I look for was directly influenced by mentors and PR reviews. Might be harder to get as much of that but an AI age version of that would be asking your agent to explain it's decisions.

Additionally, make your prompts small and specific. Make sure you understand the result. And before merging anything ask the agent which patterns it used and try to dig into them.