A Hundred Days of Code, Day 004 - Class Attributes and Inheritance
Learnt about Class Attributes and Inheritance, today.
Learnt about Class Attributes and Inheritance, today.
Learnt about methods today.
Notes follow …
My understanding about methods? They are functions in classes that help me manipulate the data the objects contain when they are created.
Did a few exercises today.
They were simple.
Create a few classes, change them, modify them, use a list as an attribute and so on.
Notes I’ve taken from the videos I watched, today. This is my attempt at Feynman-ing (below), what I learnt so far.
Classes and Object Oriented Programming started to come together for me, when I saw Kushal using them.
To use my father’s carpentry analogy, I could in theory just hammer nails into wood to join them.
But to make a really strong joint, I could use other methods.
I could screw pieces of wood together, which is markedly better than just nailing them.
I could chisel wood and create a dovetail or mortise joint.
So it all comes down to understanding what I want to do and figuring out the best technique to get it done.
How do I begin this post?
By simply beginning :) Again!
This probably is the fourth (or is it fifth) time, I’ll be attempting to learn how to program.
And probably the same number of attempts at #100DaysOfCode.
I did 47 days last time and 37 days before that.
I will try my utmost to go the distance this time.
Because even if I didn’t complete a full run, I still learnt tonnes from all my previous efforts.
I do have a beginner’s grasp of Python.
And I hope get even better, much better, this time.
What am I going to do?
Well, I want to do Miguel Grinberg’s Flask Course, but as I stumbled through it the last time, and when I read other folks’ code, I realised that I need to get much better at understanding Object Oriented Programming.
So that’ll be the focus now.
And Reuven Lerner’s OOP Course is what is going to help me.
So here I set sail again …
Now, bring me that horizon!
Unlike #100DaysOfCode, I am not quite giving up on Emacs.
Rather that it has turned out to be a habit that has fit in, quite well, and I don’t need this accountability any more.
I use it for most of my prose (not code, yet.)
This post, is in fact, written in Emacs :)
I have not gained any modicum of knowledge by any means.
But I have enough muscle memory and immersion, to make sure I will continue using Emacs for most writing I do.
Finding Jason Blevins’ Markdown Mode was what did it for me.
I did not realise, I wrote as much Markdown as I did :)
I can move about, write, save, edit, and preview Markdown and prose.
This is enough to turn it into a daily driver for me.
The next steps now are to get more fluent in Emacs and then slowly explore all the other things I can do with it … Writing code, corralling files, and using it as an organiser!