this post was submitted on 07 Feb 2024
30 points (96.9% liked)

Programming

17492 readers
43 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
top 22 comments
sorted by: hot top controversial new old
[–] gerryflap@feddit.nl 33 points 9 months ago* (last edited 9 months ago) (1 children)
  • Start with an ambitious project
  • Get stuck
  • Curse everything about said language or framework, "why did they do it like this"
  • Read the docs and find out why they did it like this
  • Feel stupid
  • Finish the project (or at least the part you actually cared about) with your new knowledge
  • Feel smart
  • Repeat until you know said language or framework
[–] kryllic@programming.dev 2 points 9 months ago (2 children)

Easy to get caught in a perpetual loop with steps 4 and 5

[–] MaoZedongers 7 points 9 months ago

You should be learning a bit more with each loop though.

Even banging your head on the wall against something eventually gets you somewhere.

[–] nitefox@sh.itjust.works 5 points 9 months ago

I get stuck at step 2

[–] anti_antidote@lemmy.zip 32 points 9 months ago

Honestly I just open up a new project and start fucking around until I figure out syntax, language features, and how files relate to each other

[–] starman@programming.dev 25 points 9 months ago
  1. Read the documentation
  2. Try some simple examples from the docs
  3. Build a simple project
[–] Solemarc@lemmy.world 12 points 9 months ago (1 children)

Either I come up with a new project or I rewrite an old project in the new language.

I used to do those old school language tutorials where we start with how to write a variable, then how to write a function, etc. but I think that's better for complete beginners just starting out.

[–] rutrum@lm.paradisus.day 4 points 9 months ago

I've done project rewrites. This minimizes the problem solving to mostly just syntax, sometimes a new paradigm if the framework is different enough. But in my experience a rewrites goes so much faster than I expect it, since theres a very clear goal to achieve while rewriting. If someone has an existing project to rewrite, I recommend it. If not, you could implement some project in a framework your comfortable with, and then do a rewrite in the new thing.

[–] puffy@lemmy.ml 9 points 9 months ago

Read. Build. Repeat.

[–] moreeni@lemm.ee 6 points 9 months ago

Get theory from somewhere on the Internet (videos, tutorials etc.), then do exercises on platforms like Exercism. Once you feel like you are getting good at it, start replacing the time for exercises on time with real projects

[–] muhanga@programming.dev 5 points 9 months ago

Is it possible to build XML parser in it?

If answer is yes then i will build XML parser in it.

Solving a problem you know how to solve and solved more than once is a my goto approach in learning languge or frameworks. Translation of already solved problem to the new operational model or semantic exposes a lot internal stuff and marketing double talk.

This is a lot of work and time so can not recommend it for all cases and situations.

[–] MaoZedongers 5 points 9 months ago

Rewrite one of my old C projects in it and compare the difficulty, ease of understanding the code, any issues/boons in documenting it, etc.

[–] PoY@lemmygrad.ml 4 points 9 months ago

i like to douse myself in mud, then slowly creep up on it from behind, taking extra care not to break any twigs or ruffle any leaves, then I grab it and hold on for the ride of my life

[–] AMDmi3@lemmy.world 4 points 9 months ago

Read official docs, then rewrite some small own project in it.

[–] abhibeckert@lemmy.world 3 points 9 months ago* (last edited 9 months ago)

These days I use ChatGPT 4, with a long running conversation where I explain what I'm trying to do, what tools I'm using, paste in sections of code that I don't understand, asking how to change the behaviour of that code, give it error messages I'm seeing, etc.

It feels really close to pair programming with someone sitting next to me who knows the language/framework. The code it writes is often wrong but it's close enough that I can work reasonably efficiently.

A couple favourite from earlier todays

  1. I asked "where can I find the code that does X" and it told me to search the project for "Y" to find it.
  2. I asked it how to use a code generation shell script bundled with the framework to do a common task, and when I explained that the answer didn't seem to line up it said "in that case you can't use the script. You'll need to write the code manually, here's how to do that"

Both pieces of advice were spot on and saved me hours of googling.

[–] kogasa@programming.dev 3 points 9 months ago* (last edited 9 months ago)

Start a project with a good template and learn by tinkering. Some languages/frameworks have some canonical starter templates (.NET, Phoenix/Elixir) and most others you can find by googling "x boilerplate."

[–] small44@lemmy.world 2 points 9 months ago
  • Watch a project tutorial video
  • Code along with the video and taking notes
  • Create my own project with the notes i took and documentation
[–] Mad_Punda@feddit.de 2 points 9 months ago (1 children)

Solve advent of code in it

[–] nathanjent@programming.dev 2 points 9 months ago* (last edited 9 months ago)

This is what I do, too. Good for programming languages. Not always applicable for frameworks.

[–] JakenVeina@lemm.ee 2 points 9 months ago

Build something that already exists. My go-to is usually dir.exe.

[–] Lmaydev@programming.dev 1 points 9 months ago

I've started using LLMs for this. You can get up and running incredibly fast this way.

I use enterprise bing at work so it sources each sentence so I can go directly to the docs if I need to.

I've found it really superior to reading docs as it's interactive. Being able to ask follow up questions is very powerful.

I've noticed the new batch of juniors at work are able to get productive very fast by using them.

[–] owsei@programming.dev 1 points 9 months ago

rebuild stuff

I've remade a temperature converter cli 3 times in rust. Just to understand enums, structs and the borrow checker. Then I made an http server, that acted as a library's book borrowing system.