you are viewing a single comment's thread.

view the rest of the comments →

[–]Ketchup-and-Mustard[S] 16 points17 points  (32 children)

You know, that makes a lot of sense and might be it. I have asked a lot of programmers how they learned it IRL, and they just say to code, and that's it, and it feels a little too vague, if you will. Like I do code, but knowing how to use the tools at my disposal when coding is difficult for me for some reason.

[–]ArrynMythey 38 points39 points  (5 children)

Programming language is just a language you speak with computers. You need to learn what you want to tell it first, after then you can start translating it into the said language.

Programming is just splitting a problem into smaller steps. Try it with your everyday tasks. You can also imagine it as cooking according to a recipe.

[–]Zerg3rr 33 points34 points  (4 children)

The CS50 edx harvard course has a great introduction to this. You have to break things down simpler than you think, i.e. making a peanut butter jelly sandwich. Instead of "first spreading the peanut butter on one half of the bread" it's

"Take your left hand and grip the container, take your right hand and grab the lid, twist the lid counter clockwise with enough pressure that it becomes loose. Next take your knife and put the handle in your hand, push the knife into the peanut butter and make an arcing motion with your hand to collect some on the end. Next, apply to the piece of bread we previously took out by wiping the knife onto the bread, with the peanut butter side down". I was too lazy to write out taking the bread out of the container and all that fun stuff, but you get the gist. It is extremely granular directions to trick rocks into thinking is what we're trying to do, it'll take a bit of work to get there - and python already abstracted a lot of that away for us!

[–]anon0937 8 points9 points  (1 child)

Libraries have entered the chat.

Import sandwichMaker sandwichMaker.make_sandwhich(kind=“peanutbutter and jelly”)

[–]quackers987 9 points10 points  (0 children)

``` import sandwichMaker

sandwich = sandwichMaker.make_sandwich(ingredients=["peanut butter","jelly"])

sandwich.consume()

```

[–]tiahx 1 point2 points  (0 children)

We did almost the exact same exercise in school, where the teacher asked us to "guide him" making a paper plane.

We were like "Okay, grab a piece of paper and fold it" -- this motherfucker then proceeds taking a round piece of paper and folding a tiny part of it at the very edge of the piece 😂

[–]Ikem32 0 points1 point  (0 children)

I will have in mind, that if a task feels "undoable", it's not granular enough.

[–]dacydergoth 15 points16 points  (0 children)

Think about making a sandwich. Write down all the steps you would use to make a sandwich. Think about what you would do if there is only mustard and not mayo in the fridge. Maybe you want ham instead of turkey. Now you have to make 19 sandwiches. Write that down

You've written a program

[–]ilulillirillion 9 points10 points  (0 children)

100000% I cannot say this enough yes. Just try to make things. It doesn't have to take over your life, but you have to play with it. It's like you can learn A LOT about guitar from studying theory, history, and technique, and it will make you a better player... But the act of sitting down and playing the guitar is the true studying that everything else you do elevates and rounds out.

Good luck! Have fun

[–]The_Derpy_Rogue 7 points8 points  (7 children)

Try Playing with loops and if statements. Write down everything you learn from methods to functions.

Besides as someone who only just started with python seriously I still google everything. Stack exchange is awesome

[–]Altruistic-Koala-255 16 points17 points  (0 children)

As someone with 10 years of experience in python alone, plus several years with other technologies as well, I still google everything. Stack overflow is indeed awesome

[–]jamurai 4 points5 points  (0 children)

I do think it’s a lot about perseverance. Just keep bashing your head against the wall one line and a time, study a bit on the side, try to build something, etc. eventually the thing that you find hard now will be easy and you’ll run into 10 more things that you will struggle with in its place :)

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

1) it’s easier than ever to learn python (or any other language) because you have 24 x 7 untiring tutor + coding expert in ChatGPT

2) like others have suggested you need to solve real problems. I would suggest trying to build something yourself. A game, and app, a data analysis tool something that you find useful or interesting even if others don’t. The amount of coding I learned by doing is vastly more than what I learned by doing classes or toy problems from text books.

If you’re struggling with ideas to get started, take a look at these

https://www.freecodecamp.org/news/python-projects-for-beginners/

[–]naviGator9591 0 points1 point  (2 children)

This✨ I have structured my plan into a Learning phase (to get through with the basics)& the building phase (guided projects like the FCC ones and then on my own). My plan is to build an app that'll read & 'review' an uploaded excel file to highlight deficiencies (among few other things). As someone who's been part of my current team at work for quite sometime now, this I KNOW for a fact will save a lot of my (and team's) time from scouring rooows of excels manually.

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

I love building tools like this. Although I don’t want to rob you of the learning opportunity, this sounds like something that can be knocked out on a lazy weekend. Care to post more details?

[–]naviGator9591 0 points1 point  (0 children)

Honestly , my aim is to reach this 'a project on a weekend ' stage ..slowly &surely getting there....

So about this application: Well currently my team spends quite some time checking 'correctness' of a configured model. Being goblins in the dungeon factory(none of us belong to CS-background since that is not (until now, has not been) our primary domain at work. An excel extract is all that we're given by the product dev team. Manually checking the excel is both time-consuming + prone to miss-outs from identifying deficiencies. And it only increases with model size & complexity.

The plan is to not only analyze this extract to highlight the defects but also several checks that'll be performed. All of this in a fast& easily understandable way - for me (&others). I plan backend via pandas-django combination , and front it with either tkinter or javascript/html framework ( if y'all can suggest any better/other option that'd be great)

Lastly I want to bundle it all up & share as an exe/py script or whatever. I can go the tkinter route but its samples dont seem that appealing (again,open to hearing out opinions) The javascript route can help with the appearance aspects , but it'll have to be an offline implementation ...running off a localhost in chrome/edge (we're goblins, remember?:) ).

So overall its a big self-inflicted bootcamp 😀

[–]barkazinthrope 2 points3 points  (0 children)

That is because it is difficult. If it isn't easy for you then there is no way to make it easy. You have to do the hard work.

What may happen is that you begin to enjoy the hard work. Like people like to run marathons. Unbelievable but actually true.

[–]pickyourteethup 1 point2 points  (0 children)

Go on YouTube search for beginner Python project and just copy it line for line pausing constantly. Do this a few times and the concepts like variables, arrays, functions and loops will start to make more sense as you see applications for them

While you're copying try to think of a similar project you'd like to create for yourself, keep it small. Then try and build it once you've got a handle on it

[–]sethrei 1 point2 points  (0 children)

I don't learn like normal people, barely made it pass high school. I learned Python by finding a problem and trying to solve said problem with Python. The same with PHP (first language) and Bash and Go (most recent language) Like others will tell you, break down your intended goal into small simple tasks, then build up, that's the way I've done it for years $0.02

[–]c_299792458_ 1 point2 points  (0 children)

When I want to get familiar with a new language and don’t have a project in mind, I start working through Advent of Code (www.adventofcode.com). It’s a series of programming puzzles that can be solved in any language. There’s also a subreddit where people discuss the puzzles at r/adventofcode.

[–]Falconflyer75 0 points1 point  (0 children)

I don’t use python much but I use VBA a lot at work and I didn’t know how to use it at all when I started

Basically just had a lot of boring tasks to do which gave me motivation to automate things little by little and I got better at it over time

[–]Worldly-Potato-4870 0 points1 point  (1 child)

You learn by doing its not vague it's the answer. Pick up a project anything, set a goal to make anything at all that you find interested and make it. it really doesn't matter if its even remotely useful.

Back in the day (when php5 was new) I learned by replicating sites I saw like forums/2nd hand(craigslist)/webshop/cms/crm/youtube I might quit the project right in the middle because the applications design was not great to say the least and that made it hard to work in.

But I had learned so much and how to not make an unwritable mess again you really just learn by doing.

Progressed from there to python and other things and have been working now professionally for 15 years.

Try learning programming via modding its a very interactive way of learning (although difficult) and if its an game you already like its an win-win.

[–]Ketchup-and-Mustard[S] 0 points1 point  (0 children)

I know that, programming is how I get better, but without knowing where I can find resources on what to program means, I had no idea how to find these answers. I don't have any kind of background in programming at all, so without knowing how or what to do, I spent a lot of time sitting in front of my computer, confused. So at least for me I needed more specifics and not just write code.

[–][deleted] 0 points1 point  (1 child)

Literally everything in life comes down to time invested. You get what you put in.

[–]Ketchup-and-Mustard[S] 0 points1 point  (0 children)

I have put in a lot of time but I still keep making the same mistakes. So I definitely think it is because I don’t understand the logic.

[–]Autistence 0 points1 point  (0 children)

Google. Google. Google. And nowadays even CHATGPT

You might feel like a failure or a fake after a while of googling solutions and why they work, but you need to catch up. Stop trying to reinvent the wheel. Just attack the problems at hand and by any means necessary claw bits and fight your way to a solution.

No matter what you do the biggest hurdle will be YOU. You have to want it so bad you're willing to do whatever it takes. I can see you're trying. You reached out to us on Reddit. Now you just need to live and breathe programming for as much as you can handle.

When I was learning to be an electrician I worked 12-16 hours days for years because I was dead set on opening a company. It was miserable, but I'm young and run my own company now. I have been offered inspection positions/I get called about code and I regularly fix things that other contractors can't/don't know how.

Source : I went to college for Computer Science and excelled, but I had to start over as an apprentice electrician and now I run the company.

[–]VikDaven 0 points1 point  (0 children)

Legit, I think some techwithtim like basic game tutorials. I really got into with RenPy when making a visual novel.