Python in the Cloud

[T] Finished Automate the Boring Stuff... Now What? 3 Essential Non-Python Skills Every Developer Needs

I’ve completed Automate the Boring Stuff With Python… Now What?

So you’ve finally worked your way through the majority of “Automate the Boring Stuff” and feel like you’re starting to get the hang of Python’s syntax and just how useful programming can be. You’ve used Python to send automated emails, scrape webpages, generate PDFs and organize files.

You know that you still have a long way to go before you become a “real” developer, but don’t quite know what comes next.

In this “Finished ATBS… Now What?” series I’d like to explore what comes next in your path to becoming a developer.

Although the programming path forward depends on the individual (a topic for a separate article in this series), there are some essential skills that all programmers are expected to be well-versed in. Now that you’ve finished ATBS and have gotten a taste for what programming can do, now would be a great time to dive into some of the skills to support your code.

I know, I know, you’re ready to dig into the meaty python libraries – Tkinter, Numpy, Pandas, Matplotlib, Tensorflow… but hear me out here

"Why can't I eat it?!"

Not only will learning these skills make you more employable, but they will also make the programming path that you carve for yourself much easier (even if you are not wanting to become a full-fledged software developer). Think of it as learning how to eat healthy and nutritious food to support your career as an NBA player: essential, even if it isn’t as sexy as practicing your layup to make you the star of the next playoff game.

1. Version Control (Git)

Git Example Image

You need a place to store your code that is not only immune to you spilling your morning coffee all over your laptop, but also immune to any “genius” changes that you may make to it after you get your program working (think of it as a giant “undo” button when used properly).

If you’ve ever desperately wanted to “just go back to how it was working a couple hours ago” you will find that Git soon has a special place in your toolbox – allowing you to confidently pursue changes without ever worrying about destroying what you currently have working.

Git’s advantages don’t stop there. Once you start working with other developers the last thing you want to be doing is sending ZIP files back and forth over email. Both working on code in the same file? Good luck finding out what parts of the file your partner modified so you can manually merge it in with your changes. Instead, you want them to be able to make changes to the code base safely without overwriting the changes that you are making (even if it’s in the same file).

You don’t need to become a Git wizard to start seeing the advantages of Git in your programming journey – Head on over to GitHub and make a free account. This tutorial series should get you started on the basics, and I’ve found SourceTree to be a great Git GUI on Mac and Windows.

2. Automated Testing

Automated Testing Image

Photo by Chris Liverani

As you write your code, you’re probably already used to the process of “testing” whatever it is you’re working on to make sure that the computer is following your commands correctly. You probably have print statements scattered throughout your code to ensure that variables and functions are returning expected values. Every time you make a small change to your program, you run it again to make sure that the output and printed statements are correct.

The problem with this approach is that as your program grows, it becomes harder and harder to make sure that all sections of your code are running correctly. Do you really want to manually verify all of the variables on every run?

Additionally, as soon as you add teammates this problem becomes even worse. You don’t know how their code is supposed to run because you didn’t write it. What happens if you need to change a function in your teammate’s code

def get_username_for_customer(customer):
  return customer.username

to

def get_username_for_customer(customer):
  return customer.username if customer.username else customer.email
def get_username_for_customer(customer):
  return customer.username if customer.username \
      else customer.email

Can you be confident that you didn’t break any of your teammate’s code? Can your teammate’s code handle an email address?

Automated testing (which also includes “unit testing”) is a way to make sure that your code is functioning correctly by automatically calling your app (and functions within your app) with different inputs and making sure the output is correct.

Automated testing is often one of those things that seems like a waste of time to do as you’re writing your code because it just seems like extra work when you know your code is running correctly (the print statements are showing the correct values after all!). It’s value doesn’t really show itself until you need to make a change to the app 3 months down the line when you don’t even remember what def get_username_for_customer(customer) does or how it’s used. Remember the “teammate” we mentioned above – that teammate is often you in the future (so treat your future self kindly)!

Unit testing is a form of automated testing where you write additional code to “verify” that functions return the correct value. Instead of manually checking your print statements as described above, your tests will automatically check those values for you every time you run them.

For more information on Unit Tests, Corey Schafer has a fantastic 40 minute tutorial on YouTube about it using the unittest python framework (really anything from Corey Schafer is fantastic – I highly recommend you to check him out if you haven’t already).

3. Deployment

Deployment Image

Photo by Taylor Vick

Once you’ve finished writing your application, you are going to want some way to share it with other people. For example:

Deploying your first app can be extremely intimidating to new / intermediate programmers because it can require so many skills related to IT, but that are not quite programming. At some point you’ll be asking yourself:

Learning how to deploy your app securely and correctly will not only make you invaluable as a programmer (businesses need your application to be runnable on something other than your personal laptop), but will also greatly improve your programming skills. As you learn more and more about how to deploy your app you’ll start to gain a better understanding of just how your app is running, instead of just being a magic box that prints hello world to the screen when you press the play button.

Next Steps

Subscribe to my mailing list where I will be taking a deep dive into not only how to deploy your application to the cloud, but also why certain deployment methods fit certain applications better than others.

Although knowing the newest python libraries will help you get a job, you’ll also need to have confidence that you can actually deploy the applications you write with them so your business can get the most benefit from them: