Posts

Showing posts from July, 2006

Noise cancelling earphones really work

Image
At the duty free store I bought these noise cancelling earphones for the plane. It's not perfect, but it does a great job of cancelling most of the noise. Now I walk around town with these things (I know, I look like a dork), but it's wonderful not having to crank up the volume to 11 just to hear podcasts. The batteries last a very long time (weeks for me) unless I forget to turn them off.

Shangri-La Diet Update

Image
I went and bought a scale So that I can keep track of my Shangri-La Diet (SLD). I also wrote a little python program, using Matplotlib to draw a chart showing my progress as well. I don't know what my real starting weight was, since I bought the scale a week later. I thought it might be 100kg but 99kg produced a nicer graph. My target is about a kilo a week (2 pounds). I'll post new graphs every few weeks.

Why it's important to read the source

Somewhere I saw a post mentioning The Environmental Paradox of Bicycling (pdf), hinting that bicycling may not be the the best solution of our environmental woes. So I read the article and it's conclusion was that bicycling may not reduce the environmental impact because -- people will live longer. In other words, bicycles are more efficient than single occupand vehicles and it's better for people, the problem is that when people get exercise they live longer, and people who live longer use more resources than those who die off earlier.
I suppose that Bush save the environment even more by encouraging everyone to take up smoking, so that they die off sooner.

Weekly del.icio.us bookmarks

Shared bookmarks for del.icio.us user scott_kirkwood
Non-Errors in English -- tagged as: [english language grammar reference]SourceForge.net: GTK Ora -- Free Oracle frontend tagged as: [gnome opensource oracle tools]Python Web frameworks, Part 2: Web development with TurboGears and Python -- TurboGears tutorial on IBM's developer network tagged as: [article programming python tutorial]Istanbul - GNOME Live! -- Create a screencast in python (creates Ogg & Theora) tagged as: [flash graphics gnome linux opensource screencast python]Javassist -- To do metaprogramming in Java tagged as: [java library opensource]Video Encoding - FlowPlayer -- Encoding FLV files on Linux tagged as: [linux flash video]

Shangri-la Diet Update

It's been less than a week and I'm already seing some improvements. I noticed that my pants were a little too loose, so I tighted my belt. It was a belt hole that I had never used before!
So these are other things I've noticed:
Eating less sometimes it's like 1/2 other times or like 2/3rds from normal.I find that the healthier foods are suddenly a lot more appealing to me. Perhaps since I crave less calories I'm not diving for the meats as much.I'm drinking a little less. Normally I would drink two glasses of wine, now I'm happy with just one.I'm eating slower than before. I normally ate more than everyone else and finished first, now I'm eating less and finishing almost last. I'm chewing and savoring the food more.
I'm not more tired or groggy and I'm sleeping normally. I would have expected eating less calories would make me tired, but it hasn't at all.I prefer the oil to the sugar water. I take the sugar water at work, but I…

Weekly del.icio.us bookmarks

Shared bookmarks for del.icio.us user scott_kirkwood
Sugar - OLPCWiki -- This is the interface to the OLPC project. tagged as: [olpc graphics]Mondo Rescue - GPL disaster recovery solution -- I really need to do a backup..... tagged as: [backup dvd linux tools]http://nexgenwars.com/ -- Digged, look at the console sales in real-time? Unfortunately, only XBox 360 is selling (PS3 & Wii to come). tagged as: [games toread]Edgewall Software: Python Sidebar -- tagged as: [development extension firefox python reference]kbarcode.net: Home -- Print barcodes, may be useful if I get a barcode scanner. tagged as: [linux software barcode util]TAZ Forum :: A Computer, Gaming, and Social Network Community of Friends :: View topic - Tutorial - Spiffing Up Ubuntu 6.06 -- Alright, maybe I'll finally try out XGL tagged as: [graphics linux setup ubuntu]http://everythingisnt.com/hosts -- hosts file to block adds etc. tagged as: [computer linux security]DropTeam Current News -- Has tanks tagged as: …

Shangri-la Diet

I've started my first ever diet. Of course, I have been trying to eat well but never followed a diet in a book before. The Shangri-la Diet appeals to me (as a programmer) since it's more like a brain hack. The idea is that there is a trick to lower your "set point" the point a which you feel full and at the weight that your body wants to be. If you lower that point you eat less, if you eat less you loose weight. You'll never feel hungry because you are eating until you feel full, as you would normally. This diet has a lot of advantages:
There no restrictions on what to eatIt's cheap (practically free)You simply add something to your daily intake, sort of like taking a medicineIt's perfectly safeYou never feel hungry
You can choose how much weight you want to loose you can adjust things as you go alongIt's fast, you'll notice a change in eating habits in a day (or two).If you go off the 'diet' you wont bounce back to your old weight as …

Shortest Sudoku solver in Python

Mark Byer's site has some more Sudoku solvers here's a short one in Python that's only 178 bytes long:def r(a):i=a.find('0');~i or exit(a);[m
in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for
j in range(81)]or r(a[:i]+m+a[i+1:])for m in'%d'%5**18]
from sys import*;r(argv[1]) On the site is also shown a longer Perl version at 185 bytes:
use integer;sub R{for$i(grep!$A[$_],@x=0..80){%t=map{$_/27-$i/27|$_%9/3-$i%9/3&&$_
/9-$i/9&&($_-$i)%9?0:$A[$_]=>1}@x;R($A[$i]=$_)for grep!$t{$_},1..9;return$A[$i]=0}
die@A}@A=split//,<>;R I think the Python version is slightly easier to understand, although they are both quite cryptic.
I'm not sure why I find these programs fascinating. I think it reminds me that any program can be written in such a way that it's cryptic, even in Python. In addition, the code is small enough that you should be able to figure out how it works, and may learn something the process.
Related is:
how to sol…

Python 2.5 in beta

Somewhere in August is expected the stable release of Python 2.5. This version has some additions that I welcome:
The excellent sqlite3 library is included as standard (called pysqlite). Sqlite is a great, SQL database that supports a great deal of the SQL92 standard (more than many commercial databases). It's nice that it'll be available for any Python installation and should introduce beginners with some good SQL practices. Also, the database is very fast and uses only one file. Programs like Amarok use SQLite. The only problem I've experience with SQLite is it's lack of backwards compatibility. I you point a pysqlite3 program to a sqlite2 database it'll just complain.
ElementTree, this is a great library and it's great that it's part of the standard distribution. The C version is particularly fast and uses very little memory. What makes this library so great is that it's very intuitive and has read/write access. For some projects I was using …

Red Had Summit Videos

Image
If you haven't seen Cory Doctorow's dog and pony show, you should. There are some other videos here which are interesting as well.

AMD stock goes down?

Image
I was a little surprised that AMD's stocks went down today because of a small forecast warning for the next quarter. I like the AMD chips (more than the Intel chips) because they are faster and cheaper and came out first with a good 64 version (although for laptops I hear the Intels chips are cooler). What I really interests me in AMD is:
Their support for the OLPC (aka $100 laptop). They are making 1.0 watt Geode chips for this device.
Oops, I thought AMD was making the chips for the Nintendo Wii, but I got confused with ATI (which AMD is sometimes rumored to buy).
AMD signs a deal with Dell. Although Dell is months late in doing this and they are probably only doing this to strong arm Intel.Google may be switching to AMD chips. It makes sense for Google to go 64 bit since it may make some algorithms simpler (and would allow machines with more than 2 GB of RAM).

Barcodes in the news

Way back before there were many laser printers I wrote a piece of software (for fun!) to print out barcodes on a dot matrix printer. Ever since then I've been somewhat interested in barcodes, I guess it's the idea of organizing my life.
Some recent links:
Somebody decided to make barcodes more beautiful. Here's there's a free, community based database of barcodes (barecodepedia) If I write a program to keep track of groceries (or whatever) I'd put and get the information from here. I've been looking to print out barcodes and slashdot people appear to recommend kbarcode for linux.My idea is to have a book of barcodes for commands. Use cases:
Add a book
Scan "My library" barcode found in book, to put the program in that mode.Scan "Add Book" barcode to put the program in a mode to add a book that's in my library.Scan the book's ISBN andCheck if the ISBM is already in my library, if notGet book information from Amazon.comCheckout a bookSca…

Xgl for Linux is cool

Image
I've been avoiding adding Xgl since I normally have problems with my dual head setup, but I tried it a lunch and it works brilliantly. I followed TAZ's instructions and worked the first time.
It actually has some features which are a bit more than just "eye candy":
You can easy fade out (make transparent) your current window. This is useful to type in text from another location that happens to be hidden underneath the current window.Switching desktops is so much fun that you are more likely to use it.The non-active window is darker than the active window. With lot's of windows open on two screen it used to happen that I would type in the wrong window, this should happen less often.
Magnify. Here you can magnify what you're looking at temporarily. My eyes aren't as young as they used to be, so this can be useful.There is more movement when windows to come up, which help get to your attention.

Weekly del.icio.us bookmarks

Shared bookmarks for del.icio.us user scott_kirkwood
The Linux Action Show! Podcast -- To add to podnova. tagged as: [podcast linux]Fcron : a periodical command scheduler for Unix and Linux systems -- A cron that works assuming your machine is not turned on all the time. tagged as: [linux util tools]ardour | the new digital audio workstation -- Competitor to audacity? tagged as: [audio tool linux opensource]Boodler: a programmable soundscape tool -- Make pink noise and other sounds with python. tagged as: [python tool linux audio]Classic Texts In Computer Science -- tagged as: [article books free library reference research computer]Enlightened Gnome: The Ultimate in Ubuntu Eye Candy - Ubuntu Forums -- How to install E17 and E16 tagged as: [linux ubuntu enlightenment]Snowball -- Word stemmer for various language and language types. tagged as: [algorithm library python programming]HardInfo -- System information plus some benchmarks in a GUI tagged as: [hardware tools linux]GNOME Sudoku

Java Apps Becoming Useful

I'm no Java fan, but I find myself using more and more Java applications:
Eclipse a program for programmers which is surprisingly powerful and quite responsive. I'm using Eclipse not only for Java programming (blech) but also for Python and Web development.FreeMind is a great mind-mapping tool. I'm using it for keeping notes and todo lists, mostly. The interface and keyboard setup is very very intuitive.
KisKis (Keep it Secret! Keep it Safe!). It's a password manager which I prefer to use instead of PasswordSafe.
Frink is a calculating tool which I love using for unit conversion (even goes online to find the latest currency prices).