Thursday, April 27, 2006

C# Dynamic Instantiation with Reflection

{

In our case it was a control that needed to be placed in a GridView column, but this could be used anywhere:

System.Type t = AnyControl.GetType(); // the control or class of your choice
object o = System.Activator.CreateInstance(t);
System.Web.UI.Control newControlOfType = o as System.Web.UI.Control;

}

Sunday, April 23, 2006

Development Abstraction Layer

{

Joel is at it again. In his most recent essay, The Development Abstraction Layer, he asserts that management at a software company should build an "abstraction layer" that eliminates all distractions from the programmers except programming. Programmers are to be cushioned in the best environment possible to think:

A programmer is most productive with a quiet private office, a great computer, unlimited beverages, an ambient temperature between 68 and 72 degrees (F), no glare on the screen, a chair that's so comfortable you don't feel it, an administrator that...

Okay stop Joel! That is the perfection that I dream of but have yet to really be placed into. In a different thread, however, I get my answer as to why:

But of course, it really depends on where you are in the foodchain. For Developers, I've always considered it to be:

Bottom - Coroporate IT Department Developers. Developers are a cost center

Middle - Internet Company. Developers are part of the core business strategy.

Top - Shrinkwrap Vendors. Developers are the profit center.
Generally speaking this seems to be true. Because my experience has primarily to do with corporate environments, there is a vast difference between that programmer experience and that of, say, your average programmer at Google.

My current employer is good to us, however - most of that seems to come from the fact that the principal is himself a programmer. As a result we have excellent hardware, software, beverages, chairs, and reading material.

}

Saturday, April 22, 2006

Motives

{

Toby Segaran, of Lazybase and tasktoy fame, recently emitted the following on motivation:
"The truth is that I don't make any money from these applications. They were never intended to be a business. I wrote them because I wanted them, it was an opportunity to learn something new, and like most people I love creating things. I determined that for less than I spend on coffee, I could put them online and share them with everyone."
In a recent conversation with a person from work I spoke about an idea for RSS aggregation I had that would be different from current tools but make for better use. As cool as it was, I said, I doubted I could build a business model around it. When it was suggested I came up with the thought as a way of making money, it gave me pause -

Not really, not at all, in fact. Things I write like iTunesBuilder, antiPod, Hobbitwerk:::pwd, Hobbitwerk::PIdigit, phoDak all had some personal problem or interest that prompted me to make them.

Pekka Himanen's book, The Hacker Ethic, does well on this note by giving "Hacker" culture three main attributes (from Wikipedia, I'd suggest you actually read the book):
1. enthusiasm, passion about work that is enjoyed

2. creativity, wish to realize oneself and one's ability, often in teams that are formed spontaneously (project orientation)

3. wish to share one's skills with a community having common goals, along with the need to acquire recognition from one's "tribe"; one is motivated by inner zeal rather than external awards: the fruits of one's work are donated to everybody for their advances and further developments
I would scarcely deign to mention myself in the same sentence as guys like Linus Torvalds or Toby Segaran, I understand this a lot from the stuff that I am trying to do. I'm hoping one of these days to have a good enough idea to make a contribution to programmers and people who use software.

}

Thursday, April 06, 2006

Northwind, Pubs on SQL 2005

{

It's a strange thought but these databases are like old friends. If you, like me, are disappointed not finding them with SQL Server 2005, and you have Visual Studio 2005 installed, navigate to:

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Samples\Setup\

You'll find scripts to generate your old friends for another round of programming.

}