Thursday, October 30, 2008

"Fan menus" for user-interfaces

I just had a look on this page on pie-menus as an alternative to the usual 'vertical list' menus in most user-interfaces. I also had a quick skim of the comments, where there was some discussion about the pros and cons of both types of menus. E.g. while pie menus can be faster, the radial layout makes it harder to scan the available options.

And it made me wonder if there was a middle ground between the two. I have no idea whether this idea has been suggested before, but here goes... you might call these "Fan menus" (I'm thinking here of the asian foldable paper fans).

In this first picture, the user has clicked the mouse and the fan menu appears. Note that the main body of the menu itself appears to the side of where the mouse is clicked.



In this second image, the user has moved the mouse into the fanned out element for the third menu item. The selection process is similar to in a pie menu.


In this picture, the user has moved the mouse down to select the fourth item.


Naturally, there's potential issues with such a design, but I thought it'd be interesting to think about.

Unseen practice is easily mistaken for brilliance

as the title says
 

Unseen practice is easily mistaken for brilliance




This applies to sport, intellectual endeavours, etc

Monday, October 27, 2008

How to get rid of Vim's temp files

The default behavior in Vim when you save a file is to also put temporary files in the save directory. I'll explain how you can stop it from doing this. (I don't know Vim that well, but the following works).

What happens is that if you save a file called 'weeklyReport.txt' it also stores a temporary file with the same name appended with a tilde 'weeklyReport.txt~'. It also stores a swapfile there.

I found this really annoying, as it makes it awkward to scan the list of files in the directory (and the files were getting into my version control system - and yes, I'm sure I could find a way to avoid them getting in there, but I think the better solution is to not have them in the directory in the first place).

Here's a solution I found (I'm using it on Windows, but the only difference on other systems should be the file system syntax for specifying directories).

Open or create your settings file.

Here's some deails if you're not familiar with doing this.

When you install Vim, you've effectively installed two programs: Vim (the terminal version), and gVim (the GUI version), and each has its own settings file. For Vim, it's <VimDirectory>/_vimrc. For gVim it's <VimDirectory>/_gvimrc.

A note on what I mean by <VimDirectory>: the actual exectuable files are stored in a directory containing the vim version number - on my computer it is C:\Program Files\Vim\vim72. This is not the <VimDirectory> I'm referring to - the one I'm referring to is the parent directory of that, in my case C:\Program Files\Vim
Add the following lines to it (it shouldn't matter where):
" turn on backup
set backup

" Set where to store backups
set backupdir=c:\temp

" Set where to store swap files
set dir=c:\temp
This will store the tilde and swap files in c:\temp - you can change the directory location to wherever you want.



I found this soultion here, via this, and that via a google search.

Saturday, October 25, 2008

Apple's design lesson

It used to seem that plain, unadorned design

had to mean dull looks and boxy shapes.

But Apple have shown us that plain, unadorned design

can mean sleek and sexy.







I'm sure Apple aren't the first or only people to do this, but has anyone else made the point so strongly?

Tuesday, October 21, 2008

Moving the cursor around in the vi text editor

Moving the cursor around in the vi text editor

Note: so far, this is an incomplete list, and I'm experimenting with the way of presenting the keystrokes - the keys to press are specified in superscript text. Hopefully it's not too hard to work out.

There’s the usual options

  • lefth or rightl, upk or downj
  • start/end of: 0line$, {paragraph} or [[document]]
But also more powerful control
  • start/end of: bprevious-wordge or wnext-worde
    where a ‘word’ is anything delimited by non alphanumeric chars.
    There’s a parallel set of commands for which a ‘words’ delimited
    by whitespace:
    • start/end of Bprevious-wordE or Wnext-wordE
  • first non-whitespace char^ on line
  • end of the nth line downn$ from the current one
  • nextf<char> or previousF<char> occurrence of char on the line
    • or the character before the nextt<char> or previousT<char> occurrence
    • the nth next occurrence of char on the linenf<char>

Colin Powell's endorsement of Obama (video)


Sunday, October 12, 2008

Coconut milk, garlic and green-chilli dahl

updated, 9.4.09 and 21.01.2020

This dish is near perfect. It's so simple, yet so good. It's surprisingly flavoursome, given that it's only lentils, garlic, onion, green chillis, tumeric and coconut milk. Somehow the flavours combine so well, and the fragrance of the green chillis adds so much.

It's also very quick and easy to prepare, compared to most Indian dishes or other dahls.

If you cut most of the seeds from the chillis (as I do) the dahl isn't chilli hot. The flavour of the dish doesn't suit being too chilli hot.

Thanks to Mangalam for the recipe.

  • Red lentils, 1 cup
  • Garlic, 5 cloves
  • Onion, a small amount (cut out a wedge ½ cm thick at its thickest edge)
  • Tumeric powder, ½ tsp
  • Green serrano chillis, 1 or 2
    • it's important to use green serrano chillis, not jalapenos or red chillis. So much of the flavour and fragrance of this dish comes from chillis, and jalapenos don't have the right type of flavour or fragrance, and red chillis don't impart much fragrance or flavour.
  • Coconut milk, about 100ml
    • for a richer flavour, you can add more, or use coconut cream instead
  • Salt
  • Black pepper

Green serrano chillis.
Use these for this dish, not jalapenos or red chillis.
(image source)


Add the lentils to a saucepan and wash them till the water runs clear.

Add enough water to cover the top of the lentils by about 1cm.

Put it on a high heat.

Finely chop the onion and garlic and add them to the pan.

Add the tumeric.

Once it's boiling, turn it down to a brisk simmer. Stir occasionally so it doesn’t stick to the bottom.

Slice the chillis in half and take the seeds out.

The lentils should take about 20-25 mins to cook. You want them to be fairly broken down, so the dahl is relatively smooth. It's no big deal if they're still a bit rough, however. Add more water if it gets too dry at any point. If it's still too liquidy after 20-25 minutes, cook it longer to evaporate more of the water.

Once the lentils look cooked, add the chillis and cook for 3-5 mins.

Add the coconut milk, stir and cook gently for another couple of minutes.

Add salt and pepper to taste.

Remove the chilli pieces.

It's now ready to eat.


Notes:
  • If you want to add some vegetables, cauliflower goes well with it. Add some chopped cauliflower a couple of minutes before the end. The base recipe is so perfect, though, that I prefer it without any additions.
  • The chillis only need to be chopped in half because their function is to infuse their flavour and fragrance into the dahl. We remove them at the end. Their texture wouldn't be very nice to eat and they wouldn't add anything to the end result. You don't want to chop them into smaller pieces and leave them in the dahl, either. Their skin is a bit tough, and wouldn't be very pleasant to eat (it's not -- I've tried it), against the smooth texture of the dahl.

Friday, October 10, 2008

SvN: 'Do it yourself first'

Do it yourself first

You should never hire anyone for something you haven’t first struggled to do on your own. It’ll teach you most of what you need to know to actually interview candidates, it’ll allow you to understand the nature of the work better (do I even need to hire or can we outsource?), and you’ll know exactly what a job well done will look like. It’ll also give you a sense of whether the job is big enough for a full-time hire yet or if you can skimp by on your own (the latter is preferable if possible).
Sounds quite sensible. He also talks about the benefits for managing the roles and being able to empathise when the going gets tough.

Monday, October 06, 2008

Sweet Potato and Bean Enchiladas

Sweet Potato and Bean Enchiladas

In this vegetarian dish you get a nice melding of the flavours of the sweet potato and the beans.

Based on this recipe.

Makes 12 enchiladas

  • orange sweet potato, enough to fill 4 cups when mashed.
  • vegetable oil, 1 tablespoon
  • onion, 1, chopped
  • garlic, 4 cloves, minced
  • canned kidney beans, 6 cups, drained
    • Or some other beans like black beans or pinto beans. You could also use refried beans, or a mixture of kidney beans and refried beans. Just remember that a can of refried beans contains a greater volume of beans than a can of whole beans would -- so, for example, if you used 4 cans of kidney beans, you might use 3 cans of refried beans.
  • water, 2 cups
  • chilli powder, 3 tablespoons
  • ground cumin, 3 teaspoons
  • mustard, 4 teaspoons
  • soy sauce, 3 tablespoons
  • flour tortillas, 12 (10 inch), warmed
  • cheddar cheese, 225g, grated (you don't really need to measure this - just grate as much cheese as you like over the enchiladas)
  • Preheat oven to 175 degrees C
  • Prepare the filling
    • Bring some water to the boil, boil cubes of the sweet potato, drain out the water, then mash it.
    • Heat oil in a medium frying pan, and saute onion and garlic until soft.
    • Stir in the chilli powder and cumin, and continue stirring for a bit (probably a bit less than a minute would be enough).
    • Stir in the mustard and soy sauce.
    • Stir in beans, and mash.
    • Add in the mashed sweet potatoes.
    • Gradually stir in water, and heat until warm.
  • Make up the enchiladas
    • Divide the mixture evenly between the warm flour tortillas.
    • Top with cheese.
    • Roll up the tortillas (you want to make something a similar size to cannelloni -- I think the flavour/texture suits making them this size rather than something too much bigger in diameter) and place on a baking sheet.
  • Bake for 12 minutes in the preheated oven, and serve.
Can serve with sour cream, chopped spring onions and salsa. One of the comments on the original recipe suggests serving with fresh mango slices and avocado slizes sprinkled w/ lime & salt.

Thursday, October 02, 2008

WALL-E

Wow. It’s a pretty impressive film, especially when you consider how unpromising the setup sounds.

The two main characters are robots. WALL-E is a waste compaction robot whose body is essentially just a cube. He has two arms but catipillar treads for legs. He has two lenses for eyes but no other facial features. Eve is a egg shaped scout robot who flies around the place and whose body is pretty much featureless except for two arms and a pair of glowing eyes.

There's hardly any dialogue; pretty much the only things WALL-E and Eve ever say is their own name or the other’s name. They do express a lot of body language, though.

Most of the action takes place on a desolated future earth, covered with garbage (WALL-E’s job is cleaning it up) and devoid of life. There are some humans, later on in the picture, but they’re secondary characters – and have little traditional appeal (they’re lazy and obese, not good looking).

But with all this Pixar have put together a wonderful movie – a love story between the two robots – that is both very funny and quite touching.

Sunday, September 28, 2008

Grrrrrr!!!

I have been trying for the last hour to make a simple credit card payment on the net, and no matter what I try it doesn't work, and it doesn't give me any feedback as to why the payment was rejected (and I've checked that I have enough money in my Credit Card account). I've made plenty of such payments before with no hassles. It's driving me crazy :-)

Update. I received the following email from the company

I am afraid we had issues over the last 12 hours in processing credit cards due to an error with our Acquiring Bank and Payment Processor; this resulted in many orders being cancelled, including your orders.


We are very sorry if this has caused any problems, but due to the timing we were not aware of the issue until this morning.


We now believe everything is working okay, so you should be able to place your order successfully.

Saturday, September 13, 2008

“Formatted paste” feature for text editors

“Formatted paste” feature for preserving bold, italics and underlining formatting in text pasted into a plain text document, using the plain-text formatting conventions *bold*, /italics/ and _underlining_

Say you’ve copied some text from something like a Word document or a PDF document that contained bold, italics or underlining formatting. If you want to paste that into a text editor, you lose that formatting.

The “Formatted paste” feature would preserve it, using the common plain text conventions for representing such formatting: asterisks for bold text (like this: *bold text*), forwards slashes for italics (like this: /italicized text/) and underscores for underlining (like this: _underlined text_).

For example, the “Formatted paste” would automatically put underscores around bits of text that were originally underlined.

If you're wondering, I just suggested this feature to the makers of the two Text Editors I use TextPad and NoteTab.

Thursday, September 11, 2008

'Swipe' technology for touchsreen text input

It's a very neat idea - the touchscreen displays a keyboard, and you just draw a line with your finger that passes over the letters you want and it figures out what you're trying to type. If this works as good as it seems in the demo, this is going to be everywhere soon. See the (2 minute) video.

Wednesday, August 13, 2008

Gujerati Carrot Salad

Gujerati Carrot Salad

(adapted from Madhur Jaffrey's Indian Cooking)

This very simple salad tastes great. Even though it's an Indian dish, it isn't at all spicy (in flavouring or heat). It's essentially just grated carrot and cooked black mustard seeds, which have a nutty taste that really compliments the carrot. It'd go well with non Indian food as well.

  • carrots, 5, coarsely grated
  • salt, 1/4 tsp
  • vegetable oil, 2 tbsp
  • whole black mustard seeds, 1 tbsp
  • lemon juice, 2 tsp
  • In a bowl, toss the grated carrots with the salt
  • Heat the oil in a very small pan over a medium flame.
  • When very hot, put in the mustard seeds.
  • As soon as the mustard seeds begin to pop (this takes just a few seconds), pour the contents of the pan (the oil and seeds) over the carrots.
  • Add the lemon juice and toss
Can be served either at room temperature or cold.

Monday, August 04, 2008

Bill Gates: Making Capitalism More Creative

Making Capitalism More Creative by Bill Gates. I think it's worth a read.

[Update: the article is no located here]

Tuesday, July 29, 2008

Internet at last!

It's taken 39 days, since moving from my old place, to get internet access up and running at my new place. One of the reasons I haven't written to this blog much lately.

Wednesday, July 09, 2008

Combined laser scapel/probe for viewing/destroying individual cells

MIT Technology Review reports

Engineers at the University of Texas at Austin have patented a laser microscalpel that allows a surgeon to operate on tissue one cell at a time, precisely targeting disease while leaving healthy surrounding cells alive.
Current technologies for destroying a cell damage surrounding cells. The device also provides imagery of the cells -- using two-photon fluorescence microscopy -- to guide the surgery.

On what's left to be done
A problem that remains to be solved before the device can be used on patients is shrinking the width of the probe from 15 to 5 millimeters--the size of the standard tools used in endoscopic surgery--so that it will be compatible with existing surgical technology.
The research was published in the June 23 issue of Optics Express.

1 in 4 people of European descent carry an 'obesity gene'

1 in 4 people of European descent carry a gene that leads them to feel famished more often -- leading to a greater risk of obesity -- researchers have found. The gene has a significant impact on the production of several hormones controlling our appetite. The research was undertaken by an international team led by Imperial College London, and has been published in Nature Genetics.

Integrating medical devices in hospitals

Integrating medical devices in hospitals could help save lives. This article from MIT Technology Review gives a few examples of efforts underway to do this.

Wednesday, July 02, 2008

A train that never has to stop: clever 'out of the box' way for passengers to board and depart

Here's a neat idea for a train that trains wouldn't have to ever stop at stations. It's been developed by Taiwanese inventor Peng Yu-Lun. (via Carectomy).

On the top of the train sits a little car, and passengers wanting to get off the train can enter it before it reaches the next station. As the train drives through the station, the car slides off the top of the train and onto a railing beside the platform.

Passengers wanting to board the train get into a similar car at the platform before the train arrives, and it slides onto the train as it passes. So at each station, the car currently on the train slides off and a new one slides onto it.

The video on the linked page shows how it works.