Complex regexp worked exactly as expected
Submitted by Leprosy
Submitted by Leprosy
(Some will say this is not the time. I disagree. This is the time when every mixed emotion needs to find voice.)
Since his arresting the early morning of January 11, 2011 — two years to the day before Aaron Swartz ended his life — I have known more about the events that began this…
This topic fascinates me, and I think tef learns and wants to learn the same way that I do. See also Bret Victor’s Learnable Programming which also cites MindStorms, and is generally a brilliant piece.
If you ask any programmer how you should learn to program, you will get the following answer:People should learn programming from my mistakes by repeating them exactly, because my mistakes have been refined and polished over the years
Nostalgia, and the way in which the teacher learns best—both…
I recently completed the Probabilistic Graphical Models course on Coursera, and thought I would note down my thoughts about it.
Probabilistic Graphical Models are a tool used in statistical fields, in particular commonly in machine learning. They are:
Here’s a quick example:
This is a Bayes Net. The way to read this is as “flow of influence”; you can read find which conditions affect which others directly from the graph. Some examples:
The relations of probabilities between these (which we must learn or infer in some way) allow us to make judgements. If you are short of breath, it might be because you are in love; if you’re also asthmatic, the chances of your gasping being due to love are lowered. The more information one has, the better one can make judgements about the missing values.
The course also covered Markov Networks, which are similar but with undirected relationship edges.
The nice thing is that there’s a massive number of problems that can be modelled in this way; there are a few different types of questions you can answer like this:
At first, a lot of these models seem quite divorced from actual problem solving. Watching the course lectures and trying to take the information in, it can seem quite theoretical and “fluffy,” not quite directly applicable to your day-to-day.
This impression is unfounded, as I found out in the first practical for the course. I was surprised to find that after wiring up a model in a relatively naive way it all just worked (given a pre-written workbench for experimenting with the values). A lot of the coursework was like this, mystical theory machines spitting out reasonable answers following an understandable process. Although the problems were largely toys, you can feel that this could be made to work on real problems, and you can see how.
My surprise with the practicality of the course didn’t end there, though. I found a few of the more self-contained topics (often presented as sidenotes) were immediately useful to me even in my day job. It helped solve problems I was only half-aware that I had.
The course is gruelling in its time demands. The Coursera description puts it at “8-10 hours per week”, but I think this is lowballing it somewhat. Watching the lectures alone, at regular speed, can take around 2-4 hours, depending on the week. The actual programming assignments took, in some cases, some 18 hours or more.
This might not be the same for everyone. I didn’t have much statistics or probability knowledge that I could actively remember, definitely less than the “very little” the course recommends. Learning this on the go can be difficult given the amount of time already spent watching lectures.
I also wasn’t familiar with Matlab/Octave, and it’s a definite “experience” for anyone used to modern programming languages or paradigms. The lectures make the point that they’ve found this toolkit works better for those learning, but in my own experience a considerable amount of the exercises was spent trying to glue various types of 2D matrices together in such a way that a library function can sweep in and calculate everything you want at once, since direct processing in the language itself is often too slow to be useful. This often feels like it’s more “busy-work” than actually helping you learn the topic. It’s a little like a much less satisfying version of lining up dominoes to fall.
The exercises, while very varied and conceptually interesting, do vary a lot in quality and difficulty. There’s a few places where the assignments were confusing, misleading, or incomplete. This could make it very difficult to even know where to start at times. A lot of time is spent squinting, and occasionally trying to reverse-engineer what is wanted from the test data, in the cases where the lectures and assignment notes really don’t seem to give enough information.
Also, although the assignments often included test data with which to test one’s implementation, this was sometimes a little sparse. It didn’t test everything — deliberately, so that your understanding could be graded down the line — and sometimes there was so much to do in one section that trivial bugs could be near-impossible to find or diagnose. I suspect my lack of expertise with Octave also caused trouble in these situations.
However, these problems did lead me to the course’s online forum where others taking the course along with teaching assistants (usually “TAs”) were all trying to help one another out. This forum was a ray of hope when I’d gotten myself stuck on an exercise. When there were ambiguities, you’d be sure that someone else would have encountered them too. Normally questions had been asked and often answered before I’d even gotten to the relevant part of the assignment. Each of the assignments got a handy test script to run your code against the test data automatically (I’d been doing this by hand before). The friendly TAs took the roles of providing authoritative answers when it was clear that there was widespread misunderstanding, and of ensuring that the answers never got so explicit that one might think of it as cheating, or that it gives away what one would be trying to learn.
This all came to a head with the assignment 5 (the notorious “PA5”), an assignment that was both very challenging, and written in a fairly difficult-to-follow way. In this case, the TAs had provided a rewritten and expanded version of the assignment text, and were further revising this with comments from students. It’s hard to imagine how I’d have managed to do this assignment without the rewrite (a friend of mine also on the course tried this — it sounded horrible). With the revised text one could skip past the difficulties introduced by the sometimes-lacking descriptions and skip right to the gruelling but beneficial act of working out how to solve the puzzles.
I feel like I learned a lot from this course. Furthermore I feel like I learned a lot that was useful, and that I wouldn’t have learned in the course of my job or my usual tinkering. This is, for me, one of the most important aspects of this course — sometimes it’s easy to stick to what you already know and can practice easily, and often the academic aspects are what get dropped.
The assignments’ role in showing how directly the content of the seemingly-abstract lectures could be used showed that these techniques were useful. The approachable nature of the lectures were good at conveying understanding.
Although I can gripe about the assignments, the workload, and Octave (and trust me — I can gripe about those things), this felt really worthwhile. I might wait a while (and think harder) before investing so much time in another online course, but although it was occasionally painful I’m glad that I did it, and I think others will feel the same way. Plus the people helping one another in the forums in a mostly civilised and productive way gave a little extra boost to my faith in humanity. Isn’t that reason enough?
Many blogs claim to elcuidate a dichotomy of programmers—normally good and bad. Upon careful inspection, most of them turn out to actually dictate the following–
- Programmers who are like me are good
- Programmers who are not like me are bad
The assertion is that if you cargo cult their…
Quite enjoyed this presentation by Lea Verou; it’s both informative and, unusually, pretty. The new CSS3 stuff looks really neat, although I wouldn’t like to speculate when we can actually use any significant amount of it.
I am on Twitter: @zootm