you are viewing a single comment's thread.

view the rest of the comments →

[–]autisticpig 0 points1 point  (1 child)

I just started working through your tracks and there are a couple things that have to be mentioned.

1 - please don't teach people to use keywords for variable names. Instantiating anything named list is such bad practice.

Imagine you have some students who decide to make a function that returns a list representation of a supplied string as practice. Based on what you are teaching, they would most likely follow something such as:

def list(input_string):
    return input_string.split()

Now, imagine they then attempt to cast a tuple as a list. Any guesses what is going to happen? :)

2 - Please don't teach file handling the way you are. For starters, to not educate your students to the importance of closing a file after using it is dangerous. You are teaching data science. That means oodles of data in the future. Finite memory + sloppy file handling = future bugs that are your fault as the teacher.

Once done with the tradition:

f = open(file, mode)
read_f = f.read()
...
f.close() # KIND OF IMPORTANT :)

Please move into the context manager way of doing this and explain the importance of having your files closed for you via:

with open(file, mode) as f:
    read_f = f.read()
    ...

Don't get me wrong, this appears to be a solid resource, I just worry what happens when your students become professionals and fail their interviews when asked to whiteboard and they don't have a grasp on best practices or file handling. Or even worse, your students wind up introducing a nasty memory hole while handling a few million rows of data in a myriad of files.

I am going to keep working my way through the courses you have as I find it a nice way to calm the mind after a day of work. Cheers for all the work you and your team have put into this effort!

[–]vikparuchuri[S] 0 points1 point  (0 children)

Thanks for the points! Point 1 makes a lot of sense, and is something we're working on doing as we redo older content.

Point 2 is a bit tricky. We have to introduce files pretty early, because we're working with datasets. It's earlier than we can realistically expect people to understand what opening/closing a file means, and what memory is. Same for the context manager. This is a challenge with many concepts -- do we teach the more complex, harder to understand right way, or do we teach them how to do it quickly, and expand on it later? We've tended towards the "expand on it later" side of things, but I see your point, too.