My problem with Heroku
We've all been hearing a lot about Heroku lately. In fact, it seems that almost every rails blog has a post about how you "must use Heroku!' or you're an idiot to not using Heroku. Over the last month or so, I've been working on a project hosted on Heroku. Now this app has a lot of issues including code written by a billion developers that is often stupid or redundant and inconsistent staging and production code, schema, and data. Needless ...
Rails is awesome … too bad the creater and much of the community are total dickwads.
In a moment of genuine unintended irony, I decided to start learning Rails at the exact moment that a huge uproar happened over a conference presentation that contained pornographic images and the following "don't hamper my freedom from expression/to look at naked chicks" response from much of the Rails community. Worse yet, DHH, creator of Rails and partner in 37 Signals, condoned the talk. (more…)
Configuring WCF with BasicHttpBinding and SSL
Despite a variety of posts on this topic, I had to go through a bunch of articles just to get what seemed to be a simple task.I started with this post How to setup a WCF service using basic Http bindings with SSL transport level security. The post gives a good explanation of how to get a ssl certificate and set up IIS to use the certificate. In my case, I just wanted to use SSL and not credentials. So I modified the web.config like this: ...
Getting random rows from Sql Server
I'm working on a project where I want to return related content. The sproc I wrote seems to work ok but because I was sorting by the insert date or the title, it would always return the same thing for all content closely associated.So how do I get it to return only the closely related content AND randomize it?Here is the what I did: SELECT * FROM #tmpRelated JOIN Content c ON r.ContentID = c.ContentID ORDER BY r.TotalRelevance DESC, ...
Neat way to handle Nullable types …
Ever since I read Rick Strahl's blog post on the C# ?? operator, I've been in love with the C# ?? operator. Mostly I use it as a clean way to test a ViewState variable for null in a property. For example, protected string stringToPersistOnPostBack { get { return (ViewState[this.ClientID + "_stringToPersistOnPostBack"] ?? "").ToString();< } } Somewhere along the way, the real purpose of the ?? operator was ...