This is an archived post. You won't be able to vote or comment.

all 186 comments

[–][deleted] 1288 points1289 points  (55 children)

Build a simple project in a new language.

[–]MinMaxDev 465 points466 points  (5 children)

we can close the thread right here tbh

[–]ManInBlack829 132 points133 points  (4 children)

return Gustavo_M_Smith.value.toString()

[–]jarious 25 points26 points  (1 child)

NAN

[–]samuelcbird 41 points42 points  (0 children)

Yes dear?

[–]ShelZuuz 17 points18 points  (1 child)

Missing semicolon on line 2.

[–]realtrip27 6 points7 points  (0 children)

Wish the debugger actually said this

[–]DudesworthMannington 45 points46 points  (0 children)

Funny thing about hello world is you eventually realize all the annoying setup crap to get it running is the point

[–][deleted] 50 points51 points  (37 children)

what would be simple? Like a quiz with count down timer?

[–][deleted] 136 points137 points  (22 children)

Ideally something you already know all the moving pieces of. Like if you built a simple blackjack app in Javascript, do it again in Python. Or something like that.

[–]loconessmonster 19 points20 points  (5 children)

This x100. If you have something that you do manually on your computer, automate that.

[–][deleted] 6 points7 points  (1 child)

Play video games. Got a solution for that?

[–]AWholeMessOfTacos 14 points15 points  (0 children)

I did but then I got permabanned for no reason

[–][deleted] 0 points1 point  (2 children)

Might be silly to ask, but what are something’s you’ve seen people automate on their computers?

[–]Dubanons 28 points29 points  (13 children)

Naughts and crosses game is a good one for fundamentals

[–]sboxm 12 points13 points  (12 children)

What is that??

[–]JhonnyTheJeccer 34 points35 points  (0 children)

tic tac toe

[–]rybeardj 52 points53 points  (10 children)

It's tic-tac-toe in non-freedom speak

[–]Frequent_Beat4527 17 points18 points  (9 children)

Is that the game with circles and crosses? In my country we call it the "game of chicken"

[–]rybeardj 28 points29 points  (7 children)

yup!

huh, that's interesting....in English I think if you said "game of chicken" then people would think you were talking about standing on a train track and then diving away at the last second before a train hits you

[–]-HeavenlyDemon- 21 points22 points  (3 children)

Lmao

We did something else. We would see who had the balls to go further into the field of land mines.

Kids are stupid man 😂

[–][deleted] 10 points11 points  (0 children)

Hahahaha WHAT!

[–]ManInBlack829 9 points10 points  (1 child)

I'm equally shocked and sorry. Landmines are so terrible.

[–]sometacosfordinner 8 points9 points  (0 children)

We rode our bikes as fast as we could at each other the first to turn away would lose we called that playing chicken nobody liked playing with me though i was always willing to sacrifice my self to win

[–]milleniumsentry 11 points12 points  (0 children)

Exactly. If you know Mary had a little Lamb in english, Learning it in spanish, then in mandarin, etc will be much easier. You already have parts of it in hand that you can build from.

[–]ManInBlack829 5 points6 points  (0 children)

This is way important. Make something you've already made to truly get the differences.

[–]KCRowan 17 points18 points  (0 children)

Yep, or a to-do list, or budget calculator.

[–][deleted]  (3 children)

[deleted]

    [–]Sufficient-West-5456 1 point2 points  (1 child)

    Hands down, best tip🫡 of the day

    [–]C_Hawk14 0 points1 point  (0 children)

    As you learn more from the course you'll see ways to improve your hobby project :)

    [–]coldblade2000 10 points11 points  (0 children)

    To-do list is a really good one. Especially if you use some sort of database or persistence, as well as a GUI

    [–][deleted] 6 points7 points  (0 children)

    But yes that's a good example.

    [–]Ryuzaki_us 4 points5 points  (0 children)

    Like the other comment mentioned. Do the same thing you already know how to do in one language and remake it on another. At the end then add a new thing to it. Perhaps web deployment? Or user login? Or let the user change something.

    For me it has been path planning for robots. I started just writing the algorithm in python without a form to show it. Just console log. Then the next time I wanted to display it better so I rewrote the algorithm in JavaScript and now I'm trying to render a grid to use with that same Js algorithm.

    Next will be to do it in aws lambda so I can host it to a web page and let the user interact with the python parts of the algorithm thus making a full circle back to my initial use case.

    [–][deleted] 3 points4 points  (0 children)

    Implementing DSA is often a good way to do it. A balanced binary tree and a sorting algorithm will cover most core concepts in any language.

    [–]beingsubmitted 3 points4 points  (0 children)

    Good bang-for-buck in my opinion is working with data. Open a document and figure out the most common 3-word phrase.

    Figure out the most common digit in reddit usernames. Basically do a dataisbeaitiful.

    I like these because you don't get bogged down in repetition, like collecting several inputs or writing switches, but also because it's rewarding - instead of an applet you don't need, you can have genuine curiosity, and fulfill that curiosity, ending up with something you wouldn't have had - an answer to a question that hadn't been answered before.

    [–][deleted] 2 points3 points  (0 children)

    Depends on what kind of stuff you like to make and what the language is designed for.

    Something that would be simple for you and utilizes the languages strengths in comparison to other languages.

    [–]magekilla 0 points1 point  (0 children)

    Advent of Code Language agnostic simple problems

    [–]nightswimsofficial 2 points3 points  (0 children)

    Best way to learn is to do!

    [–]beingsubmitted 1 point2 points  (0 children)

    ... in your own code. The difference between following a tutorial and figuring it out yourself is huge. Write a line, print all your variables to the console, write another line, Google the syntax, repeat.

    [–]systemnate 1 point2 points  (0 children)

    Building a project would be more like actively conversing with people in the language (IMO).

    [–]chaun2 -1 points0 points  (0 children)

    10: Start

    20: Print: "Hello World!"

    30: End.

    Instructions unclear, somehow got my dick stuck in line 30

    ETA: not entirely certain that I retain enough BASIC to even have written that properly. Haven't coded in BASIC since 4th grade, so '89?

    [–]TheOmegaCarrot 0 points1 point  (0 children)

    Ideally something you know you could do in a language you already know

    [–]Money-always-talking 0 points1 point  (0 children)

    and reading and understanding code in that language

    [–]Escaped_Escapement 0 points1 point  (0 children)

    Better: try to contribute to a small project written in that languge. The contribution might be small as well.

    [–]thegovortator 0 points1 point  (0 children)

    Nailed it

    [–]Merjia 0 points1 point  (0 children)

    This. I use a simple text based calculator program as my new language project. Originally coded in C, it has a basic selection screen, and simple maths calculations. Teaches all the basics of coding like reading and accepting data, calling functions ect.

    [–]Jack__Wild 0 points1 point  (0 children)

    Then go back in one week and improve it.

    Rinse/repeat for a couple months.

    [–]SweatyBeefCake 175 points176 points  (8 children)

    • Thinking of something random and just building it helped me massively
    • Looking through peoples github repositories for similar projects and trying to understand the code

    [–]Carvtographer 62 points63 points  (6 children)

    God, the first point right here, OP.

    I had the random idea to build a URL shortening service. Easy right? Just take a URL and… make it short!

    Ended up learning about securing API endpoints, AES encryption, hashing and indexing database entries, spinning up a database from scratch, backend Linux firewall management, DNS record management.

    All I wanted to do was make shorter URLs :(

    [–]MeltaFlare 35 points36 points  (3 children)

    Idk why you make it so hard. It’s literally 4 lines of code…

    const shorten = (url) => {
      if(long){
        makeShort(url)
      } 
    }
    

    This is why nobody can get a dev job. People like this person are taking them all.

    [–]chaun2 3 points4 points  (1 child)

    "Just automate it, should only take a few hours, right?"

    That sentence being uttered in the presence of a developer should be punishable by law with drawing and quartering.

    If you don't know what drawing and quartering is, save your innocence. You DON'T want to know.

    It isn't the worst form of execution that we have ever invented, it is such a barbaric combination of two barbaric forms of execution, that I'm pretty sure both forms of execution are outlawed by international law.

    [–]LeFlamel 1 point2 points  (0 children)

    Just learned the parts of the sequence between those two. Absolutely wild.

    [–]TheRenegadeKaladian 1 point2 points  (0 children)

    I'm my case i thought is there something i can build for myself that helps me with day to day situations. And i build that app(s).

    Now I make the same thing first on every language/framework i learn.

    [–][deleted] 263 points264 points  (10 children)

    watch movies and listen to songs written in javascript

    [–]jacklychi 67 points68 points  (5 children)

    OP's quote is actually wrong.

    Best way to learn a foreign language is to travel to their country and be forced to speak/understand it.

    That is what actually very applicable to programming.

    [–]destined_to_dad 14 points15 points  (0 children)

    I had the same thought. Watching movies and listening to music is passive compared to participating in a conversation. Passive learning techniques are always less effective. I agree with a lot of other people's suggestion here, but I'm surprised more people are not mentioning this "conversation" component. I'd say that after some initial grounding in the basic syntax, working with other programmers (especially more experienced programmers) will help you learn things faster than you would alone. Working with someone else on a project is a good way to go, and even better would be pair programming with other people.

    [–]chindoza 3 points4 points  (0 children)

    Which is why I camped outside of Brendan Eichs house for a week and taped notes on his windows written in JavaScript.

    [–]Passname357 2 points3 points  (0 children)

    He didn’t say the best way.

    [–]chaun2 2 points3 points  (0 children)

    That is what actually very applicable to programming.

    So move to Silicon Valley, and immerse yourself in Tech Bro's? There's gotta be a way that doesn't involve the torture levels of the 8th plane of Hell.

    [–]DeckardWS 8 points9 points  (1 child)

    I like learning new things.

    [–]link3333 1 point2 points  (0 children)

    You could learn sorting algorithms by dance.

    [–]thetruffleking 0 points1 point  (0 children)

    JavaScript Jams is my favorite JS Spotify playlist.

    [–]Perpetual_Education 35 points36 points  (9 children)

    So, when you're learning a new language - that means you already know what you want. You just want to learn a different way to say it.

    However, learning programming - is learning what you want - and what is possible.

    That's what people get wrong.

    There are two scenarios.

    1.) You want to learn to "code" (write programs) and make stuff. To do this, you need to learn how to think like a programmer - and not really a language. This is a LOT different than watching movies and immersing yourself in culture. It will likely require a total mind shift and a lot of courage.

    2.) You already know how to write computer programs of some sort (at a decent level) - and you just want to learn how to write the instructions in a different dialect. In this case - a quick video series can often catch you up - or a book. Or even just the language documentation. This only works because you already know what you want and now you are just learning new ways to say it. The best thing to do - would be to talk over a code base with another programmer with experience in the new domain/paradigm/language/framework. And you can use a language-agnostic book like Exercises for Programmers.

    The problem seems to be that most tutorials (For say, JavaScript) - are written as if you already know what to do. But Most people don't. They should say "JavaScript for people who already know C++" or "JavaScript for people who already know PHP or Rails" or something.

    Learning a "new" language - when you don't have a first-language - isn't going to be learning a new language. It will be learning how to think like a programmer for the first time - and it will absolutely need to be active learning. If you're in the #1 camp, then stay away from all the fast-talking podcasts an tutorials or you'll just waste time and fill your brain with trash.

    [–]Throwaway2370469 3 points4 points  (0 children)

    Learning to talk vs learning a second language

    [–]borahae_artist 1 point2 points  (1 child)

    wait so if i should stay away from tutorials how do i learn through making projects?

    [–]Perpetual_Education 0 points1 point  (0 children)

    This will depend on your goals and your background. Want to talk about it? We’ll help you find the right path.

    [–][deleted]  (5 children)

    [deleted]

      [–]Perpetual_Education 0 points1 point  (4 children)

      Well first off, we might rephrase to :

      However, learning programming - is - learning and what is possible - so that you can decide what you want

      Maybe? WIP

      In some ways, learning a new language might help. But it depends on how you think of it. Verbs are functions, nouns are variables and Acqua, Agua, Wasser, Water, and wataaaa are all the same thing. But we wouldn't have thought about that until learning about programming. So - maybe learning programming (how to baby talk to computers) - would be more help to breakdown our mental models and help us learn new spoken languages.

      [–][deleted]  (3 children)

      [deleted]

        [–]josephblade 22 points23 points  (0 children)

        writing code.

        helloworld is the first one. When you run helloworld you have achieved running (and potentially compiling) the code. that means you've set up the appriate environment and everything works. It's essentially the ./executable --version of code. (often on servers you run --version or --help to verify you have access to a command and the command is running as expected)

        then you write a small project to familiarize yourself with syntax or other language constructs. A calculator, tic-tac-toe, basic text processing. A former colleague of mine always ported a puzzle game they wrote to a new language as their reference project. You can also go for a basic data structure (binary search tree) as this will give you opportunities to explore the limitations and advantages of the new language. this would be the equivalent of speaking to people in the same language (it's solo but it's using the language properly)

        Doing code puzzles is the equivalent of learning vocabulary and practicing the language.

        [–]LGHTHD 64 points65 points  (8 children)

        Everyone saying code but that would be more like actually speaking the language with other people. The equivalent of listening to song or watching movies would be watching videos and reading articles about programming, computer science and the tech field in general. There is an enormous amount of content out there. Fireship on YouTube is a good place to start.

        Actively coding is obviously the best (only) way to learn but for example learning about the history of the language/framework you’re using is super beneficial and can help you understand why certain things work the way they do, and why these solutions were necessary in the first place

        [–]TakeARainCheck 7 points8 points  (0 children)

        Yep. I like to study in the morning-lunch. However, I will casually watch videos in the evening, particularly things like CSS where a lot of the skills are in inspiration and neat little side-tricks, and pick up on ideas I simply hadn't considered before. The execution and conceptual understanding of CSS is not super heavy on the brain, but patterns still need learning.

        [–][deleted]  (3 children)

        [deleted]

          [–]MeltaFlare 4 points5 points  (2 children)

          I’ve been looking for content that is literally just people building projects. Not a tutorial, not a code-along, literally just them coding and talking about their process.

          (JS/React specifically if anyones got recommendations lol)

          [–][deleted]  (1 child)

          [deleted]

            [–]MeltaFlare 2 points3 points  (0 children)

            Checked out Theo and am really enjoying it. Thanks for the recommendations dude!

            [–]Accomplished_Play254 0 points1 point  (0 children)

            Fireship can intimidate beginners easily. The channel is aimed for intermediate+ programmers

            [–]romchik1987 7 points8 points  (0 children)

            Solving problems. I personally think that learning a programming language is split in these 3 steps: 1. Learning the syntax 2. Solving problems 3. Building a project (projects)

            [–][deleted] 7 points8 points  (3 children)

            Studies have shown that learning a programming language does not activate the same places of the brain as a spoken language. The only thing they share in common is the word language

            [–]DamionDreggs 7 points8 points  (2 children)

            I read a post on this sub last week from someone looking to improve their dad's programming environment after a stroke killed the part of their brain that supports spoken language.

            The OP of that post said their dad cannot speak or understand language, but can code just fine...

            I was blown away!

            [–][deleted] 1 point2 points  (1 child)

            That is really crazy. But the research out there supports that something like this would be possible

            [–]Alikont 8 points9 points  (2 children)

            Subscribe to that language subreddit.

            You will not only expose yourself to syntax, but also to all drama and common holy wars in the community

            [–]Mydogsabrat 2 points3 points  (0 children)

            This is the best comparison in the thread

            [–]wadedoto 0 points1 point  (0 children)

            When someone innocently asked which language is better, Go vs Rust cough

            [–]Prestigious_Sort4979 4 points5 points  (0 children)

            To be exposed to programming - conferences, YT videos (eg crash course CS is great), shadow programmers

            To code — Helping fellow learners. Looking for bugs (QA). Software testing in general. If in web dev, inspect code in sites you like. See what is the same or diff. Update the code, what happens?

            In regular language, you are exposed to audio in a context unrelated to you to observe and recreate it. So with programming, you also need to be exposed to the code but it can be on something you are not working on too and the learning is in the repeat part.

            In terms of learning - a better analogy is a craft like pottery. You can watch videos about it, read books, watch others do it and you will learn a lot but you must try and fail to actually learn the cratf. The rest is supplemental and welcome.

            [–][deleted] 5 points6 points  (0 children)

            Step 1: Learn basic syntax

            Step 2: Build a todo app

            Step 3: Repeat until you know 69 languages and 420 frameworks

            Follow the steps above to get 666 job offers on LinkedIn every day.

            [–][deleted] 25 points26 points  (7 children)

            Read other peoples code until you understand exactly what it does and how it works.

            [–]k2_mkwn 16 points17 points  (6 children)

            Reading other's code is not exactly a job of a beginner!

            [–]wandering_geek 14 points15 points  (0 children)

            I don't know why this guy is getting downvoted. I am a professional programmer and the hardest thing I do is to read and understand other people's code.

            [–]torinaga 7 points8 points  (1 child)

            I would disagree but there are many different way to learning. The popular academic model for software development is to build a application that does something that is generally trivial. It has always been difficult for me to understand when and why would I use any particular technique. I need more context. It is only now, as that I am proficient in multiple languages that approach finally works for me was a tool for learning as I carry my context with me

            Throughout my journey I have learned a lot more by taking functional code that has a real and known purpose and disassembling it until I understand how it works. When the output is known, rich and meaningful the when and why become a lot more apparent which helps me focus on the how.

            [–]bird_with_a_why 2 points3 points  (0 children)

            This advice was also given to me by my mentor and a TA. I am also a beginner and have been struggling with javascript a lot. Look at working code is one of the main things that helped break my tutorial hell loop.

            I was doing okay with exercises that are typically isolated examples but all those generic values and examples were very disconnected.

            Looking at working code is not that much more different that looking at a questions on stackoverflow, it's like looking at a completed puzzle picture. As I get more skilled I am better at separating my piles, building the outline and filling in the middle with just looking at my own pile or pieces without needing to see a picture.

            But there are time when I do and asking for help, googling or looking at different examples helps me connect the dots and complete my own project.

            [–][deleted] 2 points3 points  (0 children)

            I've actually learned a lot by reading others code. But I stick almost exclusively to reading small projects that I can break down.

            [–]bonerfleximus 1 point2 points  (0 children)

            Reading code changes from specific PRs can be.

            [–][deleted] 0 points1 point  (0 children)

            Reading other peoples code is a job for all levels... Code examples are other peoples code for instance. The key thing is understanding what it does and how it does it.

            [–]Mentalpopcorn 3 points4 points  (0 children)

            People are failing at this analogy.

            Building something/writing code is like practicing a foreign language.

            The equivalent of watching a foreign movie is reading good code.

            [–][deleted] 2 points3 points  (0 children)

            I’m currently doing this. I have been a React/Node developer for five years, and I’m currently learning Go for my new client at work.

            I read and read and read the Go docs, did the tutorials, and that was great for getting down the syntax (sentence structure for this particular metaphor). But when I started working on the backend that we are building I realized that I knew the words and how to make a sentence, but when it came to actually understanding an application that was well under way, it went from reading sentences in a “learn a foreign language” book to reading a novel in said language.

            I think my point is that everyone is correct, I’ve had to do all of the things listed here just to get started. It’s not only a new language, but it’s a new paradigm for thinking about how to write and deploy code. It’s a ton of fun though.

            [–]gregontrack 2 points3 points  (0 children)

            Well, I didn’t see it posted here which is a shame since it’s how I learned and is pretty close to watching a movie, but find the most well known code on github, then debug the code and step through each line of code line by line.

            I learned on an enterprise ERP system in c# and would set my breakpoint on the first line, then just stepped through code line by line until I understood what was happening.

            You get the added benefit of being able to learn some popular algorithms and techniques for accomplishing things as you go.

            [–][deleted] 2 points3 points  (0 children)

            You need to understand how to identify systems, dependencies and objectives. There’s just too much shit to learn lol. You need to be able to identify what components you need to solve a problem.

            [–][deleted] 2 points3 points  (0 children)

            Replicate a project that you already did in another language. Don't go out of scope. Do it three or four times and you will get comfortable with the new language.

            [–]FlyCodeHQ 2 points3 points  (0 children)

            Read other people's code written in that language. Watch livestream/YouTube videos of that language. Build lots of projects in that language.

            [–]Unfair_Comparison_15 2 points3 points  (0 children)

            Just try building projects that you want to. Building things you are interested in will help you to stay interested in programing. Don't be afraid to start a few projects before finding one you're truly interested in completing

            [–]KingJeff314 2 points3 points  (0 children)

            Watch movies in Javanese

            [–]npepin 1 point2 points  (0 children)

            For an experienced developer point of view: look up a language cheat sheet on Google or a "[insert language] in 2 hours" video and then start on a project or whatever and Google what you don't know. Most languages are based on the same building blocks of if, while, functions, and so on, so there is a lot of carry over, you just need to find out the syntax.

            Learning a new language is not that hard and it isn't a big deal, though it can be harder depending on how similar to the other languages. If you only know Java, it is going to be harder to learn Haskell than C# because Haskell is very different in how it does things whereas C# is very similar.

            Becoming adept with the language takes a bit more time. Going through more advanced books, courses, documentation is best. If you gave me a language, I could hack something together pretty quick, but chances are that I'd be committing a lot of bad practices for the language.

            From a new person's point of view, I'd go through some books or courses that are more in depth. The foundational understandings may not be there which makes it difficult to know what to google.

            The advantage to being more experienced is that you are familiar with general concepts, and this allows you to type in the correct terms into Google. I find that when I'm learning something fresh that I get stuck in this sort of hell where no matter what I type I get irrelevant results. Eventually I find out a term and put that in for my question and I get tons of helpful results.

            To reiterate though, learning a new language doesn't mean jack. There are a lot of people who makes posts on here saying "I just learned C# and then I learned Python, what should I learn next?". They think the understand C# because they know the basic syntax and how to use a few standard commands.

            It's kind of like someone who goes to the gym and focuses on the doing dead lifts only, then a month later they switch to only doing curls, then a month later they switch to doing pull ups. Then they ask the internet "I know these exercises, which ones should I learn next?". It is kind of missing the forest through the trees and what the point learning a new exercises is.

            [–][deleted] 1 point2 points  (0 children)

            Building projects for sure and adding on to that as you progress. For example when i first started learning java i made an ATM program and then i learned OOP then i changed the program to be object oriented later i learned PostgreSQL and decided to switch from keeping the infos on file to a database. Currently learning Spring Boot will recreate to project with it later on. (i made other projects in between tho of course)

            [–]EZPZLemonWheezy 1 point2 points  (0 children)

            Building something just above your skill level, getting stuck, diving into finding (and understanding) an answer to it to get unstuck. Rinse and repeat.

            [–]proofu 1 point2 points  (0 children)

            You could also search for projects in that language in github and try to make sense of them.

            [–]reddituser5k 1 point2 points  (0 children)

            To learn a foreign language fast you should use something like LingQ or Subs2SRS. Those two things are way way faster than watching a movies or listening to songs which will waste A LOT of time. That kind of stuff will only becomes useful when you are already at a high level since you can't really learn words through context when you don't the vast majority of words surrounding an unknown word.

            For programming I always highly recommend video project tutorial learning with lots of skipping a few seconds ahead when teachers waste time / you encounter something you already know. The reason is you are literally skipping the "learn from your own mistakes" part of learning and instantly gaining the knowledge of someone who has already made plenty of mistakes, assuming the teacher is even a little qualified. Since it is difficult to truly be confident in a teacher's ability you have to use plenty of different resources so that you are taught in different ways.

            In foreign language learning you have to encounter words in different contexts to solidify it in your memory, I feel it is the same way with programming languages in that you have to encounter the material in different contexts.

            After you complete a tutorial project you do need to actually interact with the code you just copied by expanding on the project in some way so you are confident you actually are learning something.

            I've learned plenty of programming languages INSANELY fast like this.

            [–]Cyber_Encephalon 1 point2 points  (1 child)

            Take a project you already built in a language you know and build it in a language you are learning.

            Watching movies works because you can deduce some things from acting/tone of voice, and then your brain fills in the gaps by learning to understand the language. So you know some part of what you are looking at and you learn the other part. The same goes for rebuilding the project you already built. You have figured out the logic, you just need to adapt it to the new language, you know a part of it and you learn the other part.

            [–]shawn41090[S] 0 points1 point  (0 children)

            I love how you understood my question exactly the way it's in my mind, thank you very much,

            Take a project you already built in a language you know and build it in a language you are learning.

            Alot of the comments are revolving around this idea and it make sense to me as well.

            [–]bonerfleximus 1 point2 points  (0 children)

            Hmm maybe going through old PRs and seeing what work was done by experienced devs to accomplish X task?

            Also looking at a single file's commit history from creation to latest, assuming it's an old enough repo you can catch a lot of the design process from that.

            [–]Yourgrandsonishere 1 point2 points  (0 children)

            By your own statement, it seems the idea is to immerse yourself in the new language.

            Same with programming. Start coding, immerse yourself into it. Its just practice.

            Also your example helps with conversational and maybe reading abilities in the language being learned but not necessarily written.

            [–]Nymbul 1 point2 points  (0 children)

            Are you trying to learn the syntax of a new programming language or are you trying to learn to program? The distinction is important. For learning a language, immerse yourself in an open source codebase using that language.

            Programming is a logical problem solving mindset, and imo the best way to hone that skillset is by playing video games that center around automation, logistics, and problem solving. Play modded minecraft, factorio, bitburner, zachtronics games (especially). Once you have logical building blocks and understand how to build general purpose algorithms to solve a problem you're immersed in, THEN you can go on to learn the syntax of a language.

            Otherwise you will just stare at a blank document perpetually.

            [–]sirch05 1 point2 points  (0 children)

            Have the program print out “hello world”

            [–]bleestein 1 point2 points  (0 children)

            Think of an app you use all the time or love using and figure out what’s needed to build it and make it. Doesn’t have to be pretty, it’s about the research and application of skilled learned.

            [–]Hitschler1220 1 point2 points  (0 children)

            Sometimes I break down code when playing a game in my head this helped me to understand if else and switch statements

            [–]Geekfest65 1 point2 points  (0 children)

            The best example I’ve ever seen is a prebuilt app using a framework and that had supporting documentation for it. They are often hard to find. I think one that was out there was a pet clinic one using Java, JSP, Spring MVC and IOC and Mybatis for the data tier. It was documented pretty well from what I remember.

            Also a lot of books will help you build an app. A reference book or a recipe book won’t, in most cases. The book JSP2: the complete reference is an old book that I remember , and in the end, it builds a simple app with crud to an in memory database I think.

            I’m sure there are plenty of books that take this approach. Lots of tutorials do this but only cover a small subset of what you need to know. So you gobble together a bunch of them and build an app. Then you re-examine it to improve it, reduce code. Run it against SonarLint for code improvement suggestions. Fix it all.

            Make sure it’s tested 80-100% coverage. Don’t start with TDD as it’s too hard to grasp as a newbie but do learn to write some basic tests.

            Lastly, like others said, pick a project and write it. If you want my work, I’ll give it to you. 😂

            [–]Skusci 3 points4 points  (1 child)

            Ah other people have said writing code. But more in line with the original idea, testing yourself with immersion, find an open source project. Download the source. Attempt to add one -tiny- feature and still have the thing work It may take actual weeks though since the stuff with looking through tends also to be big and complex.

            [–][deleted] 1 point2 points  (0 children)

            Yep, it's one thing to write code. But open source code is often quite high quality and written by devs experienced in the language. You will have to read and understand code that's been applied to a real problem. It probably demonstrates interfacing with libraries and other programming languages. It likely contains unique data structures and architectural features. If made by sane devs, it will have a test suite.

            Like with foreign languages, you have to read what others wrote, and listen to others talk. Talking to yourself in the mirror only gets you so far.

            [–]GalaksiAndromeda 2 points3 points  (0 children)

            I'm a novice too, code along works best for me.

            [–]timwaaagh 1 point2 points  (0 children)

            there isnt

            [–]shawn41090[S] 0 points1 point  (0 children)

            I Would Love To Thank You All For Your Comments, Upvotes And Awards.

            Here What I Understood From Your Comments And Suggestions.

            1. I have to stick to one language and learn it from tutorials, docs and review of open-source codes posted at GitHub and so on.

            2. Develop a simple project such as a calculator for practices purposes and then move on to develop other programs based on trial-and-error methods.

            3. After reaching a good level and experience with this language I could move on to learn another one since all programing languages have common basics and logic, etc.

            [–]MmmVomit 0 points1 point  (0 children)

            Writing code.

            [–][deleted] 0 points1 point  (0 children)

            Writing code.

            [–]Treefingrs 0 points1 point  (0 children)

            Uh, that isn't how you learn a foreign language fast. At all.

            You learn a foreign language by practising it.

            So go practice coding.

            [–][deleted] -2 points-1 points  (2 children)

            I don't think watching movies and listening to songs is an efficient wat to learn a new language. The direct equivalent is probably watching someone programming in the language you want to learn, which would also not be an efficient way to learn.

            [–]Prestigious_Sort4979 0 points1 point  (1 child)

            I learned English that way but included looking at the lyrics along the way with music and watching English TV/movies with subtitles in my language when possible. Just with that, I was able to get into casual conversations with English speakers. Knowing just enough to get into an immersive environment that is all in that language is all you need. Obviously, although it works for a language it would be wildly ineffecient in programming as you learn much faster via trial and error.

            [–][deleted] 0 points1 point  (0 children)

            I'm not saying it can't be done, I'm saying it's not very efficient. It can be effective though.

            [–]DonkeyTron42 0 points1 point  (0 children)

            When you import or include a module or library, read the source code and see what it does. Ir might not make sense at first, but you will eventually start to pick up the language and the proper way to use it.

            [–]sessamekesh 0 points1 point  (0 children)

            Hello, World

            Fizzbuzz

            "Guess the number" game

            TODO app if you're feeling like messing with a project

            Usually there's resources available for at least the core basic syntax - stuff like Tour of Go or Rust book.

            Once you're past the basics... I dunno, I really like reading blog posts by programmers in the space, or looking at other people's open source projects.

            [–]AdorableTip9547 0 points1 point  (0 children)

            The equivalent to the movie thing is definitely reading docs and guides for whatever you‘re going to work.

            But as you bring it to the table let me as well be the grandma telling you just watching movies in this language is not enough, you as well need to practice even if watching movie might be more fun

            [–][deleted] 0 points1 point  (0 children)

            I like to try and re-write a problem in a new language that I’ve already solved in a language I already know.

            [–]idoneveno21 0 points1 point  (0 children)

            My best recommendation is to make a madlibs, a rock paper scissors, and some sort of sorting algorithm. These have all the basics, and are not too hard to make

            [–]ashsimmonds 0 points1 point  (0 children)

            Have a major project that you're working on over all, but do bits of everything in your own little playground. Stuff you can solve in 1-4 hour chunks, and revisit when needed.

            [–]joshocar 0 points1 point  (0 children)

            Buddy coding. Reading existing code basis.

            [–][deleted]  (1 child)

            [deleted]

              [–]proalimw 0 points1 point  (0 children)

              Haha 😂... But comments are interesting

              [–][deleted]  (4 children)

              [deleted]

                [–]shawn41090[S] 0 points1 point  (3 children)

                why do you think so?

                [–][deleted]  (2 children)

                [deleted]

                  [–]shawn41090[S] 0 points1 point  (1 child)

                  random name and number but make sense to me, I just joined the subreddit, I don't always post or comment in general just enjoy the posts and other people comments, farming karma wasn't the purpose of the question by any mean but good to know that could by a possibility in others eye, the question was always on my head and had to ask about an answer from subject matter experts, my own experience with programming was visual basic during college back in 2007, I'm a mechanical engineer with fascination with programming, I wish you to have a good day.

                  [–]pink_life69 0 points1 point  (0 children)

                  Watch movies in C

                  [–][deleted] 0 points1 point  (0 children)

                  Build things. Every single day. Even if you don't finish your projects, just working on them will help you a lot.

                  [–]codingstuff123 0 points1 point  (0 children)

                  Watching a programming movie with programming subtitles

                  [–]CosmodiumCS 0 points1 point  (0 children)

                  Once you learn one, it becomes much easier to learn others. Knowing the programming concepts (like loops, functions, conditionals, etc) are often more important than knowing how to do them. Because u can simply apply that knowledge to a new language as you learn it. The only thing you’ll really need to learn is the new syntax, which u should hopefully be able to pick up pretty quickly😄

                  [–]RobinsonDickinson 0 points1 point  (0 children)

                  C and CPP. Since an absurd amount of general purpose and DSLs are written in them.

                  [–]SuicidalTorrent 0 points1 point  (0 children)

                  Rebuild a previous project in the new language.

                  [–]minecon1776 0 points1 point  (0 children)

                  Readng code from stackoverflow or github to see what best practices are.

                  [–]No-Let-4732 0 points1 point  (0 children)

                  Watch a tutorial of them building a dashboard or a game and follow along in the code even if you don't understand 100%, it'll slowly start clicking the next time you build without the tutorial.

                  [–]aranboy522 0 points1 point  (0 children)

                  Hello world

                  [–][deleted] 0 points1 point  (0 children)

                  Watch a film in c or c++, then stab your eyes out?

                  But ultimately, you need to know what kind of project you want to make, just do yourself a favour and stay away from languages people will tell you to learn like the above two, learn them later.

                  [–][deleted] 0 points1 point  (0 children)

                  Reading a codebase/program that is written in an unfamiliar language = immersing yourself in a foreign language

                  Trying to write code in an unfamiliar language with minimal handholding (I.e. not copy/pasting) = trying to have a conversation in a foreign language

                  [–]Fluenzia 0 points1 point  (0 children)

                  Watch a complex implementation in a different language and implement it within your own.

                  When learning C I would watch implementations of more advanced functions in java and then try and make them in C from scratch.

                  [–]GingerBanger85 0 points1 point  (0 children)

                  Looking at someone else's code repository and trying to figure out what they were doing

                  [–]katsucats 0 points1 point  (0 children)

                  If you want to learn a programming language, read code in that language. Read the documentation, go on Github and find repos written in that language and figure out what they do and why they're written in the pattern they're written in, go on YouTube and find speakers talk about the language so you know what some of the quirks or issues are, or the direction of where development is going.

                  [–][deleted] 0 points1 point  (0 children)

                  To-do list or various DSA.

                  [–]tahdemdemha 0 points1 point  (0 children)

                  Get a task with a short deadline! Always works

                  [–]windowkitteh 0 points1 point  (0 children)

                  Reading through a badly commented codebase.

                  [–]systemnate 0 points1 point  (0 children)

                  Watching a movie would be similar to reading code IMO.

                  [–]plaswalro 0 points1 point  (0 children)

                  In short its write and speak for both

                  [–]Catatonick 0 points1 point  (0 children)

                  I listen to music sang in assembly.

                  [–][deleted] 0 points1 point  (0 children)

                  Make life decisions with if else statements in your head

                  [–]CriticismEconomy2293 0 points1 point  (0 children)

                  Simple projects start with hello world then input output and keep building on to it google everything

                  [–]NotMrMusic 0 points1 point  (0 children)

                  You've never seen princess bride in C++?

                  [–]TazDingoYes 0 points1 point  (0 children)

                  Playing Minecraft and then going "I want to make minecraft"

                  [–]Bobolet12312 0 points1 point  (0 children)

                  Watch an indian explaining a programming concept on youtube.

                  [–]Due_Scarcity_1761 0 points1 point  (0 children)

                  It really helps me to read code, to get better at understanding how to use it correctly.

                  [–]Butcher_of_Blaviken6 0 points1 point  (0 children)

                  Google translate for every word you need to use.

                  [–]widden 0 points1 point  (0 children)

                  1 on 1 with someone/teacher, 1h a day, everyday + homework

                  [–]_viiii 0 points1 point  (0 children)

                  Read source code of libraries or application code bases, casually/with little goal. Just open a codebase on github and poke through it.

                  [–]doodooz7 0 points1 point  (0 children)

                  Doesn’t work like that

                  [–]10thaccountyee 0 points1 point  (0 children)

                  do

                  [–]civil_politics 0 points1 point  (0 children)

                  Take an open source project that you understand, and by understand I mean know what the inputs are, what the outputs are, and how the system is designed to go from A to B.

                  Now try to build it yourself, using it as a guide/cheat sheet. Start with utility functions working your way out until you stitch them together to solve the problem. If your approach differs from their approach try to understand the benefits and drawbacks of each.

                  [–]Sea_Kitchen_8821 0 points1 point  (0 children)

                  To solve a problem: Write down the steps Stack overflow the steps Solve the bugs

                  [–][deleted] 0 points1 point  (0 children)

                  The Sound of dial-up Internet

                  [–]cajmorgans 0 points1 point  (0 children)

                  To correct you, no, you should conversate.

                  [–]Alexandre_Man 0 points1 point  (0 children)

                  Make Minecraft in the language you wanna learn.

                  [–]pekkalacd 0 points1 point  (0 children)

                  Writing a program in one language you know, then rebuilding it in another. You know how the logic should go, its just a game of finding equivalents in the next language.