2010/09/27

Gladwell on social media

Some insightful writing from [Malcolm Gladwell](http://gladwell.com/) in the [New Yorker](http://www.newyorker.com/reporting/2010/10/04/101004fa_fact_gladwell) on social media. This is the message of the piece: > The instruments of social media are well suited to making the existing social order more efficient. They are not a natural enemy of the status quo. And good comparisons between tight-knit hierarchies and loose networks: > No one believes that the articulation of a coherent design philosophy is best handled by a sprawling, leaderless organizational system.

2010/08/31

Practising writing

In ‘3 qualities of successful Ph.D. students’, Matt Might writes on cogency:

Generally, grad students don't arrive with the ability to communicate well. This is a skill that they forge in grad school. The sooner acquired, the better.

Unfortunately, the only way to get better at writing is to do a lot of it. 10,000 hours is the magical number folks throw around to become an expert at something. You'll never even get close to 10,000 hours of writing by writing papers.

Assuming negligible practice writing for public consumption before graduate school, if you take six years to get through grad school, you can hit 10,000 hours by writing about 5 hours a day.

Of course, you're not doing a Ph.D. to become an expert writer, you're doing it to become an expert in your field of research. But the point can be a shocking one: when I was early in my Ph.D. my realisation was slow that my writing was, at best, very average. Then consider that an Australian Ph.D. will take on average only 3.5–4 years after a four-year bachelor; we skip the important learning experience of doing first a Masters project.

Writing a blog isn't the only way to practise writing. Document your code as if others were to be using it; write notes on papers you read as you read them, don't just file them in a bibliographic database for ‘one day’ writing a literature review. Joining mailing lists and asking for and offering help and advice online will quickly make you realise how difficult it can be at times to make yourself understood through the medium of text online.

I also find that reading a lot helps my writing, but I'm pretty ashamed of the paltry number of books that pass by my bedside table these days.

For future reference (for myself, mostly), here are some tools I've recently read about for improving your writing without expending any time to do so:

These certainly won't do much to improve your writing, but if they save even one silly doubled-word mistake in your thesis, they're worth it.

2010/07/18

Abbreviation Punctuation

Consider ‘Mr Smith’ as opposed to ‘Prof. Crumb’. My rule of thumb for punctuation around abbreviations is that if the abbreviation ends with the last letter of the original word (in the case of ‘Mister’ to ‘Mr’) then no period is necessary. Conversely, since ‘Prof.’ ends half-way through its originating word ‘Professor’, stick in the dot.

(I’m not saying this is the absolutely correct way to do things; my philosophy for writing style is that consistency trumps, always, ad hoc style ‘rules’.)

I recently realised that I wasn’t following my sometimes-period-after-abbreviation rule consistently with ‘vs.’ for ‘versus’. I went to write ‘LaTeX vs. MathML’ and had to stop and think for a minute. Should I be writing ‘LaTeX v. MathML’ instead? Or just drop the period?

My other rule of thumb for formal writing is to avoid abbreviations entirely, and hence write ‘for example’ instead of ‘e.g.’ and ‘versus’ instead of ‘v(s)(.)’. Maybe I should adhere to this rule now to avoid having to decide what to do with ‘vs.’.

2010/07/16

I shouldn't read pop science

The New York Times has a blog talking about how being inactive for some hours per day increases your risk of heart disease, even if you exercise. References a study. Unfortunately, the study comes to different conclusions; from a commenter on the blog:

From the abstract of the actual study:
CONCLUSION: In addition, high levels of physical activity were related to notably lower rates of CVD death even in the presence of high levels of sedentary behavior.

From the article:

Their workouts did not counteract the ill effects of sitting.

This is ludicrous and embarrassing. Remind me not to read this sort of garbage in the future.

2010/06/11

Unexpected iPad

Unexpectedly—and delightfully—I have an iPad. Some quick thoughts.

Unboxing, setup, speed

  1. The box it comes in is far bigger than the iPad itself to accommodate the power brick, small as that is. Maybe Apple want to start with a big box so they can boast about reducing its size in the next update. (And, less cynically, it's easier to invent a not-so-small box first and then put in the effort to shrink it later.)
  2. None of Contacts, Calendars, Mail accounts, Bookmarks, or Notes are automatically synced. I find that strange.
  3. I'm finally going to need to sort out a multi-computer solution for email. I've been using local mailboxes in Mail for years.
  4. Finally have a reason to put movies into iTunes. Speaking of movies in iTunes, I can't stand the often false distinction between "Videos", "Podcasts", "iTunes U" content, and so on. Please let me organise things as they make sense to me.
  5. Apple's Remote isn't native??
  6. Processor speed is fine but not blow-me-out-of-the-park. Can stutter on PDF scrolling, for example. (Not that my MacBook doesn't have troubles sometimes, too.) I figure if you think about it as a large iPod, the speed is impressive. If you think about it as a small Mac, the speed just feels like what you'd expect.

Apps

  1. It's annoying when iPhone apps sync in their iPhone form, and you have no idea that there's an "xyz-app for iPad" waiting to be bought in the app store. Almost duplicate iPhone/iPad apps are not so great.
  2. Dropbox is a great method for light-weight file organising. They should really work their viewing features so that other apps such as GoodReader don't have a reason to exist/eat their lunch.
  3. Badly need a BibDesk-like application for less light-weight file organisation.
  4. Instapaper is absolutely fantastic for translating casual browsing on my MacBook into long-form reading for some time later.
  5. OmniGraffle is A$60? I'm so tempted but that's a tough call.

Ebooks

  1. iBooks not available for Australia. Bum.
  2. Amazon Kindle app is very nice, even the buying process is easy despite going though the browser.
  3. I want to start reading magazine/periodical/newspaper content, but I don't really know where to start. I feel like my reading tastes are too varied/particular to subscribe to entire magazines-worth of content.
  4. Pretty impatient for ebooks to take off in a big way. I access to any book whenever I like. E.g., three random books I've always wanted to read but have never seen in bookstores: Momo, Mr Pye, Broom of the System.
  5. I dislike but will accept using different apps for different stores. It would be nice if there could be a universal interface to all ebooks regardless of their origin.

Games

Preface: I'm not a game player, usually. I used to play Peggle, until it ate up too much of my time.

  1. Totally hanging out for Mimeo. Any suggestions in the meantime?
  2. I would love to play the old Warcraft games on this thing. Warcraft 2 was the last game I really played intensely.
  3. Typing with thumbs in landscape mode is bareable. Haven't tried real typing yet.
  4. I just found Prince of Persia from the old days. Oh wow, gotta go now.

2010/06/09

Future Apple iPad/iPhone products

Things Apple will eventually ship:

  • iPad with 300dpi resolution

When? I give them 24 months. On the other hand, larger high-dpi displays are one of those technologies that simply hasn't emerged as quickly as one would have thought.

  • MacBook without DVD drive (i.e., becoming the same product as the MacBook Air)

I thought this would have happened by now. Obviously, though, it would have if it were sensible; I'd be really interested in seeing the market research that justifies the current scenario.

  • Magazine distribution app.

I just can't see Apple being happy with the idea of mags like Wired using the functionally impaired — albeit pretty — Adobe technology to produce its iPad content.


Things Apple probably won't ever ship:

  • Dual screen (‘notebook style’) iPad.

I watched the Courier demo the other day. What a great concept. What a terrible waste of time and money to make the demo without plans to build on it.

  • Stylus support.

Speaking of that Courier demo, it really did look justified to use a stylus for certain kinds of input, especially diagramming/drawing. But Apple'd never complicate the device to have stylus use as a supported option.

  • MacBook with an iPad instead of a keyboard.

Come on, you know this would be cool.

  • iPhone mini

Imagine if the height screen were its current width and scale down the whole phone accordingly. Keyboard landscape only. Only enough space on-screen with the keyboard to display a small amount of text above for text messages, but otherwise functions fine with iPod and phone functions. Requires re-written apps if any.

2010/06/05

Backup drive

It’s a shame Disk Utility can’t try that little bit harder:

mervyn.png

I guess it’s time to buy a new drive to back up my backup.

2010/06/03

Something wrong, somewhere

Something’s not quite right in my world at the moment:

fontcache.png

It could be Chrome; it could be a font I installed; it could be Mac OS X. Who knows.

2010/05/30

Mobile widgets

You know what I hate? Waiting for widgets to update. (It’s barely acceptable in Mac OS X’s Dashboard because of the convenience of bringing it up.)

Screen shot 2010-05-30 at 7.45.20 PM.png

Having to wait half a second (on a good day) is one of those interface delays that is unavoidable but unacceptable. This is a purely personal and subjective opinion of “acceptable” — I want to be able to hit a key and see the weather without having a brain stutter while yesterday’s weather flickers out and is updated.

This is fine, just, on a computer. But I have a hard time imagining the idea of widgets on iPhone or iPad. Can you imagine swiping through screens and having to wait for a network pole before your weather is correct? Or only of having some odd chance of the weather on the unlock screen being correct? Widgets don’t even get background processes on Mac OS X — there’s no chance you’d ever see a widget updating itself without direct user input.

And given the delay from user input and network delay and interface updating, I just don’t see widgets working on any kind of mobile device.

Update: Thanks to S.-S. P. for reminding me that it is in fact possible to have background processes in Dashboard widgets. Not sure what I was thinking there.

2010/05/23

Fracturing

If you’re reading this and you’re interested in the things that I do or say related to LaTeX, go here: http://latex-alive.tumblr.com/. I’ve decided that having separate areas to write about separate interests really is a good idea.

2010/05/13

Living in the mountains

I’ve joked around with people before about living in the mountains one day. I honestly don’t know how it would ever happen. I’ll organise it (just like I’ll organise the rest of my life) when I’ve stopped tearing myself into too-small pieces with the different projects I’m working on. I hope that happens one day sooner rather than later.

Why do I want to do it? Matthieu Ricard makes a good argument:

0830651E-DC83-4A0B-81A5-E700225EDC63.jpg

2010/05/02

Installing noweb nowadays

Brief thoughts installing Norman Ramsey’s noweb. Which being the best literate programming tool out there, from my limited experience, although I’d like to make a big shout out to FunnelWeb, written by a friend of mine also from Adelaide.

I’m using Mac OS X, but I doubt the procedure below wouldn’t also work under Linux. Need to sort out how to do this on Windows, though, so I can use noweb with a new student I’ll be working with. The wayback machine has some instructions but I haven’t tried them yet.

For now I am going to take Norman’s advice and write here for using/installing noweb2, the current stable release. (Updating version 3 to a modern version of Lua and packaging it up for LuaTeX would be the ultimate. But not yet.)

The big, huge, important point when installing noweb is that you do not want to use the deprecated awk version over the new (relatively) and exciting Icon version.

So first download binaries of Icon from the University of Arizona and add it to your default path. (Side note: why does the Icon Makefile when compiling from source require a switch for the platform? Isn’t that easily automatically detectable?) Installing binaries is a matter of personal taste but I moved the Icon binary distribution to ~/bin/icon-v950 and then added

export PATH=~/bin/icon-v950/bin:${PATH}

to my .bash_profile. Then download noweb and configure its Makefile in src/ appropriately:

  1. Change the line LIBSRC=awk to LIBSRC=icon
  2. Chage the line ICONC=iconc to ICONC=icont
  3. Set the TEXINPUTS line to

     TEXINPUTS=$(shell kpsewhich -expand-var='$$TEXMFLOCAL')/tex/latex/noweb
    

Then hit the familiar

cd src/
make all
sudo make install

and you should be set. I’m a bit confused about the correct procedure for getting man pages found automatically, so I also had to include the following in .bash_profile

export MANPATH=${MANPATH}:/usr/local/noweb/man

in order to get man noweb and so on working. There’s a lot of documentation in these man pages that you do not want to miss out on!

Finally, to check that it’s all working, let’s compile the PDF documentation for the (La)TeX support:

cd tex/
noweave -autodefs tex -index -delay support.nw > support.tex
pdflatex support && pdflatex support

Skim over the resulting support.pdf document and witness yourself the amazing abilities of literate programming. (Especially notice the improvements over LaTeX’s docscript format.) But don’t use that document to try and work out how to customise noweb with LaTeX; the user-friendly documentation is inside man nowebstyle.

And now to start using it for work rather than playing around with getting it installed.

2010/04/28

Things I would like to be able to do in LaTeX #63

(In an on-going series.)

Grid-based algorithms for filling up space with boxes: (this is all HTML+CSS+Javascript)

masonry.png

The best LaTeX algorithms for space-filling revolve around column-balancing running text with floating boxes within. For arranging boxes as here, I’m not aware of any high-level tools, although ConTeXt may have some that I’m unaware of.

2010/04/23

Wherefore 960 × 640

The alleged number of pixels in the display of the next-generation iPhone has been discussed and questioned in recent times.

If you would like a concrete reason why it would be a good thing for the rumoured 2010 release iPhone to have a screen resolution in excess of 300 dots per inch, consider a screenshot taken on a current iPhone display, which has a resolution of around 160 pixels per inch:

gruber-screen-dpi.jpg

The image has been taken in portrait orientation, cropped vertically, and zoomed to emphasise the low resolution. At its natural size, this text would not be physically too small to read; in my estimation it’s equivalent to type at around 6pt to 8pt. This is small for most printing standards, but not unreasonably so.

However, the low number of pixels per character in the image above inhibits the text from actually being comfortable to read due mainly to the anti-aliasing artifacts. With double the resolution, this text would look fantastic.

2010/03/22

‘My head is in the cloud’

I think I need to quote this whole chunk from Dave Pell:

My phone tells me numbers, Facebook reminds me of birthdays, my nav system gives me directions, Google tells me how to spell, my bookmarks remind me of what I’ve read, my inbox tells me who I’m having a conversation with – my mind has been distributed across several devices and services.

My head is in the cloud.

Now, after a few years of this, I realize that when I look up from the screen I know almost nothing. And maybe that would be fine if the absent phone numbers and upcoming dates were freeing space for deeper and more introspective thought. But I sense that my addiction to the realtime stream is only making room for the consumption of a faster stream.

Indeed. We need computers to extend our brains’ cognitive ability as well as just their trick of memory. (Ray Kurzweil has various things to say about this. Look him up if you like wild-eyed and optimistic futurism.)

In the meantime, I suppose we should strive to avoid “realtime stream” as best we can. Read novels. Experience good theatre, and watch long movies.

2010/02/27

Corollary to the "fifteen minutes" rule

I've read about some theory that says that it takes fifteen minutes before one starts working with full concentration. I can't actually find a good reference to this theory, but here's an article that mentions it.

I've been thinking about what that means for tasks that take less than fifteen minutes to perform. Or for writing that takes less than fifteen minutes to read. Or so on. If your brain is only half-engaged for these things, is there really much point doing them? Read a book instead of one hundred short news articles online. Devote serious time to problem solving rather than fixing niggles (until niggles are all that are left, of course). Write a book instead of a blog.

Because there's always something that will take more time than whatever you're currently doing.

2010/02/04

Autism vs. Vaccination

The paper that, apparently, started the whole movement against the measles-mumps-rubella vaccine has been withdrawn by the journal in which it originally appeared in 1998. Not only have its suspicions been very much discredited by subsequent scientists, but its principle author acted unethically in both his approach to science and his reasons for publishing the paper. Dastard.

I find it terribly, subtly tragic that I know people younger than me who have had measles, which I hope to see it eradicated before I die. Disease eradication is in my list of ideal traits of high civilisation. Anti-vaccination mongers ruin everything.

2010/01/08

Cinema 2009

Last year I started keeping a list of all movies I watched at home and at the cinema (and the books that I read, a considerably shorter list). I watched so many movies at home that I couldn’t keep an entirely accurate record, and didn’t start at the beginning of the year, so that list is somewhat incomplete. I saw so few movies in the cinema, by contrast, that it’s easy to take about them as a group. In hindsight, I must say that I am very happy with the movies I ended up managing to see (the majority in the last two–three months of the year), the list being: (reverse chronological)

  • Avatar
  • Where The Wild Things Are
  • The Boys are Back
  • Moon
  • Up
  • Inglourious Basterds
  • Harry Potter and the Half-Blood Prince
  • Watchmen

Obviously my tastes in cinema-going (less so when watching movies at home) tend towards the mainstream. With the exception of Harry Potter, which I saw for a fundraiser and entirely against my will (but which I ended up not half minding), I would highly rate all of the movies above and recommend them unconditionally to most of my peers. I’m not going to try and rank them in order of preference or anything, but I’d have to say Inglourious Basterds would be my pick of the bunch. It promises great things to come for one of the most unique directors around whose movies just keep improving, and, in my opinion, raises the cultural bar for Hollywood cinema in general. Let’s never see a German character simply speak English-with-a-fake-German-accent-to-show-they’re-German again (let along without-even-the-accent-but-with-an-eyepatch — not that I saw that movie).

I should point out that I’m aware of less-than-positive views on Inglourious Basterds due to its irreverent view of certain events in history that should be taken more than seriously, but to be honest I’d prefer to see a movie that attempts some sort of catharsis as this one does, as opposed to reminding everyone how terrible a time and what a tragedy it was. But it’s easy for me to say that who has no direct link to the events in question.

2010/01/06

Pixels so small…

Google have released some sort of phone. The part of it that I care about is the technology in its screen.

When the iPhone came out, it’d have been pretty rare to see anything like its high-res. LCD display. 3.5 inches with 163 pixels per inch — graphics, but text especially look better than they’ve ever on a computer screen.

But this Nexus One phone? Pretty much the same size screen but with a d.p.i. value of 252 (roundabout calculation). That’s to the iPhone resolution how the iPhone res. compares to a regular computer screen. I can’t wait to see how Optima, say, looks on this new breed of screen.

optima-t.png

We’re almost getting to the point of rivalling low-tech print quality. Anyway, where was I? Oh yes, the now technical inferiority of the iPhone screen vs. the current cream of the crop. It’ll be interesting to see what June’s new iPhone (as per tradition) will bring.

Is the higher resolution actually just a gimmick? It increases processing overhead (and hence power) to display text and graphics onscreen, and 163 d.p.i. is generally pretty good — but it could be better, and the higher resolution screen will surely happen if not this year then next.

When that happens, all of the hundreds of thousands of apps that have been created for the iPhone so far use a fixed resolution. Until developers release updated versions of their apps with higher-res. graphics, will auto-scaling them be an acceptable way to display them on this larger (in terms of pixels) screen? My hunch is that since few graphic elements on the iPhone are created down to single pixels, this will be fine.

And, of course, programmatically generated graphics and all text will be automatically improved since they are (or should be, in the case of graphics) resolution independent. So let’s toast the idea of print-quality output on our screens, but regretfully mourn the loss of any chance to use the beautiful bitmap fonts of old.

2009/12/29

The Urge

About a year ago I wrote:

I’ve accepted long ago that my mind latches onto ideas with a terrible grip and it’s inevitable that something that I’m currently spending time on will overwhelm my concentration, to the detriment of all other tasks and thoughts.

I’m starting to realise that I can predict when this will happen. It usually happens when there’s a natural lull in my work, such as the time just after completing a paper or finishing off some code. In the quiet time when my brain starts asking and wondering “What’s next?” I’ll queue up a bunch of possibilities and regardless of the order of their priority there’ll sometimes be one that simply overruns my thoughts. I’ll be able to picture in detail the stages of the task and exactly how to get started and an urge to get working on it; generally I find that there’s no point resisting at this stage and I’d better drop everything to focus on this one thing.

If I don’t drop everything (and attempt to work on what is most important rather than what is most motivating) I’ll generally start drifting into the fun work anyway, in and out of work hours, and it’ll slowly take over; in the meantime, I’ll have been attempting to multitask between a motivated task and an unmotivated one and generally not been as useful as if I’d concentrated on the former alone.

(Of course, there’s always the backlog that accrues during a time of blinkered/focussed working and it’s never fun to sort that out after emerging for breathe. Still, it’s often from the backlog that the ideas for what’s next? emerge.)

I think that learning how to transition continually between these focussed tasks is really the goal of productive work. It’s the dead time in between that’s soul-killing, when you finish a week or a month or a season and ask yourself “What have I been doing all this time?”.

2009/12/26

Brief comments on: Everything and More (2003) by David Foster Wallace

I don’t really intend to go on for too long about Everything & More, D.F.W.’s book about the history and philosophy behind infinity and maths. Suffice it to say that you’ll either like it or not depending primarily on two factors:

  • Like: If you are a D.F.W. fan (which counts me in)
  • Dislike: If you know a lot about the subject matter (i.e., you’re a set theorist–mathematician yourself, which counts me out)

This is assuming, also, that you’re the type of person who likes to read either unique works of literature and/or popular science–type things. Without a fairly good working knowledge of maths, be prepared to work hard to follow along with a good proportion of the book that’s dealing with technical content; it’s not impossible, however: the friend who lent the book to me managed to get through without much background knowledge.

Apparently there are a certain number of technical inaccuracies, or elements of the story that are simply wrong. I’m not one to judge these; (the only error I ever saw was a basic oversight-style typing mistake in a big list of examples of the application of differential equations (or something like that) in which was written F = m dx/dt) but it’s easy to find numerous critiques of the book in which the technical content is rather heavily denounced. However: It doesn’t matter. First of all, in some cases I’m sure D.F.W. was aware of some of the technical problems his popular descriptions required. He admits as much quite early on. But secondly, this is not a book to learn set theory in a mathematical sense. Just as you read Gödel, Escher, Bach to get a taste of some rather meaty mathematics in the context of a much broader philosophical discussion, Everything & More does a truly excellent job elucidating how all the things we learnt in school & university about abstract ideas such as irrational numbers and limits tending to infinity really were huge mathematical/philosophical problems back in the day and we should do better than take them for granted.

The best example of this is the way anyone’s who’s done a little university-level maths can reject Zeno’s paradox by their being taught about convergence of infinite series. How can you cross the road if you first have to reach half-way, and before you reach half-way you must reach the quarter-way mark, and before that get to one-eighths of the way, and before that one-sixteenths, … , ad infinitum? Anyone who’s studied the maths “intuitively” knows that this particular infinite sum equals one, q.e.d., but this result requires them to have already abstracted in their head the very idea of an infinite sum itself as something that is actually possible. It’s not exactly easy to explain how this works without using terms like “tends towards infinity” that a priori assume that infinity is an abstract concept that can be used to explain infinite sums. The formulation of a rigorous (explanation of a) proof is sort-of the main goal of the book (plus fleshing out a good amount of material about how this happened historically, and a number of consequences of what effects this had on the mathematics of the time leading into the current era).

This is a book about how some certain results were discovered, with a sufficient explanation of those results to expand your mind a little or a lot. And like all of D.F.W.’s writing, even just going along for the literary ride is well worth the effort.

2009/12/08

Dean Allen on philosophy of self

In explaining something he did about something he made, Dean Allen writes:

I’ve spent the past year or so reading and writing and doing my level best to chip away at 40 years of belief in the logical fallacy that one’s identity meaning – self-worth, self-image, whatever you want to call it – can accurately be measured in the thoughts of others. Much as you and I may enjoy being encouraged through recognition and praise and dislike being saddened by rejection or indifference […], deriving personal value from these transactions in the absence of a well-formed internal frame of reference through which you can decide on your own what does and doesn’t work, and subsequently accept the opinions of others as feedback, is just plain faulty thinking, of the sort that makes otherwise capable, centred people all loopy and weird.

2009/11/10

Coders at Work

I recently bought and read Coders at Work, a collection of interviews with past and present people of influence in the programming world. Very easy book to casually read. A few typographical problems, but I have fairly low expectations. Full of fascinating stories that really made me think about how far we’ve come in some areas and how little we’ve progressed in others. I recommend it if you’re into that sort of thing.

I found three quotations particularly poignant. I don’t have anything to add to them; make of them what you will.

Douglas Crockford:

My interest in programming is helping other people to do programming, designing a language or a programming tool specifically so that it’s more accessible to more people—the thing that got Smalltalk started. Smalltalk went in a different direction, but the initial direction was really attractive to me. How do we build a language specifically for children or how do we build a language specifically for people who don’t think of themselves as programmers?

Ken Thompson:

I think by necessity algorithms—new algorithms are just getting more complex over time. A new algorithm to do something is based on 50 other little algorithms. Back when I was a kid you were doing these little algorithms and they were fun. You could understand them without it being an accounting job where you divide it up into cases and this case is solved by this algorithm that you read about but you don’t really know and on and on. So it’s different. I really believe it’s different and most of it is because the whole thing is layered over time and we’re dealing with layers. It might be that I’m too much of a curmudgeon to understand layers.

Fran Allen:

Isaac Asimov made a statement about the future of computers—I don’t know whether it’s right or not—that what they’ll do is make every one of us much more creative. Computing would launch the age of creativity. One sees some of that happening—particularly in media. Kids are doing things they weren’t able to do before—make movies, create pictures. We tend to think of creativity as a special gift that a person has, just as being able to read and write were special gifts in the Dark Ages—things only a few people were able to do. I found the idea that computers are the enablers of creativity very inspiring.

Information wrangling

I’m not particularly happy with the state of how I collect, absorb, share, and store generic information electronically. (On the whole, I’m generally happy with how I browse information, however. It’s not too hard to spend too much time reading about interesting things.)

  • I use Google Reader to browse information, from which I can also share items I find interesting.

  • I use Delicious to share other things that I’ve read from plain old “web browsing”.

  • On my computer, I store in a BibTeX database a subset of whatever appears in the above two public feeds plus “other things” that I haven’t shared for whatever reason.

    The BibTeX database also contains links to local content on my machine, so I can still read articles and watch videos that I’ve collected, even away from a network.

  • Keywords or tags are used separately both in Delicious and in BibTeX to help organise the items therein, but the tagging is inconsistent and not kept in sync.

It’s all a bit of a mess. To top it all off, I still don’t have any good way of organising all this local information so that I can browse through it in a way that doesn’t remind me of combing through a poorly-maintained database (which is exactly what it is).

Furthermore, all of the organisation of my actual research literature I have no way of sharing with anyone. Someone coming along to do a similar literature review as I’ve done will either have to read my thesis or start from scratch, and even reading my literature review will hardly give a good overview for their research interests.

There are sites like Cite-U-Like and so on which aim to make academic literature reviewing a more “social” activity, but the fact that they are web applications means that I still need to locally sync my databases whenever I add new content. Manual syncing is simply not a useful solution. (Aside: I’m looking at you, Things.app.)

Furthermore, I can’t maintain an online database of research and be able to store the papers offline in a local database that contains a superset of the online content. In other words, I don’t want to maintain a folder structure and file-naming scheme for content that’s mirrored in a database.

All of these factors indicates to me that there’s still something missing to tie together all of these different aspects of information wrangling. I hope a solution rears its head at some stage in the not-too-distant future. What’s the point of 3D animation on the web if we don’t have similarly-advanced information systems with which to play?

A measure of low academic funding

The common theme in Australian academia is that lecturers are hired on their research merits but must spend too much of their time teaching and performing administrivia, which ends up sucking the life out the research side of their job.

Certainly in my department, the more established as a lecturer you become, the lower the publication count trends in general.

Now, I know publications are not everything, because a professor will often be sitting on top of a pile of other researchers who are doing the grunt work below them. Still, in my opinion a healthy researcher should still be writing at least some of their own papers to indicate that they are still actually doing some of the research.

Could this be measured to a degree by looking at the publication output of every research group in every school in every university in Australia? Interesting results might appear after crunching the numbers on things like

  • Normalised number of publications per person.
  • Ratio of professors to academics to postdocs to postgrads.
  • Weighted number of publications per role according their ratio in the research group.

For example, let’s say that the ratio of roles is something like 1:4:6:20 (I have no idea if these numbers are feasible or representative). Papers published by a person in each role should be weighted by the inverse of these numbers, so the total number of publications per role is given equal weight (one paper by a professor is equal to twenty papers by the PhD students). Justify this by saying the time of a professor is twenty times more valuable than a grad student.

Now sum the papers per role according to these weights; if you see a large discrepancy from a 1:1:1:1 ratio of weighted publications, something is looking a little fishy. (This is just a hypothesis; I presume the numbers could be analysed a posteriori to determine that a healthy ratio might look like 1:2:4:3 or whatever.)

Even if this isn’t at all a suitable way to gauge the research health of a research group, it should at least be useful in comparing in a more detailed way the publication output between similar groups around the country. If it turns out the RMIT’s academics publish far more than Adelaide’s (after you’ve removed the masking influence of high-publishing postdocs, say), isn’t that a difference worth investigating?

Of course, my opinion on all of this comes back to basic funding at a tertiary level: the number of academics per student should be increased to give the academics more time for research. My aim at discuss ideas like “weighted numbers of publications per research role” is biased towards indicating this at some level. But I don’t have the time to actually look into the matter. (Especially being that I’m not actually part of the system at the moment.)

Does anyone do “research on engineering research”? In my opinion, they should.

2009/10/26

Knuth on addiction

Donald Knuth, Adventure (PDF):

Clearly the game was potentially addictive, so I forced myself to stop playing — reasoning that it was great fun, sure, but traditional computer science research is great fun too, possibly even more so.

2009/10/22

The nature of procrastination

When your mind is distracted to the point of not starting an impending task.

That’s not quite it.

The adage is that after being interrupted it takes fifteen minutes to get back into the “flow” of working.

The first fifteen minutes, then, is crucial. Before even starting something. If your mind slides off track at any point before the fifteen minutes is up, gotta start again.

But how often does my mental trigger kick in to read email, refresh feeds, check newsgroups (and, in the past, Twitter and Facebook and New York Times and …) ? In fact, I still get mental triggers to visit news sites I haven’t read in years. Which scares me, frankly. What sort of rut did I get myself into that my brain still brings it up multiple times every single day even if I never (in years, now) respond to it? Is that the side-effect of the addictions of youth? When will it go away?

(To see if you have such mental triggers of your own, close all the windows on your screen and open up a fresh and blank browser window and try and think of nothing. The first thing that pops into your head to type into the address bar?)

Worse than all of the above, how easy is it to slide from the hard tasks of involved research writing/reading/coding to the easy tasks of fixing bugs or renaming variables in my latest toy project? Especially if you can trick yourself into thinking that your toy project can substitute for your real work.

Sometimes, I even get a mental trigger to write things on the internet, things which people already know and which don’t help either the people reading them or person writing them.

Unlike Merlin Mann. (I linked him before, but no hard in repetition.) He says everything on the topic much better than I’ll ever be able to: (albeit this time in an uncharacteristically difficult-to-quote way)

…developing those invaluable tolerances [to “stick with [your work] at the time you’re most tempted to run away”] requires the exercise of some very small muscles. The muscles are super-hard to locate, and once you do find them, they hurt like a bitch to exercise.

Ain’t that the depressing truth.

Well, I’m off to do the dishes. And then get back to work.

2009/10/12

Matlab vectorisation

Wikipedia tells me that Donald Knuth said:

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.

(I figure you don’t need a citation when you mention “Wikipedia” in the sentence.)

Back in the old days, the fast way to do things in Matlab was to use “vectorised” code which operated on entire array rather than the individual elements; loops were the devil. More recently (2003-ish), Matlab gained a just-in-time compiler, eliminating the old bottleneck. (Update: Thanks, Ben, for pointing out my mistake there; not sure what I was thinking when I wrote 2007. Perhaps I didn’t get access to Matlab-with-JIT until some time later; I forget.)

But you still sometimes see advice to use vectorised code whenever possible. In short, this is a bad idea on performance grounds alone.

For example, the above-linked advice gave the trivial example:

% Extremely slow:
for i = 1:length(x)
   x(i) = 2*x(i);
end

% Extremely fast:
x = 2*x;

Interested, I tested this out.

[Update: Ha, “I tested this out” completely incorrectly, because I was hasty and hadn’t used Matlab in a while. So don’t mind me on that particular point. However, the following still stands:]

Your rule of thumb should be: write the code that makes the most sense when you’re writing it. If it’s slow, try and fix it then. Vectorised code can get damned hard to write and harder to read. It’s only worth it if it saves you real time running the code. And I’m talking hours and hours of time difference here.

When you write x=2*x, you should do so simply because that’s the clear logical representation of the operation “multiply each element of x by two”. But just because you use vectorised code here doesn’t mean you always should.

GitHub from the command line

Here are a couple of shell aliases that I’ve found useful recently. To use, add them to your .bash_profile file. All of these commands are intended to be run from the working directory of a Git repository that is connected to GitHub.

  • Used in the following, more useful, commands, this returns the GitHub identifier for a repository: (E.g., wspr/thesis)

    alias githubname='git config -l | grep '\''remote.origin.url'\'' | sed -En   '\''s/remote.origin.url=git(@|:\/\/)github.com(:|\/)(.+)\/(.+).git/\3\/\4/p'\'''
    
  • On Mac OS X, this opens your GitHub project in the default browser: (I’m guessing it needs some adjustment to work under Linux.)

    alias github='open https://github.com/`githubname`'
    
  • Similarly, this one opens up the Issues page:

    alias issues='open https://github.com/`githubname`/issues'
    
  • Finally, this one returns the number of open issues in the GitHub project:

    alias countissues='curl -s http://github.com/api/v2/yaml/issues/list/`githubname`/open -- | grep '\''\- number:'\'' | wc -l'
    

Via the GitHub Issue API, it’s possible to extract all sorts of useful information programmatically that could come in handy for project management. Use the output of this URL to get all the juicy info:

http://github.com/api/v2/yaml/issues/list/`githubname`/open

For example, I’d like to write a script to report summary details of all open issues across all of my projects/repositories. Saving it up for a rainy day.

It would also be interesting to write a script to run before pushing that checks which issues you’re closing (via the closes #xyz commit log interface) and shows a brief summary for confirmation before sending off the commits. That’s for a rainy weekend.

2009/09/07

pdfTeX on Windows upgrade

It’s not often in the (La)TeX world that new versions of things break existing documents and packages. Unfortunately this has just happened to me.

I maintain a LaTeX package pstool (written in collaboration with Zebb Prime) that sort of uses TeX as a portable scripting language to perform external graphics processing during the typesetting run. (The main benefit allowing you to use psfrag in pdfLaTeX.)

Since it executes programs on the command line, it needs to know whether it is being run on Windows or on some sort of *nix variant (Linux, Mac OS X, etc.). The package I use to detect this, ifplatform, is also written by me (in collaboration with Johannes Große), and it uses a heuristic based around the difference in how the shells in Windows/*nix deal with quoted material.

Unfortunately, this heuristic no longer works in TeX Live 2009 for Windows, as reported by Joseph Wright. “That’s okay,” I said, “Few people will be using TeX Live 2009 on Windows yet — no rush to fix the problem immediately.”

Unfortunately again, I’ve now discovered that the problem also exists in MiKTeX 2.8, which has been released in the past week, and which is much more widely used than TeX Live on Windows. I’ve received several good ideas how to fix the problem via the tex-live mailing list, so it just comes down to trying a few of them out with the help of some of my Windows-using friends.

But for now, be warned: ifplatform (v0.2 from 2007) and hence pstool and auto-pst-pdf currently do not work in TeX Live 2009 on Windows and MiKTeX 2.8. A new version to fix this problem will be forthcoming.

Update: The new version of pstool is now available from CTAN, and it fixes the problem above.