Posts

Showing posts from December, 2005

AjaxTrans

Here's a cool little demo app . It translates from one language to the other, as you type. Technorati Tags: programming , ajax , javascript

Bitter Brew

I opened a charming neighborhood coffee shop. Then it destroyed my life . Some good info here like: There is a golden rule, long cherished by restaurateurs, for determining whether a business is viable. Rent should take up no more than 25 percent of your revenue, another 25 percent should go toward payroll, and 35 percent should go toward the product. The remaining 15 percent is what you take home. It reminds of an article a few months ago that the hardest workers (in terms of hours worked per week) in Brasil are typically the owners of small businesses.

Linux Toys

Image
I'm thinking that in 2006 I may purchase a new toy and I'm thinking of two of them: One is the GP2X . It's basically a Linux game machine and costs only USD$200.00. Another device is less suitable as a game machine, but more suitable as an e-book reader. That's the Nokia 770 internet tablet, also a Linux machine. This one's quite a bit more expensive at USD$360.00, but the screen is a lot nicer and it has Wi-Fi connectivity. These machines are very close to perfect, and I'm a little torn between the two. The GP2X is inexpensive and with MAME should be quite the game machine. The Nokia 770 would be a very nice e-book, can be used for e-mail, browsing the web, PIM , but the battery lasts only 3 hours . I wish the 770 had a IR device so I could possibly use it as a universal remote. I like the fact that they are open Linux devices. This means that there's a chance that someone will make a compelling application for it, like a program to keep track of my gol...

Reddit.com, another social bookmarking site

Image
Del.icio.us is great Digg is maybe even better, but reddit.com is my current favorite. Like del.icio.us it's very clean and at the moment it provides the best (most interesting) links of the three. I also like the fact that they wrote the site in Python and have hundreds of millions of hits each day . Through reddit I also found this related article: Getting it Right (blink.com founder on why blink failed, and del.icio.us didn't) . Here's my saved list at reddit. I think their mascot should be a frog that says "reddit" instead of an ET.

On School Lunches: French vs American

This is a very interesting article which compares the menus of a school in NY state and a school near Paris. I can't believe the crap that American schoolchildren are given, it's embarrasing. Near the end of the article is a little funny: I had this difference in sophistication vividly demonstrated some years ago, when I was a student in Paris. I had been hired to babysit a five-year-old boy twice a week, in the hopes of teaching him a little English. One evening, as I was preparing a snack, I held up a piece of cheese. "Nicolas, in English this is called cheese . Can you say that?" "Cheeeese!" "Very good! Cheese. What would you call this in French?" "Reblochon." Five years old, and he knew his cheeses by name. I checked him on every one in the fridge. He even knew the names of the ones that were unpasteurized. Technorati Tags: food

pyContest - shortest Python coding contest

The pyContest is to make a Python program that pases some unit tests with the fewest number of characters possible. Mine has 191 characters, ranked 68 so far. Here's my submission: c=[ ' _ _ _ _ _ _ _ _ ', '| | | _| _||_||_ |_ ||_||_|', '|_| ||_ _| | _||_| ||_| _|'] def seven_seg(x): return '\n'.join([ ''.join([l[n*3:n*3+3] for n in map(int, x)]) for l in c] + ['']) The version I submitted is all on one line and doesn't have the assignment. I just prettied it up for you. Here's another, better solution .

$100 Laptop (OLPC)

Jim Getty has an interesting post on my favorite subject, the One Laptop Per Child (OLPC) project. He has scrounged together more technical information about the laptop and offers advice on how and why to develop programs for it. Here's a snippet: What does this mean to you, an open source developer? With luck, a huge new audience for your software all over the world; maybe of order 100,000,000 in ?07, if everything goes really well (there are about 1 billion school-age kids on the planet, and others want the same kind of hardware for more commercial use). Governments want to buy these by the shiploads. Their motivation is obvious: distributing conventional books is expensive, and all you get is a book. A computer at the $100 price point, if it can last 4-5 years, can be justified on that ground alone, much less the other uses of computers, such as the web, VOIP, email, IM, etc. Technorati Tags: olpc , programming

Why not self-publish

DonXml l ooks at self publishing a book versus a publishing house. Summarizing: doing all the work yourself and selling through Amazon.com you might be able to get $9.50 per book sold. If you go through a publishing company you might get about $1.60 a book.

First Rule of Usability. Don't listen to Users

An interesting article by Jakob Nielsen on usability. Here's a snippet: Watch what people actually do. Do not believe what people say they do. Definitely don't believe what people predict they may do in the future. We did some usability studies at Andyne which was very useful. We set up a video camera taping a beginner users using our product while we watched in another room. It was painful to watch, but after a few hours of this with a couple of users we had a list of simple changes which would greatly improve the usability of our product. Some of the problems that I remember could also have been 'solved' by using screencasts which are becoming quite popular. Technorati Tags: usability , programming

Linux: Useful utilities

There are two posts which list some of the most useful and most used utilities in linux. What I didn't know about was lsof, tcpdump, CDargs. Two that I use daily at work, which was also mentioned in the articles are SSH and GNU Screen. I also use ssh -L to tunnel to my machine at home and wget on my machine at home to get downloads that the company blocks. Technorati Tags: linux , util

Fun: Arcade Cabinet

Image
MAME ( M ultiple A rcade M achine E mulator) is a computer program which runs on PCs which can emulate a huge number of arcade games (i.e. the ones where you put in quarters). In fact there are more than 5848 rom sets that can be played which would be worth $1,462.00 if you played each one once for a 25 cents each! This guy built a MAME cabinet in about 24 hours. I'm salivating just looking at it. I might be able to build and identical one here for about R$1,350.00 (or USD$572.00) without the monitor and the computer (which I already have). Ever since I was a kid I had a dream of having a Robotron cabinet in my house, and now it could be possible, without even breaking the bank. Another idea is the image below, built by Joel McIntyre which is maybe a litte more practical, and cheaper too. I've been doing some digging and I found that the best version of MAME is AdvanceMame and the best front-end is AdvanceMenu . Basically the AdvanceMame tries to improve on the graphics an...

My 2006 year prediction

I think 2006 may be the year we see a new disruptive technology, with headless (linux) devices. We are already seeing it a bit with PVRs, but here's my ideal device. You go to the store and buy a box it's designed to sit in the closet or someplace out of the way. It can be used as a NAT / firewall . It has a huge hard drive and you can hot-swap in one more. If it finds another similar device on the network it will configure itself to be a mirror of the other device. If you don't have your house wired you can get the more popular WiFi version. So for a beginner it should be really easy, they ideally buy two of these boxes and plug them into the wall, one of them they plug into a cable modem or other the broadband connection. Both of them would be hotspots so by placing them in different locations you can get better WiFi coverage. They automatically talk to each other in a p2p fashion. If one of them dies it's ok because they are automatically mirroring each other, just...

PostgreSQL is goodness

A recent post by my old friend Sandy reminded me that I haven't posted much of anything about PostgreSQL on my blog. About 10 months ago I did some extensive research on open source databases and quickly zeroed in on PostgreSQL. Here in summary form are what's to like about PostgreSQL (PG). It's true open sources and free. MySQL is sorta, kinda open source but not to same level as PG. PG is very flexible and agnostic. There is nothing special about the function SUM as used in PG versus writing your own SUM function in C and hooking it in. This is also true of datatypes and nearly everything else (like indexes). You can create new datatypes, functions, index types etc. with absolutely no speed penalty and without requiring a recompile of PG. PG is very close to the features of Oracle. I use Oracle every day at work and have learned a lot of the ins and outs of that product. No doubt about it, Oracle is very quick, especially when you've got more than 4 processors, but...

Weekly del.icio.us bookmarks

Shared bookmarks for del.icio.us user scott_kirkwood The Linux Link: Portal To Linux Web Radio Shows -- tagged as: [podcast linux] feedbag » Blog Archive » Using Closures To Support Object-Oriented AJAX -- Everything you wanted to know about closures and JavaScript. tagged as: [ajax article javascript programming] Smart stuff - the world's smartest stuff. -- The Broken Window book looks interesting. tagged as: [shopping blog] Gobby -- Collaborative editing tool with each user using a different color tagged as: [agile development edit collaborative text] USB Flash Memory HOWTO -- I'm having problems with my USB mp3 player sometimes.... tagged as: [flash linux howto] Performance Tuning PostgreSQL -- Some interesting info here. tagged as: [postgres tips] Os pinguins também jogam! - Die bitch!!! -- Nice list of Linux games with little screen shots. tagged as: [games linux] del.icio.us/help/firefox/extension -- Firefox extension for slightly quicker del.icio.us tags. tagge...

Programming: CanvasGraph.js

Image
CanvasGraph is a library to draw charts using JavaScript. It doesn't work at the moment with Internet Explorer and I think SVG instead of Canvas is the way to go in the near future, but it's still useful in a lot of cases. Creating charts by running a program on the server to make PNG or GIF files is just lame. I really never understook why charts are not part of the HTML standard. SVG is a good step in the right direction, but it tries to compete with flash , why not compete with charts instead? Wouldn't it be cool if as you mouse over a chart it shows you the Y value at your current position and this would be part of the browser, oh well?

PostgreSQL is goodness

A recent post by my old friend Sandy reminded me that I haven't posted much of anything about PostgreSQL on my blog. About 10 months ago I did some extensive research on open source databases and quickly zeroed in on PostgreSQL. Here in summary form are what's to like about PostgreSQL (PG). It's true open sources and free. MySQL is sorta, kinda open source but not to same level as PG. PG is very flexible and agnostic. There is nothing special about the function SUM as used in PG versus writing your own SUM function in C and hooking it in. This is also true of datatypes and nearly everything else (like indexes). You can create new datatypes, functions, index types etc. with absolutely no speed penalty and without requiring a recompile of PG. PG is very close to the features of Oracle. I use Oracle every day at work and have learned a lot of the ins and outs of that product. No doubt about it, Oracle is very quick, especially when you've got more than 4 processors, but...

Politics: Dictator Bush

Bruce Schneier has a long article about President Bush secretly authorizing the NSA to engage in domestic spying without having to go through any legal procedures that regulate this activity. Here's part that caught my eye: The result is that the president's wartime powers, with its armies, battles, victories, and congressional declarations, now extend to the rhetorical "War on Terror": a war with no fronts, no boundaries, no opposing army, and -- most ominously -- no knowable "victory." Investigations, arrests and trials are not tools of war. But according to the Yoo memo, the president can define war however he chooses, and remain "at war" for as long as he chooses. This is indefinite dictatorial power. And I don't use that term lightly; the very definition of a dictatorship is a system that puts a ruler above the law. In the weeks after 9/11, while America and the world were grieving, Bush built a legal rationale for a dictatorship. Then he...

Programming: Selenium, more than just an element.

Selenium is more than just element 34 on the periodic table. It's also a very cool way of writing functional tests for your web applications. As an asside I'll describe my foray into testing for web apps.I decided the best way of writing these tests is to make some XML files with commands to create for GET or POST and read the results. I worked fairly well quite quickly, but I saw that I needed to have cookies working to test properly. A little more code and I had cookies. Then I noticed that redirects weren't working. A little more code and I got that working as well. Then I had the problem with pages with passwords - fixed. Then I wanted to test multiple languages, added. Now I have a reasonably complete testing suite for Python which uses XML as the testing source. But then I found some problems with my JavaScript code on the page and realized there was no way for me to test that. I would have to drive IE or Firefox from Python and it was just too much work. Selenium ...

Weekly del.icio.us bookmarks

A little tardy with the weekly bookmarks this week because del.icio.us was down when the script to generate it was run (through crontab), plus the accent in one of the links screwed up my Python script, here it is.. Shared bookmarks for del.icio.us user scott_kirkwood The Linux Link: Portal To Linux Web Radio Shows -- tagged as: [podcast linux] feedbag » Blog Archive » Using Closures To Support Object-Oriented AJAX -- Everything you wanted to know about closures and JavaScript. tagged as: [ajax article javascript programming] Smart stuff - the world's smartest stuff. -- The Broken Window book looks interesting. tagged as: [shopping blog] Gobby -- Collaborative editing tool with each user using a different color tagged as: [agile development edit collaborative text] USB Flash Memory HOWTO -- I'm having problems with my USB mp3 player sometimes.... tagged as: [flash linux howto] Performance Tuning PostgreSQL -- Some interesting info here. tagged as: [postgres tips] Os pin...

Programming: Premature optimization is the root of all evil?

There is something about the phrase "Premature optimization is the root of all evil" that gets in my crow. Perhaps it's because I like doing optimization, or perhaps because I've seen code go into production that is embarrassingly slow. [BTW, the full quote by Hoare and Knuth is: "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.", I have less issues with the full quote] There's another expression that's similar in the Agile world which is "Ain't gonna need it". Basically, don't put in code unless you need it right now to fulfill your tests. There's a tendency for programmers to put in code because they think they'll need it sometime in the future. When it finally does get used, a year later, it doesn't work because it was never tested. The evil here is over-engineering the code. I've seen junior (and not so junior) developers create code which I th...

Politics: Patriot act renewal rejected

The patriot act was designed to be a temporary measure for "times of war". I put that it quotes because there really doesn't exist a war in the traditional sense when it comes to terrorism. I mean, who surrenders, which land or resources do you get when you "win", where is the enemy? The government could have this "war" go on forever, because it'll never end against terrorism (according to them). So the Patriot act is dissolved . Finally, something that the Bush administration did right! Oh, I'm sorry, the Bush administration was against dissolving the "Patriot" act - never mind - perfect record.

You really need to checkout TurboGears

Image
I've been playing with TurboGears for a little while and it's great (and just getting better ). What is it? The main site calls it a "[..]rapid web development megaframework you've been looking for." I've heard it referred to being something akin to a Linux distribution, just like Linux has a variety of distress that cater to different needs by pulling in different code from different projects: TurboGears is a web development framework that pulls in: MochiKit - an AJAX/JavaScript library ( screencast ) Kid - a templating framework ( docs ) CherryPy - a web development framework ( tutorial ) SQLObject - an object relational manager ( docs ) It pulls together these separate best-of-breed projects and puts them together in one simple install, adds some shell scripts and documentation and give it a cool name and logo. There's also some extra libraries included . You really need to check out the screen casts. Download this movie and in 20 minutes Kevin...

Ubuntu: Some USB problems

I wrote a little Python program to copy my downloaded podcasts to my MP3 player(s). It works farely well, except, on occasion I'll get a podcast that's scrambled. It'll start with one podcast and in the middle there would be another. It's like the FAT table is screwed up or wasn't properly flushed. I have noticed that when I unmount the MP3 player using the icon in the desktop it'll go away immediately, but the device itself will continue flashing on it's display (maybe indicating that it's copying something?). Eventually, it would stop flashing. Also, if I run "mount -l" I'll still see the drive for a while until it get's fully unmounted. What I need is a way to be sure that it's safe to unplug the device or a method of forcing a flush to disk after I've copied everything, it's very fustrating. So far I've found this article usb flashkey disk copy error . There's also the USB Flash Memory Howto .

Relation to teeth brushing and weight loss

...there is no clear evidence that schools are contributing to the growth in obesity. The obesity-related complaints about school lunches, vending machines, and physical education are based largely on the assumption that these factors are causing our kids to get fat. Yet, I find little evidence to support this claim. For example, in looking at survey data on the health behavior of middle and high school students, the factor I found that best predicted whether or not a kid was obese was tooth brushing [emphasis added]. More important than how much junk food they ate, soda they drank, or physical education they received was whether or not they brushed their teeth. Among fourteen- to seventeen-year-olds, only 16 percent of kids who brushed their teeth more than once a day were overweight compared to 24 percent who brushed less than once a day. Of course, other factors were important as well -- teenagers who play more computer games, eat more fast-food, and drink less whole milk wer...

First wikipedia entry

Often when writing a blog entry I'll point to a wikipedia entry. The other day I wanted to point to firehosing , which didn't exist in wikipedia when I checked. So I went and created it. It looks like it might get deleted, since it's more like a dictionary entry than a wikipedia entry, so I've also put in a wiktionary entry as well. Hopefully, one will get accepted.

Weekly del.icio.us bookmarks

Shared bookmarks for del.icio.us user scott_kirkwood: gumstix - expansion boards -- Linux based robot boards tagged as: [electronics robots] Linux.com | Creating appealing video software demos in Linux -- Even better than screenshots! tagged as: [linux video demo] How to Handle Your Child's Temper Tantrum - WikiHow -- tagged as: [kids victor] Code Sermon > Home -- Might be an interesting podcast. tagged as: [podcast programming] BackupPC: Open Source Backup to disk -- Another backup solution. tagged as: [backup linux perl] Linux.com | Simplifying backups -- Yet another backup program. tagged as: [backup linux python] TiVo to develop TV ad search service - Yahoo! News -- I don't know why ADs aren't easier to find and download. tagged as: [toblog] Urwid - curses-based User Interface Library for Python -- Cool library for Python, even works on the web! tagged as: [gui python library] Saving the Net: How to Keep the Carriers from Flushing the Net Down the Tubes | L...

OLPC One Laptop Per Child

The $100.00 laptop is one of my favorite pieces of news that I've been following closely . The short of it is that I think it's a great idea. On slashdot there's a recent thread on it. I see the same comments over and over: Laptops? These kids need food and water! $100.00 could be better spent elsewhere. It'll be sold for food and money $100.00 - can't be done 3rd world, what about Americans? So here are my answers: Laptops? These kids need food and water! These laptops are mostly for kids that are too poor to buy a computer but rich enough to have food and water. There are kids in the US that go to school hungry as well. For those kids laptops aren't the solution. However, there are lots (most) kids that are on the edge of technology, but not quite there. Or they might have parents who have the money but don't know computers and don't want to "waste" their money on a computer or laptop. $100.00 could be better spent elsewhere. ...