Watching the Euro 2008 games. Yes, many days late.
The Germany-Turkey game was an interesting one. The entire time watching I was reminded of our European trip, oh, about 10 years ago.
We spent a lot of time sharing trains with lots of people from lots of countries. Twice with …
MoreI'm about buy a new laptop for my wife, and it has me thinking about how to keep computers for non-technical folks virus free.
The best method I can think of is to have a virtual machine running on her machine. She can keep her important things on the core …
MoreThis is kind of pretty:
void log(lazy char[] dg)
{
if (logging)
fwritefln(logfile, dg());
}
void foo(int i)
{
log("Entering foo() with i set to " ~ toString(i));
}
Note the lazy keyword in the definition of the log function, which tells D to only evaluate the value if needed (ie …
MoreIf you've spent any time with virtualized environments you know how effective and productive they are. The process of expanding capacity for FaceDouble, for example, became significantly simpler once they moved to depolying virtual servers, and SmugMug has been singing the praises of Amazon's EC2 with a clever system to …
MoreI have a need to verify user email addresses, which I've been doing the traditional way - sending an email with a secret to the user's address and having them reply or click on a URL.
Unfortunately this is not optimal - emails tend to not make it to the user, go …
MoreLooks like Time Warner has dicontinued usenet service:
A good reason to leave Time Warner. I currently have the majority of my services through them (cable, phone, web), I'll be looking for alternatives.
MoreJust finished watching Russia vs. Netherlands. Most of it anyway - I'd only DVR'd the main match, missed most of the extra time.
What a fantastic game. Arshavin is the real deal, looking forward to seeing more of him. Sorry to all my Dutch buddies, but Russia really looked like they …
MoreI find seeing the results of Pig commands on sample data a good companion to the PigLatin language reference, so I setup some simple sample data and ran commands, capturing the results.Here's the sample data as well as the commands:
/data/one:
a A 1
b B 2
c …
I revived a bunch of mp3 onto my windows box. I want to get them onto my iPhone. Should be drop-dead simple.
I've spent 10 minutes with iTunes, pressed the "Sync" button a ridiculous number of times, and I'm no closer to getting the songs onto the iPhone.
I found …
MoreAs I waste yet another styrofoam cup and stare at a desk full of various thank you / congratulations / etc chachkis, it occurs to me that if I was handed a real cup / mug instead of the various junk I currently get I could stop wasting styrofoam. A cup is useful …
MoreIf you're running into the problem where unicode items in your Django / MySQL project are displayed as question marks, here's the likely problem and solution, found in this django-users thread:
The likely problem is that your MySQL encoding is set to latin1, as opposed to utf8. You can check this …
MoreLaughed out loud at this one:
Static typing is like giving a drunk a bunch of breath mints and saying "Don't drive drunk. But if you must, use these breath mints in case you get pulled over."
Via Simon.
MoreSay you want to monitor changes to instances of a model and update something based on the changes. In my example I wanted to maintain a sum of the values that had certain characteristics. You can accomplish this with Django Signals.
Signals are events that fire at various pre-defined moments …
MoreStep 1: Give the baby some inappropriate sugary thing since mom is not home.
Step 2: Go to the backyard. Get fascinated by the fact that you get get better wifi reception in the backyard than you do inside the house.
Step 3: Come back to consciousness as you realize …
MoreThe following worked for me for unlocking the Cingular BlackBerry Pearl I recently got:
Don Dodge discussed the very small percentage of content creators versus viewers:
in a group of 100 people online, one will create content, 10 will "interact" with it (commenting or adding to it) and the other 89 will just view it.
True enough. However, it's important not to discount the …
MoreYou're busy making hamburgers and suddenly you get lots of customers. You want to scale your service to take care of more customers more quickly.
Threads: all of your workers share a single set of tools, utensils, and the same workspace. One puts mustard on the spreader, turns to grab …
MoreIn case you didn't believe my earlier ramblings, here's the short version:
A small group of schools account for a disproportionate amount of billionaire education. Just 20 universities and colleges account for 52% of the billionaire graduates while 182 schools count for the remainder.
Via Yahoo Finance.
MoreThere are about a million different ways to execute an external program from Python. Here's the right way:
import subprocess
subprocess.call('''zcat %s | tr '\02\03' '\r\n' | ssh %s "hadoop dfs -put - %s"''' %
(local, DEST, remote), shell=True)
Where what you put inside the call statement is what …
MoreInteresting benchmarks in PEP 371 -- Addition of the Processing module to the standard library. In short, standard Python threads perform worse than non-threaded in almost every benchmark, while the multi-process Processing module generally does as you'd expect and reduces processing time proportional to the number of processors / cores.
You could …
More