30
We should rethink how we teach people to code
(deadsimpletech.com)
a community for posting cool tech news you don’t want to sneer at
non-awfulness of tech is not required or else we wouldn’t have any posts
What do you suggest to learn instead? I'm teaching myself python because I wanted to understand coding more. Also because a lot of the tinkering with micro controllers can be done with micro python. So I have things I want to do with it too, future projects I want to create.
Funnily enough like the article mentions I taught myself HTML first in the early 00s. I did enjoy it but never used it much outside of the odd geocities website. This article does make me think maybe I need to revisit that too.
I also considered other languages to start on like maybe some kind of C or Basic but ultimately python felt like it was the most popular suggestion for newbs. I can always learn other things later.
I don't think you'll be broken by learning Python, but in my opinion to be a good programmer you need to understand at least one layer of abstraction lower than what you're implementing. So, as an example, once you learn how to code in Python using idk
numpy
, you absolutely must learn hownumpy
works under the hood. And that means C, because you cannot escape C.I teach people Rust and I always say that you kind need to know the nightmare that is C/C++ to be able to fully appreciate what Rust does for you and how it builds a much more sensible programming model on top of the same set of basic concepts we use and have always used to talk to silicone. And then you can write web apps with Rust and never even touch a raw pointer in your life, but it will make you an infinitely better Rust developer if you understand what's going on below you.
This works surprisingly well across the entire SE stack IMO, e.g. if you're using React you should be fully aware of the layer below you - raw JS and HTML. If you're coding in C you should be aware of assembly and memory models. If you're using SQL to query a database you should be aware of logical plans. If you're a project manager you should be aware of what software engineering entails and what people in your team actually do day-to-day.
There is nothing wrong with learning python in general or as a first language. My gripe is more that if you self teach it with no software engineering thought, you end up with some real bad habits that lead to bad code, like:
So as long as you avoid that you might be good.
Also specifically with micropython: it’s good to get something working, just don’t expect it to be fast. And if you want it to be fast, you’re going to have to learn C.
Those are some valid points and definitely things I'm trying to be mindful of. Especially since I'm just teaching myself and at this point everything I'm doing is in a vacuum by myself, but if I want to get to the point where I can share my code and work with other people on projects I need to be doing it in a way that it's understandable to anyone else (and myself).
I think the next thing i'll lear will be C it seems a lot of what I want to do needs that too, so that will be fun. Thanks!