I timebox and so can you

August 10th, 2010

Axiom: SRS is by far the most effective vocabulary learning method I've ever seen.
Corollary: There is no way I could have learned nearly as much vocabulary with my usual laid back attitude.

Don't get me wrong, I'm happy spending most of my life propping up the idea that "if a word wants me bad enough it will find a way to attach itself". It's modest reward for scarce effort and I like it that way. There is so much more worth doing in life than learning lots of words. But there are times when a quick uptake of vocabulary is pretty crucial, namely in the opening stages of a new language. It's when you put in a lot of effort and consequently, where seeing results matters a whole lot. But it matters not only for motivation. It also greatly impacts the quality of your early learning process if you can absorb the core vocabulary quickly.

I found this out last year when I was starting on Italian and I realized I had learned lots of not-all-that-interesting-but-important words that would have taken me several times longer without SRS. To my good fortune, I knew about Anki and I had read enough plaudits to try it.

Still, there is a problem. Anki may be effective, but I wouldn't call it fun. In fact, it's awfully tedious. So much so that even though I appreciate how helpful it is, most days I just can't persuade myself to click the icon that launches it. I get little thrill from returning to the same words that I saw yesterday and couldn't remember then. Plus the interaction itself is highly tedious; clicking those buttons like it's some kind of psychological survey, trying each time to pick the most appropriate choice.

Making it more fun

Alright, how? Khatzumoto writes about timeboxing and SRS tirelessly, and after reading through most of that I was ready to try it out. The idea is to go from "man this is boring, how much longer?" to "I only have 5 minutes, how much can I get done?" and it sounds like it's never going to work. And yet.. okay, have you ever stayed at a nice place on vacation for just a bit too long, so much so you get bored? The idea is to leave wanting more, it's basic showmanship. Timeboxing, believe it or not, adds that element of urgency to the mix. You give yourself 5 minutes for Anki and that means you only have 5 minutes, however many decks you have.

Yeah, it's weird. But here's what it looks like to me. Before timeboxing I would start up Anki, gaze at all the decks I have and all the cards that are up for review and sigh. "What a pain it's gonna be to review all that." Now, all of a sudden, I have a different reaction. "Alright, I have all these decks, which one do I most want?" Then I start on one and keep going for a while, but not for too long since I also want to cover other ground. The 5 minutes is almost up and I still want to get more done so it ends up being 7 minutes. 7 minutes,  which prior to timeboxing, seemed like a century of Anki.

Decks - how to plan them out?

You could just put everything in one giant deck, but I don't like that idea. I did that at first and I found out that I like to have some notion of the context where the information was from. Is it from a textbook, a vocabulary list on a particular topic, from reading or watching stuff (ie. passive learning) or what? That gives me a choice; I can pay close attention to some vocabulary set that's important right now. And if a particular deck is just annoying me I can remove it completely.

It's also a way to manage my morale. If I review lots of cards from a tough deck and I can't remember anything (ie. the thing that makes me unhappy), I can counter that with an easy deck where I win easy points.

timebox_anki_decks

Steven Pinker: The stuff of thought

August 8th, 2010

The title is too vague and not very good. The subtitle is much better: Language as a window into human nature.

steven_pinker_-_the_stuff_of_thought

Go read it!

Dry and minute at times, but very rich. Don't get discouraged by the wikipedia page, it doesn't begin to do justice to the content between the covers. Neither does Pinker's google talk where he's selling the book and gives a superficial impression of it.

A non-exhaustive feature list:

  • Why can you not interchange "give her a hand" with "give a hand to her"? Is there any logical explanation for these quirks? (Answer: yes. In fact, language is far more logical and far less arbitrary than we imagine most of the time.)
  • Linguistic determinism. Is it really true that our language/vocabulary is the language of our thoughts, and thus it can empower/limit what we are able to think? (Answer: no.)
  • Why do you say "the stars are out" when you can see them and "the lights are out" when you can't see them? (Answer: don't remember the explanation for this one, but it's a neat example, no?)

And so on. But Pinker doesn't just explain a whole bunch of riddles, he reaches deep into a whole range of topics, like how language routinely states time in terms of distance (and vice versa), how language expresses causation (and what this implies for our perception of causation) and many more such topics. In short, he does exactly what he's promised to do, he shows how language codifies our human nature.

If I never read a second book about linguistics, I still think this one will have been a pretty good choice.

ansicolor: because the view is better in colors

August 6th, 2010

If you're a coder you probably try to modularize everything to death on a daily basis. If not, your practices are a little suspicious. :nervous: Alas, it's not so easy to knock out something that I can say with confidence will be reusable in the future. One piece of functionality I keep reimplementing is output in colors, because it's hugely helpful to making things look more distinct. The first time I wrote this module I knew I would be using it again and I wished to make it nice and reusable, but I didn't know what the future uses would be. So I put that off until "later". In the meantime I copy/pasted it a couple of times into other projects. Shameful, but effective.

I finally got around to organizing these types of bits that have no specific place of their own into a new github repository, appropriately named "pybits". It holds the pretty printer and this rewritten ansicolor module, and it'll probably grow with the ages.

But to business. Anyone spitting out ansi escapes who has figured out the system knows it's trivial to make a color chart. So to keep the tradition going, here's proof that ansicolor is able to enumerate the colors:

ansicolor_chart

Notice that section at the bottom about highlighting colors. As you might be able to deduce by sheer logic, black and white are not great colors for highlighting something in a terminal, because they are typically used respectively as the background and foreground of the term (or vice versa). (The colors of a term can actually be anything, but black and white are the common ones. Ideally, code should detect this at runtime, but I don't know of a way to check for this. Besides, lots of programs [eg. portage] do make this assumption also.) So the highlighting colors are supposed to be useful for when you want to output a wall of text and mark something in the middle of it, so the user can spot it.

Suppose you are (as I have been in the past) developing a regular expression and you can't get it right on the first try (yeah, unbelievable, I know). Well, what you do is highlight the string so you can see how the matching worked out:

ansicolor_1regex

Regular expressions tend to get hairy (yes way) so it helps to compare their results when you're trying to unify two half-working variants into one. Adding a second regex will show the matches from both. Where they overlap the styling is bold:

ansicolor_2regex

Think of the green highlighting as a layer of paint on the wall. You then paint a layer of yellow on top, but you don't cover exactly the same area. So where the green wasn't painted over it's still green. Where the yellow covered it, the paint is thicker. And where the yellow didn't overlap the green it's just plain yellow.

Adding a third regex potentially produces segments highlighted three layers thick, so there the color becomes reverse.

ansicolor_3regex

And then bold and reverse.

ansicolor_4regex

ansicolor doesn't support background colors, but that's a product of my use so far, I've never needed it. I don't think they improve readability.

You will find this cutting edge technology in the repo:

cygwin essentials

July 21st, 2010

This isn't really appropriate for a blog entry, because it's bound to be updated over and over, but I need a place to keep these notes.

Essential packages (not including pre-selected):

  • xinit. Effectively what is called Cygwin/X. (Creates a new shortcut in the start menu called XWin Server that you probably should stick in your startup list.) With this you can run gvim, xterm etc.
  • binutils (if you want strings)
  • file
  • git, gitk
  • openssh
  • ping
  • python
  • rsync
  • vim, gvim
  • wget, curl
  • zip, unzip
  • make/patch

Decent terminals:

  • mintty
  • puttycyg (ie. putty modded to use locally) You have to get this one separately, but it has a nicer feel to it imo.

Rome on foot

July 8th, 2010

This summer I spent 4 days in Rome in June. As with vacations in general, I did quite a lot of walking. At times it seemed like more than just "a lot", so I traced my walking on a map so that I could figure out how much "a lot" really is. It turns out that you can cover pretty much all the sights in Rome on foot, they're not that far apart. A walk would take anything from 1.5h to 2.5h. It turns out I would cover up to about 13km in that time. In three and a half days (also took a half day trip to Ostia Antica) I did about 40km of walking.

rome_on_foot