How I Learned Python and Made the Switch to Linux

I see the ads online...

Become a web developer in only 24 weeks!

Developer Bootcamps are a good way to learn the basics. No doubt. But don't expect to become a web developer in a matter of weeks; or even months. That will take you years and years. There are no shortcuts.

I have been doing web development for more than 25 years and I'll be the first to tell you, I know nothing. Ok, maybe not nothing, but very little...

How did I learn Python and make the switch to Linux?

In 2014, I had burned out on Microsoft, Windows, ColdFusion and SQL Server. It just wasn't fun anymore. The workplace in which I had an office had become a completely toxic environment. I needed a break. I had some savings. I decided to take a sabbatical.

I spent a year doing nothing other than having fun and finding new hobbies. I took a big trip across the country. Visited Vancouver in British Columbia and cruised the 101 from Olympia to San Diego with my girlfriend.

When I got back; I tried to get back to the computer but my heart just wasn't into it.

I worked a retail job for a little while. That was a much needed wake up call.

I knew I needed to get back to my development work. I started to look at my options for something new and exciting to learn. At first, Ruby on Rails seemed like a good option for me. I worked on several RoR tutorials. For whatever reason, the language just did not click for me. Although, I love the build and scaffolding features of a project like Ruby on Rails, it just wasn't for me. I continued my search for the right dev stack.

Python, on the other hand, was easy to read and understand. I could play with Python functions and methods in the REPL. Importing libraries was ridiculously easy and there is practically a PyPi library for anything and everything your heart desires.

This made way more sense to me. I ditched my Windows PC and laptop and installed Ubuntu on everything I owned. Completely immersive learning. Jump in and start swimming; or drown.

If you have not used Linux or Ubuntu Server, start now. You can thank me later...

I started working on Django projects and tutorials, learning the Python standard library, code structure and nuances of the language. I spent a lot of time getting up to speed with Python virtual environments and correct project architecture. I already had 25 years of development experience on which to draw so the transition from Windows to Linux was pretty smooth overall. I did not have to re-learn SQL, only a Python library for databases.

I could not believe how simple it was to use Linux package management. Everything in Linux is just better. If I want to install MySQL, it's one simple command and two setup questions. No product keys to configure or per CPU licenses to install. I'm up and running in a minute or two.

Fast forward 6 months. I'm hitting the top of the arc of the at-home learning curve when I happen to spot a job posting on Indeed. A technology company in Oviedo, FL was looking for a junior Linux, Python, Django web developer. What an opportunity this could be for me. Well, as it turns out, they had just hired another developer by the time I inquired about the position. I missed it...

A few weeks later my phone rings. It's Wayne at the Labs. He tells me the new guy isn't working out and they want to meet. I go and meet with the two principals and I explain that I am an experienced developer new to Python and Django. They like me and I am offered a consulting position. Now I'm getting a nice paycheck to continue the learning. A sweet deal, no doubt.

A month later, I start working on-site at the Labs on their wireless sensor project. I spend a lot of time with Wayne in their Oviedo office learning everything I can. He is one of the smartest people I know and is a great resource for idea refactoring. The Labs developed their own radio and now I'm getting into Arduino, Raspberry Pi and ARM programming in C. The front-end radio receivers are Node.js apps and I get ramped up on Express, pm2 and debugging Node apps.

At first I am a totally overwhelmed by the sheer complexity of their Django back-end. I start profiling all of the Django components and start creating a list of best practices I had learned over the past year at home with Two Scoops of Django, among other Python learning resources.

Turns out, this is exactly what I needed to break the ceiling of the self-imposed learning curve arc. From now on, the learning curve is completely vertical.

I have achieved lift off.

I spend every day for the next year in the Python REPL. In order to figure out what some of the more complex functions were doing, I had to work them out in the shell. Then I start doing all of my coding in the shell first; before I ever start writing any code in my IDE. I spend 6+ hours a day at the Labs developing their consumer portal. I'm now confidently fixing things that are not working correctly. And I start adding new features and improving the existing.

1 year becomes 2 years. The principals at the Labs are very happy with my work.

I start taking on new clients and expanding my portfolio.

Today, I am well into my 3rd year with Python. I absolutely love it. Earlier this year, I completed my 5th professional Python project for a new customer.

I don't use Django as much as as I did before. I prefer the lightweight flexibility of Flask and I have really embraced Celery automation as a core part of my application development. SQLAlchemy is my new best friend.

I only wish I had made the switch 10 years ago instead of 3. Maybe I wasn't ready for Python back then. Who knows. I found my way.

The main takeaway...

To learn anything, you just have to stick with it. No matter what it is.

My Path to Learning Python.

Write basic functions in the REPL. Call your functions.

Look up a great learning resource called Public Data Hacking. Super cool stuff. Learn parsing XML docs using lxml.

Scrape some web data using BeautifulSoup or requests-html.

Get a Weather Underground API Key and build a project.

Get a FREE IPStack API Key. Learn GeoIP. Parse JSON.

Use this free service and requests to call Fake User APIs and parse the results, add them to a real database, send fake emails, process them through Celery, play with the data.

Write reports in SQL, then convert it to Alchemy. Run queries in DataGrip. Save the results to CSV.

Parse the CSV results and perform modifications and alter the dataset, save it to another database.

Write BASH scripts that run automated cron schedules to upload the database dump to S3 using s3cmd.

Write Python scripts that call a Remote API and updates some dataset. Schedule the script to run on a specific cron schedule. Emails or text the results using Twilio.

Clone this repository and learn how to use the Bitcoin tools in the shell and in your own projects.

Learn blockchain with this cool demo, written by @anders94 in Node.js.

There are many free services. Sign up for a mLab account and get a 500MB MongoDB for FREE.

Use pymongo to read and write to a document database.

Consume API's with requests. Parse json in the shell and send output to text files.

Read and write text files.

Read and write CSV, XML and Excel.

Write API's.

Consume those API's.

Learn Tkinter. And Qt.

Just use the REPL every single day (for at least a year). Even when you don't feel like it.

Create a small project. See it through.

Then you'll become a better Python web developer.

EDIT: The learning never stops. I'm now starting to build beautiful API's with Go and Goland.

EDIT 1.5: I also managed to become a Git expert in the 2 years working in a team environment with a couple of other devs. Git is awesome. GitHub is my choice.

EDIT 2: Get the community edition of PyCharm. A 100% FREE IDE for your Python dev needs.

All JetBrains products rock. Get DataGrip, a SQL IDE, while you are there.

EDIT 3: A complete Python development environment in Visual Studio Code

Craig Derington

Secular Humanist, Libertarian, FOSS Evangelist building Cloud Apps developed on Red Hat Enterprise Linux and Ubuntu Server. My toolset includes Python, Celery, Flask, Django, MySQL, MongoDB and Git.

comments powered by Disqus