Programming, learning and teaching.
Pass me the hammer: how people deal with errors in Python
Imagine three people building a house, A, B, and C. A finds and gives tools, C uses the tools, and B makes the logistics of passing things from A to C. If everything goes perfect, then: B to A: Can you please pass me the hammer? A to B: gives them the hammer A to C: here you go C: Thanks! works with the hammer class Hammer: pass class Screwdriver: pass class Nail: pass screwdriver = Screwdriver() nail = Nail() def A(): drawers = {"screwdriver": screwdriver, "nail": nail, "hammer": Hammer()} thing = drawers["hammer"] return thing def B(): thing = A() # get something from A C(thing) # give it to C # C finishes their work, so does A A(), B() and C(thing) are all functions. Hammer, Screwdriver and Nail are stand-ins for real objects with more interesting methods. But the world is, as you know, imperfect, so things can break at any point of the chain. Here you will find several cases one could possibly encounter in the wild and ask: What is best? More robust? Faster? Convenient? ...
Concepts of Hugo
Learn Hugo efficiently! 90% of Hugo explained in less than 25 key points.
Hello World
Hello World! Welcome to ΔY. The name of the blog represents moving forward one small step at a time. The idea is to talk about programming, learning and teaching. Enjoy!