Friday, March 28, 2014

I had my one-month eye exam the other day. Both eyes are 1.5, which is great. My left eye has a bit of residual astigmatism, but not enough for repeat surgery or to add correction for it to my reading glasses. The surgery has been a success, and I'm happy I went through with it. I'm particularly happy and surprised that my frequent headaches now are almost gone.

That doesn't mean I'm free of glasses. I've converted one pair to reading glasses for work, and added dark lenses to another pair for use as sunglasses. I'll add weak bifocals to my favourite pair so I can comfortably read and use my phone on the train. I'll actually have more pairs of glasses now than when I really needed them. Which is fine as I like glasses; I just didn't like having bad eyesight with glasses as well as without.

The Japanese sales tax will increase in a couple of days and it's been impossible to miss. Signs everywhere profusely apologize that commuting passes, vending machines or whatever will regrettably become more expensive on April 1st. Morning TV shows have run daily segments on this for weeks.

I got drawn into the hysteria this morning as well. There was a segment about sporting equipment will become more expensive. Some store manager points out that you should get expensive golf clubs now rather than wait until April. And I find myself thinking:

"Ah, perhaps I should pick up a set of ...WHAT AM I DOING?! I DON'T EVEN PLAY GOLF! I'VE NEVER BEEN ON A FREAKING GOLF COURSE IN MY LIFE!"

I'll be really happy come April 1st. A 3% tax hike is a small price to pay for the media frenzy to end.

Professional Takoyaki. What is takoyaki? Think a small ball-shaped runny pancake with a bit of boiled octopus in the center. Drench them in sauce and mayonnaise and enjoy. Great fast food.

We're having a Takoyaki party at work tonight. We'll make takoyaki, akashiyaki and side dishes. The organizer suggested we try making rice cooker cake for dessert. Should be a lot of fun; I'm bringing a camera and if it's a success I'll try to post about how to make it.

We'll be about a dozen people, so we need a fair amount of food and drink. Normally we'd assign a couple of people to take a car and do all the heavy shopping at some supermarket. This time the guy who organizes it simply ordered everything from an internet supermarket. Have to love the net.

Tuesday, March 25, 2014

There was a time when I was young and dumb and drank coffee only for the caffeine. I bought cheap pre-ground coffee, brewed it in an electric maker that I never got around to cleaning, then kept it warm by reheating it in a microwave oven. I've learned better since, and we now have a number of ways to brew, grind and roast coffee at home. But my favourite way to make coffee has to be the siphon brewer.

Hario da-1 Siphon Brewer. Coffee grounds in the top bowl, hot water in the bottom bowl. An alcohol heater is bringing the water to a boil.

I had never heard of siphon coffee before I came to Japan. It's an old coffee making method and used to be quite common until electric makers became widespread. It was largely forgotten in the west for many years but it remained popular here in Japan. Several Japanese companies make brewers, and a few coffee chains even specialize in serving it.

When I left NAIST in 2012, I received a small Hario one-cup siphon brewer as a gift. It's one of my favourite things, and I frequently use it on slow, lazy weekends, when coffee is a way to relax and unwind. The one drawback with this brewer is that I can make only one cup at a time, so I usually use it only when I'm home alone. One day I'll get a larger 2-3 cup siphon so we can have siphon coffee together.

The siphon brewer before assembly. On the left is the filter holder and cloth filter. In the center is the top bowl and the pipe, in its metal stand. To the right is the bottom bowl and the alcohol burner. The filter and ground coffee goes into the top, hot water goes in the bottom, and the burner heats the whole thing.

A siphon brewer works exactly like a spray can. You've got a sealed container with a liquid in the bottom and some empty space at the top. A pipe descends from the top down to the bottom of the container. Pressurized gas in the space at the top pushes the liquid through the pipe and up a hole at the top.

A spray can is filled with paint or other liquid and pressurized gas, and has a push-valve with a nozzle. A siphon brewer is filled with hot water, and when it boils the steam pressure pushes the boiling water up the pipe and into the top bowl where it mixes with the ground coffee. A filter over the hole to the top prevents the coffeegrounds from dropping down into the bottom container.

The boiling water has rushed up to the top bowl and the coffee is now merrily brewing away. The steam from the remaining water bubbles up through the coffee at the top. That pressure prevents the coffee from running back down, it mixes the water and the grinds, and keeps the coffee hot as it brews.

Once the coffee is done — about a minute and a half or so — you remove the heat source and the siphon goes into reverse. Without the heat source the steam condenses, the air cools and so the pressure quickly drops. The coffee in the top bowl gets sucked back down through the filter, leaving the coffee grinds at the top. Remove the top and you're left with a bowl of delicious coffee.

One cup worth of siphon coffee.

Since I had a stack of shots from the brewing process I figured I should try to use them for a simple stop-motion animation. I used GIMP to make a simple gif animation of the process(1), and here's the result.

A few notes:

The filter is kept in place with a spring that is hooked on to the bottom rim of the tube. Don't forget to hook it properly. If you forget, you end up with no coffe and a big mess to clean up. No points for guessing how I know that.

Stir the grinds with a chopstick when the hot water rushes up into the top bowl. If you don't, some coffe grinds might not get soaked properly in the hot water.

There's a short length of chain hanging off the filter hook at the bottom. This provides extra surface area for the hot water to turn into steam. Without it you could get superheated water and a sudden boil with too high pressure as a result.

This model has a small hole in the tube near the top. I think this is a simple pressure regulator. The water level is very close to the top in this small maker, so as the water and the air at the top is heating up, that small extra pressure would be enough to push water up the tube too early. With the hole the pressure is strong enough to push the water up only once it's boiling properly. Larger models apparently don't have this hole, as the pressure you need is great enough already.

Siphon coffee is smooth and fragrant, without the bitterness you can get with other methods. It's delicious, especially with good-quality beans. It does take a fair amount of time to prepare and there's a lot to clean up afterwards, so it's not something I do every day. But the process itself is slow and deliberate, almost meditative, so when I have the time, making the coffee is just as enjoyable as drinking it when done.

A cup of coffee.

#1 I shot the frames on a tripod and lit with strobes. But the brewer shifted around just a little bit as I handled it, and the ambient background light from a window changed slightly over time. Those subtle changes become very obvious when you stick the frames together as an animation. So I had to use GIMP to manually align the shots and correct the exposure on each one. Makes me appreciate why movie equipment is so oversized, precise and expensive.

I also used GIMP to generate the fading with a fade script. You can set individual frame transition times and preview animations within GIMP itself, and you can save optimized animated gifs directly from a stack of layers. The process is a bit clumsy, and for a more complicated animation I would write a set of scripts instead. But GIMP is plenty good enough for something simple such as this.

Tuesday, March 18, 2014

My laptop broke almost three weeks ago. The left screen hinge snapped off, making it effectively unusable. Repairs were straightforward, if not particularly cheap, and involved replacing the hinges and the lid cover that'd been damaged as well. The machine itself was fine, so I never lost any data, and I was able to back up and move any data I needed and clean the machine of any passwords and keys before I sent it in.

Meanwhile, I was going without the laptop. The workstation at the office let me continue working as usual during office hours, but I've had no real computer to use at home. I've got an ancient desktop that I've set up as a server at home; I use it for RSS feed reading, and I've installed Owncloud so I can access files from anywhere. And of course I can log in and run command-line stuff on it if I need to.

The Tablet Z and the Microsoft bluetooth keyboard. It's a pretty compact package and the keyboard mostly works well though the keys could stand to be a bit more sensitive.

I also have an Xperia Z tablet with a Microsoft bluetooth keyboard(1). It's not a real computer by any stretch, but far better than nothing. I've used it for travel with some success, and some people argue that tablets can already replace desktops for many users. This made for a neat experiment.

Software

I use gmail for public and work-related email, but I also installed the K-9 email client on the tablet for my home email. It works nicely enough, though it seems to lack spam filtering by default.

The bluetooth keyboard is decent, but of course it has a Japanese layout. I want to use a Swedish layout on it, but the problem is that the key that has '' and '|' in Swedish is absent on Japanese keyboards. I need to remap it to include these characters elsewhere. After some searching I found External Keyboard Helper, which lets you remap your external keyboard any way you could possibly want. It's inexpensive, and if you need it I can highly recommend it.

Hacker's Keyboard is better than the standard software keyboards for programming and such things, but it's not a substitute for a real hardware keyboard.

You need an editor. My favourite is Vim Touch which is the Vim editor(2) ported to Android and adapted slightly for touch screens. I would never use it on a phone, but on a tablet and with a bluetooth keyboard it works quite well. Just remember to set up your vimrc file; you get the default (and hopeless) Vim settings otherwise.

If Vim is not to your taste, there's plenty of other options. Textwarrior works well and has a neat "touchpad" function for cursor navigation. I bet there's piles of other good editors available, but I've never had reason to look around.

JuiceSSH is a decent SSH client. Key management is rather confusing but the terminal emulation works nicely, and it handles command keys well. Be aware that it actually honours the ancient ctrl-s/ctrl-q sequences to pause and restart terminal communication. If nothing suddenly seems to work you may have pressed ctrl-s by mistake when you meant some other combination. The Pro version doesn't really add anything critical, so stick with the free version if you want.

What Worked

Some things have worked well these past couple of weeks. Email has never been a problem, and I mostly used my tablet for reading RSS feeds already before the laptop broke. Owncloud has given me decent (if not problem-free) two-way access to files, and JuiceSSH lets me login to other machines.

Web browsing works OK too. Firefox mobile is a capable client, as is Chrome, and few sites give you any trouble these days. The only thing I sometimes run into are sites that try to actively decide the text size and end up with an unreadably tiny font for the relatively small, high-density screen of a tablet.

I could read PDFs with Adobe Reader, and Office Suite Pro (from an old Play store sale) let me handle a number of office formats. It doesn't work too well with open formats, though, so interoperability with Open/Libre Office is a bit problematic.

What Didn't Work

Some things don't work at all. The main issue is that I can forget about writing papers. WriteLaTeX is a really good online service for writing LaTeX-based papers and it works well on mobile too. But there is nothing equivalent to Inkscape/Illustrator or GNUplot on Android to make illustrations and graphs, and nothing like R or Pylab to analyze your data.

Also, I use Zotero to organize my papers. But it's not available in any form on Android, so I can't search the literature or generate citation lists while working on my tablet. And without citations papers will not get written, it's as simple as that.

Photography is not completely hopeless — as long as I use my phone camera, and accept using Snapseed or similar for image editing. It's nice and works well enough, but it's not Gimp (or Photoshop). This, by the way, is shimesaba — pickled mackerel — at a local izakaya.

My photography has effectively been on hold during this period. I don't have the tools to really edit RAW files from my digital camera, and I have no way to deal with scanned film on the tablet. File sizes are much too big, and I rely on a pile of homemade scripts for processing them. Besides, the small screen and lack of a precise pointer would make editing a frustrating chore.

Flickr is almost unusable. The web site doesn't work well at all on mobile and the Flickr app is not available to users in Japan. I have no idea why - I heard it was because of language support, but if somebody is already using the English-only website then surely they wouldn't mind an English-language app? I would probably quit Flickr altogether were I to use my tablet for photography.

Blogging is surprisingly difficult. The Blogger online editor is completely mouse-oriented and very difficult to use on a touch screen. There is a Blogger app but it fails badly in many ways; I've actually lost posts trying to use it. The only way I found to write posts was to write them in Vim on the tablet, then cut(3) and paste the text into the Blogger online editor when done. I'd have to use a different blogging platform were I to primarily use a tablet for blogging.

Programming is, if not impossible at least quite difficult and limited. There is really no viable way to code on the tablet itself that I have found - no Python or Ruby, and no useful port of any other common language that I can find.

I can log in to my home server and do programming there, but in a text-only environment. No plotting or other graphics in other words. There is an online Sage server that offers Python, R and other tools through the Sagemath system. It sort of works on Firefox mobile, but it really is made for a keyboard-and-mouse system so it's a bit difficult to navigate on a tablet. Also, it can be quite laggy and it even crashed the browser in the short time I tested it. In either case you need a good-quality connection at all times.

So...

So, life with just a tablet somewhat sucked. It kind of worked — for two weeks only, with a real computer at the office, and I still had to temporarily postpone several tasks that I just wasn't able to deal with. Could I do this without a work computer, or for longer than two weeks? No. Not the way I have things set up now.

But I do see how I could set things up better had I had the time. Could set up my home server with blogging software, image storage and gallery, and perhaps a graphical desktop I'd access through VNC. Or just select a blogging platform and photo site that are better supported under Android.

Research paper and citation management would still be problematic; I could set up my work machine for writing, but I usually do that at night at home, not at work. And I don't see a way to do photography without a real computer. A tablet is just too small, cramped and slow to edit images comfortably, and writing small scripts for image processing is all part of the fun for me.

Life with a tablet is not here for me yet, and I suspect it never will be. The tablet worked well for consuming content but not for producing it. A real laptop with Ubuntu gives me a large screen, great keyboard, accurate pointer, lots of computing power and memory, but most of all an open computing environment that encourages me to change and adapt the way I want. A tablet just plain does not.

#1 Whatever else you may think of Microsoft, they do make some excellent peripherals.

#2 If you are not a Vim user, feel free to ignore this. Trying to learn to use Vim on a tablet without any prior experience is just asking for trouble.

#3 You yank the text into the '*' register to get it into the copy buffer on Android, just as in other Linuxes. Never say Android is not Linux.

Monday, March 10, 2014

First, my computer is still being repaired, and this blog turns out to be difficult to manage with only a tablet. I would have written a long LASIK surgery post; instead I'll just tell you I'm still dependent on glasses for close-up seeing but see great in the distance so I'm really happy I went ahead with it.

Anyway, Japans sales tax will increase from 5% to 8% come April. This turns out to be an interesting case study in human behaviour. There is something of a rush to buy stuff before the deadline in a few weeks, even though it makes little sense for most products. For some reason, toilet paper is especially popular; our local store has even run out a few times the past couple of weeks. This is of course insane.

First, the raise is three percentage points only. That is tiny. A brand-name toilet paper pack costs around 5-600 yen so it will be only about 15 yen - about 15 US cents or 1 Swedish crown - higher come April 1st. What's more, it's a typical sale item; if you wait a while or shop around you can easily save a hundred yen or more. It's just hoarding behavior in other words, and has nothing to do with the price increase in itself.

And most other items similarly make little sense to buy specifically for the tax increase. Low-cost items just won't change price enough to make a difference. Appliances are expensive enough, but you'd save much more buying them during a regular sale than you'd ever save now, and many high-cost items such as full-size cars or real estate have fluid prices that depend mostly on your ability to shop around and to negotiate a deal. Indeed, it seems some prices have even been increasing from the surge in demand, and will probably be cheaper in April, not more expensive.

If you must take advantage of this, your best bet is expensive items that rarely or never go on sale, and that you were already planning to buy in the near future. Books, for instance, especially expensive textbooks and non-fiction. High-grade camera lenses and telescopes, professional tools, racing bicycles and some other sporting equipment probably make sense too. LASIK surgery and other professional services that are unlikely to simply absorb the extra cost.

For now I will avoid the rush, buy nothing, sit back and enjoy being a spectator.

About Me

From Sweden, living in Japan. I've worked as a researcher in cognitive science, neuroscience and robotics. Now I work at OIST in Okinawa, as a member of the Scientific Computing and Data Analysis section.