Ramblings and thoughts by a Mensch or two.

Sunday, June 08, 2008

Programmer's Editors: The Bad and the Ugly

This started out as a comment on this blog entry, which discusses the long-running "programmers editor war." If you don't know what that's about, or what vi or Emacs are, then you can skip this entry without missing anything important.

It's been a pet peeve of mine that no editor exists that really does everything "right," even at a first approximation. As much as I'm probably temperamentally an Emacs-user (of the classic Emacs-vi options), I just can't quite get past the fact that I need to use Lisp to script it (Lisp offends me aesthetically; I know it's powerful, but it's also painful)...or the fact that its UI design dates to the '70s. Engineers didn't really know much about good user interface design back then--that's the decade that produced interfaces so friendly that millions of people were inspired to let their VCRs flash 12:00 rather than attempt to set the clock, and microwaves so poorly designed you practically had to read the manual to use them. Since then there has been a lot of research and positive progress on good user interface design paradigms, and a common, accessible interface standard (or two..?) has evolved that most people can just sit down and use. Yet Emacs and vi still use the same basic interface they started with, and both present a pretty steep learning curve for people who grew up on Microsoft Word. Yes, I could learn to really use either, but so far I haven't really been motivated to. I know that each is quite powerful in its own right, but I'd like to see something powerful and accessible.

I've been obsessed with finding The Best Editor since at least the mid-eighties, if not all the way back to 1976...though if I'd had access to a computer back then, I'm sure I would have cared. My day job forces me to use Windows, but also involves work on the Mac, and I've been maintaining Linux boxes for my own use since at least 1997. I have played with Emacs, but, like Lisp, it tends to annoy me from a user-interface perspective. I studied under Don Norman when he was teaching at UC San Diego, and I don't have much patience for a user interface that requires instructions, no matter how powerful you can be if you learn it.

What I want to see is an editor with the power of Emacs, but the basic UI of TextMate (or Notepad++ on Windows): I want it to be as usable as a modern GUI-based editor, though at the same time able to be driven completely from keyboard (to the point of being able to type in functions and run them, Emacs-style). I want it to be scriptable in whatever language I choose to script it in. And I want it to load quickly and act lightweight and fast--it should spring to life immediately, and if there are 20Mb of scripts that it needs to load, it should do it in the background and not block until a command I try to execute needs some code that hasn't been loaded yet (and while we're at it, it should KNOW which commands I frequently use and load their supporting scripts first...). Notepad++ on Windows again is closest to that goal--it starts up super-fast, and yet is moderately powerful (even without the zillion plug-ins you can add to it--and here I mean more of a TextMate-level power rather than Emacs-level, but you have to start somewhere).

At some point I'm going to make an attempt at starting such a project--I seriously obsess about this. I'd want to start from a solid base, possibly Notepad++, though I can't say for sure since I haven't dug in its code base yet. Since I'd want real Linux support (Notepad++ works under Wine, I understand, but that hardly counts), and probably real Mac support as well, what I'd be contemplating might end up being a pretty serious fork, though as it's based on Scintilla, it should be able to work on all three platforms with some cajoling. (The wxWidgets port of Scintilla works on Windows/Mac/Linux) If someone knows of such a project, and it's one that actually satisfies my goals, I'd happily join and contribute--I don't feel the need to start a new project as much as the need to have the editor it produces. :)

In the interim I've been using Visual SlickEdit, which has its own issues, but at least it does a lot of things well, IMHO. I also use vi when I need to do Linux configuration, but I'm a perpetual-novice vi user, and am under no illusion otherwise. I've also played with gVim from time to time (it's still my default on the Mac these days), and yes, my fingers do get used to toggling between modes, but I still don't really like it.

Saturday, May 24, 2008

Biscuits on an Elimination Diet

Yes, again I've been adventuring in the kitchen. This time I didn't go quite as far afield, starting with a recipe that was at least close to what I needed. But eggs, soy, corn, and dairy are still off the list, so I still couldn't make the recipe verbatim. Also, it seemed to need a higher oven temperature, given our high altitude--it might have just been the lack of butter, but the biscuits only just started to brown 40 minutes.

But they were still quite tasty. Here's my modified recipe:

Wheat, Egg, Gluten, and Dairy-Free Biscuits

Preheat an oven to 350 degrees, and grease a large pan. Mix together well in a large bowl, ideally in a bowl mixer:

1 1/2 c. brown rice flour
2 c. tapioca starch
1/2 c. oat flour
4 tsp. baking powder
2 tsp. salt
1 1/2 tsp. baking soda
2 tsp. xanthan gum

Cut into the above bowl, until you have the consistency of crumbs:

1/2 c. palm shortening

You can use a flat beater on a bowl mixer to cut the shortening through. The recipe on the previously referenced page suggested using a grater with chilled butter, but I didn't have time to attempt to chill the shortening; that would likely work just as well.

Stir in until the dry ingredients are just moistened:

2 Tbsp. olive oil
2 c. rice milk
1/2 c. water
1 Tbsp. vinegar

Use a large spoon to drop sixteen biscuits onto the greased pan, and put them in the oven for 30 minutes, or until they start to brown.

Enjoy!

Wednesday, May 21, 2008

Experiments in food

There's an old Dilbert strip where he's attempting to cook, but doesn't have the right ingredients...and so he makes a number of substitutions. Things like butter for marjoram, and eggs for cheese ("Eggs are just like cheese, but from chickens!"). By the time he's done, he ends up with a rather solid looked cake, having set out to make a soup...

Well, my wife is on an elimination diet, attempting to isolate which foods encourage colic-like behavior in our newborn son. But today was her birthday, so I felt the need to produce a "cake." With no dairy, eggs, or wheat. Or chocolate. Or corn products. Or soy. Or citrus...the list is long, but those are the key things someone might want to put in a cake that she's not eating for at least the next few days.

SO, what to do? Search the Internet for some really great recipe? If only I had planned ahead that far... Instead, there I am at Whole Foods looking at wheat flour substitutes, trying to guess which ones might work. And while I was at it, I was looking for gluten substitutes. If I'd had my wits about me, I might have also looked for egg substitutes, but I didn't get that far.

In any event, when I got back, I again scorned the Internet and instead used Joy of Cooking to give me a rough idea as to what one might do to create a cake. Then I winged it, fully realizing the risk that I would be reenacting a Dilbert cartoon. But it worked! At least, approximately. We ended up with something quite tasty, though I could have probably cooked it longer. I've adjusted the temperature below to attempt to cook it a bit better--the original called for 375, but it was looking quite brown, and seemed done when I took it out, though there were parts that were a bit less done.

So, in case someone else wants to experiment, here's what I did, give or take:

Wheat, Egg, Gluten, and Dairy-Free Tapioca Cake

Preheat an oven to 350 degrees, and grease a 8-9" cake pan.

Sift together three times:
1/2 cup oat flour
1/2 cup rice flour
1/4 cup tapioca flour
1 1/4 tsp baking powder
1/4 tsp pinch of salt.

Combine in a small bowl:
1/3 cup rice milk
1/4 tsp vanilla
dash of almond flavoring, unless you want the final result to taste like marzipan, in which case 1/4 tsp is about right. :)

Combine in a pan and whisk:
1/4 cup of tapioca flour
1/4 cup sugar
1 tsp xanthan gum (a powder--you can buy it at Whole Foods it turns out)
3 tbsp water (or more until the mixture is somewhat liquidy--didn't really measure this one...)

After you've done what you can to introduce bubbles in this, set it aside.

Then combine, in a bowl mixer if you have one:
1/3 Cup Coconut oil (palm oil would also probably work, or any solid-at-room-temperature oil).
1/2 Cup Sugar

Blend until smooth. Then alternate adding the flour mixture, one third at a time, and the rice milk mixture, half at a time. Blend some more. :)

Then we get back to that funny tapioca mixture. Pretend these are egg whites. They don't really look like them, but the finished product was tasty, so don't complain now. "Fold" them in to the batter using a rubber spatula, and spread the batter in the cake pan. Cook until a toothpick comes out clean--18-25 minutes, or so.



We used the extra almond flavoring, and it really did taste like marzipan--especially the parts that weren't as well cooked. The parts that did cook well were light and fluffy--I really liked it.

If you're not avoiding corn, you could cover it with a sugar glaze, mixing powdered sugar with water until you get the right consistency, and then pour/spread it over the cake (after it's cooled, of course!). Powdered sugar has corn starch in it, though. Odd, but true.

Slowing down from the fast lane

Living here in Colorado, after having lived my entire life in the Bay Area, is starting to have a real effect. In particular, I feel generally more relaxed than I ever have living near San Francisco. Sure, I'm working from home now--but I've worked from home before. This is different.

Life is slower here. What does that mean? Well, it's easier to be patient when driving around, for one. There aren't any incidents of road rage to speak of. People don't even use their horns. Really.

In any event, it's a more pleasant life, and I'm not sure that I want that California life back, now that I'm getting used to another alternative.

Getting the California weather back, that's another story entirely.

Tuesday, March 04, 2008

Snow in Boulder...again...

Before this year, I've never lived in an area where it snowed. I assumed that, here in Boulder, the snow would come a few times over the height of winter, and then it would be over. It would be cold, maybe, but snow would be a rare event.

Well, I guess I misjudged. In February it snowed several times. Mostly melted between times, but then it would snow again. Sometimes it would get downright warm--and then that night dump four inches. Now it's March, and I'm seeing more snow fall outside my window. Is this going to persist right into summer?

I guess I'll find out. At least the insulation in the house has been good: We don't typically end up turning on the heat until it's been cold outside for a week. Maybe I'm just running too many computers all the time...