What a New Programmer Can Learn From a Proper IDE

This is a love letter to JetBrains.

I am a Virgo, and although I have zero esteem for astrology, I have to admit that some of the characteristics on that list describe me eerily well. For one thing, I am extremely organized. I love schedules, and I hate breaking them. I also love when things are done in a specific way. Doesn’t have to be a particular way, just a consistent and specific way.

“closeup photo of eyeglasses” by Kevin Ku on Unsplash

These quirks of mine rule my coding style to the most fundamental of levels. Style-guides are my bible. I want to know if the open curly bracket sits at the end of the line or it has to be transferred to a new line. I want to know the best way to break a line of code to fit in the under-eighty-characters rule. In other words, I have an obsession with code-readability and correctness that borders the thin line between “helpful” and “unhealthy”.

What’s more, I think that those skills should be learned and sought after from the start of one’s journey down the coding rabbit hole. Once a nasty habit settles in, it’s very difficult to get rid of. It’s much easier to shape good habits when none exist. This is where the right IDE can make a huge difference.

For my first year or so of programming with Python, I kept jumping from text editor to text editor, from IDE to IDE, never being fully satisfied. This went on until one day I met the one. Its functionality was robust, it rarely disappointed, and it always knew what to say to make me feel better. I’m speaking of PyCharm.

JetBrains’ IDE has thought me a lot about programming in Python.

Remove redundant brackets.

Watch out for unused function parameter.

Keep an eye out for potential shadowing of outer scope variables.

And some more advanced tricks as well!

The type definition for Python3 allows PyCharm to catch instances where you’re trying to pass an int to a function that was originally intended to receive a string. (FYI, similar functionality is available in the lawless land of JavaScript with JetBrains’ WebStorm IDE!)

Don’t forget your docstrings, which is a check not activated by default.

Along the same lines, never use triple single-quoted strings for docstrings, which, to my great horror, I have witnessed employed in wide-use on a project I intended to work on… in the past.

These are but a few of the many checks that PyCharm performs on your code. You can checkout and customize the full list of inspections by going to Preferences… -> Editor -> Inspections. Of course, the IDE performs a plethora of logical error-checking as well. However, I have chosen to expose its more subtle highlights, the ones focused on style, mainly because logical errors will be caught one way or another. Readable code and proper documentation can be kicked to the curb in the short run but will save you hours of frustration if mastered and applied early on.

Ever since I discovered the sweet pleasures of a proper IDE, as soon as I decide to pick up a new language, the first task on the list is to check out JetBrains website for an IDE. They usually have one. And bonus for University students like me: free IDEs for us!

Proper code crafting is built from the fundamentals up, so do yourself a favor and pick up the good habits from the get-go.