How to Become a Python Programmer at the Age of 44? Ruslan’s Story
Hello everybody! Today I want to share an interesting story about how Ruslan become a Python developer at the age of 44.
I want to share my experience and tips on how I learned python from scratch at the age of 44. After 6 months of honing the skills, I made quite good progress. I’ll also a bit present the program I created to see my level better.
Table of Contents
Why do I want to share all of this?
Many people I know who are a long way from programming ask me the same questions over and over. How is any of this possible? What does it mean to become a programmer? How do you get started and what specific steps does it take? Turns out many of them seem to be thinking the same thing yet don’t have any way to set it off. You are not sure about what exactly it takes and what challenges you may encounter along the way. I have since come to understand that sharing my experience is not only possible but necessary in some way. You’ll also find tips on how to tackle challenges. Honestly, I wish I had known the tips before starting. They wouldn’t be that hard-won.
Getting started with the three important elements made it easier
Programming at University. I did study programming, the only thing that it was back in… 25 years ago in short. I wrote programmes in a now almost dead Pascal language.
Knowledge of English. Upper-Intermediate to Advanced
Spare time. With my working schedule, I was able to spend 3 to 18 hours daily in order to acquire the skills.
Real Life Progrgam
The best way to learn how to program is by having a real task to tackle. You know when there is an urge and no way you can dodge completing it so whether you like it or not you end up searching for ways how to get it done. It was exactly my case. I have a small business, it’s an offline shop. During the 2020 pandemic at a website builder, I created a very simple free-of-charge internet shop. For the record, web builder has nothing to do with programming.
However, since it was the simplest and cheapest internet shop it was not in any way connected with the 1С accounting software. This is to say, I had to manually insert the sales and if I am honest, it was quite a headache for me as well as the shop assistants. That’s a heck of a lot of work to manually enter the data on a daily basis, right. So I thought this definitely could be somehow automatized. I mean taking SKU and number of sales from 1 excel sales report table and importing the data into a different CSV table which later would be uploaded onto the internet shop. This was exactly the task I set for myself. After doing some googling I discovered that this kind of task i.e. operations with excel flies can be easily performed with the help of Python. Got it, say no more.
First Program – Hello World
The very first and simplest program traditionally written by novice programmers is Hello, World! Literally, your program is supposed to type on the screen these two words- “Hello, World”! What I did was I downloaded it from the official Python website, installed and run it. Next step I typed Hello world. All is working. However, it seemed weird to have a white window and nothing more. I mean I remember 23 years ago there was a special program where you take your time with editing the code but here I see something else. I went to ask Google this dumb question – “which program do I use to code in Python”. That’s when I found out what IDE was – an integrated development environment.
IDE is a software application that provides convenient ways to do coding. You start the program and see how it helps you in every possible way. Underlines errors, and gives you prompts on what you want to write there. Sort of Microsoft Word the only difference is not for writing text but programs. There are various means to code, for various languages and tasks. I desperately googled again and ended up choosing PyCharm. Yeah, I really like it. It’s convenient, cool, and free of charge. After downloading and installing PyCharm, it made much more sense. I run the program here, I launch debugging there. Surprisingly though, the program can’t be turned into an executable file (.exe) I have always thought that I first should create a .exe file and then launch it. The truth is, Python is a so-called interpreted programming language, not a compiled one which means it is not the language that you turn into .exe files. So just like that, you launch PyCharm and you receive the result. Well potentially you could create an .exe file but it turned out it is rarely practiced. And here is why: there is simply no big need. In case you want to calculate it for yourself, well it’s up to you. If you’d like to share the program with someone and are thinking to send it over email – we don’t do that, not anymore. If you want your program to be used by others, do it in the app. I never thought in those terms.
After Hello World I lost myself in reading a book about Python, for two weeks. There is a great deal of such books out there, I downloaded one from the internet and I liked that it was expressed in a simple and clear language. So I went like this, as I learned something I would try it out in PyCharm. The best part is that you could acquire the basics as well as the core of the language in a week or two. The main thing is to understand the fundamental principle of programming. All languages have the same basic concepts: cycles, conditionals, variables, data types. The languages differ in syntax and some details, but the basic principles are all the same for all languages.
Where To Get Started?
Here is some practical advice for you: study the string operations. Why? Number one, you are definitely going to use it in every program you do. Two, it will greatly speed up language acquisition. It’s true that the books will definitely mention object-oriented programming (OOP), just skip it. At the very early stages, you don’t have to delve into it. So, we know the theory, now what? How do you actually write the code? At this point, I again turned to Google in order to learn how to read excel files in Python.
The Art of Google
In general, googling as a skill, the ability to find the required information is one of the most vital skills a programmer should possess, all the more a beginner. I am serious, all the answers to your questions are on the Internet. The main point is to be able to find them quickly. Even though it may seem you are dealing with a rare case, something tameless and obscure, I assure you that thousands of programmers before you have most definitely encountered this issue and put this question on the Internet to receive the answer. Therefore, Google should be your go-to assistant at all times. Learn how to correctly formulate search queries. Say, you are not sure how to sort the dictionary by keys. So you type in the phrase ‘Python dictionary by keys’. Can’t find the answer? It means the request wasn’t correctly formulated. Go give it another try. The rule is simple. Write the name of the language, or else you will see answers related to other languages, then write exactly what you want to do. For instance, ‘Python excel file’ or ‘Python change directory’ etc. If your programme gave out some kind of error and you are not sure what is that about, copy it and add the language name, e.g. Python name error name is not defined. Also, and this one is important, keep in mind that programming languages are constantly updated and there is a whole lot of out-of-date information on the Internet. What, for example, used to be Python 2.7.0 may be different in Python 3.0, that’s why it’s important to check the date of the answer. 5-year-old posts should be viewed with caution. You’d rather look at the most recent answers.
What is this? And this is one of the oldest, coolest and biggest website with questions and answers on a wide range of topics related to computer programming languages. On the whole, the global programming community is quite welcoming and is happy to help and share information even with beginners, no one would ever mock you just because you don’t have sufficient knowledge. What’s more, they will share a link with an existing solution or figure it out, and it comes with great examples. I can’t even remember a time when I had to write a question, I have always been lucky to find ready-made answers. This is what I would definitely recommend to you, not to write your questions right away, but to look around and into the solutions. Let me repeat that again, absolutely all answers to your most unexpected and hard questions already exist. The main thing is to correctly enter the request into the search engine. If there is no answer, that means that the request wasn’t formulated correctly.
How Stack Overflow works?
So you’ve entered the question and you see an answer. What I usually do in the first place is I read the title, and if it matches my query I just stop there, I don’t need to dive deep into the actual issue someone has, or read their code. I move straight on to the answer and I choose the most upvoted one. As a rule, a decent response will be concise and unequivocal. Kudos to those people who give brief and clear answers with examples. There are lots of answers and comments to look through in order to find the solution. Keep trying.
Another powerful source of information is Youtube. There is a good bunch of lectures, tutorials, and webinars to name a few. In the beginning, I listened to a huge number of people who shared their knowledge on all topics, starting from general issues like how the Internet works or how to do searches, how the memory in Python is allocated, how to write a clean code and up to very niche, with that Hindu guy who explains in broken English how he animates the menu items in HTML and so on and so forth. Now back to my task which was to read an Excel report and write it down into a CSV file, which later would be uploaded onto the internet shop. In the process, I came across an answer that it’s simply impossible to accomplish with the help of Python alone, or rather it is possible but it will be long and tedious. It’s far more convenient and faster to use a certain framework specially written for this type of task.
A framework is an additional library, an extension to the programming language core which provides it with special features. That is, someone has written for you huge pieces of the programme which in turn will significantly make things and life easier. You just need to install the library, import it to your project and use it with pleasure and enjoyment. The only thing is that you would of course need to study the framework documentation, methods, how it all works, and see what is helpful and what’s not. The value of a programmer lies actually in the knowledge of various frameworks and understanding which and when is best to apply. If you have a look at programming vacancies, for example in Python, you won’t find a single vacancy which would require a programmer solely with Python knowledge. They all list libraries you need to know, like Django, Flask, SQL and so on. Small libraries are not usually listed though. It is implied that you know them by default. It will take you half an hour to master them. Thus, I wouldn’t suggest you settle down if you have learned Core Python. There is a vast ocean of libraries which are waiting for you to also be examined well.
I google, open excel and write CSV and I find out that it can be done with a few frameworks, for example, openpyxl, xlrd and pandas. So I chose the latter, firstly because I liked the name. Secondly, it’s the most powerful library for data science, that is, for operations with large data arrays. Another thing is that for my simplest task the capacities of pandas were too extra, it could have been much easier to do all of this. I am glad though to have mastered pandas as I now use its features in pretty much every programme. If you master pandas, it will be a big plus to your CV. The main feature, if I put it simply, is that when you load the data table pandas will give you limitless possibilities for working with selection for any fields and under any conditions, and it is done very quickly. So I figured out my programme and how to create an excel file followed by a new CSV file and after that, for a couple of weeks, I was coding. My programme was expanding, this was no longer 10 or 15 strings, the count went up to hundreds of lines. At that point, I remembered some important rules from my university studies. It’s not enough to simply write a programme to make it work, it should be written in such a way that it makes sense to any programmer who reads it. Or even you yourself after a couple of months when you get into your code. Such code is called beautiful or clean, whereas ugly code has various names, “spaghetti” or dirty code.
What is Clean Code?
Indeed, what makes a good programmer, is the ability to write clean code. When you will be applying for jobs they are going to have a close look at the programms you previously created. Purity will be of crucial importance. “Clean code” by Robert C. Martin is a cult book, and although it’s quite old and is not about Python, it describes all of these basic rules of clean code. I did read it, I wouldn’t recommend it to you though. You better find Youtube lectures with the most important principles and that will do. What is the main purpose of clean code? It is to make it readable and very clear to another programmer or when you look at it after a while. Furthermore, the text of a programme can be understood by even non-programmers. A well-written code can be read just like a text in English. Have a look at this statement.
You follow the instruction: If the post has more than 100 likes, highlight it as popular. It’s all clear I am sure even to non-programmers. The main point is to name the variables correctly. If we didn’t take care of the cleanliness of the code, we would just name the variable as ‘X’ and function as ‘func’. It would take a while to sort things out. Now, this is a very simple example. Picture a programme with thousands of strings where dirty code is likely to harm and ruin the development process. Learn how to write it clean from the very start. Cleanliness is the crucial point.
How exactly do you keep the code clean?
It is to give the variables proper names, which would make sense and give an explanation on which variable it is and what it actually means.
Also, do your best to ensure that the functions perform only one explicit task. If the function is count_table_rows which means it counts the number of the lines, it must actually do the calculations and nothing more. If by any chance you add something else, say opening or closing of the file, or even an assignment of a global variable, what you get is a dirty function. This may lead to troubles in the future. It’s like you want to change a car wiper on your rear window but it causes AC to stop working. For Python, there is a set of rules or rather style guide known as PEP. It helps you write beautiful code. PyCharm also drives you to stick to the rules and highlights in case something goes wrong.
Back to my programme. A month or so after I had started learning Python the programme was ready and I began to update my online store in a more automatized way. I was very glad that I got to write my very first helpful programme and it made our life easier as we were using it every day. The task was solved and I was thinking what to do next. I was eager to go on programming and I came across this website https://codewars.com/
Tasks on Codewars
It is a kind of website where you will be given small programming tasks so that you practice by tackling them. The level of difficulty varies with the nature of the tasks, from simple to more complicated. And the best part is, you get to see how the same task was solved by others. It may be frustrating to see that the task you’ve written a programme using hundreds of lines and a smart cookie (I am saying in a good way) out there did the same thing but with a coupe of lines. Sure thing, it is so attractive to be able to come up with an elegant solution. These examples give you great practice. Always go and check for how others cope with tasks.
The Last But ot Least
The first months up to half a year you should be absorbing tones of information. Choose learning over Instagram. Use the chance any time you’re stuck in a traffic jam, your playlist can wait but the lecture on how memory in Python is distributed will serve you right. Before sleep choose reading about bubble sort algorythm instead of scrolling the feed. The very beginning as you just step on the path will be decisive and push your coding practice for you to either become a great programmer or not. If over 6 months all you’ve learned is doing calculations or simple operations with string it will not be enough. You gotta immerse yourself into education. You’ve tackled Core Python? Great, now go to frameworks and choose a popular one, try your skills nd never stop learning. Your goal must be breaking through as far as possible.
This article was prepared using the next video https://www.youtube.com/watch?v=XThWZuEOCNE