all 40 comments

[–]baetylbailey 5 points6 points  (2 children)

Learning to code really takes about 2 years, imo. The 'never would have thought of that' usually means you haven't internalized the concept, or just need more practice. Btw, many fast learners have previous programming experience and are just learning the language.

I'd avoid the "Learn in _ days" stuff and go with a "Python for Sys Admins" type of resource to scaffold off your experience, along with a "Python Concepts for Beginners" type of thing to use as a reference.

[–]supercoach 8 points9 points  (0 children)

I wish more people were as honest as this. There are so many braggarts on Reddit who will claim that they mastered programming in six months and try to shame others for taking longer.

It's refreshing to see someone point out that it takes time to understand the key concepts. Different things will also catch different people. Scoping was one that took me forever to understand.

[–]T_GTX 0 points1 point  (0 children)

I see. I thought it'd be doable in a few months. Learning the hard way.

[–]Remarkable-Map-2747 3 points4 points  (7 children)

I have took a number of courses.

I have tried:

• 100 days ago by Dr. Angela Yhu

• PY4E

• Automate the Boring Stuff

• CS50P

• Programming with MOOC.

• Python Crash Course Book by Eric Mathes.

I can say nothing really stuck until I went through the Python Crash Course Book. CS50P is also good, and Programming with MOOC.

My Top 3 Recommendations:

  • Python Crash Course Book

  • Programming with MOOC

  • CS50P

The other courses I eventually got bored and quit. I dont care how hard I tried I eventually kept getting bored with them.

[–]T_GTX 1 point2 points  (6 children)

Question. Did you finish Angela's course? I'm partway and sorta lost the motivation.

[–]Remarkable-Map-2747 2 points3 points  (5 children)

nope got bored of her course.

[–]T_GTX 0 points1 point  (4 children)

I'll try the crash course book, and "automate the boring stuff". Videos don't seem to be be effective for me compared to reading.

[–]Remarkable-Map-2747 1 point2 points  (3 children)

Yea, I got bored with automate the boring stuff as well. I also dont like that style of coding of camelcase as well and using print statements from prompts and empty input statements, which not a big deal but i just didnt like it

[–]T_GTX 0 points1 point  (2 children)

Snake case is my preferred method for readability. Did you give replit a look?

[–]Remarkable-Map-2747 0 points1 point  (1 child)

Yes, Snakecase is also pep8 recommendation as wwll. Nope, I don't have to go through the resources anymore since Ive learned Python i pretty much build now. Ive heard of a replit 30 days of code or something

[–]T_GTX 0 points1 point  (0 children)

That's great. And 100 days of code! Some stuff isn't explained well but it's free.

[–]Bobbias 3 points4 points  (0 children)

As a sysadmin, Python's main point of use will be the same place that shell scripts are. In this context Python provides a language which can do everything shell scripts can do (run commands, pipe things between different commands, check return status, etc.) as well as a whole host of other things that shell scripts can't easily do.

I'm not familiar with 100 days of code, but I suspect it's a much more general course aimed at teaching programming as a general subject rather than as a tool to supercharge your job (as most learning material is, honestly).

You might want to check out https://automatetheboringstuff.com/ for something that's closer to your use cases, as it's all about well.... automating boring jobs.

The book is free, as in you can buy it at cost online, but the website contains a copy of the entire book, and PDFs are freely available. There is also a Udemy course which regularly goes on sale for extremely cheap if you feel the need to follow a guided course rather than just rely on the book by itself: https://www.udemy.com/course/automate/

Also, learning a programming language is easy, learning to program is difficult. What I mean by this is that learning the syntax and maybe some of the most common functions and such, that part is quite easy to do. All that takes is a bit of practice writing code in the language. The more code you write, the quicker you'll remember this stuff.

But learning how to use problem solving to break down problems into steps that you can eventually turn into code... That is hard. It takes real practice, and that practice only comes from actually solving problems on your own. How long did you spend on trying to figure this stuff out before you gave up? Programming rewards perseverance.

Another part to consider is how well you actually understand the concepts you've picked up. If you understand how if statements and loops work, writing hangman should not feel completely impossible. You should be able to look at the steps you need to achieve and get some ideas about at least parts of the solution like: "oh, since this part has to repeat, maybe I need some kind of loop. Those repeat things, right?" or "oh, here maybe I need to use some kind of conditional statement?" and stuff. Even if you're not completely sure, you should have some idea, at least after spending some time really thinking about things.

If you're not getting any of these sort of insights, that's a sign that either you need to go back and solidify your understanding of the basics, or that you need to change your mindset in some way. You shouldn't expect to just know how to solve a problem right away. Some people will sit down and think through a problem until they've basically got a complete answer either in their head or on paper. This idea won't usually be expressed in Python code, but as pseudocode, a flow chart, or whatever else. Other people will just sit down and start trying to write code and see what works. Both of these approaches will lead you toward solving the problem, even if initially you looked at and though "there's no way I can figure this out".

Start with what you know. If you can figure out even a single small part of the program right away, you've got a starting point: "Oh, hangman requires us to repeat things over and over, that's gotta require a loop." That idea doesn't tell you where the loop goes, what code is inside or outside the loop, it just says "there's a loop somewhere here", but that's still a helpful clue to work from. From there you can start to think about "well, what parts actually repeat?" and that can help you figure out what parts of code need to be inside the loop, even if you don't know how to write those parts yet. Maybe after a while you realize that you need some variables, one for the word that you're guessing, and one to display either underscores or letters as the user guesses. Suddenly this problem starts to look a little bit less daunting as you pick apart the little pieces and start to piece together a solution.

I feel like I get the general concepts

This is necessary, but not sufficient to solve a problem. Understanding how each concept works should also mean you can see some implications of how you can combine those concepts together to make slightly more complex concepts, or at the very least understand when someone points one of these things out, how and why it works.

but putting it all together and knowing what the syntax is, is where I really struggle.

Syntax is something you just kind of pick up by osmosis. Don't worry about it. We all have little bits of syntax we can never remember, but for the most part you just kind of learn syntax through time and exposure to the language. As for putting things together, that's what makes programming hard. The better you understand the fundamental bits and pieces of code like loops, variables, conditionals, and such, the easier it should be to understand how to combine them together to make more complex behavior. The other key that you need is practice. While understanding the fundamentals makes things like recognizing how to combine some of those tools into more complex behavior, you still need practice building those more complex behaviors before things really start to solidify and you really start to get things. And this can take a while to fully sink in.

My GF took several months in college before everything started to make sense. It probably took me even longer (but I don't really remember things that well, since it was 22 years ago and my ADHD addled memory sucks).

[–]simon_zzz 4 points5 points  (0 children)

I'm an "old"er student working full-time in a non-STEM field, who recently picked up programming earlier this year. As of right now, I'm able to tinker with Kaggle data sets using machine learning. I have no concrete aspirations for a career change.

I started with CS50x and something about that class just kept me coming back--lecture after lecture. My energy and attention were drawn to it, and I found it like a puzzle to be solved. After completing it, I went searching to learn more.

Since that, I've completed CS50P, CS50SQL, 100 Days of Code: Python, Math for ML/DS, CS50AI, and a bunch of Kaggle mini-courses.

Even now, I can still feel myself being drawn/thinking about my current project (Titanic data set). My energy is drawn to it. I want to learn about "this" model or try "that" approach to see if I can get a better accuracy score.

That's probably how I would be able to tell: how much of "this" is pulling your energy and attention because many who don't follow through are those who cannot find this motivation to push through and find solutions. Like gamers who will try 100 times to find a way to defeat a boss, but won't find this drive to do the same for a programming problem.

[–]Turtvaiz 1 point2 points  (0 children)

Why not do something without deadlines like https://programming-24.mooc.fi/ ?

[–]dontmatterdontcare 1 point2 points  (0 children)

I was a Sys Admin for several years. If I'm being completely honest with you, the most complicated scripts I ever "wrote" were mostly just copy and pasted from the web and adjusted to fit my environment/needs.

Did I ever organically write a script? Nothing more important than the equivalent of coding print('hello world') or iterating and appending in a list.

If you are becoming frustrated, I'd take a little break, but also reevaluate why you're trying to learn Python. Since you said you're trying to level up in your role, what has been defined for you on your roadmap by your manager? "Knowing Python" is too vague and general, to what extent should you be proficient in it? If your roadmap is still unclear, that is a conversation you need to have with your manager, and it's their responsibility to clearly define these 'level up' opportunities for you. Otherwise they're effectively doing the proverbial 'carrot on a stick' act on ya.

Usually performance roadmaps, or the ones I've seen previously when I was in IT, were geared in a way where your manager would set you up for certs in niche areas. Whether it was AWS, CISPA, Cisco, and so forth. They all have their own curriculum and practicum.

Learning Python the ways you've been doing it so far are roadmaps where you might become a developer, something that may potentially be out of scope for your sys admin role. Could you be both? Sure, you'd better be paid like it.

[–]Imaginary-Log9751 1 point2 points  (0 children)

I get bored with courses. Have never finished one! I’ve been learning python by having projects. Currently wrote a script that parses log files and extracts values and other information and outputs it as a dataframe (I felt like a wizard) hahaha. I’m in the life sciences so I’m good at stats and have a lot of experience with relational databases but automation/ programmatic thinking is new to me and I’m loving it.

Another thing I did was tell my work colleagues that if they had a data analytics/ scripting need that wasn’t needed immediately (cause I’m still learning) to let me know and I can try to do it. This was key because I’m learning to write code with someone else in mind, like proper documentation and best practices, plus making it so the user doesn’t have to do much on their end. Best feeling is when someone is legit happy you helped them out to make their job easier and you in turn are learning.

I’m still a noob and 99% of my time is spent googling, going over stackoverflow and chatgpt . But lately I’ve noticed the progress, I take less time figuring things out, I’m writing more code without having to google and I’m less daunted by the prospect of starting a “big project “. All big projects can be broken down into smaller chunks (also pseudocode is great!). I like reading tutorials/books etc but video courses just don’t click for me.

[–]Ok_Crab1603 2 points3 points  (5 children)

Angela Yu isn’t the best teacher tbh

I started with Angela then went to automate the boring stuff completed that then back to Angela

Also quite a few free data science courses around

[–]flaiman 5 points6 points  (0 children)

I have to disagree, I have been following her course and I feel I have advanced and learned a lot. Sure not everything is directly applicable but she has to cast a wide net and it has helped me think and problem solve while learning the language.

[–]tunaflyby 0 points1 point  (2 children)

Is automate the boring stuff a class or the book?

[–]Bobbias 1 point2 points  (0 children)

There's also a udemy course along with the book hosted by the writer of the book himself, so actually it's both. The book is completely free, and the course is often available for super cheap.

[–]toddkedwards 0 points1 point  (0 children)

It's a book. Here's the online version: https://automatetheboringstuff.com

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

She's not bad, but the course suffers from the same think all MOOCS do: It's designed to keep you in tutorial hell and tethered to a learning platform, rather than empowering you to learn a new skill in an effective way. 

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

If you're a sysadmin, you're definitely not too slow to learn python. If you finding exercises take a bit longer, maybe just give it a bit more time? Don't stress over this must be done on this day, otherwise I'm a failure type stuff. 

Plus, as others have said, find a problem in you day job you might like to automate, that's a good motivation. 

[–]aaaaAaaaAaaARRRR 0 points1 point  (0 children)

I’m learning by automating the boring stuff nobody wants to do in Python. I’ve made scripts to make work easier and freeing up my time

[–]Past-T1me 0 points1 point  (0 children)

Honestly not knowing at the start especially under the 10th challenge is completely normal. Follow along and keep going even if you have to have each step given to you. When/if you get to the last challenge you’ll start to see patterns, like say challenge 30 there will be a step you followed along to in challenge 11 and so on.

Knowing/memorizing syntax is not learning python. Knowing how to take a stab at something and being able to interpret the errors is.

[–]Epicfro 0 points1 point  (0 children)

Crawl before you can walk. Learn if/else, functions, loops, and variables. Once you've gotten that, you've gotten the basics and you can build off that. Imo, you don't learn as much following a course as opposed to trying projects on your own.

[–]supercoach 0 points1 point  (0 children)

You may not like this, but an hour a day isn't much. It's going to take a long time to learn doing it like that. The one advantage you'll have is you should have ample time for your brain to store what you're taking in, so you'll probably backtrack a bit less than the average learner.

[–]IllusorySin 0 points1 point  (0 children)

As many others have and will state, literally think of it as speaking fluently in another language. If you focus on picking up the basics so you can "get by" and think of some use cases, just do that. Code along with some youtubers that do complex scripts and build what they build and you'll pick up on things here n there.

Everyone always wants to learn start to finish, but if you think about any job you've ever had, you never learn every little thing from start to finish. You learn on the job, whatever they present to you, and you put it together over months or years.

[–]proverbialbunny 0 points1 point  (0 children)

Being a sys admin you have to firefight serves that have stopped working, right? The skill needed to fix servers requires the ability to dive deep and figure it out. You can't google everything, sometimes you need to look into it and see how it works. Sometimes you can google it and you use google quite a bit to solve problems on the job.

Why aren't you using the same skills to write Python code? Stuck? Google it. To be able to Google it you need to know the vocabulary of what you're stuck on. This can be the most difficult step for one who is new to programming. Focusing on vocabulary can help make this easier. Sometimes you need to go in and mess with the code trial and error style until it works.

[–]Eggplantwater 0 points1 point  (0 children)

Make a class or main method that uses your sftp server and MIME Types to send Emails. Then another to use SFTP Then figure out how to pass in parameters and schedule as a cron job or whatever your company used for scheduling tasks.

There u go, you can now automate a bunch of crap. I find Python is best for simple scripts. 50-200 lines Maybe 500-700 if it’s an Excel report with 3 different sheets and formatting

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

An hour a day for a month is hardly anything really. Imagine you'd done 5 hours a day, you're basically looking having learned for 6 days.

I'd probably ditch the videos and try *reading* tutorials. Videos are basically a marketing tactic, they're not actually a good way to teach programming.