Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Site Map | RSS2 | Atom | Backend

Archive for 2010-02

« Previous Entries

fullscreen without distractions

Step 1. Set a hotkey to make applications run full-screened in Gnome:

gconftool-2 --type string --set \
  /apps/metacity/window_keybindings/toggle_fullscreen \
  '<Ctrl><Alt>f'

Step 2. Run your text editor and terminal window fullscreen.

Step 3. Code without distractions.

Hal Canary | Computers & Code | 2010-02-27 20:23:17 UTC
Permanent Link |
Comments Off (but feel free to email)

Stew Thing Recipe.

Stew Thing Recipe.
(A work in progress. I’m making it up as I go.)

  • Half a pound of cooked, then rinsed lentils
  • One can of red beans, rinsed
  • One can of black beans, rinsed
  • Chopped carrots, bell peppers, and onions
  • Olive oil
  • Salt, black pepper, garlic powder, chili powder
  1. Start cooking the lentils first.
  2. Rinse the beans.
  3. After around fifteen minutes, start sautéing the veggies in oil; use a shallow pot; add generous amounts of the spices.
  4. Rinse the lentils after they are done cooking.
  5. Add the beans and lentils.
  6. Mix it all together; add more spices; add some water; let it cook together.

Should I add cumin? Fresh garlic?

Serve over rice, unless you want to limit your carbohydrate intake.

Hal Canary | Food | 2010-02-26 08:31:33 UTC
Permanent Link |
Comments Off (but feel free to email)

zip-one-file

#!/bin/sh
## zip-one-file
## DTPD
for x in "$@"; do
  zip "${x}.zip" "$x"
done

Hal Canary | Computers & Code | 2010-02-24 08:47:50 UTC
Permanent Link |
Comments Off (but feel free to email)

private static String itoa(int i)

I like Java’s verbosity; it is consistant and clear. But sometimes you want succinct things.

/** "Returns a String object representing the specified integer." */
private static String itoa(int i){
	return Integer.toString(i);
}
/** "Returns a String object representing this Integer's value." */
private static String itoa(Integer i){
	return i.toString();
}

Also, I realized I had been using assert statements without -enableassertions for the last month, which did me very little good. A good habit, I suppose.


ALSO:

private static void printl(String s) {
	System.out.println(s);
}
private static void error(String s) {
	System.err.println(s);
}

Hal Canary | Computers & Code | 2010-02-21 11:19:27 UTC
Permanent Link |
Comments Off (but feel free to email)

the 90% diet

Updates to my diet: I’ve gone 90% vegan. That means that I have two or three meals a week that include meat and cheese. I also put milk in my coffee, but I only drink coffee a couple of times a week.

To make up for the protein, I’m eating a lot more beans and lentils. Lentils (like oatmeal porridge) can be cooked ahead of time. I’m experimenting with cooking them with veggies and spices. I’m also adding more variety of fresh veggies to the diet, including a lot of raw broccoli.

I’ve also gotten lazy about baking bread, so I’m buying whole-wheat bagels from the grocery and freezing them. I’ll pull one out each day to thaw by lunch time. I can mop up the dressing off my salad bowl with the bread to season the bread and make cleanup faster.

Hal Canary | bariatrics, Food | 2010-02-20 12:30:39 UTC
Permanent Link |
Comments Off (but feel free to email)

Laissez-faire environmentalism

Every so often, I meet someone who claims to be a libertarian. When I was young and stupid, I held these same beliefs; so I have to suppress the urge to educate them. Instead, I’ll rant on my blog.

The following is from the Libertarian Party’s platform

We support a clean and healthy environment and sensible use of our natural resources. Private landowners and conservation groups have a vested interest in maintaining natural resources. Pollution and misuse of resources cause damage to our ecosystem. Governments, unlike private businesses, are unaccountable for such damage done to our environment and have a terrible track record when it comes to environmental protection. Protecting the environment requires a clear definition and enforcement of individual rights in resources like land, water, air, and wildlife. Free markets and property rights stimulate the technological innovations and behavioral changes required to protect our environment and ecosystems. We realize that our planet’s climate is constantly changing, but environmental advocates and social pressure are the most effective means of changing public behavior.

(source)

That’s crazy. To begin with, it goes against every bit of real-world evidence on the subject. Here’s why. If you own a business, it makes sense to organize it as a limited liability company; this shields your family’s assets from the liabilities of the business. You can also grow the business faster by selling shares. Suddenly, you have a corporation and officers of the corporation have a single duty: to make as much money as possible for the shareholders by any legal means. In the absence of environmental laws and regulations, that will often mean lots of pollution. To protect itself from lawsuits, the corporation can create a second corporation to do the actual polluting. That second corporation will have very few assets. If it gets sued by those hurt by the pollution, it can go bankrupt, leaving the shareholders of the first corporation reaping the profits, shielded by limited liability.

Strong property rights are no substitute for regulations, unless you want to eliminate the corporation.

Hal Canary | Economics, Politics | 2010-02-20 09:46:16 UTC
Permanent Link |
Comments Off (but feel free to email)

On “Big Government”

It’s so hard to argue against people who lie about what they believe. Remember that GWB increased the size of government more than any other president.

You are not against “big government”; you are in favor of “let’s trim 10-20% off the government while leaving it pretty big” or something like that.

If you really mean “let’s trim 10-20%” can we please stop being so melodramatic? As I’ve whined before, moving government size, or tax brackets, by a few percent is not the difference between capitalism and socialism.

  • Libertarian: government should be 5% of its current size.
  • Socialist: government should be 200% of its current size.
  • Republicans and Democrats judged by actions not rhetoric: government should be 105% of whatever it just was. Disagreement on where the new 5% goes.

(—Havoc Pennington)

Hal Canary | Politics | 2010-02-20 09:26:42 UTC
Permanent Link |
Comments Off (but feel free to email)

paygo + an exception

New idea. We reinstitute pay-as-you-go to the federal budget on a permanent basis, with the exception that it doesn’t apply in years where the unemployment rate is over 6%

Hal Canary | Economics, Politics | 2010-02-20 09:10:46 UTC
Permanent Link |
Comments Off (but feel free to email)

Judging a Book by its Cover

Slapped by the Invisible Hand: The Panic of 2007 by Gary Gorton. (9780199734153)

Hal Canary | Books, Judging a Book by its Cover | 2010-02-19 19:42:09 UTC
Permanent Link |
Comments Off (but feel free to email)

Mplayer and Gnome’s screensaver.

#!/bin/sh
#DTPD
gnome-screensaver-command --inhibit &
INHIBIT_PID=$!
mplayer -dvd-device /dev/scd0 -ontop \
	-fs dvdnav:// -nocache 2> /dev/null
kill $INHIBIT_PID

This is how to use gnome-screensaver’s inhibit command with a video player such as mplayer.

Hal Canary | Computers & Code | 2010-02-17 21:05:06 UTC
Permanent Link |
Comments Off (but feel free to email)

Olive Oil Balsamic Vinaigrette

Olive Oil Balsamic Vinaigrette
(makes 2 cups)

  • Balsamic Vinegar, 1/2 cup
  • Yellow Mustard, 2 tablespoons
  • Extra Virgin Olive Oil, 1+3/8 cups
  • Salt to taste
  • ground black pepper to taste
  • Spices (onion, garlic, et cetera) to taste

Shake well. Use sparingly, as it has a lot of calories.

Hal Canary | Food | 2010-02-13 09:09:09 UTC
Permanent Link |
Comments Off (but feel free to email)

food labels

I had a dream that the big food companies had subverted FDA regulations by inventing new chemicals and giving them funny names: “Ingredients: Water, Sweetness and Light (TM), Lovely Hugs (TM), spices, Beautiful Tastiness (TM), artificial flavoring, and natural flavoring.”

Hal Canary | Dreams | 2010-02-13 08:41:55 UTC
Permanent Link |
Comments Off (but feel free to email)

« Previous Entries

Copyright 1997-2011 by Hal Canary.
mailto: h3 at halcanary dot org
http://halcanary.org