post-4095

why am I still awake? Oh, that’s right, to make inane comments like this – sheesh

Advertisements

post-4093

At the moment, still trying to fully parse this blog entry since it’s pretty informative about the CLR hosted in SQL Server, a very interesting scenario. I had spent a great deal of time in the past learning a lot about Aurora in Oracle (their in-RDBMS-server JVM) since I was using it pretty heavily at Porivo so it’s interesting to compare and contrast.

post-4092

I should probably get to bed since we have to be over at the Swains at like 10am tomorrow (mmmmm turkey frying goodness), but (with apologies to Led Zeppelin), I have to ramble on

[Edit: I just noticed that I mistyped “executive” (as in the branch) as “execute” in that comment – which given who’s holding office and his background is sure to spark a cute comment :)]

post-4090

so this Intel 82815 (4MB of video memory, obviously on the motherboard) graphics driver (from Intel) is willing to give me 1280×1024 @ 24bpp, but unwilling to allow 1600×1200 @ 16bpp, which I’d much rather have, only allowing 1600×1200 @ 8bpp, which is horrific to try and work with.

bleah.

Edit: to save everyone else the math, yes, 1600*1200*16 == 30720000 is less than 1280*1024*24 == 31457280, and both fit inside 4MB fine, of course 🙂

post-4088

The ice on our street seems much worse (at least traction-wise) than anything else in the last few months – I can’t even get more than about 10 feet without losing all ability for the car to make forward progress.

Working from home it is.

post-4087

these guys should do more C# programming – I hate what their recipes look like.

Most of their for loops could be foreach’s instead, and most (if not all) of their try/finally blocks could be using blocks instead.

Yes, it’s syntactic sugar, but it’s “good sugar” which I define as sugar that puts less variable and/or block control logic in the hands of the developer, so they have less of a chance of screwing it up 🙂

Compare:

HttpWebResponse response = (HttpWebResponse)request.GetResponse( );
try
{
    if(VerifyResponse(response)== ResponseCategories.Success)
    {
        // get the response stream.
        Stream responseStream = response.GetResponseStream( );
        // use a stream reader that understands UTF8
        StreamReader reader = new StreamReader(responseStream,Encoding.UTF8);

        try
        {
            html = reader.ReadToEnd( );
        }
        finally
        {
            // close the reader
            reader.Close( );
        }
    }
}
finally
{
    response.Close( );
}

with:

using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
    if(VerifyResponse(response)== ResponseCategories.Success)
    {
        // get the response stream.
        Stream responseStream = response.GetResponseStream( );
        // use a stream reader that understands UTF8
        using (StreamReader reader = new StreamReader(responseStream,Encoding.UTF8))
        {
            html = reader.ReadToEnd( );
        }
    }
}

and

for(int i=0;i<students.Length;i++)
{
    students[i].Join( );
}

with

foreach(Thread student in students)
{
    student.Join();
}

note that this is just syntax i’m talking above, not better code, which is another issue, like fetching using the WebClient built-in (the point of the HttpWeb* classes is if you want to do async operations)


WebClient client = new WebClient();
byte[] data = client.DownloadData("http://foo.com/random.html");

Of course, if the contents of the web page you’re fetching are XML, you can skip a lot of middlemen just loading directly, of course 🙂

XmlDocument doc = new XmlDocument();
doc.Load("http://www.some.place.com/foo.rss");

ramblerambleramble

IEnumera{ble,tor}<T> rocks my world.

DMV fun

60 minutes waiting in line for my renewal
2 minutes for the eye/sign tests and paying the $15
2 minutes for picture taking and card production

Guess I’m now officially 30. The queues were broken out, at least – at 10:09am (stamped on my ticket) I was the 33rd person for renewal, there were ~127 duplicates (kinda odd since you can do those online) and ~235 id cards. I wish I knew Spanish, eavesdropping would have been much more fun – as-is I could only pick up yes/no and numbers 🙂 My 7th grade Spanish teacher probably wouldn’t be happy to hear that, but IIRC he’s still in jail on that liberties-with-minor (teenage girl molestation) charge so he’s probably got other things to worry about.

ramblerambleramble