Skip to main content

Command Palette

Search for a command to run...

Don’t Start Coding With Python — Begin With C

Published
•5 min read•View as Markdown

Python is amazing for its ability to promote programming. It delicately endorses the proverbial “if you know English, you should know how to code” idea. Python makes other programming languages look useless with its English-like syntax, indentation paradigm, and extensive libraries. Python is the default programming language of “the sexiest job of the 21st century.” Yes, data buzzwords still make data scientists “sexy,” although the current circumstances wouldn’t fully support that claim. Impressively, Python happens to answer most if not all data science problems. Python is also popular in blockchain, DevOps, and cybersecurity. The hype around Python is growing exponentially. The language is used as a coding medium in countless online courses and academic programs. With that said, and despite all of Python’s promises, the language isn’t a viable choice to test the programming waters. C is a better option. In this article, I will lay before you the reasons why you should use C as a starting point rather than Python. Start Strong My thesis supervisor once told me, “Always start strong. The first punch decides the fate of the fight.” Python is a high-level programming language. This means that Python enjoys a high degree of abstraction, allowing for a smooth connection between the user and the language. In other words, the Pythonic interpretation mechanism tends to tolerate errors other programming languages are likely to flag. No variable declaration, no column chase, auto casting. All of this enhances the programming experience and makes Python user-friendly. Interestingly, Python’s benefits are also its drawbacks. This “ready-to-eat” approach cultivates a fragile programming mindset that endorses impatience and laziness. C, on the other hand, is a mid-level programming language. It sits between low-level programming languages (assembly, machine languages) and high-level languages (Python, Ruby, etc.). Practically speaking, this makes C harder to write than Python. However, it is worth the grind. C displays a genuine picture of what programming looks like. C programmers endure hardship to get their code up and running, and that instills good programming habits. C developers are known to craft comparatively organized, clean code with meticulous care. And because the process of building such skills takes place pretty prematurely, they tend to impact not only C coding but also prospective programming endeavors altogether. Simply put, C is a great starting point because it sets a solid programming foundation for aspiring developers. Computer science fundamentals such as dynamic memory allocation and data structures make programming an arduous journey, but developers will reap the rewards of their efforts down the road. Unrealistic Expectations What breaks my heart about Python is the unrealistic expectations and false hopes it sets upfront. Many people trust that Python is the golden ticket to their career aspirations, hence the rising wave of people looking to master the language. For example, only the other day on a Facebook group, I stumbled onto a post by a seven-year-old kid looking for data science freelance jobs. He attached a Python online course certificate as proof of his programming proficiency. Now, I’m by no means underestimating this boy, as many young developers produce code denoting programming mastery. What made me cringe, though, is the idea of looking for a job at such a young age. Having seen that, I realized that the tech arena has radically changed. Now everyone wants to master Python for the promised lucrative jobs. I’m not saying that it’s Python’s fault. It’s our fault. It’s our fault because we tend to set the bar too high and act as if Python is the be-all and end-all. Realistically, it takes more than willingness and a programming language to thrive in today's unpredictable world. Take the economic downturn caused by the pandemic, for example. The crisis turned the job market into a battlefield. This, in turn, crippled computer science graduates who once used to get hired without entering the job-hunting hurricane. Therefore, unless you went beyond a stupid certificate and worked your fingers to the bone, you won’t stand a chance. It’s as simple as that! “Be realistic: Plan for a miracle.” — Osho C is a good option to train your fingers as well as to get your brain in gear. In the end, at least you will get an idea of the challenges awaiting you down the road. Python Is Cooked in C Python is nothing more than a bunch of rules. The rules that govern Python could be implemented in some languages. Usually, we concatenate the abbreviation of both the language used and Python to denote the implementation. For example, we have C for CPython and Java for Jython to name but a few implementations. The most popular Python implementation is in C. As such, a fair amount of C knowledge would certainly come in handy when deciphering Python code. On top of that, a decent number of Python packages like NumPy are written with C and its younger brother C++ to address efficiency drawbacks because Python is dead slow in comparison. It’s true that when one gets used to a lightning-fast runtime, they become more sensitive to slow-executing programs. This leads to a propensity to produce efficient code — whether with Python or another programming language. Takeaways I have worked with more than five programming languages in my lifetime, with C being the first and Python the last. While I am grateful for the old-fashioned C's programming foundation, I’m certainly not biased towards C. My doubts concerning learning Python first were cleared while working with “straight Python” developers. What I noticed is that most (not all) of the developers I interacted with lacked refactoring skills. They hardly took runtime issues seriously and all they cared about was having a functional code. In reality, coding is more than that. At that moment, I realized that behind the Python makeup, there’s an ugly face. A face that could’ve been prettier if it had been meticulously cared for from the beginning. In summary, the path to Python mastery becomes less steep if supported by a C mindset. Thanks for reading. I hope I didn’t step on any toes. Good luck coding.

R

Thanks for sharing your point of view! It makes me see further...

However, I'd like to say that I started programming with Java (which was the mainstream at the time), then I came across Python, it was a game changer for me. So far, I could put things running and generating value much faster. So, this was creating motivation to keep learning and creating new things. In the other hand, Java was boring and had all the time the feelings everything is hard, I needed infinity things before I could create something up running...

Cheers!

1
D

Thanks for sharing. (One more thing : my favorite language is java)

1
K

I really liked your arguments about this, I started my "real" programming journey when I was about 10, I decided to learn Python because of all the buzzwords about how Python is the best language and how Python will get me a job at some major Silicon Valley company when I were to grow up. (funny that 4 years later I'm working as another profession)

After learning Python and doing some projects, I decided to learn a "big boy" language and learned C++. Learning C++'s syntax was pretty difficult, not because of how C++ is structured but because of how out of place it felt. Switching from Python to C++ hit me like a freight train, and of course objects caught 12 year old me off guard.

Anyways, nowadays when some friend ask me about them wanting to learn a programming language. I just direct them to either Nim or C. Both are amazing languages, specially Nim. As it offers a taste of what "real" programming languages are, while keeping a simple to understand and fast syntax.

I'd also like to add some (constructive) criticism to your post and its that Hashnode allows the use of Markdown on posts. Reading though your post was kind of hard and distracting (specially when you have ADHD heh). So I'd suggest the use of paragraphs, line breaks and some Markdown stuff (like headers and dividers). Outside of that, your writing is amazing and I'd love to see more of it.

1
D

Thanks for sharing your experience and suggestions 🥰

1
N
Nekoto5y ago

I... have been persuaded, I must say. Clicked on this thinking, what's he on about? But now I actually understand your argument, and have really nothing to say against it.

Just, one minor, really small problem - using paragraphs in the writing makes it much easier to read, the whole article felt like a massive chunk to read through.

I started with Python as my first language :/ However I've been wanting to take up C or C++ as a new language to learn, they seemed like a good challenge with very rewarding outcomes, and I think this article has solidified that decision.

Perhaps as long as there is a will to learn, the grind should be a little easier at least? In any case, this was a great read! Thanks for sharing :)

2
D

thanks for your words

1