Modeling Information: Part 1 - The programmer’s trick

Sunday, December 28th, 2008 at 8:37 pm

My latest project at work has lead me down an unexpected road of wrapping my head around modeling information from a very high level.  It’s made me realize a lot of my own past mistakes of overlooking the obvious.  As a self-taught programmer, I’ve picked up some very fundamental bad habits.  Since I’m a programmer, I’m going to start there with a simple concrete problem.  Through the next parts in this series, we’ll hopefully work our way toward an ultimate generic model for information.

(more…)

Visual Studio Macro for Sentence Case

Wednesday, May 7th, 2008 at 4:10 pm

I can’t believe I couldn’t find this, so I wrote one:

    Sub SentenceCase()
        Dim textSelection As EnvDTE.TextSelection
        Dim newString As String = ""
        Dim firstCase As Boolean = False

        textSelection = CType(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection)
        For Each ch As Char In textSelection.Text.ToCharArray()
            If Not firstCase And Char.IsLetter(ch) Then
                ch = Char.ToUpper(ch)
                firstCase = True
            ElseIf firstCase And Char.IsLetter(ch) Then
                ch = Char.ToLower(ch)
            End If
            newString = newString + ch
        Next

        textSelection.Text = newString
    End Sub

New Blag

Monday, April 14th, 2008 at 12:45 am

Previously I had Serendipity, but I decided to go mainstream with Wordpress. The interface is a lot more fun to use out of the box which hopefully means I’d update this more. It was ridiculously easy to switch since it will import blogs via RSS feed.

I signed up for Akismet since in the first thirty minutes of publishing the blog, I already had a spam post. So far so good.

Not only that, I’m trying out TwitterTalk about mainstream. I realize that since I don’t have a lot of time to blog, putting up a stream of out-of-context short thoughts could be worth it.

SubSonic Benchmarks

Thursday, March 20th, 2008 at 11:18 pm

I’ve started using an open source project at work called SubSonc. It’s a combination ORM and code generation tool for creating your DAL in .NET. It looks at your database and creates classes with CRUD functions for every table. Out of the box with no configuration. The best part is that they are implemented as partial classes so you can add your own business logic to them very easily. Finally, it doesn’t put the hate on stored procedures - all of them are made available via the generated DAL.

In the past, I had stored procedures for everything. After writing 50 stored procedures I started to worry. I decided to rewrite a small web project to use Subsonic for it’s DAL. I share with you the results in numbers.

(more…)

Come on Adobe!

Saturday, February 9th, 2008 at 11:57 pm

Right now I am trying to fix a web app with a Flash frontend that suddenly broke because of a major change in Flash player.

Adobe put out a new release of Flash Player 9 that disables the authorization header from being sent when doing any web request within a Flash file. It’s documented here.

(more…)