Empty Before You Fill.
You will have a hard time learning from someone with more knowledge if you already know everything.
It was a nice Morning, you know, the one that you wake up psyched up. Those days when you wake up before your alarm goes off. It was one of those days when I read that specific quote in a book that I had been putting off to read for quite a long time. But as I said previously,
I have time and I intend to use it skillfully and artfully.
Learn Python the hard way
I already know some bit of programming, like a tiny drop in a vast ocean 😅. I always feel like a fraud because there is so much more that I need to learn, and not so much time and space to learn it.
So I picked up a book called learn python the hard way, deciding to have shoshin, the beginner’s mindset as I go through the book and practice and learn.
My plan is simple, having only four steps to it.
- Write exercises using my text editor,
vim. - Run the exercises I wrote.
- Fix them when they are broken.
- Repeat.
Warnings, reminders, more warnings and Errors
From the very word go, there are so many warnings and disclaimers. On the first exercise, I am given a reminder that I should have my environment set up already. Furthermore I am warned not to go on if I have skipped that step as I will not have a good time, then warned and reminded that that is the last time they will start an exercise with a warning not to get ahead of myself.
Sidenote from the editor:
I might make a series out of this depending on the next few exercises. I will use pynotes to log things I learn. Right, moving on swiftly.
The beauty of learning python the hard way is I have to literally learn it the hard way. The book uses python2.x while currently the world is at python3.x. The first time I learnt python, it was using python3, so what is happening is I am going to give myself hell because i have to
- Type the exercise as is in python2
# example1.py (python2)
print "Hello World!"
print "Hello Again"
print "I like typing this." #lol
print "This is fun."
print 'Yay! Printing.' #see what I did there? Pay attention!
print "I'd much rather you 'not'."
print 'I "said" do not touch this.'- Loop through the 4 steps mentioned above 👆.
- Convert the code written to python3.
# example1.py (python3)
print("Hello World!")
print("Hello Again")
print("I like typing this.") #lol
print("This is fun.")
print('Yay! Printing.') #see what I did there? Pay attention!
print("I'd much rather you 'not'.")
print('I "said" do not touch this.')- Repeat step 2.
- Convert the code written to python3 with backward compatibility (is this even a real thing?).
# example1.py (python3 with backword compatibility i.e can be run with python2 as well)
from __future__ import print_function
print("Hello World!")
print("Hello Again")
print("I like typing this.") #lol
print("This is fun.")
print('Yay! Printing.') #see what I did there? Pay attention!
print("I'd much rather you 'not'.")
print('I "said" do not touch this.')- Repeat step 2.
The end result would be a really strung up programmer, possibly with a lot of rage 😤 to go around but who might have fun and learn so much🤪.
What is living if you cannot take risks and plough through discomfort.