Eric Gehrman

asp.net developer and austinite

I’m a mac now, apparently.

Posted on | May 4, 2009 | No Comments

So I did it. I sold my old trusty IBM thinkpad and purchased a 6 month old black macbook. Here are my first thoughts:

THIS THING IS AWESOME.

Other thoughts? Besides the obvious, I’m REALLY happy with this laptop. I bought a program called Parallels which basically is a virtual machine where I can run windows (any version) on top of the Mac OSX.

This means that I can have my trusty Visual Studio and MS SQL Server running on my mac. Woo Hoo!! This mac runs pc stuff way better than, well, my pc does. Crazy isnt it? Besides the expensive price tag (which I think now is TOTALLY worth it), I can’t really find anything wrong with this badboy. I upgraded to 4GB of RAM for $40 from newegg. This thing is a hoss.

Visual studio had one thing where I had to figure out – When you step into while debugging, the f11 button was set on mac osx to show the desktop. I went into system preferences and unchecked that as a default key, and whallah! I’m stepping thru just fine now.

Also, the fine folks over at zagg make an invisibleshield for the macbook too; keeping it ever so pretty.

So anyways, if anyone is wondering whether or not to make the switch, I say DO IT!!! It’s totally worth it! I love it :)

Bookmark and Share

Select Distinct on DataSets

Posted on | March 23, 2009 | 1 Comment

Have you ever wondered how to do a “SELECT DISTINCT” on a dataset column? Well, here’s the low down:

I came across this handy little method for querying a DataSet for distinct records . Say that my data is already in my app and I need to do something with it. Going back to SQL or re-writing the query just isn’t an option, so what can I do?

Microsoft has a helpful kb where it defines a dataset helper class and a SelectDistinct method for accessing data in this way – here.  But as always, Microsoft makes simple things complicated. And who wants to write a bunch of classes and functions when we can do the same thing in one line?

Say we have a DataSet ds like so:

ID grID value
1 100 abc
2 100 def
3 110 efg
4 120 hij

To select distinct grIDs we can just do this:

DataTable distinctDT = ds.Tables[0].DefaultView.ToTable(true, new string [] { “grID” });

This returns:

grID
100
110
120

We can now use this distinct DataTable to make our queries on our original DataSet:

ds.Tables[0].Select(”grID = ” distinctDT.Rows[0]["grID"].toString());

Yeah! No helper classes and no extra methods taking up that valuable development space. Hope this helps someone!

Bookmark and Share

And the latest victim of this troubled economy is….

Posted on | February 26, 2009 | No Comments

Me.

Yep – You read it right. Even with all the love I had for my employer (and them for me), I still was unable to steer clear of the messed up economy.

Everywhere you look, people are getting laid off. I read somewhere that last week set a record for the most number of people that had signed up for unemployment benefits since 1982. Something like 667,000 newly unemployed. And I was wondering why traffic seems to have let up recently….

But seriously – Those are some troubling numbers. And when is it going to end? Bernake says sometime by the end of this year… provided that all goes as planned.

And certainly none of that is going to get me into the Modest Mouse show this Wednesday. I did get a wristband for SXSW, so that’ll be fun. Luckily lots of free beer & food is usually available – so I won’t be left starving.

If anyone knows of a need for a web developer here in Austin, let me know! I’m a good one. A real good one.

Bookmark and Share
keep looking »

About

This is a blog about Eric Gehrman and his random musings, observations, gripes, concerns, and fascinations. Check back often and enjoy!

Subscribe to my feed

Search

Admin