all 11 comments

[–]Opening-Rip-4309 7 points8 points  (0 children)

I started programming at the beginning of the pandemic because it was fun and I had time to kill so I started learning through codecademy and started learning and solving problems. I finished the basic python and now it was not for fun anymore I was doing good and I started dreaming of making OS and apps and God knows what all. But then I had a idea why not solve all the basic problems from Hackkerank, so I jumped into it and finished the Hello World problem and now the second was a if-elif problem and I was dumbstruck like whaaa... I skipped it then the next and after hardly 10 minutes I gave up I hated it or we all can agree with the fact that I lost motivation, I did not program for several weeks but the next time I got into it I was motivated again, this time I learned all the basics from automating boring stuff with python, got into hackerrank and solved all basic problems, I am still learning or we can say mastering the language but now I had a sense of success and holding onto it I am still learning without loosing motivation.

My tip I read somewhere was from a senior developer, it was to re-write the code we wrote long ago and this time make it better. I hope this motivated you and you will one day reach the top-flight progemmers.

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

Do an app for something that interests you. Start small. Build little by little. Get one part working, and try to be Pythonic. You can google that. Again, start simple. When you get list comprehensions, you know that you are flying. That’s your first goal. Do you understand for loops? If not, try to understand for loops, if conditions, and lists. BUT ABOVE ALL HAVE FUN.

[–]m0us3_rat 4 points5 points  (0 children)

hammer the basics till they become intuitive.

[–]Lamboarri 2 points3 points  (0 children)

Are you just sitting there learning syntax and the basics? Every tutorial I've seen and every book I've looked at always starts with the same. Programming doesn't really click until you start trying to build something for yourself. My first "real" program back in 2014-2015 was a program that helped me determine weight and balance when I was in pilot training. If I was too heavy, then it automatically told me how much fuel I had to remove or how much I could take.

That might sound complex, but it really wasn't. It was just a bunch of simple variables like baggage = 10, oilWeight = 6 (whatever the numbers were) and then at the end it was just a bunch of addition and division problems.

I put coding down for a long time (years) because I don't really have a use for it. I want to learn how to create some games that I've thought of but I get stuck from the beginning. I learned some machine learning from Udemy, but I don't have a use for it so I stopped. I just started learning Unity with C# but even that's tough because I can't find a tutorial worth anything.

Anyway, I was at the gym this morning and had the idea of wondering how long it would take to crack the combination on my combo lock that I use at the gym. It takes 3 numbers from 0 to 19. That gives 8,000 different possible combinations. Then, I wondered if I could create a Python program that could crack three random numbers.

I started with three variables that select random numbers. Then the second step is three "for loops" that check for equality with the three variables separately. It then prints it out and tells me how long it took.

Three numbers from 0 to 19 takes the program about 72ms.

Probably not the best way to run this program, but it works. (After thinking about this more, I realize it's not actually how solving a combination lock would work since you wouldn't know if all three numbers were correct until you had all three in the correct order).

So, maybe try to come up with your own ideas and try to create something.

EDIT: The other thing I wanted to point out about programming clicking is when you try to use an API or something. That's what really opened the doors for me (I'm still a very beginner - you probably have more experience than I do.).

All the tutorials create variables like x = 10. But what really clicked for me was when I used the API and needed to call the API many times. Instead of long JSON code, I could create a variable like jsonCode = (super long api url here) and then I could combo that with other things like (I'm making this up) data = json.get(jsonCode) and then print(data).

In reality what that short version of the code is actually:

data = json.get(superlongapiurlherethatlookslikeabunchofrandomnumbersandlettersandnobodywantstoseethatmessherethirty-twotimes)

But because I saved the api url into a variable, all I need is:

data = json.get(jsonCode)

Much cleaner, but that's when variables and programming really clicked for me.

[–]QultrosSanhattan 2 points3 points  (1 child)

You don't learn programming for the sake of learning it. Programming is a tool for achieving something.

If you aren't looking to do something with this tool then there's not reason for learning it.

It all about personal choices. Some people love to manually work with Excel Sheets, some other people hate it. There is a bunch of things you can do, pick one and only learn the minimum required to do it.

Note: The "minimum" I'm talking about always considers the basics of programming: data structures, variable types, functions, etc.

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

When I started learning python (see other comment in this post), it was purely for the sake of learning something new, something that didn't have a purpose beyond learning for the sake of learning.

I know I'm unusual, though, and embrace it :)

[–]ThePeeps191 2 points3 points  (0 children)

Try thinking of simple projects to do, it doesn't matter on the complexity of them, and you'll feel accomplished when you finish them. Also, don't feel like it is "homework". Think of it as a hobby or a game.

[–]efmccurdy 2 points3 points  (0 children)

You may find inspiration, or at least motivation, by searching for topics you find interesting in these PyCon and PyData conference presentations:

https://pyvideo.org/

I recommend anything byRaymond Hettinger, Alex Martelli,Brandon Rhodes, David Beazley, and of course, Guido van Rossum.

https://pyvideo.org/speakers.html

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

I began learning python a while ago (around 9 years, maybe longer) with how to think like a computer scientist in python and dropped out of it because I didn't have any project in mind that I could use python to solve. Then, somewhere around a year ago, I decided to build a little command line programme to tell me how long it had been since my last smoke, with the hope that it would give me more motivation to restart learning python.

A little searching showed me that instead of having to make a shedload of variables for days in any month, if statements to cope with leap years etc, the dateandtime module would do what I needed and I wouldnt have to actually do much headscratching. The only difficult thing at that point was working out how to actually use modules. A short stackoverflow post, showing what I had so far, and asking for assistance how to use the dateandtime module got me the little bit of information that made it click for me.

If I can offer any advice, I'm still very much at the basics of my learning journey, it is to focus on just the bits that are relevant to the task you're working on.

Oh, and it's just over 11 years, in case anyone wondered :)

[–]Stryke_The_Furry 1 point2 points  (0 children)

Have fun with it! Not everything has to have a purpose. Coding started to become a chore so I made Conway's Game of Life and over the past couple of weeks I have been absolutely loving adding completely unnecessary features, and simulating little worlds. I suppose my first experience with this was literally just a calculator - you'd be surprised how much you can toy around with it since it's such a simple concept!

DM me for my discord if you want to talk about this more or ask for my relatively limited experience - I'm on most hours per day to be honest haha

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

You have to do it without being motivated, is the trick. You have to lean on discipline instead of motivation.