The 5 Hour Rule
Over the last few decades, a cottage industry has sprung up that examines and dissects the habits and values of “self-made” millionaires. One of the key findings that comes up again and again is known as the “5-hour rule.” In short, this is the rule where we spend one hour a day learning, reflecting, and thinking. We do this five times a week (which makes up the “5-hour” rule). The rule dates to Benjamin Franklin, who would devote (at least) an hour each day specifically to learning something new. Franklin would rise early to read and write. He even set up his own club of artisans and experimenters.
Going back to school
It's been twenty years since I started at Georgia Tech to study Computer Science, and it's been over ten years since I was a professional programmer. So, I figure, I'm going to check out Harvard's CS50 for refresher and updating on programming thinking & theory.
Personal tutors are a good investment
However, the most striking of the findings is that under the best learning conditions we can devise (tutoring), the average student is 2 sigma [standard deviations] above the average control student taught under conventional group methods of instruction.
…
This is the “2 sigma” problem. Can researchers and teachers devise teaching-learning conditions that will enable the majority of students under group instruction to attain levels of achievement that can at present be reached only under good tutoring conditions?
I've seriously considered hiring a personal tutor for both chess and foreign language study, I just have never pulled the trigger on it. This gives me more motivation to do so when I am able to.
I continue my efforts to learn Python, tonight's project was to implement a calendar function. Python has a built in tool that does this, but it's about learning the language and implementing the tools for it. I was able to do it in about 60 minutes, with most of that being troubleshooting errors and learning some of the requirements for Python.
As I come from PHP, getting used to strict typing on variables is a big learning for me.
One of the common pitfalls I fall into is naming my files an obvious filename, which ends up being also something I import. For example, tonight's file was originally called 'calendar.py' but since I am importing the calendar library in python, it was erroring. So it got renamed to cal.py.
Here's the code I came up with:
import calendar
from datetime import datetime
date = input("Enter Date: ")
dt = datetime.strptime(date,"%m/%d/%Y")
header = datetime.strftime(dt,"%B %Y")
weekday = int(datetime.strftime(dt,"%w"))
date = int(datetime.strftime(dt,"%-d"))
month = int(datetime.strftime(dt,"%-m"))
year = int(datetime.strftime(dt,"%Y"))
firstDateOfMonth = int(datetime.strftime(datetime.strptime(str(month)+"/1/"+str(year),"%m/%d/%Y"),"%w"))
lengthOfMonth = int(calendar.monthrange(int(year),int(month))[1])
print(header)
print("[Sun][Mon][Tue][Wed][Thu][Fri][Sat]")
line = ""
if firstDateOfMonth > 0:
k = 0
while k 6:
print(line)
line = ""
k = 0
filler = " "
if i == date:
filler = "*"
if i This code outputs a simple text calendar such as the following:
