r/learnprogramming • • 1d ago

learning backend (Django): go slow and understand every line, or build 10 quick practice projects with AI?

Hi everyone,

im kind of in despair right now

I'm building a learning project: a marketplace where customers order offers from business users. (fiverr clone)

My problem is that it takes me a very long time to really understand code. Take this one line as an example:

Order.objects.filter(business_user__user__id=6)

I have to draw it out first: the order points to a profile, the profile points to a user, __ means "follow the relation", and behind that there's a SQL JOIN. And that's only one line. In the project, lots of pieces like this depend on each other (models, serializers, views, permissions, queries), and sometimes I feel overwhelmed.

I try to write the code myself on purpose and only use AI to explain things. But it takes forever for my brain to grasp it and I keep wondering:

  1. Should I stay slow, understand every line, and build a solid foundation?
  2. Or should I use AI to quickly build around 10 smaller practice projects, to see more patterns and build routine, even if I don't understand every line right away?
  3. Or is there a middle path you'd recommend?

i learned frontend (html, css, JS, angular) before that and it was so much easier to understand.

How did you handle this, especially if you also used AI while learning? What actually moved you forward, and what was a waste of time?

Thanks for any advice!

Edit: damn i guess i will have to take the slow way. Thanks for the advice

7 Upvotes

15 comments sorted by

11

u/acuddlywookie 1d ago

I’m not sure what your level of experience is, but I’d hazard a guess that you’re relatively new to programming.

If you want to develop a deep understanding, just don’t use AI, or at least for a while. Use google, read docs and stack overflow. It’s slower, but you’ll learn so much more doing it this way vs using AI. It’s important to explore, make mistakes and experiment and AI will remove a great deal of this cycle.

A big, perhaps the biggest part, of programming is problem solving, and if you’re handing that over to something else then you’re not going to be learning, or at least learning at a significantly lower pace.

10

u/aqua_regis 1d ago

"learning" - "quick with AI"

Pick one. You can't have both. This is either - or.

If you want to learn and become proficient and self sustaining, go slow, if you want to ship AI slop, do it, but don't expect to learn anything.

3

u/davidbalbino 22h ago

tbh what helped me most with ORM stuff was stop drawing it and just look at the SQL. open python manage.py shell and do

qs = Order.objects.filter(business_user__user__id=6)
print(qs.query)

you see the JOINs right there. after a few of those the __ thing just clicks. django-debug-toolbar does the same in the browser and also shows when you're firing 50 queries without noticing (select_related / prefetch_related, you gonna need it later lol).

and ngl the slowness is normal, backend has more invisible layers than frontend. I think is better to do 1 project slow than 10 you didn't write yourself, but you don't need to understand every line on day one. understand the line that's breaking right now

2

u/_BeeSnack_ 1d ago

Get AI to build you a test regarding Django

2

u/darth_skipicious 22h ago

quit and enjoy your life using art, entertainment, and distraction

2

u/tony_saufcok 21h ago

Get your pencil and learn to draw yourself or explain what you want to an artist and let them draw a sketch for you. Which one do you think is going to teach you how to draw?

2

u/Key_Storm_2273 20h ago

you don’t have to use Django, there’s many different frameworks out there. you can also code your own helper classes or functions that encapsulates some code you're struggling to read into something more understandable. Python is also different than JS, you can use JS or TS for a backend with bun or Node.js.

2

u/JGhostThing 20h ago

I would like to suggestion option one. You need to understand the code, no matter how long it takes. You will get faster with practice.

1

u/addenrock001 6h ago

Drawing the diagram out is normal.

1

u/Impossible-Tune-1596 1d ago

Go to the quick start, go slow, build it out. Then make a few changes.

When you are ready to move on try building something small outside of it.

Keep going, I agree largely that No AI is good advice but be honest about where you are weak and that’s where you build no AI.

I use AI for tedious things like formatting, CSS or quick templates.

You can also make a project that will not give you the answer. That’s surprisingly helpful.
Read docs, I get slaughtered for this but read books on programming. It was the best thing ai ever did for programming and for learning an actual foreign language