Servergeek
Mickey Williams' weblog


Powered by Blogger Pro™

Friday, April 04, 2003

New Cell Phone Considered Crap


It's a nearly new GSM phone with all the whistles, and I am so over it. I'm mainly over it because my wife now constantly reminds me about how crappy it is. Or maybe it's just because her new Nokia gets twice the battery life on a charge, even though it's about as big as my thumb. Or maybe it's because her browser seems to be faster than mine. Or maybe because she always gets better reception than me.

Or maybe it's because I went ahead and bought the damn phone even though I had sworn off buying anything from these guys after suffering through three crappy phones (2 Nokia's ago). Now I need to figure out how soon I can swap this thing out for a phone that works.

How Rough is Loretta Street?


A couple of weeks ago I went down to Loretta St. to run some cones. I had plans with the family, so I got there early - around 8:00 or so. I had been riding for about an hour, and had just finished a run when I saw a big dog at the top of the hill.

A big Rotweiller.

Did I mention that it was big?

It was.

So the dog looks at me, and I look back, trying my best to look non-threatening (in a bad mofo sort of way). I'm also measuring the distance between me and the dog (about 200 yards) and between me and a big storage container (about 50 yards). I'm thinking, "If he takes off towards me, I can probably make it to the top of the container. Tiger and the Leucadians will get here about 1:00, and ...". But the dog doesn't seem to be interested; instead, he's poking around inside my Ellemtel bag. The he trots off. With my latte. The Rotweiller stole my latte. Loretta Street is a tough neighborhood - even the dogs are out for themselves.

I sent an email to Tiger, and he recommended bringing dog biscuits. Last time I was on the hill, guess who comes strolling by on a leash? And he was giving me the eyeball - I know he was looking for more caffeine. It turns out that the Rotweiller's name is Nacho, and he's racer-friendly, but next time I go racing early I'm bringing two lattes.

Custom Formatting for Windows Forms DataGrid Controls


I would have sworn that I had posted this earlier - I get asked about custom formatting for data grids quite a bit. The general approach is to subclass the DataGridTextBoxColumn class, and override the Paint method as shown below. This code is an example from my WinForms course, and it colors cell backgrounds based on the text length. You can extend the idea in any number of ways - by implementing a delegate or event that is used to control how the cell should be formatted, or you can just inspect the cell's value and determine which text should be displayed.
protected override void Paint(Graphics g,
                              Rectangle bounds,
                              CurrencyManager source,
                              int rowNum,
                              Brush backBrush,
                              Brush foreBrush,
                              bool alignToRight)
{
    // Here's how you get a ref to the parent grid (not used in this fragment)
    DataGrid parent = this.DataGridTableStyle.DataGrid;

    g.FillRectangle(Brushes.Red, bounds);
    // Get the cell value for this column in the current row
    string contents = GetColumnValueAtRow(source, rowNum) as string;
    if(contents != null)
    {
        // If the string has more than three chars, change the background
        if(contents.Length > 3)
            g.FillRectangle(Brushes.BlanchedAlmond, bounds);
    }
    using(Font font = new Font(parent.Font, FontStyle.Italic))
    {
        g.DrawString(contents, font, Brushes.Green, bounds.X, bounds.Y);
    }
}

Thursday, April 03, 2003

Okay, it was funnier on April 1st, but...


Yahoo Store is switching back to LISP according to LtU.

Wednesday, April 02, 2003

C# and the CLI are now ISO standardized


C# has cleared the ISO fast-track standardization process. ECMA press release here.

New WS-Specs


New WS-Goodness spec here. (from Don Box).

Tuesday, April 01, 2003

Deadlocks With Mixed-Mode Assemblies


There's a long-standing issue with Win32 DLLs where you must take steps to be sure that you don't deadlock the process in DllMain. In versions 1.0 and 1.1 of the .NET Framework, you can run into this problem if you're developing mixed-mode assemblies - this is only a problem if you're an MC++ developer. Details on the MSDN page here.

Monday, March 31, 2003

Wow, I get to save some money


Just found out that since I'm a contract instructor for UC Irvine Extension, I qualify for academic pricing on MSDN Universal. Cool. Too bad I can't get academic pricing on Volvos. Or on a Farr 40.

Dr Jeep...


William Gibson has a blog. And he's a Sisters of Mercy fan.

Injury update


Just saw an update from Chris Chaput on NCDSA about Elsinore injuries. Looks like Dave hit his head hard enough to crack his flyaway helmet, and went to the hospital as a precaution even though he didn't have any signs of a concussion. Holy cow - that's why you need safety gear - for those of you that are programming geeks and haven't seen one, a flyaway is a fairly substantial helmet. I'm getting a headache just thinking about it (I broke a helmet once and wound up with a concussion and a broken wrist). Also, John O has a broken collarbone.

It's Racing Time...


Stop 1 on the FCR series was held over the weekend at Elsinore. Haven't seen the full results yet, but props to Lynn, Isabelle, Dan Sturt, and other Loretta St. regulars that raced, and seem to have placed well. Lynn was talking about racing in the men's open class, so I'm just glad I wasn't there - she's way faster than me. Haven't heard yet how Tiger, Sherm, Wes, and other LCB's placed. Somebody send me an email for christsakes. Heard that Dave from Skaterbuilt spent the night in the hospital after a head/neck injury, and John O. has a broken arm and separated shoulder. Get well soon.

Scoble decides to turn the wrench


Robert Scoble, who actually paid me to speak at conferences (I know, there's one born every minute), has decided to start developing on .NET. Robert's getting advice to start with the SDK, and bypass Visual Studio. I personally think that's a mistake, as Visual Studio takes nothing away from your path towards programming enlightenment, it just helps make the road a lot less bumpy. Of course, if you're the type that likes to churn their own butter and age their own Regiano, Notepad and the SDK are the way to go. But seriously, there's no reason why using Visual Studio should be a dead-end. Use Visual Studio .NET as a tool to see how a project can be organized. Take a look at the code generated by the tools, and understand what it does - and look for ways to optimize the generated code. I don't think you should use Visual Studio blindly, but spending your life using crappy tools just to satisfy some lame hero's journey through the SDK just doesn't make sense either.

Home