Welcome to the adventure

Some cool Amazon-based projects/startups

Tuesday August 29, 2006

I was reading up on Amazon Web Services (AWS) for my next startup and discovered a few cool projects/startups that make use of them.

txtbux

Ever been in Barnes & Noble, tempted to buy a book, but wonder how much cheaper it is at Amazon? Turns out you can SMS the ISBN to this service, and it will text you back with the price on the spot. That is dang convenient. They make money by sending you an email afterwards with a link to the product you asked for; if you end up buying it through their email, they get a referer fee from Amazon.

BlueOrganizer

If you like collecting crap, this Firefox extension lets you bookmark products you see, mark if you want it or already have it, and include tags and comments. It’s gorgeous. Collections are stored via S3, and you can publish your favorite items as an RSS list.

MotionMall

These guys are making ads for your website that are actually useful. Build an ad from amazon product information (keywords,category) and include it on your site. It’s a flash applet with a ton of information in it; the product tiles are pretty and you can scroll through them to find more relevant products. Very cool.

As a side note, when did distributed storage (S3) and computation (EC2) become a commodity? Amazon has both of these as web services, for cheap. Time to start an indexing service for a few hundred bucks a month.

URL rewriting in IIS

Tuesday August 29, 2006

URL rewriting is the practice of rewriting the URLs in your website to reflect some logical content structure rather than a URL structure reflecting your implementation.

Your URL might look like this:
blog.com/showPosts.aspx?author=phil&view=newest

The user doesn’t care that you’re using ASP.NET (.aspx) for your website, and those crazy ?&= characters look funny. A better URL that means the same thing:
blog.com/phil/newest/

URL rewriting allows you to map requests to showPosts.aspx and rewrite them like the example URL above. As you can imagine, this helps search engines index your content more easily.

In Apache, it’s easy with mod_rewrite. In IIS on Windows, it’s not so easy. There is no built in support in IIS for URL rewriting.

If you have an ASP.NET application, you can do this through the HttpContext.RewritePath(string) method. There are frameworks built around this method that allow you to specify rewriting rules in your web.config as regular expressions. They only work on ASP.NET controlled resources (e.g. .aspx) and I think it’s an awkward way to go about it. There is also a killer flaw: the forms HTML generated by ASP.NET will not honor the rewritten URL. The form will postback using the filename of the script, which means postback data is completely lost when using ASP.NET URL rewriting frameworks. More details here. The workarounds are all formidable hacks… good luck.

Thankfully, there are plugins out there to do this directly in IIS, which is where it should be done. There are both free and non-free.

The best I’ve found is the free Ionic ISAPI Rewrite Filter. Just one DLL and a simple .ini file to edit. When you edit the .ini, you don’t need to restart your website; the changes are picked up immediately. The syntax for rewritten URLs is perl regular expressions, and the example file they ship has tons of examples, so you can just edit those without actually knowing regular expressions.

There are a few caveats. In the case of ASP.NET, you have to start using IIS on your development machine instead the server built into VS, so that you can test with URL rewriting on. This can be a hazardous task; I’ll write up the details for getting it working later.

Why phones today suck

Wednesday August 23, 2006

Well-put comment over at engadget. This pretty much sums up why phones today suck:

Surveys show that the vast majority of people didn’t want to ‘upgrade’ their phones with the new ‘features’ in 2003-2005, and most phone UIs are now only satisfying for 14-year-old girls. “Color” LCDs are a disaster for battery life and visibility in sunlight. Phone cameras are responsible for 99% of the worst and most depressing photographs ever taken. Meanwhile, with all the new bandwidth available to mobile phones, none has yet been allocated for improved audio fidelity, which is something that would actually improve the phone-nature of these phones.

Please, give me something thinner than my wallet that lets me make calls quickly without user interface lag while java loads up in the background to defrag my address book. Like this.

IE bug #750981297561 - CSS background images are not cached in IE

Wednesday August 23, 2006

I have this layout where a background image is used to implement some rounded corners on a posting. There are 10 postings per page, 2 images per posting, so that’s 20 images used with the background-image tag.

When an image is used with the background-image tag in IE 6.0, it is not cached! That means IE will ask your server for each image individually, resulting (in my case) in 20 seperate requests and 20X the bandwidth, and this happens for every single page. You’d think you’d only notice this travesty when inspecting server logs (and you notice your image files have a billion hits), but no - the lag time to load each and every image usually makes IE flicker like crazy when rendering your page.

Thankfully, there are a few, albeit annoying, fixes for this (more details here).

The best solution is to modify the settings on your server to tell IE to keep the images in cache and stop asking for them again and again!

Apache (Put in your .htaccess, you need mod_expires enabled):

ExpiresActive On
ExpiresDefault A18000
ExpiresByType image/gif “access plus 1 day”
ExpiresByType image/jpeg “access plus 1 day”
ExpiresByType image/jpg “access plus 1 day”
ExpiresByType image/png “access plus 1 day”

IIS:
Right click on your website, select properties. Under the HTTP headers tab, check “Enable Content Expiration”

Windows update vs. the user, round 2

Sunday August 20, 2006

What part of “Restart later” do you not understand?

ss2.jpg

ss3.jpg

ss4.jpg

ss5.jpg

That’s right - Windows Update disturbs your work with a non-minimzable dialog every 10 minutes to ask you the same freaking question you’ve answered 20 times already. The worst part is that somebody conciously planned this curious behavior, knew it would bother all humanity, and then implemented it. Where is the checkbox “never ask me again” ? IE is littered with them.

I imagine the very same devs and PMs who made this have since updated their machines, were hounded relentlessly by this dialog, cursed the implementation, and laughed at the irony.

Wiki hosting at wiki.com - cool business

Saturday August 19, 2006

This is a cool business idea. They host you a nice wiki for free, with simple admin pages and the like. The software is a customized version of MediaWiki.

This is great, because you can get a wiki up and running in just a few seconds, and it doesn’t require any hosting space. It also saves you from the pain and torture of setting up MediaWiki and modifying its presentation… although, I don’t think wiki.com lets you mess with the style sheet. Hopefully they’ll change that.

For their services, they place google ads on the top of the wiki. They get a lot of user content to run advertising against, and you get no-troubles wiki hosting. Pretty smart business plan.

What I’m wondering is how they got a hold of that domain name.

Howto setup mail forwarding on Ubuntu (it’s easy)

Saturday August 19, 2006

A common task is to set up mail forwarding on your web/mail server so that you can have email addresses like me@mydomain.com ; however, managing email on your server sucks, especially if you get into the horrors of courier imap or hula, and then you have to worry about backing up your email, spam filtering and lots of lovely tasks.

Easiest thing to do that I’ve found is to forward all my email to some gmail accounts and let google worry about the best way to manage, secure and filter email.

The world of mail management is a nasty one, but getting mail forwarding set up (specifically on Ubuntu) is very easy — it’s just a scenario that’s clearly documented, because everyone assumes you want to do more than email forwarding.

This is what I did:

apt-get install postfix
apt-get install mailx

postfix receives your mail, mailx will take it and forward it.

You then add a user for each person that has an email account. So if you have sales@mydomain.com, you’ll need to create a user account called sales, and edit a .forward file in their home directory.

sudo adduser sales
sudo nano /home/sales/.forward
sudo chown sales:users /home/sales/.forward

In the .forward file, just list the email address you want the mail to be forward to.

To test, you can cat /var/log/syslog to see mail the forwardings and if they’re successful.

Warning, Gmail

If you’re using gmail in this process in any way, beware. Testing this scenario cost me an hour. You can’t send an email from a gmail address and then have it forward right back to yourself. Gmail will apparently just ignore (or send to oblivion) any email it receives that looks exactly like the one it just sent (if sender and receiver are the same gmail address). My forwarding was working for a full hour before I realized that Gmail just wasn’t showing my emails. So, you must send emails from a different gmail address than the one you’re forwarding the emails to.

Some interesting Bahnsen material

Tuesday August 15, 2006

There’s a Wikipedia article about him.

An interview with him by Contra Mundum about theonomy and some other things.

Personal biography written by Ken Gentry.

A few Bahnsen debates/lectures available for free as MP3.

The rest of his audio material is at CMF.

Every time I read about him it makes me sad. I wish he were here… I would be in CA studying under him. Gentry wrote “anyone who has experienced Bahnsen’s instruction … knows that he was so careful in his presentation, so logical in his argumentation, so quick in his thinking, so biblical in his foundations, and so forceful in his conclusions that all hope of credible resistance was futile… certainly, though he is dead, yet he speaketh.”

CrystalTech initial impressions review - calamitous usability

Tuesday August 15, 2006

Signed up with CrystalTech the other day in an effort to run an asp.net 2.0 Atlas app that won’t run under Mono yet.

I found out within five seconds that this was not going to work. My app uses db4o for the database layer (highly recommended), and the db4o assembly requires full-trust. Shared-hosting providers like CrystalTech only give asp.net accounts partial-trust, to prevent security compromises. This sucks, but makes sense, and it is my fault for not realizing the requirements of my application or the capabilities of my provider. Since I need more control over my environment, I’m going to try a cheap Windows VPS at vpsland (who are not very well liked at WHT, but there are not too many Windows VPSs out there…) and upgrade as needed.

I stayed with CrystalTech for about a day and didn’t even host a site. So what can I even say about my hosting provider? CrystalTech got me up and running within minutes. Interaction with your account is limited to FTP and a control panel at “webcontrolcenter.com.” I’m used to Linux hosting and wanted to get files to my account via scp or Unison, and wanted to ssh in to my machine and run commands. Maybe Windows hosts in general do not provide that kind of service (my VPS box certainly will), but I would have at least liked ssh access.

As soon as I signed up I got an August email newsletter about general CrystalTech info. Apparently I’m subscribed (I don’t remember subscribing) and there’s no visible way to unsubscribe. Get this crap out of my inbox! Why do hosting providers think you care so much about their news? Tell me if you’re going to be down, otherwise leave me alone. I still to this day receive newsletters from CIHost, who I cancelled with years ago. Leaves a bad taste in my mouth.

But let’s talk about the usability nightmare that is the control center, which is what you’ll be using for most of your time at CrystalTech. I would rather slam my head in a car door repeatedly than use this application for more than a day. Apparently you’re supposed to do all of your adminstration through this panel, and it’s slooow. webcontrolcenter.com is one of the first websites hosted on Neptune (the planet), and the response times reflect that.

Setting up IIS permissions on a folder requires navigating a directory tree, where each folder being opened causes a full-page refresh. Each refresh takes 2-3 seconds. That can really try one’s patience if done often enough. Where is the AJAX?
ss3.png

How about logging in? They log you out with a quickness, as if someone is going to jump on your computer and use the control center in an open browser while you go to the bathroom! So logging back in will be a common action.

I have never clicked the correct button on this login form on my first try. I type in my credentials, look to the bottom right of the form, and find nothing. Where has that login button gone to? The designers of this panel, in their infinite wisdom, have violated years of usability research and have placed their buttons on the upper right of the form. Not only that, the most commonly used action (login) is placed in the middle of the form. I’ve clicked “Lookup” about five times now. Unfortunately, all of the dialogs in the web control center have this horrid design.
ss1.gif

Logging in initially takes about 6 seconds, as if their authentication servers are located here on earth, and the round trip back to Neptune is really dragging on the network.

On a positive note, the web panel they give you does have a lot of functionality in there. You can manage databases, mess with IIS, manage your mail preferences… you even get pretty graphs of your bandwidth usage, which is cool:
ss2.png

Oh, one last thing. For some assinine reason, their knowledge base (troubleshooting/howto articles) attempts to disable right clicking. I middle click on a link to open it in a new tab, and I get a big javascript dialog telling me “function disabled” (although, the tab still opened, and right clicking works fine). What web host uses a childish 1996 javascript hack to prevent you from stealing content (or whatever they’re trying to do with this…)? It just annoys the crap out of legitimate users.

All of my criticisms are aesthetic and superficial in a way, so take them with a grain of salt. I have no idea how reliable their data services actually are. However, the first thing this company shows you as a customer is its shabby web panel UI and its right-click-disabled support articles. These should be the most attractive parts of their service, because they are so user-visible. Poor execution in this area makes me suspect poor execution elsewhere.

Mission control, we have comments

Monday August 14, 2006

Commenting on posts has been disabled for some time now. I didn’t know this, because I’m a moron. However, commenting is now re-enabled. No account required.

It also doesn’t help that the akismet spam filter is implemented like this:

public bool IsSpam(Comment c){
  // TODO:
  // return AdvancedFilteringAlgorithms(c);
  return true;
}