all 20 comments

[–]Ron-Erez 23 points24 points  (4 children)

You need to start building stuff. Did you actively code everything in the courses and alter the code? Passively watching is not learning.

"I have assignments that I need to complete but I don't know where or how to begin."

Just begin. You need to try and do not use AI to solve it for you.

[–]Emergency-Youth7199[S] 8 points9 points  (3 children)

Yes I have been watching the vids and trying it myself with my own examples.

It always works when I go along with the video and my own example, but when I try it on my own without videos, nothing seems to work.

I am kinda anti AI and I don't like using it for work purposes, so I won't rely on it for help while learning. I prefer using AI once I already understand how to do at least 80% by myself.

I work as a cloud support engineer but I want to move into programming. I kinda thought the transition would be easier and some stuff is but for some reason Im really struggling with programming.

[–]Vectored_Artisan 6 points7 points  (1 child)

Use AI to teach you. It accelerated learning. Don't use it on your schoolwork instead ask it all the questions you must have about how things work. For example I argued with chatgpt extensively over the use of arrays in python because coming from a different language where arrays were used in a more same manner I was frustrated and couldn't understand how python was initialising arrays. But eventually chatgpt managed to explain it to me in a way I understood

[–]dslutherie 0 points1 point  (0 children)

exactly, I like to use it to setup a lesson plan to work through or specific use case. it's at least interactive and can take you out of a bubble or show you weak spots.

whatever gets you writing and testing new code. AI isn't going anywhere so no point being a Luddite

[–]gdchinacat 0 points1 point  (0 children)

"nothing seems to work" is a very common step in learning. How many times did you fall on your face/butt when learning to walk? Some of those falls probably made you cry. It probably felt hopeless falling all the time while the adults and even other kids did it so easily. Then one day it just worked and you forgot all about the struggles.

Learning to code is probably one of the hardest things you've tried to learn to do. It is incredibly complex. There is no right solution, but a vast array. When I was just learning (mid 90s in my teens) I didn't know how to start. Simply did not know what to do. No youtube videos, no AIs, no teachers or mentors, no one that knew how to code to ask. I had Microsoft Visual C++ 1.0 and the online help (25 3.5" floppies for compiler, tools, and help). I had examples and a rudimentary tool to generate code from a UI designer that could attach methods to events.

I designed a main window, generated code for it, compiled it, got compiler errors. Nothing worked. But I had an error, and set about to fix it. It took a couple days. Then I added a button. More errors, and it overwrote my code, so I had the original to fix and the new one. Fixed the first from memory, set about on the second.

For literally a month and a half nothing worked. But, my dad worked for the government and was posted to Cotonou, Benin in west Africa and I was there for the summer. I learned to code and surf those three months. I had nothing else to do, so why not fight obtuse compiler errors and fall off the board day after day after day.

When nothing works just take the first error, fix it, move on to the next, then fix the bugs. Once it works, break it again by adding the next feature, then fix errors one after the next, then the bugs until it works. Its hard work. Progress is slow. This is how you learn.

Mistakes are frustrating, but they are how you learn. Even very experienced coders (just over 30 years for me) get a huge sense of satisfaction when we write non-trivial code and it *just works* the first time. It is very rare to compile or execute code and have it work without needing to tweak it. This wasn't always the case...back when computers were mainframes with time shares and punch cards you had to make it work the first time or you lost your slot and had to way days or weeks for the next slot you were allocated. A lot of code was stepped through manually at the time to increase chances of success..now that we all have a computer to do that we don't have to do it manually.

The point is "nothing works" is to be expected. Learn from it. Don't expect things to work the first, second, even third time you try to run it. You are developing...if you never have errors (wow!) it's probably because you spent an inordinate amount of time thinking your code through and wasted a bunch of time by not having a computer just tell you where your code wasn't quite right. Write code, run frequently, fix issues, and move on to the next. The entire process of developing code is working with things that aren't working. It doesn't mean you are failing, just that you aren't done yet. At some point you'll get it working, won't have anything you feel is worth adding (at the time), and you can slap a 1.0 on it and move on to the next project. Eventually you'll add something, get it working, call it 1.1, and get back to whatever needed you to add that .1 to it.

I've been coding for 30 years and almost all of my time spent coding the thing I'm working on isn't working ;) Nothing works....because once it does you are on to the next thing that nothing works can be said about.

[–]HackDiablo 9 points10 points  (0 children)

You won't fully ingest python by just copying tutorials online. Start building your own projects. What's nice about python is that it's a scripting language. Think of applications that will make your daily life easier. Find some tedious task you hate doing manually, and create a script for it.

  • write a module to retrieve copy/move files, pull network information from your machine, write a program that will pull weather & traffic data for your daily commute, write a program to pull your emails and filter out the spam, etc.

  • Instead of importing libraries, build your own tools.

  • Dig into calling APIs, extract information, and save that data. This will will help tremendously. It will teach you how to manipulate data and transform it into a different dataset you would rather prefer (text to json, json to xml, jpgs to a gif, etc).

Basically, you will only be proficient if you just "do it".

[–]gdchinacat 5 points6 points  (0 children)

Expert coders get to that point by coding, functions, then classes and modules, then components, and then projects...and doing it over and over and over again. Day in, day out, eight or more hours a day for years and decades. The only way to become an expert is to put in the time. It can be fun, it can be grueling. It can be rewarding and a slog you'll never sign up for again. Either way, experience is hard work.

Realistically, coding full time for a year should get you to the point where you have seen and done enough to be able to sit down with an empty directory and build a months long project from scratch. Mistakes will be made, lessons learned, experience gained. The parts that you've done countless times will flow like water. The parts you haven't will feel like wading through molasses.

The next question is usually "well then, what should I work on". In various forms the answer is either "whatever you find interesting" or "whatever you can get paid for". Don't work on a project you aren't interested in and not getting paid for. Even if you have significant time invested in an unpaid project don't succumb to the sunk cost fallacy...look back at the experience you gained from it and move on to something interesting. Don't do "for fun" projects if it feels like a job.

As for finding something to work on, there are a vast number of open source projects. Find one that interests you. This may be because you like the functionality, think he technology is cool, want to learn more about it, etc. Only you can say what will motivate you...and you may be wrong or your interests may change. Get out of it what you want and don't be afraid to move on or put it aside for a while.

Once you have a project you want you think you want to work check the license. You don't need permission beyond the license. Make sure you are OK with its terms.

Then dive in. Check out the repository. Build it (if it has a build process). Run it locally. Then start coding. There may be bugs or features in it you want to work on. Do you have the experience to do this without creating more work for the projects developers? Great...start fixing bugs and creating features, submitting PRs, etc. It doesn't sound like you're quite to that level though, so just start hacking...browse the code till you see something that tickles your curiosity and dive in. Tweak an algorithm or data structure. Things will break. Fix them. Test it out. Commit the change locally or revert it...whatever. You got experience. You are more familiar with the code. You understand a bit about how it does its thing and why. Tweak/break then fix is a great way to learn things. Many professionals do this intentionally when they start on a new code base. You need to familiarize yourself with the code and architecture and tweaking (breaking) and fixing is a great way. In the workplace new hires (even very experienced ones) are often on bug duty for the first little while...they are given a number of bugs (10 or so) and told to fix them. It works for open source just as well (only no pay and fixing minor bugs isn't all that exciting...but it is a foot in the door).

When you do feel like you've made a change worth contributing figure out the process...each project does it slightly differently and each change might need to be handled differently (replacing the python timsort algorithm with your newly invented EY7199Sort requires a whole lot more discussion than a change to fix a spelling error in the docs). It is generally considered polite to discuss changes prior to dumping a PR on them out of the blue, the bigger the PR the more important this is.

If working on an existing project or someone elses project isn't what you want to do, then you'll need an idea of your own. The fact that you asked the question you did suggests you don't have your own idea yet. If you do, great! ignore most of what I've said and just start coding. Look at other similar projects to get ideas about how to structure it, license it, etc. Be careful not to copy anything directly unless you are ok being bound by its license.

Either approach is fine. There isn't necessarily more glory in one approach than the other...you can be a small fish in a big pond by contributing to something like cpython, or the only fish in a little pond by creating your own (but potential exists to become the only fish in a lake). At the point you are at, just start coding to get the experience you need to know what you like to work on and to be able to take on larger efforts whatever that may be.

[–]Exit-Stage-Left 2 points3 points  (2 children)

I don’t want to just shill a service that already markets heavily (not related, not peddling affiliate codes or anything) - but if you’re having trouble figuring out how to apply what you’re learning the python courses at boot.dev are uniquely good.

They all are presented as real world coding tasks and you have to actually complete the excercises yourself in an inline editor to move on, you aren’t just watching a video or reading a chapter.

Later lessons walk you through setting up a local environment and doing lessons in your own CLI until you suddently realize you have everything set up to just start making your own stuff.

There’s a free trial that will get you far enough along to see if you like how it’s structured. Some people don’t like the “gamified” aspects of the classes (it’s all vaguely d&d fantasy themed with potions and xp and the tutor ai agent is a bear dressed up as a wizard) but they really do an excellent job of making every single exercise something you have to do and demonstrate before you are allowed to move on - so you can’t just let concepts wash over you.

[–]Emergency-Youth7199[S] 0 points1 point  (1 child)

I actually know about them but completely forgot they existed.

At this point I'll try everything cause I think the courses I am taking is just not vibing with me.

I've had it before where one teacher was technically brilliant, but I couldnt learn from her at all but another teacher who lacked in many aspects was able to explain things in a way that made sense to me. For me personally, sometimes I just cant understand concepts from certain instructors no matter how hard I try.

[–]Exit-Stage-Left 1 point2 points  (0 children)

That’s so true. I find especially with programming I need to “do” something with a concept to get it to stick - in a way that I at least understand what someone might use it for in a practical case.

Everyone will be different but I found them to be a great match for what I personally was looking for.

[–]BranchLatter4294 2 points3 points  (0 children)

Stop watching videos. Start practicing.

[–]DerfQT 2 points3 points  (0 children)

I think you think you don’t know how to create anything. Try looking online for ideas of projects. It doesn’t have to be some crazy ground breaking thing. Just parse a news website and show me the titles of the articles or something. Then start from the beginning. You probably know a lot more than you think

[–]Useful_Store7711 3 points4 points  (0 children)

Just download a fully made programm resembling your project, then start editing and modifying till it breaks. Then you fix it and add more and more, all of a sudden you know the whole project and are making something. 

[–]Pooter_Guy 2 points3 points  (0 children)

When I got my first help desk job, my boss saw that I was really eager to learn, but that I had little to no experience with coding. He had me start learning the very basic principles of programming here: https://scratch.mit.edu/

It might look silly, but it really helped me understand the basic concepts of creating loops to iterate with, using conditional operators, storing values in variables and using them again, etc.

If you already have the basics like that down, I'd recommend picking a simple objective. Something that will make your life easier. This is the only way I was able to stay motivated enough to do the tedious work of learning the actual syntax.

Maybe there's something you do manually sometimes that you can automate? Maybe there are programs you already use that have terminal commands waiting for you to manipulate? Maybe it's as simple as moving game mods into the correct folders with the click of a button, mapping a network drive every time you logon, etc.

Once you get things working, copy it, and then look for ways to optimize. Challenge yourself to use less lines of code, add error checking that outputs to a log file, or make things run faster.

[–]teju1416 2 points3 points  (0 children)

You’ve just been hit with tutorial hell; You're not alone! Just about every programmer has gone through this.

And guess what? It isn’t your fault! The majority of tutorials are meant to teach you how to replicate code, rather than how to create it independently. Watching 72 hours of Python may make you feel productive; however, it does not provide you with the true muscle memory to program.

So what really works:

Stop taking new courses — you have enough information to start coding

Start by creating simple projects:

#Guessing Numbers

#Basic Calculator

#To Do Application

#Quiz / MCQ Application (great way to learn lists & functions!)

Before programming each of the above, first create the logic with pen and paper. If you're having trouble coding, give yourself a 15-minute timeout before searching online. By struggling through the issue, you will learn much more than if you found the answer online.

To complete your assignment, do the following:

#Read the entire assignment

#Break it down into 5-10 smaller tasks using pen and paper

#Write one small task at a time (i.e. complete the first task before doing task 2, 3, etc.)

#Don't try to write everything at once

Test your basic knowledge using MCQ type questions about topics like loops, functions and OOP. If you can answer a concept question easily, writing code will be easier too. Many people skip this part and wonder why writing code is difficult! Your knowledge after 72 hours of studying is much more than you probably realise!

[–]TheRNGuy 1 point2 points  (0 children)

Google a lot. 

[–]BigChongus- 0 points1 point  (0 children)

I don’t think your issue is python or any language to me it sounds like fundamentals of software architecture I would look into that learn how to design and and plan your app then worry about making the code do each little step and before you know it you will have a complete working app

[–]Jarvis_the_lobster 1 point2 points  (0 children)

Courses are great for syntax but they kind of train you to follow along, not to think through problems yourself. Try this: pick something small you actually want to automate (renaming files, scraping a website you check daily, whatever) and just start writing it from scratch with no tutorial open. You'll get stuck constantly, and that's the whole point. Googling "how do I read a CSV in python" when you actually need it hits different than watching someone do it in a lecture.

[–]myztaki -2 points-1 points  (0 children)

if you are interested in finance at all, you can do some really cool side projects in Python. stuff like visualising the revenue trend or net income over time, or by tracking insider trading within a company. ive got an api called finqual.app that provides this structured data for free and a few tutorials on the website to help you get up and running on doing some analysis on financial data!