Overteaching - an error

Teach one thing at a time. An intuition that many have when teaching is to start at the foundation and strictly work upwards. In programming this translates to working with languages that reveal to you some aspects of the hardware, brick by brick, and thinking about things like how to retrieve stuff back out of your ram. The all-knowing-already teacher intuits that in order to understand one thing you should understand everything else holding it up. This is obviously untrue when you give it any thought. You don’t need to understand the details of fluid dynamics to be an expert engine mechanic. You don’t need to grep math proofs to manage global scale financial systems. We operate our whole lives almost exclusively in abstraction layers with no idea whatsoever about the scaffolding holding it up. ...

December 4, 2017 · 3 min · 571 words · theelous3

Wtf is self (in python)

Let’s say you wanted to design a useful little machine called a widget, and start producing them in a range of colours. First thing you’d do is design a blueprint. In Python, writing a class is much like writing a blueprint for something. Let’s write our widget! class Widget: pass Well. That was easy. We could start producing these widgets right away if we liked. first_edition_widget = Widget() second_edition_widget = Widget() third_edition_widget = Widget() Nice! We have our widgets. Each widget is an instance of Widget and is its own object. We don’t yet have a way to give our widgets a range of colours though. Giving our class an __init__ method will enable us to initialise each widget with a colour. Let’s do that, and then create a red widget. ...

August 19, 2017 · 4 min · 655 words · theelous3

Concurrency in python, a primer.

Some Terminology I/O i/o (input/output) is pretty much any operation that requires getting data from outside of your computer’s RAM. (Usually means getting stuff from your hard drive, or over a network.) Hard drives and networks are physical things which need to be accessed, and as such they are extremely slow relative to running computations, or accessing things from your blazing fast RAM. The performance of an i/o bound task is dependent on the devices and interfaces between you and the resource you want to access. This could be kilometers of copper wire maintained by pigeons, or it could be your uber-fast SSD. ...

June 2, 2017 · 7 min · 1408 words · theelous3