Wednesday, September 08, 2010

Valuable tips on graduate school

I can say now as I approach the end of my PhD that from my experience
and trial and error these sound about right (and I should be following
these more):

http://calnewport.com/blog/2009/03/12/some-thoughts-on-grad-school/

Thought #1: Research Trumps All
Thought #1.5: Don't Let Courses and Quals Distract You From Thought #1
Thought #2: Don't Be a Firefighter
Thought #3: Stick to a Fixed Work Day
Thought #4: Three Projects is Optimal…
Thought #5: …But Don't Work on More than One Per Day
Thought #6: Listen to the Married Graduate Students and Ignore the
Unmarried Students Who Live in the Dorms
Thought #7: Promise People Deadlines Then Follow Through
Thought #8: Challenge Yourself Once a Month
Thought #9: Don't Mistake Experience for Smarts
Thought #10: Take Days Off

Wednesday, July 21, 2010

Memorizing with Smart Flashcards: the Freakish Power of Anki

Memorizing is my achilles heel. I think avoiding memorization even
shaped the course of my life, away from things requiring that kind of
factual knowledge and towards things that mostly require understanding
systems. I shuddered when I heard the stories from my friends in medical
school about being examined on the names of hundreds of bones - I felt
like I just couldn't do it. But now I have a tool that I think could
achieve that for my brain, called Anki. It's technically a spaced
memorization program, derived from the original called Supermemo. But
Anki is free and has a *much* less complicated interface, while still
having tons of great features, including the ability to sync over the
internet (it is also open source and has good import & export
capabilities so that you're not locked in).

The best intro is probably via the youtube videos on the website where you can also download it:

http://ichi2.net/anki/
But I will try to describe it here. Anki is essentially smart flash
cards. It's good for learning any kind of knowledge that can be
summarized as a short answer or fill-in-the-blank. You input the front
and back of a lot of these "cards" (can be imported from a simple
spreadsheet), and then Anki gives them to you at exponential intervals:
say every day for a couple of days, and then 3 days later, 7 days later,
21 days later, 2 months later etc, to infinity and beyond. The interval
is modified by whether you got it right (and how hard it was) or wrong:
it presents you with the front of the card, you try to think the answer
to yourself, then press the spacebar to reveal the back, and click or
press a key to say whether you got it. If you get it wrong, you get it
again after the day's normal review, and then probably tomorrow too. The
theory is that if you get reminded just before the point when you would
naturally forget it, then you can retain knowledge indefinitely. And
pretty much an unlimited amount.

That's assuming you actually Anki every day, and I was wondering if I'd
be able to keep it up. Turns out I didn't need to worry: it's something
I look *forward* to, even procrastinate on things with. For the number
of cards I have it only takes 6-10 minutes to do, and it's very
satisfying to see how quickly progress comes at mastering these facts. I
started 40 days ago by adding a few different sets of facts just to try
it out and because I wanted to have them in my brain (plus most of these
were already in a format that was easy to enter): metric conversions,
the International Phonetic Alphabet, constellation names, the greek
alphabet, some numbers to do with vision science and facts about 19th
century vision scientists, and some constants and timelines that I
wanted to use as reference markers. In total 450 cards, which are added
to my study schedule 10 per day, so that I've almost seen all of them now.

How are the results? Well the wealth of stats and graphs that Anki
provides to warm my nerdy soul give some hard evidence: when I first see
cards I get them 57% correct (remember that I already read these facts,
in order to enter them). However my average success rate for non
first-time cards - most of which I've seen a bunch of times now - is
87%. That's a more than 50% improvement! And it's still relatively early
for these facts. I feel like I can easily get to point of answering them
95% correctly, and with every one occasionally turning up months and
years from now, keep that rate. What about subjectively? Knowing these
facts with so little effort feels a little freaky. Like Neo getting kung
fu uploaded into his brain, or the subliminal training in Brave New
World. Without checking: The sun is 150 million km from the earth. One
teaspoon is about 5 ml. The big bang was 14 billion years ago. The peak
response for the short, medium and long wavelength cones are 430, 540
and 570. Despite what people assume, except when it comes to movie
character actors and 1950s science fiction I've never been a fact and
trivia guy. It's a new feeling to get enjoyment just running through my
command of these numbers in my mind.

Some things are proving tricky to shove into my brain even using this
method, and I'm finding it useful to go back to this great document from
the somewhat crankish creator of supermemo:
http://www.supermemo.com/articles/20rules.htm
Essentially the important points are to understand before you memorize,
try to break things into the simplest possible chunks, and avoid
learning lists. How I wish I'd had this in school! So many classes could
have been a piece of cake, because their knowledge was susceptible to
being formulated as fill-in-the-blanks. And I might have actually
retained the knowledge (ever heard someone say, "I'm just going to
forget all this right after the exam"?). Further advice for those tough
cards (and the beautiful part is that they identify themselves, since
they keep coming up while the easy ones are cast far into the future) is
that spaced memorization works *great* with mnemonics. For example the
star Mirphak was giving me a lot of trouble, and coming up every day,
until I made up the mnemonic that Perseus (the constellation it's in)
used a MIRror to PHAK up medusa. Bam, now I'm acing that card. I also
put a reminder of the mnemonic on the back of the card, easy to do even
in the middle of reviewing.

You might be questioning at this point how far memorization can take
you. Is it the same as real knowledge? It's definitely not the whole
story, but I've come to believe that it goes hand in hand with
understanding. Even with my somewhat silly starting set I'm already
seeing how having facts at my fingertips can help me make connections
and inferences. For instance when I was on the plane and saw how far
we'd flown on the way to amsterdam, I automatically compared it to the
circumference of the earth (40,000 km). When a book referenced
creationists denying that dinosaurs existed 65 million years ago, I
realized that that's around the time when they went extinct. And more
substantially, remembering the active periods of a few different vision
scientists made me make all kinds of comparisons of who came first and
who were contemporaries when I was reading a bit more about them. Even
though all these facts are accessible within seconds on the internet,
there is something incredibly powerful about having them all in your
head at once. I think it's a foundation for creativity and true depth of
knowledge. I have big ambitions for using it to memorize hundreds of key
concepts in my field, not to mention references I might be asked about
in my PhD defence. And because it's so easy to use, there's no reason
not to boot up Anki at a moment's notice and add anything you want to
remember, including facts from something you're reading (especially
useful for mass anki-fying: the "cloze" feature)

Give it a try, and then tell me what you've got in your deck!

Wednesday, June 02, 2010

Be Pushy

The most important advice for me personally I've heard lately, from
writer Dave Holmes.

http://myyearofeverything.tumblr.com/post/607422936/b-e

"BE AGGRESSIVE. Pretend you're giving it all up and going back to school
in a year. Act like you have one year to make it work before you give up
and try something else. What haven't you done? Where aren't you being
aggressive enough? Go do it and embarrass yourself with your pushiness-
after all, you'll be doing something else in a year anyway, so who cares
what people think? Push until you feel uncomfortable, and then double
it. The trick is: when you do that, good things start happening right
away, and you get yourself to a point where you can't imagine giving up,
one year from now or ever."

How (and Why) to Stop Multitasking

Eyeopening stuff from Peter Bregman's essay:

http://blogs.hbr.org/bregman/2010/05/how-and-why-to-stop-multitaski.html

WHAT YOU GET FROM NOT MULTITASKING:
- It was delightful. "I never realized how significantly a short moment
of checking my email disengaged me from the people and things right
there in front of me."
- My stress dropped dramatically. Research shows that multitasking isn't
just inefficient, it's stressful.
I made significant progress on challenging projects
- I lost all patience for things I felt were not a good use of my time
"Since I wasn't doing anything else, I got bored much more quickly. I
had no tolerance for wasted time."
- I had tremendous patience for things I felt were useful and enjoyable.
HOW TO DO IT:
- the best way to avoid interruptions is to turn them off. Write in the
morning, disconnect. "most of us shouldn't trust ourselves. "
- Use your loss of patience to your advantage. Create unrealistically
short deadlines. Cut all meetings in half. Give yourself a third of the
time you think you need to accomplish something.


One strategy I thought of just now for helping myself stay on task:
write down on my pad of paper: "I AM writing a blog entry" or "I AM
reanalyzing the gaze data" At least then I can't fool myself into
thinking that doing this other thing is what I'm supposed to be doing.

Thursday, April 29, 2010

How to bid for things on eBay: be a True Max sniper

I've tried half-heartedly to buy a few things on eBay in the past, but
always ending up not winning the auction. Thanks to a webpage I ran
across by Tyler Jones, I now understand what the right strategy is, and
have since bought several things very much to my satisfaction. It's here:

http://members.cox.net/cruentidei/ebay/snipe.html

The important thing to understand is eBay is not a going-going-gone
auction like on TV. It uses a *proxy bidding* system, which is like
sending an agent to a tv-style auction to bid for you. You tell the
agent how high you're prepared to go, and he keeps raising the bid by
the *minimum* possible amount to get in the lead (beating all the other
agents' maximum bids), $1 at a time, stopping when he's either won or
hit your maximum.

What's great about this is that you don't have to actually *do* anything
during the auction: you put in your bid and it either gets it for you
for the best possible price, or passes if the auction goes too high. But
you have to make sure to bet what Tyler Jones calles your True Max - and
what my book about negotation calls your Best Alternative to Negotiated
Agreement. This would be a good spot to read my entry on negotiation if
you haven't:

http://howdanielworks.blogspot.com/2008/11/minimum-you-need-to-know-about.html

But in a nutshell it's about figuring out how high the price would have
to be before you walk away from the deal. And there's always an
alternative: the internet makes it easy to look for other places to
purchase an item, so if there's another website you trust that carries
it your bid definitely shouldn't be any higher than that (taking into
account shipping). Think Craigslist, Facebook, Kijiji, Amazon, etc. And
make sure to look at the other eBay listings for the same type of item.
Also, there might be a substitute solution you'd be willing to settle
for if the price got too high. Or you might just be able to do without
it, for a while or forever. Think all that through, read the item
description very carefully (does it have all the accessories? What kind
of condition is it in?), and figure out an exact dollar amount beyond
which it's not worth it. That is your True Max. (Tyler Jones provides an
interesting exercise to help you figure out your True Max as well if
none of those other things apply). Of course you hope that you will get
a better price - and if you win you usually will - but at least you will
never go over your budget.

So all you have to do then is as soon as you've decided to go for the
item, type in your True Max and click to enter it as your bid. Then walk
away and wait for the results of the auction. (NEVER bid on more than
one of the thing you want at a time, unless you're willing to buy both.
Only go after your second choice listing once you've lost the first one)
You don't even have to log on, except once you've won to arrange
payment. In theory this is the optimal strategy, called Proxy bidding,
and it works well.

However Tyler Jones recommends a different strategy if you have the
time, which is sniping. Sniping is waiting until the last possible
minute to put in your bid, still your True Max. If you understand eBay's
system you can see why this is not unfair: if someone else has a bid
registered that's higher than yours, they'll still win. It sometimes
helps because not everyone is following the optimal strategy, and so you
can beat them with sniping. Jones names two bad strategies, low balling
and nibbling, that involve not bidding your True Max, but the price you
*hope* to get. The distinction is that nibblers continuously raise their
bid, when they see that they're not in the lead anymore, just enough to
get back on top. This makes no sense, unless you are using the auction
process to figure out how much you really want to pay for something,
which is a very bad idea (well documented psychological phenomena
strongly bias your judgment). By bidding at the last minute, you beat
them, and also help to protect yourself against dishonest practices like
friends of the seller conspiring to run up the price.

How I've done it so far is to put something on my watchlist when I want
it, rather than make a bid, and make a note in my calendar about the
closing date of the auction. eBay sends you reminder emails for watched
items when the auction is about to end, so you could probably rely on
that too. 5 minutes before the end I sign in, watch the timer on the
eBay listing page count down, read the listing again *carefully*, and
then enter and confirm my bid in the last 30 seconds. (Any less than
that is probably cutting it too close, since there might be unexpected
complications like having to type in your name and password again).
Sniping is fun! You seem to have a good chance of winning, and also some
idea of what you're getting it for (though the bid might jump more than
$1, to $1 more than whatever the next highest bid is)

There's a few more things to think about, in terms of paying and what to
do if there's a problem, but that's how to bid. A few more tips I've
discovered in my short time on the site:
- The Watch button is really useful both when you're trying to decide
whether to buy something, or when you want to compare a bunch of
listings of the same type of thing.
- If you have no idea how much an item is typically worth, a good way to
research it is to look at the closed auctions on eBay for similar items.
How to do that, and a lot of other important information, is in the eBay
education center, which you should definitely read through (it's not long)
- I've developed a few ideas about what is a trustworthy seller besides
the percentage positive feedback: that they have a large number of
sales, that they have a kind of professional graphic on their listing
page, that it's a photo of the actual item you'll be getting and not a
stock photo of that model, and that it seems they specifically wrote
text for that item and didn't just copy and paste it.
- I bought something from a really sketchy looking listing: bad grammar,
short on specifics, and the seller had few transactions and a website
that was some kind of very dubious real estate consulting business. I
thought there was a fair chance I'd get ripped off. But I factored that
risk into my True Max, and bid 25% less than I would have for a more
solid seller. It came, and worked, despite some cosmetic damage that
wasn't visible in the photo, so I consider it a good deal.
- Make sure to sort lists of items by Price + Shipping, not just price,
because shipping fees can vary wildly, especially to Canada.
- It might make sense to bid non-round numbers: if you bid $61 (or just
add a few cents) then you'll win over someone who's betting $60. If
there's a tie the earlier bidder wins, so this is relevant to sniping.
- Listings come and go fast. It's a good idea to search over a period of
at least a couple of weeks, being prepared to possibly miss out on some
good deals in the process of learning what kinds of prices come through.

Monday, March 08, 2010

You Should Probably be Using Version Control Software

If you're working on a coding project that more than one person *ever*
is going to be contributing to, you should definitely be using version
control software - in fact you would be a fool not to, just because of
all the headaches it will save. Even if it's just the two of you, with
some kind of system to not step on each other's toes, if it's not proper
version control, your system sucks and it will waste your time
painfully. But I'm going to say why it might be worth using it even if
it's just you and even if you don't need to do any programming.

How version control software works is that there is one "master" copy of
the project folder stored in something called a repository, which should
be on a shared server. When a programmer begins working on it, he or she
"checks out" that folder, into what is called a working directory on
their local hard drive. When a significant change has been finished and
tested, and the code is now back to working, they check the code back
in, updating the repository. The great advantage to using version
control software is that it handles the situation where two people are
working on the same folder or the same file - it identifies places that
were changed by both people and then aske you to manually merge together
the changes to make a program that makes sense.

What makes it super useful even if you're writing code solo is the
version tracking aspect of the software. The repository stores in an
efficient format the state of the project at all previous check-ins, so
you can always retrieve an old version. Much better than ad hoc ways to
hang onto old code (the worst being the "copy the folder and add 'old'
to the end of the name" technique, which I've definitely been party to).
You have a detailed log message (well it should be detailed)to identify
the version, and also powerful tools to tell you which files were
changed and exactly which lines were changed and how between the current
and any past version (or between two past versions).

I resisted putting my experiment code under version control for years,
but I noticed an immediate change in my behaviour when I did: I became
bold. I could plow ahead when I saw a change I wanted to make, without
worrying about how I might get back if I changed my mind. And I no
longer had many copies of the same code lying around, all with different
conventions to their names, with no idea which ones work or (if you
leave it long enough) which is even the final version. With version
control there is only one "real" version. But the whole history of the
project is well taken care of. (I'm not even going to get into the
ability to create and maintain alternate versions of a project, known as
branches, which is a more advanced topic) It even vastly reduced the
number of useless .m files around, since you have to explicitly add the
files you want to use to the repository.

Which brings me to the cost of starting up version control, which is not
insignificant, and kept me from bothering with it all this time.
Subversion, or SVN is what I use - it is free, very widespread, and
relatively simple, but it's still pretty intense for people not used to
using it. You have to create, move, and delete your files differently,
and think about checking in and updating your local copy, not to mention
learning to resolve conflicts. Most important is to really understand
the underlying concepts of what's going on, which in itself can take a
half day of reading and experimenting. You should *definitely* read at
least chapters 1 and 2 of this before starting:
http://svnbook.red-bean.com/en/1.5/svn-book.html
I was lucky enough to be trained in using version control in my software
engineering jobs, but even people who are ok with programming I might
have warned away from this because of the complexity, except that I've
found an excellent GUI for Windows that makes it much more intuitive and
accessible, and solves a lot of the headaches SVN itself introduces,
called TortoiseSVN:
http://tortoisesvn.net
It integrates beautifully with Windows explorer, and allows you to
easily surf your repository and past versions as well as some tricky
things (like importing an existing folder) that are hard in SVN. However
it's still very important to understand the underlying concepts, so
definitely read the background chapters in the TortoiseSVN docs. (it is PC only, but apparently there is an equivalent for mac OS called SC plugin, http://scplugin.tigris.org/, which should be uusable to interact with the same repositories and checked-out directories since they are both based on SVN)

TortoiseSVN also means for the first time that even people not doing
programming should think about using SVN, for one feature: Microsoft
Word versioning. SVN is ok for storing non-text files, it just can't do
comparisons between versions, or resolve conflicts. However Tortoise SVN
*can* do that for Word files, and amazingly: differences between
versions show up as though they were changes made with Track Changes
turned on, so dead simple if you're used to that. So version control
worth using on manuscripts you will be working on for weeks for the same
reasons as code: so you can boldly strike out in a new direction with
the text, and be sure that all the old versions will still be safe if
you need to backtrack or you need a complete older version to send to
someone while you're ripping apart the current one. It's happened so
many times, me and/or my advisor decide we should go back to an earlier
take on some material. Because of that, looking in a folder for a
current paper of mine, I have literally 10 copies of it with different
version numbers in the name. No more. From now on, with Tortoise SVN,
only one Word file for this manuscript. (plus I don't have to make up my
own version numbers)

Note that this solves a different problem than backups (which I cover
here), though it is related and can help with that. If you really know
what you're doing you might be able to use Apple's Time Machine software
to replace some of this functionality for the solo user.

--

The biggest challenge with adopting version control software beyond learning the basic concepts, and the one that can get you into snarls, is that you have to reteach yourself to do all the regular file manipulation operations in a new way. To that end I have made a summary of how to do the basics in TortoiseSVN:

Create a file or folder - just create it, and then later right click it, go Tortoise SVN -> Add...

Delete a file - right click and choose Tortoise SVN -> Delete.

Delete a folder - right click and choose Tortoise SVN -> Delete. Note that in this case the folder will not disappear until you commit the changes.

Move a file or folder -

  1. select the files or directories you want to move

  2. right-drag them to the new location inside the working copy

  3. release the right mouse button

  4. in the popup menu select Tortoise SVN -> SVN Move versioned files here

Renaming a file or folder - Tortoise SVN -> Rename

More detailed instructions at TortoiseSVN's user guide, http://tortoisesvn.net/docs/release/TortoiseSVN_en/index.html

One more trick is that using TortoiseSVN it's easy to place folders that already exist under version control (copied from the manual):
  1. Use the repository browser to create a new project folder directly in the repository.

  2. Checkout the new folder over the top of the folder you want to import. You will get a warning that the local folder is not empty. Now you have a versioned top level folder with unversioned content.

  3. Use TortoiseSVN -> Add... on this versioned folder to add some or all of the content. You can add and remove files and make any other changes you need to.

  4. Commit the top level folder, and you have a new versioned tree, and a local working copy, created from your existing folder.

Sunday, March 07, 2010

Dropbox: The Solution to Home-Work Sync?

This is a superneat utility that seems to solve a bunch of problems I've
been having:
http://www.dropbox.com/
It's basically a magic folder that exists mirrored on any number of
computers you want, and also can be accessed via the web, with 2 GB free
storage. I've tried it out for moving files between work and home (it's
windows, os X and linux compatible) and it's a big improvement over
having to plug in a USB key. It also worked well for sharing a bunch of
large photo files with a friend (although it took a little while for all
the files to show up, with no indicator that there were more to come).