Skip to main content

Posts about study (old posts, page 1)

Study, Day 3

Morning

Lets see what this day holds :)

French

  • Did a review session
  • Made 15 flashcards

MITx, 6.00.1x, Introduction to Computer Science and Programming Using Python

  • goofed off on twitter and read articles on blogs instead of studying
  • learnt about tuples.
  • it’s been an hour & a half and I am still terribly distracted.
  • doing the dishes to regain focus. be back in 30.

Nope. cannot focus.
Annnnnd now there is no power. This day is done!
Will just sit at the window and enjoy the rain :)
Hopefully tomorrow is a better day.


Study, Day 2

Just did the MIT course all day today, because my next problem set is due tonight and I did not want to fall behind again.
Got distracted a bit, but a lot less than yesterday with the way Nikola renders headers, and youtube videos of sausage making :P
Now that I am going through the class, I realise programming is not what I imagined.
It is at once, much simpler and a bit more complex than I thought it to be.
More than that, I realise I can do this. :)

The day isn’t over yet. Will attempt to solve the problem set at night.

French

  • Did a review session
  • Made 25 flashcards

MITx, 6.00.1x, Introduction to Computer Science and Programming Using Python

  • Good programming
    • More code is not necessarily a good thing
    • A good measure is the amount of functionality, the utility, your program provides
  • The notion of abstraction
    • like a thing you know how to use.
    • the details of how it is internally are irrelevant to you
    • the box provides utility and you know how to use the controls to get what you want. that is all that matters.
    • like a phone. or a tv. or a scooter.
  • The notion of decomposition
    • i can take all those dumb black boxes that I know how to use
    • and mcgyver them together to do something I want.
    • use independent pieces of codey things that each do something and then glue them all together to get the program I want
    • or to invert, can i break my big problem down into small independent pieces that I can write, or use other folks’, that I can stitch into my own little frankenstein?
  • Decomposable Code, divide code into modules that
    • are self contained
    • are reusable
    • keeps you and the code organised
    • keeps things coherent
    • can be done with functions or classes
  • Abstractable Code, build a black box that
    • cannot see details
    • does not need to see details
    • does not want to see details
    • hides the gory details from you. or just the fact that your magical thing is made of small boring pieces :)
    • can be done with function specifications or docstrings
  • One new aspect of functions I learnt was that they have specifications.
    • Thinking back, it’s a well, duh! point, but I’m glad I learnt it explicitly.
    • there’s a contract between me, the author of the function, and its users
    • there’s a set of assumptions that the function has. this is what I expect, this is what I want, these are the values you need to pass, this is what the environment needs to look like, what is the phase of the moon?, yadda, yadda
    • and if those assumptions are met, there are guarantees I can make about the output.
      • pass these numbers in, in this sequence, and you will always get this output. put the dough in the oven, when the new moon is rising, and you will always get delicious pizza
    • in python, a docstring documents what the function assumes and guarantees. good programmers do this to help other folk using the function and to save their own future dumb selves
  • I learnt recursion
    • from what i understand, this means that i take something i know and then use it to repeatedly tackle a complicated problem, if said problem, lends itself to being broken down that way.
    • break it down until i reach a step where i know i can do all of the operations on my own.
    • multiplication is a good example.
      • I know that if when a*b when b is 1 is just a.
      • so I can write a function that keeps adding a to itself while decrementing b until b reaches one and et voilà, that value of a is my answer
      • I got that backwards. I know that i need to repeatedly add until b is 1. so i just keep adding a to a function that just asks if the value of b is 1. if not just add a to that same function where the else states that I reduce b by 1. when b is 1, i just return a which will be the first of the added as and the function then begins looping outwards and backwards adding a. I realise I have horribly explained it, but it’s somehow more intuitive and more elegant to my mind and fun to watch, so I’ll let Professor Grimson do it much better than I can
      • I still don’t totally get it, but I get that this is cool and makes tackling hard problems easier. Hopfully more understanding will come with time.

P.S. A note to student planet readers, if you miss some posts in that feed, check the site to see if I wrote anything (or manually subscribe to the main feed.) I might be uncomfortable pushing certain language or frustrations of mine to other learners at large.


Study, Day 1

Day 1 is an disaster of fantastical proportions.
I did lots of stuff.
But I got nothing of consequence done.
Save one big thing.
I managed to buckle down and study for six hours.
That counts as a win, a big one in my book.
Will hopefully get more done tomorrow.
If you are following this blog, the days might soon seem out of sync.
That’s because I’ve decided that Wednesday, Thursday and Friday are my days of study. Monday & Tuesday are for work, while Satuday and Sunday are for home and family.
I need to practice what I preach and have margins and boundaries in my life.

French

  • Created cards and a review sesion

Python Problem

  • I decide to tackle this first thing in the morn and sank like a stone.
  • I yak shaved for 2 hours (git issues, setting up a dedicated desktop space for study, rsync issues, syncthing issues, crontab issues, more git issues)and then took nearly another hour trying to remember things and then by the time I had some idea of how to tackle the issue, it was lunch time. Hopefully better luck tomorrow

The MITx, 6.00.1x, Introduction to Computer Science and Programming Using Python course

  • I am hopelessly behind and playing catch up.
  • Already missed the deadline for the week one exercises.
  • Hopefully will be all caught up by this time next week.

I learnt

  • that iterables are things that can be counted. like beads in a string, or on a rosary.
  • strings are a form of iterable.
  • Bisection searches to find square roots are much more efficient than having to go slowly guessing our way up.
  • I should not compare floating point numbers (e.g. test for equality). Their internal representations might just be subtly different. Instead use the absolute value of the difference of the two floats. abs(x-y) instead of x==y
  • Start with a basic set of code, check to see what it runs on, and then see if small changes to the code can solve other similar problems or improve the efficacy of existing ones. (Newton-Rhapson better to find roots than Bisection guess better than incremental exhaustive guessing)