Wednesday, January 27, 2010

NewSequentialID() vs NewID() – SQL Server 2005+

I was not aware of this! – “…using NEWSEQUENTIALID can be faster than using the NEWID function. This is because the NEWID function causes random activity and uses fewer cached data pages. Using NEWSEQUENTIALID also helps to completely fill the data and index pages.”

Update: After the initial euphoria wore off, my more experienced peers were quick to point out that “…the bummer is if you want to generate guids from the app and the database then you can't use sequential –Gregg Stark”… i.e. typically in these scenarios the reason you’re using a GUID in the first place is exactly because you need to generate the IDs from outside of the central database server context where the NewSequentialID() works it’s magic… so you really don’t get to take advantage of it’s index defragging potential (duh :(

Thursday, January 21, 2010

Austere – word of the day

Adjective: austere
1. Severely simple
2. Of a stern or strict bearing or demeanor; forbidding in aspect
     "an austere expression"
3. Practicing great self-denial
     "a desert nomad's austere life"

Thursday, January 14, 2010

Portable Air Compressor - Dust Out Your PC In Style :)

  • These lists quickly set my bearings on what’s out there in my low end interest bracket:
    00919224000 I found the Bostitch Model# CAP1516 to be an obvious choice based on features, price & ratings
    • + it gets consistently good reviews
    • + excellent price: $80 street
    • + low end weight as far as these buggers go: 20lbs
    • + good air flow @ good psi: 1.8 CFM @ 90 PSI (6.2) bar which is plenty to blast your components with … it actually maxes at 120 PSI (8 bar)
    • + i like the protection the hood provides which is fairly unique if you look around
    • + the built in gauge and regulator are nice
    • - no accessories included – however the 1/4” quick release is VERY standard and easily accessorized… and we don’t lose any extra cost on junky accessories
    • -  challenging to mount water trap – unfortunately the protective hood wraps around the outie such that we can’t hang a typical trap right there (see trap photo below)… i am going to make due with mounting mine on the inside of the hood… there is a 1/4” threaded junction point with decent room to hang something right next to the air tank… the trap will take a while to fill up, you’ll know when it’s time when you see the water and the hood is easily removed… with a little work I might even widen a potential access hole on the undercarriage.
  • Recommended accessories:
    • Hose - $13
    • Attachments & Fittings - $28
    • Water Trap - $20
      • ESPECIALLY IMPORTANT IF YOU PLAN ON HOSING DOWN DELICATE ELECTRONICS … it’s a well known fact that compressing air also compresses the humidity in the air … this ultimately results in spraying a fine mist of water all over your subject if not otherwise accounted for… honestly a little bit probably wouldn’t kill something immediately but it’s jut not the kind of thing you want to be subjecting your precious toys to on a regular basis
    41P2JBVEZXL._SL500_AA280_ 51RKJN1S99L._SS500_ 21aTdJHJfPL._SL500_AA200_

  • Sunday, January 10, 2010

    BuckyBalls

    20% off promo code: BUCKFRIEND

    buckyballs_photo_one2   buckyballs_photo_two

    Tuesday, January 5, 2010

    MadCon – Soulicious Norwegian Hip Hop <who knew?!?>

    These guys are awesome!  Thank goodness I stumble on this stuff so late so they’ve had time to cough up 3 albums!!  (2004, 2008, 2009)

    “What If” is my favorite song so far.

     coverMadcon - So Dark The Con Man_F An InCONvenient Truth

    Thursday, December 10, 2009

    Richard Feynman (Nobel Physicist, 1918 - 1988)

    Richard_Feynman

    Just kinda catching up with how “fun smart” this guy was… worked on the Manhattan project, all kinds of creative physics problem solving, “Original Prophet of Nanotechnology”, Nobel prize in Physics 1965, liked strip clubs, art and bongo drums… there are at least two semi-auto biographies out there in public circulation… I’m reading “Surely You’re Joking, Mr. Feynman!” right now… also a few enjoyable BBC Horizon videos featuring a fair amount of direct interview content: “The Pleasure of Finding Things Out (1981)”, “The Quest for Tannu Tuva (1988)” and “No Ordinary Genius (1993)

    Monday, December 7, 2009

    My first real WPF exposure

    Having a fairly “good time” getting up to speed on a WPF based app for my day job.

    Highlights:

    • Coming from ASP.Net the last few years it’s nice to see so much similarity and convergence in how one thinks about building GUI’s in the two environments… specifically TEMPLATE based UI’ing in XAML… if you’re an ASP.Net head, think of a Repeater and how you can customize exactly what you want each row to look like via the ItemTemplate… WPF is like that on steroids… the template stuff gets pretty deep and thick pretty fast and i don’t ‘get it’ all just yet… but it’s coming as I go along looking for examples out in the wild for what I know can be done.
    • Laying out a UI in XAML as if it was HTML feels very intuitive… nesting element tags within tags, setting margins for pixel perfect whitespace aesthetics, using the various free flow containers that automatically stretch to fill in the size of the current window is all grand to see finally available over in Windows land.
    • Speaking of the free flowing UI… this can’t be understated… everything is finally geared towards this kind of layout… you actually have to work at it to “hard code” elements at a specific X,Y position… using the various panels Stack, Wrap, Dock, ‘Grid’ just makes sense after whipping up Web UI’s for years… very good stuff
    • The templating really opens up the guts of all the stock WPF controls to extensive tinkering way beyond any Microsoft based GUI building framework we’ve had to date… there are tons of annoying esoteric gotchas to be found in how all the little pieces of the stock controls hang together but one can rest with confidence that if you take the time to dissect, you will be able to force it to do whatever you want… there are tools like “snoop” which give you a full tree breakdown of a running UI’s widget hierarchy… then starting with a known element reference you can walk up or down the widget hierarchy in code to dial in on exactly which chunk needs to be tweaked.
    • The amount of flexibility in the syntax for databinding to various objects is mind boggling… binding to your own custom business objects is well covered… but also binding to .Net framework and UI elements is just as possible if the situation demands… I’m sticking with DataTable/DataView binding via thin BO property wrappers for now versus maintaining a BO property per field… i really abhor a full blown OO business object layer, especially if I have control over the database like in this situation.
    • This is a good example of h0w “elegantly” all of the current .Net stuff hangs together… targeting a specific WPF DataGrid column via Linq lambda function:

      static public void GridSort(DataGrid Grid, string ColumnName, ListSortDirection Direction)
      {
        Grid.Columns.Where(c => c.SortMemberPath == ColumnName).Single().SortDirection = Direction;
      }