Archive for the 'Uncategorized' Category

Send email as a text message to your iphone

If you want to email your phone and have it received as a text message, simple send an email to:

[10 digit iphone number]@txt.att.net

This will work for any iphone, or att customer.

This is useful if you want to have email alerts (like when the DOW goes below 8000) sent to your phone.

MySpace still more fun than Facebook

Full disclosure: I work at MySpace as a consultant on the MDP (MySpace Developer Platform) team.

I now use both social networks on a daily basis. And these are my observations:

  • Bulletins on myspace are funnier than posted items on Facebook. On MySpace, the bulletins tend to be funny, irreverant videos and images. On facebook, the posted items tend to be less funny images and reposts of New York Times repetititive and whiny op-ed columns. If I want the news, I’ll *read* the news.
  • MySpace has less of your coworkers and so users feel more at ease to be themselves. Case in point: I have friend profiles on myspace that are public, but private on facebook.
  • It’s still about the music. iLike is arguably Facebook’s de-facto music application. It’s a great app but it still doesn’t compare to the complete integration of music that MySpace has achieved. Being a musician and music-lover, this is what I care most about. I can listen to *full* songs, add them to playlists, listen to my friends playlists. It’s now a full-on personal and social radio station with whatever music I want. On facebook not everyone has the iLike app installed and I don’t always see the music notifications in my news feed. On MySpace, music is a first-class citizen. On Facebook, it’s a second-class citizen. Until this changes, MySpace will continue to be the social-network of choice for bands and music fans.
  • The chicks are cuter on myspace. It’s just true.

I think that these observations are largely dependent on the demographic of friends you have on each social network. On MySpace, I definitely have more artsy, musically-inclined friends. The profile customization and freedom on MySpace attracts these freer individuals. On Facebook, I have a more heterogenous set that includes friends, family, coworkers, school friends, etc.

The end result is that I end up going to Facebook to learn and see what my friends are doing. But I go to MySpace to get a laugh, listen to some tunes and have a good time. Each network has it’s place and we should accept that they can live in harmony, serving a different need in the ecosystem of internet social interactions.

Testing windows live writer

Hello world! Some changes here.

 

voltron

Bananas are a ticking time-bomb

bananas

Here’s the problem: You buy a bunch of bananas at the store and initially, they’re all green. Then one day…BOOM!!!…they’re all ripe at the same time. Now it’s a race against time. You might even have to eat two in one day. It’s banana overdose. Then you get sick of them and don’t want to buy bananas for a month. Then you miss them and the whole process begins anew.

Here’s my solution: Bananas should be sold individually, like apples. And stores should keep bananas at a variety of ripeness stages. This way, I could buy several bananas and enjoy them immediately and for the rest of the week. This doesn’t preclude stores from selling bananas the old-fashioned way, but it just offers the CHOICE of enjoying a bunch of bananas on MY schedule.

Ultimately, it’s a question of power. Why do bananas make the rules? And why do they all gang up against me?

This is a pointless rant on bananas. I’m sorry if you read this all the way through. God help you.

Logging the machine name (hostname) in Log4net

If you have a web farm where all servers are logging to the same place, then you’ll likely need to log the machine name as part of the log message. You can use the conversion pattern %P{log4net:HostName} to output the hostname. So, here’s what that looks like in context:





Invoking ASP.NET Web Services using a GET Request

To enable your .asmx webservices as GET requests, simply add the following to Web.config in the System.Web section. This will also fix the class of errors with this description: “Request format is unrecognized for URL unexpectedly ending in /MethodName”

Karate Typing

This game is awesome.

Decompressing a dict-formatted dictionary file using gunzip

For some reason this took me an hour to figure out. If you have a dictionary formatted in the dict database format, i.e. a .dict.dz file, you can decompress it using gunzip. That is, you don’t need the dictunzip tool, which is probably unavailable on a windows machine. The trick with using gunzip is to just specify the correct suffix (file extension). For some reason gunzip checks this before attempting to decompress. The command looks like this:

$ gunzip --suffix="dz" english.dict.dz

This command will generate an english.dict file that you can open in any ascii text editor.

Tracking UPS / Fedex / etc Packages Using isnoop.net RSS and Google Reader

isnoop.net Tracking is a great little site that shows you your package / shipment status in a google map. You can visually see the geographic location of your package as updated by the shipping carrier. They also generate you an rss link to your tracking page. You can copy this link and add it as subscription in Google Reader. I created a subscription folder called “Shipments” that has my multiple isnoop.net tracking rss feeds. This has been a great way to monitor all my shipments.

Uploading (’Putting’) binary files to Amazon S3 in C#

So I’ve had a technology crush on S3 since it came out but I’ve only recently started to explore it. After downloading the C# S3 SOAP sample code, the first thing I tried to do was upload a jpeg. The upload was pretty easy, but upon trying to access the file via the s3 url, I only received an unintelligible string sequence. Opening it in a hex editor proved that the file didn’t get uploaded as a byte sequence, but as one long string. The reason, it turns out, was that I was using the wrong api call (duh), the call that accepts a string parameter:

public PutObjectResult put(string bucket, string key, string obj, MetadataEntry[] metadata, Grant[] accessControlList)
{
DateTime timestamp = AWSDateFormatter.GetCurrentTimeResolvedToMillis();
string signature = makeSignature(”PutObjectInline”, timestamp);
ASCIIEncoding ae = new ASCIIEncoding();
return s3.PutObjectInline(bucket, key, metadata, ae.GetBytes( obj ), obj.Length, accessControlList, StorageClass.STANDARD, false, awsAccessKeyId, timestamp, true, signature, null);
}

To use this call, I had to convert my byte sequence into a string, which was then converted to another byte sequence using an ascii encoding. That process corrupts your original byte sequence because not all bytes fit into the ascii spectrum. But where was the correct method signature? It turns out it was omitted, at least in version dated 2006-10-13. Adding the following method to AwsConnection.cs fixed my upload woes:

public PutObjectResult put(string bucket, string key, byte[] objBytes, MetadataEntry[] metadata, Grant[] accessControlList)
{
DateTime timestamp = AWSDateFormatter.GetCurrentTimeResolvedToMillis();
string signature = makeSignature(”PutObjectInline”, timestamp);
return s3.PutObjectInline(bucket, key, metadata, objBytes, objBytes.Length, accessControlList, StorageClass.STANDARD, false, awsAccessKeyId, timestamp, true, signature, null);
}