How to Turn Python Dreams into Reality: A Beginner's Compass to Success

How to Turn Python Dreams into Reality: A Beginner's Compass to Success

Overview

"The journey of a thousand miles begins with a single step." - Lao Tzu

Greetings. This article outlines my initial endeavors to learn Python. I share some of the difficulties I face while balancing my job, family, and more. Consider it a coding diary with a touch of formality. If you find this article lengthy, feel free to jump to the "In a Nutshell" section at the bottom to get some useful tips on how to get started yourself. But remember, skipping it means missing out. Oh yeah, I am trying a bunch of different smileys in this post to better express my emotions😝. I hope you don't mind. Anyway, enjoy your read!

Introduction

"The only way to get started is to quit talking and begin doing." - Walt Disney

...and so I did, just like I planned to even before I wrote it in my previous post, Future-Proofing My Career: Embracing Python as a Non-Developer. How am I doing? Well, I am not sure. Sometimes I think I’m making pretty good progress, and sometimes I’m frustrated because I am way behind where I planned to be. Is this normal? Probably. Will I learn from it and improve? I will definitely try. Here is the story so far. Maybe you can relate to me, and maybe you can even help me get better. Even if not, I sure hope you can still enjoy the read and perhaps pick up a few new insights.

The Python Beginning

Setting out on this journey, I quickly found an easy way to get started: I booked a course on Udemy. It received many positive reviews, and I still believe that it was a good place to start. The course is indeed very informative, and I don’t regret it at all. I'd love to share a link with you, but alas, the Udemy Affiliate Program seems to think I'm still in 'affiliate training wheels' mode. So, no link for now! There is a ton of free content on the internet as well, by the way.

The first step, of course, is the installation of Python. This was pretty straight-forward and easy. There are actually many different ways to accomplish this.

Next, you need a coding environment. As my course suggested, I went on and got Jupyter. This is a type of open-source digital notebook for writing and running computer code. It lets you mix code, text, and even visualizations in one place. That really makes it great for learning programming. I love it.

I learned pretty quickly that it is very good to know a few of the keyboard commands. You use them constantly. Since I have difficulty memorizing it all, I plan to create a printable cheat sheet with the most common ones.

Around this time, I also stumbled across GitHub for the first time. This is a tool for developers to collaborate. Fantastically interesting; I will absolutely use this more in the future, but it is regrettably very distracting as well😖. Maybe more on that later.

Python Basics: A Solid Foundation

The basic objects and data structures were the first real Python concepts I discovered. It makes sense to put this at the beginning. These are essentially the building blocks from which all the code is made. Integers and even strings are straightforward to understand, but as soon as you get into sequential types like lists or tuples, things all of a sudden become a little less clear.

Even though sequence itself just means that the information is stored in a specific order, understanding the utility of what that means took me a little while. It also required a few examples and exercises for me to fully grasp a concept like mutability vs. immutability and how that could be useful.

Shortly after that, while learning the way Python handles variable assignment, it became clear for the first time why Python is regarded as an easy-to-code language. Unlike most other programming languages I have known so far, Python makes use of a concept called dynamic typing. This means that you do not have to define the data type of a variable when creating it, and you can even reassign the type later on. As variables are such a big part of coding, besides making it very fast to use them, it also improves readability, but at the cost of increasing the chance of bugs in more complex code.

Another very useful thing I learned early on was that most objects come with built-in methods, which are essentially object-specific functions that you can call to perform actions on the object.

As these concepts of objects, variables, and data structures are so fundamental, I believe it is essential to memorize as much as possible and to know them all by heart. Therefore, I wrote much of it out in detailed notes and reviewed the lessons over and over again, all the while fine-tuning things like my indexing, slicing, and string formatting skills. This was, of course, kind of a drag because the area of application of just the basic concepts is rather limited.

Mastering Control Flow and Libraries

Learning about the concept of control flow was the point where things got a bit more complex, but it was also where the fun started for me. Control flow is all about making decisions in your code, thereby making it adaptable to different situations. It really is as essential to programming as the rudder is to a ship. Yes, I like sailing.

The first key players here are "if" and "else" statements. I imagine these to be similar to crossroads in code, where a program can take different paths depending on certain conditions.

The second major type of control flow I learned about was loops. You can automate a number of operations using loops.

“For” loops let you iterate over each element within an object of data. Iterate means to repeat something in computer nerd language. Oh no, am I mutating already!? List comprehension is kind of a neat shortcut here that is well worth looking into, but this reduces the readability of code pretty quickly.

“While” loops, on the other hand, are used to repeat a process or function as long as a certain, defined condition remains true.

It was not difficult for me to imagine how these statements and loops would offer me many new possibilities. But it did come at the price of a whole new layer of complexity. Only practice and repetition will help master this, and I am still working on it. But the good part is that at this point you can actually create the first functional programs, and that is the whole point, right?

At some point here, I also stumbled across libraries for the first time. Though I have merely scraped the surface of this topic, I have already read quite a few things about their marvelous powers. Python Libraries can be seen as pre-built tools that contain a multitude of additional functionality written by smart, highly motivated folks to save me time and enable me to become superhuman at coding at a yet-to-be-determined point in the future. So far, these superpowers are limited to creating a random number and shuffling the order of a list😉.

The Challenge of Functions and Methods

I had come into contact with a few useful methods at this point. Methods are basically commonly used, object- or data-type-specific, built-in functions. They are very useful and enable many cool things to be done with them.

In interactive environments like Jupyter Notebook, you can simply type the object name followed by a dot and then press the Tab key. This will trigger an auto-complete drop-down list that shows all the available methods and attributes for that object. That is a neat little trick.

Anyway, built-in functions are only a minimal part of the endless opportunities you can get with functions in general. The main use case is that you build your own. What do they do? In a restaurant kitchen, you could imagine them as independent chefs. They're separate blocks of code that you call when you need them. You pass them some ingredients (arguments), and they whip up a dish (return a result) for you.

Functions exponentially increase the possibilities of coding. They are the links that enable you to write completely functional programs. Of course, with this immense scope of opportunity, my little happy, easy-to-understand Python World kind of came crashing down on me😬. Well, no, that is not true. It's just a thing that takes a lot of practice to master. And that requires more time than I had anticipated.

Facing Reality…

So after about 3 months into the subject, I have only managed to accomplish about a quarter of what I had initially wanted to achieve. I have identified several factors (or are they excuses?) that contribute to this. These are:

  • I probably set an unrealistic goal to begin with, as I am new to the subject. I do have a 9-to-5 job, a family with three kids, and other hobbies as well. Did I mention we were on a summer vacation in between?
  • I get distracted easily, as diving into the world of coding just opens up so many new fascinating opportunities (blogging being one of them).😂 wait! HTML, wait! CSS, wait! SEO, wait! affiliate marketing, wait! AdSense, wait!… How interesting! Don’t get me started on AI!
  • My priority is quality, not speed. Which means I really want to get a deep understanding of the subjects. I believe that if I don’t build a solid foundation, I will never be able to build crazy-cool stuff. This is not a mistake, but it means I need way more practice exercises. I might just be a slow learner.
  • I don’t have a good learning routine. Right now, I do this whenever I find time in between. But the problem is that the larger the gaps between sessions, the more time it takes for information to stick to memory, which again requires more practice. What a vicious cycle😩!
  • [Placeholder for further “justification”]

… and Dealing with It

So, I am behind schedule, for good or bad reasons; it does not matter why. To be honest, I’m not overly concerned about it. Why not? Several reasons and countermeasures:

  • I am not giving up on the subject; far from it. I will attempt to take a more realistic approach, for sure. It is really a matter of focusing and setting priorities, and I don’t even think my priorities are so badly balanced. This is just one of many setbacks yet to come, and I will treat it accordingly. Persistence is key.
  • I will break the whole coding journey down into smaller milestones, setting a few dedicated milestones for the rest of the year. These include
    • the establishment of a frequent, almost daily practice routine to stay on top of things. This will be a small time investment of no more than 10 to 15 minutes. I will leverage ChatGPT to create custom exercises of ever-scaling difficulty. Naturally, I will explain how to do this (see the next bulletin point).
    • making use of a lot of the thereby gained information and experience to build on and enhance my upcoming email course on the fundamentals of Python, which is another task I aim to complete that does have lots of synergies.
    • finishing milestone-project one from my Udemy Class
  • I will also cut down on the roughly 100 other ideas I have until I have succeeded in the above three things. This will be the toughest thing to do, really😄. So it might be a while before another blog post appears here.

In a Nutshell

So in order to get started on becoming a master of coding with Python, consider the following:

  • It is easily possible to learn the basics of Python within a few weeks, thereby glancing at its’ potential and getting a feeling for whether it is worth continuing
  • There are numerous ways to get started, many of which are free. My upcoming email course is certainly one of the best😉
  • Getting really good at coding still requires a lot of practice
  • In order to be successful, set realistic and specific goals
  • Stay focused on the goals and follow through with persistence
  • Establish good learning routines and stick to them
  • Sign up for my email course on the fundamentals of Python once it launches

Closing Thoughts

Well, I’m very excited about what lies ahead. Hopefully, within the next few weeks, I will be making some solid progress on the above-mentioned topics.

In Python, next after this will be the topic of object-oriented programming. I also want to continue my AI Series, digging deeper into algorithms, machine learning, and what AI really consists of. Hopefully, I can summarize my research in a simple and easily understandable way.

And then I still have a few other topics I would like to share some thoughts on and/or research deeper into. These include things like philosophy, what I learned and tried about physical and mental health, maybe personal growth, life hacks, parenting, etc., just to mention a few.

But this is it for now. I hope you enjoyed the read. Let me know if this was helpful to you or if you have any additional helpful advice for me. Your feedback is, as always, very welcome.

Thanks for reading. Until next time!

J.D.

© 2023 | J.D. | Let's Learn, Code, and Thrive!

Comments