Content tagged Self-Learning

A Fun, Maybe Useful Exercise...

posted on 2012-08-18 04:34:09

A random walk through 30 years of history...

1960s: Lisp, Simula, Algol, our hallowed forefathers
1971: Unix released in Assembly, the advent of time
1972: Unix ported to C or, the advent of Portable/Commodity OSes
1973: ML interpreter in lisp appears, the advent of Typed FP?
1974: Deutsche+Greenblatt, the advent of LispM Dreams, fast implementations
1975: Sussman and Steele, the advent of Scheme
1976: Copyright Act of 76, the advent of Proprietary Software
1977: Apple II, Atari 2600, the advent of 'hobby computing'
1978: 8086, The first BBS, TCP split into TCP/IP, the advent of networking
1979: CADR LispM paper published, the advent of Single-User Workstations?
1980: Smalltalk-80, the advent of OOP? (76 wasn't released outside PARC)
1981: Symbolics LM-2 sells, the advent of the LispM
1982: Commodore 64; Sun-1 workstation or, the advent of the Unix Workstation
1983: MSFT announces Windows; Stallman founds GNU, the advent of free software
1984: Apple Macintosh or, the advent of consumer graphical PCs
1985: Symbolics registers first domain, NES, Intel sells 386, the advent of home computing? (spreadsheets, office suites, etc)
1986: IETF is formed, IMAP is developed, efforts to add OO to Common Lisp, more standards
1987: GNU Compiler Collection, the advent of free toolchains
1988: Soundblaster, MS-DOS 4.0, a boring year
1989: General Public License, the arrival of free software
1990: Haskell 1.0, Caml Light, the arrival of Typed FP? not quite yet...
1991: Linux 0.01, the advent of open source
1992: Alpha+OpenGenera, Linux GPL'd, Windows 3.1 is released, the advent of the Dark Ages
1993: Pentium I released, the advent of the "One True"(ly bad) Architecture
1994: Linux 1.0, XFree86, Red Hat, the advent of the distro
1995: IE 1, AOL 3 hits 2 million users, the advent of the net
1996: Linux 2.0 w/SMP, Apache leads web servers, the arrival of open source
1997: Wifi+HTTP 1.1, CD-RWs+Office 97, IE 4+google.com, nullsoft founded, the advent of the modern age
1998: US v MSFT, Netscape open sources Mozilla, the 6-year browser war purgatory
1999: Google Incorporates, the advent of Search

A Summer Schedule and 10,000 Hours

posted on 2010-05-17 13:00:35

Today is the first day of my summer courses. I'll be taking Distributed Computing, Programming Language Concepts, Information Security Administration, Astronomy and the corresponding Astronomy lab and cramming all that into 8 weeks. Hooray. The Distributed Computing and PLC courses are online which helps ease my scheduling and transportation concerns somewhat...though by the end of summer there is a possibility I'll have a car again obviating my need to take public transit an hour and a half to get to campus. As it stands, classes are Monday through Thursday, start between 10 and Noon and end by 3pm everyday.

That ought to give me plenty of time to work on personal studies...but there's a problem with that. I haven't been good about making my personal CS studying structured since the great 2008 experiment/debacle. There are a lot of reasons for that experiment's failure. I lost steam studying only SICP in 2008 and not having any immediate idea how to write software that was useful to me or anybody else. Perhaps more significantly, I wound up with not only a full time job but also housewife duties in May 08 which practically ended the time and tight scheduling that had been crucial to my progress. I'm likely still going to have housewife duties but I think I can carve out enough time this summer to give things another go.

Why Bother?


Long before Outliers, many studies suggested that 10,000 hours of practice are required to achieve expertise. Peter Norvig has a post called "Teach Yourself Programming in Ten Years" that is often linked to in discussions of learning to program and it links to a few of these studies. ...but that link is, perhaps, a bit over cited and it's impact softened as a consequence. I prefer the comment by nostrademons on that post, reproduced here for posterity:
I don't think it works quite like that.

When I got my first programming job, straight out of high school, I finished tasks in 2 days that took the other programmers there 4 months. I figured that if I was that much faster than them, I ought to be able to become a world-class programmer in just a couple years (or more accurately, I thought I could become a world-class physicist in my 4 years of college and then a world-class programmer in the 2 years afterwards).

So I resolved to take all the shortcuts I could. I'd read all the classic books in the field and learn from those with more experience than me. I'd take internships with experienced, accomplished programmers and pick their brains for everything I could. I'd take on volunteer coding tasks so I could get some experience building things on my own. I'd cherry-pick all the tough courses at college so I got the best part of a CS degree without having to sit through stuff I already knew.

I did all that. I've read all the classic CS books - GoF patterns, Mythical Man Month, Extreme Programming stuff, Pragmatic Programmer, Knuth, SICP, TAPL, Dragon Book, On Lisp, etc. I've worked with programmers that wrote large chunks of curses, Rogue, vi, Jini, JavaSpaces, HotSpot, Gallery, Stratus, Equalogic, DEC compilers, Python, Google, and a bunch of other projects they don't brag about. I wrote Amherst's course-evaluation system, and rewrote the software for a 100k-user site, and wrote one of the front-page hits for [haskell tutorial]. I have that CS degree, and aced the algorithms class of which you speak, and took compiler design and OS and computer graphics too.

It's been 9.5 years since that first programming job, and it still feels like I have a really long way to go before I'm actually a world-class programmer.

The part I didn't realize, in my youthful arrogance, was that I was comparing myself to the wrong people. When Norvig tells you how to become a programmer in 10 years, he's assuming you're already taking all the shortcuts you can. It still takes 10 years. Most of the people you'll meet straight out of high school, or in most colleges, or in random companies, will never become programmers in the sense that Norvig's talking about. Eventually they'll give up trying, and start grumbling on Reddit about how the software industry is mostly boring cubicle farms where they push around Enterprise JavaBeans and never use the algorithms that they learned in college.

Let me just say, I *love* this comment. I've thought about printing it out, hanging it over my bed and reading it before I go to sleep every night just for the kick in the ass it gives me. I'm probably too relaxed to ever achieve the level of expertise nostrademons is talking about (and see the "experiment" link above if you don't believe me) but I want to keep learning. I think it is far too easy in this field to not follow both theory and practice, to either stop writing code or stop keeping up with the theory. I have a real passion and interest for programming and I plan to try to avoid that.

How To Do It


I'm not sure to what degree schoolwork, paid work or personal projects can contribute to the 10,000 hour figure. I feel like if it's not a concerted effort to get better in an area where you are weak or otherwise generate forward motion, if it's not dedicated practice rather than plodding repeated movements, it doesn't count. Many of us are adults though and if you want 8 hours of sleep 7 nights a week with social time, transit time, time to eat and time to relax then a week goes from 168 hours to 112 hours to 72 hours (after a 40 hour workweek) to less really quick.

Assuming you set aside an hour every work day (M-F) for dedicated personal studies, 52 weeks a year, it would take you about 40 years to achieve 10,000 hours. I have to assume Norvig or others would include school or a job assuming that it continued to push your limits. Otherwise, we're talking 20 hours a week (or 4 hours after work+school+etc every workday) to get there in 10 years. At any rate, I've said I'm in no rush and that I'm probably too relaxed to achieve the level of expertise discussed above. As a consequence, I'll only do 5 hours a week from 4-5pm Monday through Friday.

I'm not going to have quite as structured a study plan as I did in 2008 though I will be doing the exercises, there will be specific books I study from and hopefully I'll find time to blog about it and not just push to github. Monday-Tuesday will be Computer Systems: A Programmer's Perspective by Bryant and O'Hallaron, Wednesday-Thursday will be Algorithm Design by Kleinberg and Tardos and Friday will be Peter Norvig's Paradigms of Artificial Intelligence Programming in Common Lisp. Let's see how this goes...

Since Last Time

posted on 2009-10-19 23:04:56

Well, it seems a lot has happened since last time. An additional lisp library for concurrency called Calispel has been released and is up on Cliki. Unfortunately, it depends on cl-jpl-utils which in turn depends on cl-rsm-queue, neither of which are on Cliki. Such is life. There are good things though, a release candidate for CCL 1.4 has been put out. I've also started a branch porting Paktahn to Embedded Common Lisp. It didn't wind up being as tricky as I thought. Hopefully, I'll have something I can merge to master in a week or two. Of course, I wouldn't have gotten anywhere without Leslie. Geez, that guy is patient. Anyway, what about non-lisp news? The ACM Reflections conference is over and hopefully videos will be posted soon. Additionally, there's been some discussion about whether or not it's time for Factor 1.0. There's still really great work being done on the language implementation. I would like a proper book for it and binaries to be available in my linux distro but I can wait.

There's also been a good discussion on what math programmers need to know on reddit recently. The outstanding comments (IMO) are here, here, here and here. Similarly, there was a good thread a few weeks back titled "What do you wish you knew when you started programming?".  A few of my favorite comments are here, here, here and here. More importantly, there was a very enjoyable article and followup about Office Politics as interpreted by Hugh MacLeod and The Office. As some folks in the hackernews thread mention, the model isn't universally applicable. Yep, that's right. It's a model. Go figure.

Well, it's been a very hard week. Mostly because I just hate my Algorithms class. I don't hate algortihms just the way it's being presented and taught. I'm pretty sure I can overcome the obstacles involved, I'm just much less motivated to do so than I would like. The last two semesters I really had a fire under my butt about school for some reason. Maybe not but when I had to rise to the challenge, it was relatively easy to do so and I was kind of proud of that since it was a divergence from my past. This semester the fight just isn't in me and I have next to no pride in what I'm doing in school. I'm sort of coasting and I'm finding it hard to break out of that. Of course, I'm learning the material and I'm doing extracurricular things to improve my knowledge, joy and understanding because I care about programming. Whether that's stupid or not is another question but also kind of irrelevant, I didn't choose to be fascinated by this stuff. I just can't help it. So I'm not doing what I love, I'm doing what I can't help but do. It's gonna be a long road.

I've still been getting a few things done. I've written a few quick hackish, sbcl-dependent scripts. Maybe I'll post some of the code for them soon. I started working on Redlinux again. The last release I made was back in May and a lot has changed since then, more about my approach than about Redlinux. I'm hoping to make a new release by the end of November. So far the big change is my build process. As in, now there actually is one. It should be trivial to rebuild from scratch in the future. See what a non-distribution it is? The upcoming release should have a nice proper script for creating a new user and doing a little initial setup. Above and beyond that, I'm hoping to work on the documentation some. If anything, the real problem is it may not fit on a single CD with all the programming software I've bundled in.

A while back I wrote a post on getting an undergraduate CS education for under $1,000. It was mostly focused on which books and resources were ideal for self-study. I reworked said list and posted it on Amazon over the weekend. A lot of my decisions about what's worthwhile for self-study has changed (since I've actually read more). My motivation stems largely from the fact that I prefer self-study to school. Finally, there are two slightly older articles of mine that linked to a bunch of really interesting articles that are still among my favorite blog posts I've stumbled upon since trolling the internet for programming stuff. I'm hoping to do a real writeup on a number of these articles and add in a few of my own ideas in the near future. And since I'm calling it "the near future" you know advance I'll never get around to it. Well, hopefully not. :)

That's all for now. Back to homework guys.

SICP Section 2.1

posted on 2008-08-07 20:54:02

It's taken far too long to post this up and the last four problems remain unfinished. That said, I want to get more of the solutions I've worked written up and I shouldn't have waited this long in the first place. With any luck Section 2.2 will follow within a week. I'm around half done with it and you can see some solutions here.

Report Card, Semester 1

posted on 2008-07-22 15:58:17

So, I've been trying to do this self-study thing for 30 weeks. I probably should've stepped back to evaluate my progress before now but I've allowed myself to be distracted with other things. You know, moving out, working my first full-time job, learning how to cook, clean and take care myself. That's no excuse though. Rather than beat around the bush some more let's just get to the heart of it:
"You got an F. What the hell's the matter with you? Ya big failure.
Final Grade: 20.786516853932586%
To be fair, you would've had to do 14.0 problems a week to finish the book in 26 weeks.
They are pretty hard problems. Just keep at it man. You may want to revise your strategy though."

We're 30 weeks into 2008 and I've only done 74 of the 356 problems in that legendary text, the Structure and Interpretation of Computer Programs, which was the central object of my study this semester. That's about two and a half problems a week. Not my brightest shining moment. This whole experience definitely gives me new appreciation for the people that tried to structure and/or educate me in the past. Clearly, I need one of two things:

1) A good kick in the ass to really get going.
2) A new gameplan.

Personally, I'm going to try a mix of the two. Where 1) is concerned I recently wrote a self-study program (the biggest program I've ever written, actually) to help me keep abreast of my own progress and help me chart my course a bit. Where 2) is concerned I'm going to have to start making concessions to maintain momentum and I'm not entirely comfortable with that.

What concessions do I mean? Well, some of the SICP problems are hard. Really hard. Unreasonably hard (see Exercise 4.79 at the bottom for which a good answer is "probably worth a Ph.D."). The book has it's reputation for a reason. It's a reputation of difficulty but also of enlightenment. A lot of very smart people say it's the best way to learn Computer Science and probably the best book on the subject yet written. I'm willing to take their word for it. Anyway, there are problems that I get hung up on and I haven't been letting myself move on to the next section of the book without solving all the problems in the current section. That just isn't scaling well. I'm already hung up on the last 4 problems in Section 2.1. God knows what would happen come 4.4. I'll surely never finish the thing if I don't let myself move forward.

With that in mind, a week or so ago I did let myself move forward a bit and work on Section 2.2. I've already got about a third of it done. Maybe even half. I'm worried about this because I want to stay honest. I don't want to shirk the hard stuff. I won't move past problems unless I'm really stumped and I will circle back at various points to try to work through them. Aside from SICP, I've worked on HTDP (How To Design Programs) and CA (Concrete Abstractions) as well this semester. I got an almost reasonable portion of HTDP done but next to nothing on CA. I'd really like to try plowing through as much of those three books and The C Programming Language (rocking the 1st ed.) as possible before Xmas.

Semester 3 (starting in January) I'm hoping to work on Algorithms (DPV, not CLRS), Essentials of Programming Languages (1st edition, baby!) and one of my Operating Systems texts. Of course, Discrete Math (5th ed) would be more prudent and judging by this semester this could all be revised by Xmas. Well, back to work. Happy Hacking!

Seeking a Net Win

posted on 2008-06-19 03:36:05

Things have been really crazy lately. I've been trying to do so much and it really is hard. The real world finds ways to eat most of the time you have. It makes you small. It's gotten to the point where it's hard to find time to do anything other than maintain a few precious friendships and keep the bills paid and the house clean.

That said, I'm trying to push forward. I've gotten in touch with some professors at Northeastern University where I'd very much like to study Computer Science in Fall of 2010, ideally. I also wrote code today for the first time in three weeks. It's hard to find the time, man!

More immediately I'm looking for a new job and have an interview tomorrow morning. For a variety of reasons I'm just not pleased with my current job and I think I can grow more and be happier elsewhere. Cross your fingers for me.

Finally, Jonathan Zittrain was on The Colbert Report tonight talking about his book, The Future of the Internet and How to Stop It. I heard about it in advance and was very excited to see him speak. Unfortunately, I feel that he really botched the interview and I got into a long discussion with Ben about it. I'm pretty disappointed because there are important political issues about technology but they're rarely communicated to the public coherently and concisely and I'm no good at it myself.

I'll probably try to think of a good way to present it and give a fuller update in the next few days though. If I don't get bogged down with the promised education post or the emerging philosophy post or the big easy posts that is. Or hell, SICP 2.1. Yeah, right.

A Computer Science Undergraduate Education for Under $1,000

posted on 2008-06-09 18:52:59

In the style of my former post on a Math Undergraduate Education, this post proposes a list of texts suitable for a rigorous and well-rounded foundation in Undergraduate Computer Science. A future post will cover the philosophical details and practical implementation of such an approach.

This list skews towards theory rather than practicality (or Computer Science as opposed to Programming, if you prefer) but tries to maintain a suitable balance. Consequently, outside study of particular languages (e.g. ruby, php, html, css, javascript, erlang or haskell, python or lua) is assumed. It is advised to work on practical projects (setting up source code repositories and servers, open source software contribution, web development, etc) as applicable since these subjects are covered at best loosely during the course of study.

This list of 24 texts costs about 900 dollars when bought used off of Amazon.com. Click on the book's title to get forwarded to it's Amazon.com page. The ordering of the list loosely conforms to increasing difficulty but it is not a recommendation as to structure. I will probably delve into those details in the aforementioned future post.

How To Design Programs by Matthias Felleisen, Matthew Flatt, Robert Findler and Shriram Krishnamurthi
Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Sussman
Paradigms of Artificial Intelligence Programming by Peter Norvig
Algorithms by Sanjoy Dasgupta, Christos Papadimitriou and Umesh Vazirani
Introduction to Algorithms by Thomas Cormen, Charles Leiserson, Ronald Rivest and Clifford Stein
Computer Networks by Andrew Tanenbaum
Programming Language Pragmatics by Michael Scott
Computer Organization and Design by David Patterson and John Hennessy
Introduction to Computing Systems by Yale Patt and Sanjay Patel
Operating System Concepts by Abraham Silberschatz, Greg Gagne and Peter Galvin
Operating Systems: Design and Implementation by Andrew Tanenbaum and Albert Woodhull
The Humane Interface by Jef Raskin
Code Complete by Steve McConnell
Real-Time Rendering by Tomas M'Oller
Artificial Intelligence by Stuart Russell and Peter Norvig
Introduction to the Theory of Computation by Michael Sipser
Modern Cryptography: Theory and Practice by Wenbo Mao
Hacker's Delight by Henry Warren
Purely Functional Data Structures by Chris Okasaki
Compilers: Principles, Techniques, and Tools by Alfred Aho, Monica Lam, Ravi Sethi and Jeffrey Ullman
Lisp In Small Pieces by Christian Queinnec
Programming Languages: Application and Interpretation by Sriram Krishnamurthi
Types and Programming Languages by Benjamin Pierce
Concepts, Techniques, and Models of Computer Programming by Peter Van Roy and Seif Haridi

There are a few caveats to this list that should be noted.

1) As mentioned it does not presume to teach language-specific or platform-specific knowledge. It is slanted towards theory and books on how to write C or HTML, do Linux Kernel Development or learn the Win32 API, or work with OpenGL or TCP/IP should be purchased separately.

2) Since it does not deal heavily with specific languages, it does not make any prescriptions about what languages one should know. Generally, I believe it's good to know a language which epitomizes each of the major programming paradigms whether these paradigms are valid or not (as Krishnamurthi posits in PLAI). This means at least one OO language, one stack-based language, one functional language, and one logic/constraint language. I'd recommend Smalltalk for Object Orientation, Forth for a stack language, Erlang or Haskell for a functional language, and Prolog for a constraint language. Beyond that it would probably be reasonable to learn C as a good representation of the von Neumann architecture and "for culture" and hypothetically python, perl, or ruby to learn a web/glue/scripting language.

3) The list could certainly be shorter. It leans towards functional programming, lisp, and programming languages due to my own personal interests and some material could be omitted from those areas correspondingly. Notably, Distributed Systems and Databases are conspicuous absences from my list. This is because I have yet to find any sort of consensus about quality books on either subject. I'm not interested in Databases but I'm certainly interested in Distributed Systems. Computer Networks is about as close as this list gets.

The beauty of this list, if there is one, is that the basis is strong enough that one could jump off in any direction after it's completion. If you were interested in video games get more books on rendering and physics, if you're interested in cryptography and security get more books on that, etc, but the foundation should be strong enough for any direction you'd like to go in. This list may get updated in the future. It's far from perfect but it does seem to me like a pretty reasonable place to start.

A Math Undergraduate Education for Under $1,000

posted on 2008-06-09 15:21:48

In the next few days, I'm hoping to write an article about education that serves as a follow up to Towards a new HR and Secondhand Standards. It will explain a bit more about the feasibility and philosophy behind this post.

All this post is meant to do is propose a list of texts that are rigorous and provide a well-rounded foundation in Undergraduate Mathematics. Be forewarned that it leans more towards Algebraists than Topologists. Lest anyone think I'm a total quack I plan to eventually work through all of these myself and have been researching which math texts are good on and off for a few months now. Autodidacticism (to my thinking) doesn't work without good books. I also have a list for an Undergraduate Computer Science education but I'm not quite done with it.

There are 20 texts and their total cost is about 700 dollars when they're bought used off Amazon. This also covers most all of what you would learn in High School Mathematics. Click on the book's title to get forwarded to it's Amazon.com page. The ordering of the list loosely conforms to increasing difficulty but it is not a recommendation as to structure. I'll probably go into such details at a later date.

What is Mathematics? by Richard Courant and Herbert Robbins
How to Solve It by G. Polya
How to Prove It by Daniel Velleman
Algebra by I.M. Gelfand and Alexander Shen
Functions and Graphs by I.M. Gelfand, E.G. Glagoleva and E.E. Shnol
The Method of Coordinates by I.M. Gelfand, E.G. Glagoleva and A.A. Kirilov
Trigonometry by I.M. Gelfand and Mark Saul
Calculus by Michael Spivak
Discrete Mathematics and it's Applications by Kenneth Rosen
Introduction to Probability by Dimitri Bertsekas and John Tsitsiklis
Introduction to Linear Algebra by Serge Lang
Linear Algebra by Serge Lang
A Mathematical Introduction to Logic by Herbert Enderton
A Classical Introduction to Modern Number Theory by Kenneth Ireland and Michael Rosen
Topology by James Munkres
Topics In Algebra by I.N. Herstein
Algebra by Michael Artin
Ordinary Differential Equations by Morris Tenenbaum and Henry Pollard
Principles of Mathematical Analysis by Walter Rudin
Concrete Mathematics by Ronald Graham, Donald Knuth and Oren Patashnik

HTDP Section 04

posted on 2008-05-19 14:13:12

Well, here's Section 04.

HTDP Section 03

posted on 2008-05-19 13:43:29

As promised, here’s Section 03 with 04 soon to follow. Sections 03 and 04 are pretty unremarkable and the questions and answers are pretty self-explanatory. Again, you can check all the latest code in my repo by going to manifest, then books, htdp, and navigating to the various source files.

HTDP Section 02

posted on 2008-05-19 03:25:27

So, I've finally gotten around to cleaning up SICP Section 1.3. It's not quite done but it's damn close. For now, I want to start posting some of the HTDP code I've been writing to get back in the hacking habit over the past few days. I also have some of Concrete Abstractions done and in my source code repository but it's nothing substantial. Without further ado, here's HTDP Section 02 (of 43!). Sections 03 and 04 will go up tomorrow. Note: I skipped HTDP Section 01 because there are no exercises or problems whatsoever.

Adulthood and Academics

posted on 2008-05-14 03:39:37

Admittedly, the title of this post is a misnomer. I'm no adult yet. I am trying my damnedest to keep this house running smoothly though. As of today I think we're up on all the utilities and I've got a Static IP here with AT&T so I can move my server at some point. Work's been going well and I'm taking MARTA in to simplify my life a bit. I'm cooking (if you can call it that) and keeping the dishes done and the house clean with regularity. I'd say I've almost settled into a groove. I say almost because the people actually staying in the house won't stabilize until after May 25th. Heck, even I'm gone from the 17th to the 24th to house sit for my parents. For the most part though I'm enjoying myself.

Additionally,  I'm way behind on programming. I know. I've had a lot going on but my progress the last month or two is still just shameful. I've started HTDP to get the juices flowing again and am already through Section 03. It's definitely more straightforward than SICP if less revelatory. I'm considering going ahead and trying to blow through HTDP completely over the next month or two. Then I could circle back to SICP and hopefully be better prepared. I haven't decided on anything yet other than tidying up the presently unadorned answers to SICP 1.3 and then posting what I've got from HTDP so far. I am more than half-way through SICP 2.1 but I'm wondering if it makes more sense to knock out HTDP considering the difference in pace between the books. I'll let you know as I move forward. I'm hoping to get a post up with some pictures of my new digs in the next week or so. Feel free to drop me a line if you'd like to swing by.

SICP Section 1.3

posted on 2008-04-01 02:31:48

At long last, I'm through Chapter 1 of SICP. I'm a bit disappointed that Closures haven't been covered yet but they're in the first few pages of Chapter 2 and I've already got a few problems solved. As a matter of fact, I finished Chapter 1 last Wednesday it just takes time to get these posts up. I have a feeling I need to go back and study those explanations of Lexical Scope in Chapter 1 though. I'll try to write more about the experience thus far in a separate post. For now, here are my results for Section 1.3.


SICP Section 1.2

posted on 2008-02-29 19:39:36

I finally finished SICP Section 1.2 last night. I'm tremendously excited because this means that next week I can start tackling Higher Order Functions and (I hope) Closures. At any rate, here is the last month's work:


Tutorials I’ve been meaning to do…

posted on 2008-02-26 21:50:16

as part of a getting things done streak. You know? Like, learn x y per z. Anyway, aside from reading SICP and writing code, getting it posted on here, and getting this essay up these are the other thing I've been lagging on:
An Emacs Tutorial
Git Tutorial Part 1
Git Tutorial Part 2
A Much more focused collection of *nix & associated utilities sheets
A Massive Index of Cheat Sheets

Also, I'm not sure I buy it but there was some pretty optimistic news about Concentrated Solar Power today. I'd love to see more detailed plans and a price/time-to-completion estimate.

Finally, if anyone has any insights about why I'm getting a bad EIP value and a kernel panic whenever I try to transfer large files (or dozens of songs) with my server, feel free to let me know. I will buy you a (coffee/beer/etc). It seems related to this issue from an openSuse user. It could also be related to me using the 8139cp module instead of 8139too for my ethernet card. Whatever, I doubt i'll get anywhere but I'll be looking into it.

Now to grab dinner and finish that essay...

Pascal’s Triangle

posted on 2008-02-07 03:25:28

A little over two weeks ago I came up against Exercise 1.12 in the venerable Structure and Interpretation of Computer Programs.


The exercise wants you to write a recursive program to compute elements of Pascal's Triangle.


This exercise has pretty much infuriated me and it's all my own fault. Upon first hearing the problem statement I got it in my head that the function should look something like "(define (pas n)...)". I always think of number series being described in terms of a single argument (i.e. the 12th element) so it seemed natural to me that the pascal's triangle function should be computed in this way even though it is not, in some sense, a traditional series.


After a while, I cracked and read the precursor text (but not the code) to Eli Bendersky's solution and noticing that he defined the function with two arguments (for columns and rows) arrived fairly quickly with that insight at what seems to be the more or less standard solution. I have had this much completed for a week but gotten stalled trying to figure out the problem of a pascal function that takes one argument.


As of today I've solved the problem though and hoped to share my results here. First, the throwaway code that ended up being good for nothing!



(define (is-one? element)
(define (is-one-iter ones count flag)
(cond ((< element 5) #t)
((= ones element) #t)
((> ones element) #f)
((= flag 1) (is-one-iter (+ ones 1) count (- flag 1)))
(else (is-one-iter (+ ones count) (+ count 1) (+ flag 1)))))
(is-one-iter 4 2 0))
;Value: is-one?

That code tests to see whether a given element equals one and it does take a single argument which is nice. I couldn't figure out a way to use it to compute the actual elements though.


After a little bit of experimenting I stumbled on this number sequence (OEIS #A080956) which when put in the following procedure would allow me to compute n from a given column and row.


EDIT: Corrected dyslexic mistake in my code (I'd replaced all instances of col with row and vice versa). See comments.



(define (n-from-rowcol row col)
(define (f x)
(- (/ (* (+ x 1) (- 2 x)) 2)))
(+ row col (f (- row 1))))
;Value: n-from-rowcol

Now all I had to do was find a way to reverse the function to give me the inputs if I gave it the output. I actually stumbled upon another number sequence (OEIS #A000124, also known as the Lazy Caterer's Sequence) which when put into the following procedure returns the correct column and row for a given element. At last, working code:



(define (pascal n)
(define (pas col row)
(cond ((= col 1) 1)
((= row 1) 1)
((= col row) 1)
(else (+ (pas (- col 1) row)
(pas (- col 1) (- row 1))))))
(define (colrow-from-n)
(define (col-iter count)
(define (f x)
(- (/ (+ (square x) x 2) 2) x))
(cond ((> (f count) n) (pas (- count 1) (- n (- (f (- count 1)) 1))))
((= (f count) n) (pas (f count) 1))
(else (col-iter (+ count 1)))))
(col-iter 1))
(colrow-from-n))
;Value: pascal

Any insights into cleaner code, better algorithms, or comparisons between the two number series are welcomed.

Still Kicking

posted on 2008-01-30 19:26:42

Okay. So, I didn't get the week 2 recap posted last Friday and I'm not getting it posted today either. Before you folks go judging me and deciding I turned into a lazy bum I thought I should make some note of progress.

As I've mentioned, SICP isn't going as fast as I hoped but I won't skip a thing. If my schedule goes out the window so be it but this book is getting finished. Of course, hopefully I can conform somewhat to the schedule as well. There will be an update this weekend even if I'm not through section 1.2.

In the meantime, I thought that I'd post up something I've been working on during my lunch hour. Namely, Project Euler code. Project Euler is a website that has about 180 Programming Problems of escalating difficult. I've only devoted one lunch hour to it so far but it's been fun and I'd love to get through a quarter to half the problems this year.

The challenge for me I think will come from the math side as well as the programming and some of these I just won't be able to solve for a while. Better to challenge myself from both ends, right? The code's hidden behind a cut for those who don't want their eyes scarred by this programming nonsense. Also, I'll be improving these as I discover better programming formalisms. I'm also solving each problem in both C and Scheme. I want to solve each problem from two paradigms (or more) if possible.

The Rubber Meets the Road…

posted on 2008-01-25 05:33:05

and I find the resources to read. This SICP studying is harder than I ever could have imagined. I have done approximately nothing in my math, putting me about two weeks behind tomorrow. My focus has been entirely on SICP. SICP, I'm only a few days behind on thankfully. It's really hard stuff. And as somebody noted, charmingly, at this stage it practically is math. And proof by induction, recursive functions, golden ratios and Fibonacci sequences math. Not your grandpa's arithmetic.

Anyway, I've dug up some resources hitting snags here and there. It's what I do. So far, I've found a really great SICP Wiki (but it's half Russian), and a pack of people that have studied it from the Open Courseware over the past year.

That pack is as follows:
Ken Dyck's Solutions
Peter Sheats Solutions
Chuck Hoffman's Blog
Michael Harrison's Solutions and Commentary
Ozten's Solutions and Commentary
and finally, The Lispy Solutions and Commentary which so wonderfully motivated and inspired me tonight. Particularly with regards to a remark on Section 1.1 "just lulling you into a false sense of security".

Of course, there is also the aforementioned SICP Wiki and Eli Bendersky's Blog. Long story short, I really owe it to Lispy for encouraging me. Half way through section 1.2 I was bogged down. Roughly on exercise 1.13 which apparently gave a few other people trouble too. And I felt all alone.

Anyway, I'm going to try to push my schedule back a week and see if by next Friday I can be up to lambdas and through 80 pages of Discrete Math and then continue as planned. At the very least, I've known from day one that the one thing I want most to accomplish this year is wringing as much as I can out of SICP. So if it takes the whole year just to do that, schedules be damned, so be it.

Trial by Triangle

posted on 2008-01-24 02:31:11

Today was not the easiest day. It wasn't terrible either. The news was decidedly mixed. And it's not about Dad though if you're wondering he's doing well. He's undergone chemo and lost most of his hair but he's generally upbeat and energetic.


Two things have been wearing on me today and the first is work-related. Since January 11th I've been working full time at TVS. The news was that I finally got the paperwork for my benefits package today. It's nice having benefits. Benefits are good. All the same, this meant I could start doing budgeting and working out my finances.


Finances are some scary shit. If I didn't know better I'd swear I'd die without a sizable chunk of money a year. For now I'm still staying with my parents until summer (at their behest more than mine) and I'll find a place to live then.


I really am making enough to be okay. It's just that there's not a lot on the margins. I don't want a whole bunch of stuff. I just don't want to worry about suddenly needing money for any reason.


Anyway, the other struggle has been that of the triangle. I'm getting behind on my schoolwork and hoping to catch up by/over the weekend. And I was pretty distressed because I spent like 4 hours obsessing over exercise 1.12 in SICP.


The problem is to write a procedure that computes the elements of Pascal's Triangle.


That shouldn't be a big deal, you know? But I obsessed over it. And now I've got a silly over-engineered solution that I'm more fond of than I should be. It's an interesting problem though. Hopefully I've learned something from it.


Mine still isn't quite working and I know there is a simpler way to do it. I cracked after a while and read about how one might solve it but I didn't peek at any code. Still, I'm stuck on doing it my way. I'm such a bastard. Anyway, it's coming together and I expect it'll be done by the end of the hour. It'll be in the week 2 recap for sure.


Long story short I realized what I've gotten myself into today. And it's still where I want to be. It's just that I think it's going to take more work and time than I might have been able to understand.

SICP Section 1.1

posted on 2008-01-19 03:18:23

Well, I said I would do this and I meant it. These entries will be a bit lengthy. I feel a little pain for any feeds I'm aggregated on. So, in the interest of not driving you all mad, these weekly semester updates will be behind a cut.

Spring 2008 Schedule and Syllabus

posted on 2008-01-17 03:17:24

So, I've finally gotten everything nailed down. I know what courses I'm taking, what resources I'm using, and what my schedule is.


I've decided to break my studies into 2 semesters each of which is comprised of two courses and lasts 20 weeks. The first semester started this Monday (1/14) and ends Friday (5/30). I then take the month of June off. The second semester will start Monday (7/7) and end (11/21). Having June and December off will both motivate me to push through and also allow room for slight changes in schedule.


I'll study SICP and Discrete Math with Applications by Rosen this semester. I've already started in on the SICP. Obviously I'm a little behind on the math. At the end of each week I'm planning to post a summary of exercises and notes at least for the programming courses. I don't know what I'll do on the Math course. I also haven't quite settled on whose problem sets to do. Ah, well.


Next semester it's HTDP and CTM. I'm a little freaked out looking at all this but if I try I'm bound to learn something. Wish me luck.


And here's the week by week breakdown of the first 4 weeks for each course:


discrete math: resources include lectures, problem sets, and course notes

dma - 787 pages / 20 weeks = 39.35(40) pgs/week

1 is lecture 11-01-00 and pgs.1-44 (through section 1.3)

2 is lecture 11-02-00 and pgs.44-80 (through definition 4)

3 is lecture 11-03-00 and pgs.80-119 (through chapter 1)

4 is lecture 11-06-00 and pgs.119-161 (through theorem 7)


sicp: resources include lectures, online book, course notes, problem sets, and eli bendersky's site

sicp - 610 pages / 20 weeks = 30.5(31) pgs/week

1 is lecture 1-a and pgs.1-31 (through section 1.1)

2 is lecture 1-b and pgs.31-62 (through section 1.3.1)

3 is lecture 2-a and pgs.63-97 (through section 2.1)

4 is lecture 2-b and pgs.97-126 (through section 2.2.3)


As far as my schedule goes, the plan is to work from 7am-3pm Monday through Friday, go to the gym after work on MWF, and veg on the weekends where possible. The workweek will be dedicated to my "education" of course, beyond work and exercise.

Latest Learnings: Lessig and Lisp

posted on 2008-01-16 04:34:47

So, I've been meaning to post about the things I taught myself in Montana and my course of study and a course schedule through May/syllabus but I had to recover some partitions on my desktop. My laptop also was caught between Ubuntu Hardy Alpha 2 and Alpha 3. I'm not getting into it. It's a long story. Anyway, now that all my systems are running flawlessly I'll speak a little on the aforementioned subject matter.

I have a long term plan for a course of study but no hard schedule yet. I have to divide up readings and problem sets and link them with lectures and such. I plan to have such a syllabus done and up for viewing by the end of the week. As for the long term plan of study there are 6 Programming Texts and 3 Math Texts that I'd really like to get through. If I get through the first 3 Programming Texts (or even the first 2) and 1 or 2 of the Math Texts I'd consider it a successful year. They're all fairly rigorous and I'd like to cover them in depth. Of late, I've been debating the order in which to approach the programming texts. Either SICP, CTM, HTDP or HTDP, CTM, SICP. Some of the stuff in SICP is a bit difficult and some of the stuff in HTDP is a bit easy so far. This is another thing I'm hoping to have worked out by the end of the week so that I can get going.

Once I do have a syllabus I'll post it and then post notes on readings and lectures and solutions to exercises as I go along so feel free to follow along and ask questions. You can only help me learn more. So far, I read the first 40 pages of SICP in Montana. That's Chapter 1 (of 5), Section 1.1. I've got notes typed up on the lecture and reading and most of the examples solved. I'll get those posted up by Friday as the first entry whatever my course of study turns out to be. Also, Friday I will be going to that Yeasayer concert. So far Ben Grad and Minor are talking about going too. Any more takers? Have you guys liked Yeasayer as much as I have? Isn't that Red Cave song from yesterday awesome?

Finally, here are some good Lessig quotes my readings in Montana of The Future of Ideas (Pgs. 1 - 99):

"The very idea that nonexclusive rights might be more efficient than exclusive rights rarely enters the debate. The assumption is control, and public policy is dedicated to maximizing control." - Lawrence Lessig, The Future of Ideas, Pg. 86

"Where we have little understanding about how a resource will be used, we have more reason to keep that resource in the commons. And where we have a clear vision of how a resource will be used, we have more reason to shift that resource to a system of control." - Lawrence Lessig, The Future of Ideas, Pg. 88-89

"The point is more than theoretical. In essence, the changes in the environment of the Internet that we are observing now alter the balance between control and freedom on the Net. The tilt of these changes is pronounced: control is increasing. And while one cannot say in the abstract that increased control is a mistake, it is clear that we are expanding this control with no sense of what is lost. The shift is not occurring with the idea of a balance in mind. Instead, the shift proceeds as if control were the only value." - Lawrence Lessig, The Future of Ideas, Pg. 99

Holiday Greetings

posted on 2007-12-23 05:59:21

Hello there, everyone. I've only dropped off the face of the earth. I'm not dead. Neither is Dad. So far we're all holding together well. He's had his brain radiated a few times and had bone infusions. Chemo begins shortly after Christmas. There is a Doctor who has talked about remission and on the whole I think we're optimistic. Or fighters anyway. Now, on to all the other business.

I'll be in Montana from the 2nd to the 11th, so I've got that coming up. I'll be in Bozeman if you're wondering. It'll be nice to get away for a bit...even if it is for a family reunion with people I haven't seen in a good while, my biological Dad's side of the family. For those who don't know, Mom divorced and the all too awesome feller suffering from Lung Cancer is (technically) my Step-Dad.

I need to draft up a schedule for the new year to figure out how I'm getting my studies done. And whose lectures and course materials I'll be following as I have a choice in some cases. More on that soon. There's also been a ton of great nerd discussion floating around the blogosphere of late, some of which I'll try to comment on in the next couple of days. In the meantime, here's a trivial nugget of thought.

I watched Lecture 1A of the classic MIT Structure and Interpretation of Computer Programs series tonight and something struck me, mostly because Sussman brought the idea to the forefront with clarity at some point. He said something fairly fundamental that borders on self-evident when Computer Science is viewed introspectively but I hadn't formerly considered. In essence, Computer Science is about how to knowledge and process rather than declarative knowledge or fact. Thus, a programming languages job is to serve as a description of process and provide tools towards that end.

The part of this that I hadn't formerly considered is that this is why we bother, or even focus, on learning new programming languages and methods of abstraction rather than focusing on writing specific programs. Sure, many schools recommend a course in Compiler, Operating System, or Programming Language Design and there are plenty of blog posts detailing such undertakings in an effort to enhance skill and knowledge in the field but nothing is so popular or so emphasized as learning new languages. Regularly and of different paradigms and abstractions, if possible. There's something to think on in greater depth here about why that is that I haven't seen eloquently written about by Yegge, Graham, Braithwaite, Atwood, or anyone else. Perhaps if I can capture what it is, I'll write about it. In the meantime, it's just a thought.

A healthy debate, anyone?

posted on 2007-10-31 04:05:54

I would love to hear arguments as to what necessitates the current system of education beyond simple job training and skills certification.

More Importantly: I would like to hear a reasoned argument as to what subjects cannot be learned faster outside of the educational system (note: this does not mean without structure or guidance) than in it and why this might be.

Any takers?

Unless otherwise credited all material Creative Commons License by Brit Butler