{
Derek Slager, whose background sounds a lot like mine, makes a case for using Emacs as an editor. It makes me think of two occasions: first, when I guffawed at James Gosling saying that his favorite IDE was Emacs, and then later on when I was teaching a .NET development class at Countrywide and a person sitting the class (graduate of UPenn) sneered at using Visual Studio .NET and instead opted for Textpad (he hadn't used it before but still leaned towards a simple text editor and his ability with the command line). Needless to say he put everyone to shame.
}
Wednesday, March 21, 2007
Tuesday, March 20, 2007
Foo, Bar, Monorail, and being Test Driven
{
People I work with are always amused by my excessive use of "foo" in naming things while I do examples or sketch out ideas. I was equally amused with Hanselminutes 55 which I can roughly quote here:
Fun stuff, but the real conversation was about Monorail, a piece of the Castle Project, a .NET web application framework I've been interested to look at for some time. The most interesting argument for the use of Monorail/Castle was the ability to have greater and more precise test coverage than with a typical ASP.NET application using Watir or an equivalent technology. All the buzz about being Test Driven usually breaks down for me when I'm looking at the kind of web applications we build. Even something like Watir is a frightening prospect on an ASP.NET page with several grids, in a masterpage, loaded with javascript - and has about 10 different "directions" that a tester could take. Extend that to about 100 pages, many of which support different "views," and you've got, well, a bit of a problem in being "Test Driven."
The conversants, besides Scott were Aaron Jensen and Jacob Lewallen.
}
People I work with are always amused by my excessive use of "foo" in naming things while I do examples or sketch out ideas. I was equally amused with Hanselminutes 55 which I can roughly quote here:
... so once you've got your foo class accepting a bar class
and more likely it's going to be accepting a IBar interface... foo depends on bar which depends on blah and yada ... your instantiation looks like new foo, new bar which takes new yada...
Fun stuff, but the real conversation was about Monorail, a piece of the Castle Project, a .NET web application framework I've been interested to look at for some time. The most interesting argument for the use of Monorail/Castle was the ability to have greater and more precise test coverage than with a typical ASP.NET application using Watir or an equivalent technology. All the buzz about being Test Driven usually breaks down for me when I'm looking at the kind of web applications we build. Even something like Watir is a frightening prospect on an ASP.NET page with several grids, in a masterpage, loaded with javascript - and has about 10 different "directions" that a tester could take. Extend that to about 100 pages, many of which support different "views," and you've got, well, a bit of a problem in being "Test Driven."
The conversants, besides Scott were Aaron Jensen and Jacob Lewallen.
}
Sunday, March 11, 2007
Beautiful Code
{
Here's something for the radar: Greg Wilson and Andy Oram have a forthcoming release (wow, I sound like a radio DJ) from O'Reilly entitled Beautiful Code: Leading Programmers Explain How They Think. If the title isn't seductive enough, a look at the essay authors should be - including Charles Petzhold, Yukihiro Matsumoto, Douglas Crockford, and Elliotte Rusty Harold amongst others.
}
Here's something for the radar: Greg Wilson and Andy Oram have a forthcoming release (wow, I sound like a radio DJ) from O'Reilly entitled Beautiful Code: Leading Programmers Explain How They Think. If the title isn't seductive enough, a look at the essay authors should be - including Charles Petzhold, Yukihiro Matsumoto, Douglas Crockford, and Elliotte Rusty Harold amongst others.
}
Friday, March 09, 2007
Perlcast Interviewed
{
Josh McAdams, the guy behind Perlcast, is interviewed over at ClearBlogging. Buried in the interview is the answer to something I've always wondered: his mellow southern accent is from Arkansas.
}
Josh McAdams, the guy behind Perlcast, is interviewed over at ClearBlogging. Buried in the interview is the answer to something I've always wondered: his mellow southern accent is from Arkansas.
}
Friday, March 02, 2007
Keyboard shortcuts with Javascript
{
Creating shortcuts on textboxes is none too difficult in Javascript, but (and don't get me wrong - I love Mr. Flanagan) the Rhino book is a bit abstruse. I was adding this functionality to my night project and pared it down to:
function handleKeyCommand(event){
var e = event window.event; // Key event object
var kCode = e.keyCode ¦¦ e.which; // What key was pressed
// I am trapping Ctrl+e (69) here
if(e.ctrlKey && (kCode == 69)){
var theButton = document.getElementById('actionButton');
theButton.click();
}
}
I'm calling that from the onKeyDown event of a TextArea the boring way; because I'm assigning it from the server side in ASP.NET, I have:
actionButton.Attributes.Add("onKeyDown", "handleKeyCommand(event);");
Which translates to onKeyDown="handleKeyCommand(event)"... the Web 2.0 kids would thumb this down since it's not an anonymous javacript function assigned after the page is loaded (I need to question that "inobtrusive javascript" ideology, but it's a post in the making), but this keeps it simple.
The main pitfall for me was in using onKeyDown rather than onKeyPress - the latter is more appropriate for obtaining ASCII related keyboard events, not special keys like shift, control, and so on. Another pitfall was browser compatibility; Flanagan also uses a nifty idiom when he allows the assignment of the event object occur with the operator. It returns the first true value and since an unassigned object returns false in javascript, writing the following assigns a reference to the event object based either on the parameter which would be passed by the browser (Firefox) or the built in window.event object (IE):
var e = event ¦¦ window.event; // Key event object
}
Creating shortcuts on textboxes is none too difficult in Javascript, but (and don't get me wrong - I love Mr. Flanagan) the Rhino book is a bit abstruse. I was adding this functionality to my night project and pared it down to:
function handleKeyCommand(event){
var e = event window.event; // Key event object
var kCode = e.keyCode ¦¦ e.which; // What key was pressed
// I am trapping Ctrl+e (69) here
if(e.ctrlKey && (kCode == 69)){
var theButton = document.getElementById('actionButton');
theButton.click();
}
}
I'm calling that from the onKeyDown event of a TextArea the boring way; because I'm assigning it from the server side in ASP.NET, I have:
actionButton.Attributes.Add("onKeyDown", "handleKeyCommand(event);");
Which translates to onKeyDown="handleKeyCommand(event)"... the Web 2.0 kids would thumb this down since it's not an anonymous javacript function assigned after the page is loaded (I need to question that "inobtrusive javascript" ideology, but it's a post in the making), but this keeps it simple.
The main pitfall for me was in using onKeyDown rather than onKeyPress - the latter is more appropriate for obtaining ASCII related keyboard events, not special keys like shift, control, and so on. Another pitfall was browser compatibility; Flanagan also uses a nifty idiom when he allows the assignment of the event object occur with the operator. It returns the first true value and since an unassigned object returns false in javascript, writing the following assigns a reference to the event object based either on the parameter which would be passed by the browser (Firefox) or the built in window.event object (IE):
var e = event ¦¦ window.event; // Key event object
}
The FizBuzz Conundrum, Ramanujan
{
Imran observed not too long ago that one proof of the difficulty of finding "quality" developers was that he (or she) was encountering a shocking amount of failure among applicants to write code that solved even simple problems. This was picked up for comment by Raganwald, Atwood, and even Hanselman.
I resisted the urge to write up a solution but after that much buzz I thought there's got to be a catch. So this morning, before I "clocked in" from my basement (we're under blizzard conditions here in South Dakota), I wrote up the first thing that came to mind:
for (int i = 1; i < 101; i++) {
Console.WriteLine((i % 3 == 0 && i % 5 == 0) ?
"Fizz-Buzz":((i %3==0)?
"Fizz":(i%5==0)?
"Buzz":i.ToString()));
}
No catches, it seems. But after thinking about it, I thought that a lot of people I work with wouldn't be happy with my solution to that particular problem. It could come across as "convoluted."
The more I thought about it, the more I knew the more acceptable answer was:
// iterate given range
for (int i = 1; i < 101; i++)
{
string output;
// if the number I'm on is divisble by 3 or 5
if (i % 3 == 0 && i % 5 == 0)
{
output = "Fizz-Buzz";
}
// if it is divisible by 3 then set output to "Fizz"
else if (i % 3 == 0)
{
output = "Fizz";
}
// if it is divisble by 5 then set output to "Buzz"
else if (i % 5 == 0) {
output = "Buzz";
}
// if divisible by neither 3 or 5, output the number.
else
{
output = i.ToString();
}
Console.WriteLine(output);
}
And as I think about it, there may be more to this test than just the matter of output - you may be able to get a sense of what type of thinking a person employs in solutions and how their values mesh with them. Even if the answer is "right" it may not be right.
A while back I was feeling some angst toward my employer (when I used to live in California) and put my resume on Monster to see what I was "worth." The first party to express interest went under the guise of an actual company, but really they were just recruiters. They scheduled me for a "test" at 8:30 am in downtown Los Angeles.
At 8:30 am in downtown Los Angeles.
Traffic and personal discomfort aside, I made it to the office where a person who was obviously non-technical gave me a (photocopied?) sheet of paper and a number two pencil to write some javascript code that manipulated the DOM and XML.
I was a little green and was writing stuff like this:
document.getElementById("foo").appendChild(root.createTextNode((entry == foo)?"This":"That")...
You get the picture. I wasn't used to writing things on paper so I was erasing here and there, and because I tended towards multiple steps in one line, my lines were going across the page and I'd curve them upward so I could get it to fit. It was pretty messy, and I'm sure the recruiter picking up the "test" wasn't impressed with how disjointed it was.
And I can imagine the people at the software company, if it ever made it there, looking at smudges and pencil marks and an utter lack of comments on a piece of paper which they'd never be able to verify unless they entered it by hand. I doubt it made it that far but if it did, they might have thought the messy code was indicative of a "messy" mind that didn't write enough comments and consolidated steps too much. It would either go into the "Not a team player" or "Quixotic" pile before it was dumped to the trash.
In defense of myself, or if I may be bold enough to think of my ideals in this light, I keep thinking about Ramanujan, the brilliant Indian mathematician. As an autodidact, he was not familiar with protocol and convention and the step by step approach other mathematicians used... he would skip steps by presenting formulas without rigorous proof in order to arrive to his solutions. Of course this is an unassailable attribute if you're as smart as a Ramanujan and a death blow if you're not.
Now Hanselman has a podcast on the whole thing. I'm going to check it out.
}
Imran observed not too long ago that one proof of the difficulty of finding "quality" developers was that he (or she) was encountering a shocking amount of failure among applicants to write code that solved even simple problems. This was picked up for comment by Raganwald, Atwood, and even Hanselman.
I resisted the urge to write up a solution but after that much buzz I thought there's got to be a catch. So this morning, before I "clocked in" from my basement (we're under blizzard conditions here in South Dakota), I wrote up the first thing that came to mind:
for (int i = 1; i < 101; i++) {
Console.WriteLine((i % 3 == 0 && i % 5 == 0) ?
"Fizz-Buzz":((i %3==0)?
"Fizz":(i%5==0)?
"Buzz":i.ToString()));
}
No catches, it seems. But after thinking about it, I thought that a lot of people I work with wouldn't be happy with my solution to that particular problem. It could come across as "convoluted."
The more I thought about it, the more I knew the more acceptable answer was:
// iterate given range
for (int i = 1; i < 101; i++)
{
string output;
// if the number I'm on is divisble by 3 or 5
if (i % 3 == 0 && i % 5 == 0)
{
output = "Fizz-Buzz";
}
// if it is divisible by 3 then set output to "Fizz"
else if (i % 3 == 0)
{
output = "Fizz";
}
// if it is divisble by 5 then set output to "Buzz"
else if (i % 5 == 0) {
output = "Buzz";
}
// if divisible by neither 3 or 5, output the number.
else
{
output = i.ToString();
}
Console.WriteLine(output);
}
And as I think about it, there may be more to this test than just the matter of output - you may be able to get a sense of what type of thinking a person employs in solutions and how their values mesh with them. Even if the answer is "right" it may not be right.
A while back I was feeling some angst toward my employer (when I used to live in California) and put my resume on Monster to see what I was "worth." The first party to express interest went under the guise of an actual company, but really they were just recruiters. They scheduled me for a "test" at 8:30 am in downtown Los Angeles.
At 8:30 am in downtown Los Angeles.
Traffic and personal discomfort aside, I made it to the office where a person who was obviously non-technical gave me a (photocopied?) sheet of paper and a number two pencil to write some javascript code that manipulated the DOM and XML.
I was a little green and was writing stuff like this:
document.getElementById("foo").appendChild(root.createTextNode((entry == foo)?"This":"That")...
You get the picture. I wasn't used to writing things on paper so I was erasing here and there, and because I tended towards multiple steps in one line, my lines were going across the page and I'd curve them upward so I could get it to fit. It was pretty messy, and I'm sure the recruiter picking up the "test" wasn't impressed with how disjointed it was.
And I can imagine the people at the software company, if it ever made it there, looking at smudges and pencil marks and an utter lack of comments on a piece of paper which they'd never be able to verify unless they entered it by hand. I doubt it made it that far but if it did, they might have thought the messy code was indicative of a "messy" mind that didn't write enough comments and consolidated steps too much. It would either go into the "Not a team player" or "Quixotic" pile before it was dumped to the trash.
In defense of myself, or if I may be bold enough to think of my ideals in this light, I keep thinking about Ramanujan, the brilliant Indian mathematician. As an autodidact, he was not familiar with protocol and convention and the step by step approach other mathematicians used... he would skip steps by presenting formulas without rigorous proof in order to arrive to his solutions. Of course this is an unassailable attribute if you're as smart as a Ramanujan and a death blow if you're not.
Now Hanselman has a podcast on the whole thing. I'm going to check it out.
}
Monday, February 26, 2007
What Set You Claim? (Server Software)
{
Royal Pingdom did an analysis of what "popular" sites are running beneath the hood (as easy as a query at Netcraft). Royal Pingdom reveal themselves as a certain "persona" (yeah, I'll overgeneralize for now) by their choice of sites: Technorati, Meebo, Feedburner and so on.
It probably isn't surprising that most of these sites run on Linux with Apache and MySQL involved somewhere on the back end. I'm surprised (of course I'm not in the LAMP game though) to see a bit of a surge in the use of Lighttpd - a more lightweight serving engine than Apache.
As a developer confined to the realm of Microsoft tools it's a bit disappointing albeit unsurprising. What lies beneath the statistics at Royal Pingdom is something bigger and more crushing: the people that seem to be at the forefront of thinking and building the web don't use our tools. Our tools are the favorite of the commoditized environment of your average big company - less thinking and less innovation.
In part I can see a chicken and egg scenario: people building startups and experimenting need a cheap platform upon which to do so. One doesn't license Windows Server, Visual Studio, SQL Server, and so on with a poor [wo]man's budget when comparable free tools exist. In other words, I would assume that some market economics are behind the choice of platform.
But if you're a person like me in the Microsoft space, perhaps a big part of the frustration of working within an environment that lacks passion and quirky inventiveness is that the birds of a feather live in a different place and use a different technology. Of course I work with a lot of people who are excited and innovative - and beyond my coworkers there are quite a few people pushing the envelope with Microsoft tools. But I'd say in general that a corporate developer has a different set of values and goals than the kind of person who would build at a startup. As time passes I see this less on a "success" angle - most types seem to do well enough for themselves - and more of a clustering of similar people.
The bright spark on Royal Pingdom's list is Alexaholic built buy Ron Hornbaker which follows a pattern I'd like to follow as an ideal - that a person can use Microsoft technology (with which I'm quite familiar) and implement any good idea. Beyond that, there is an advantage to a smaller pool of innovators - there is more room for folks like me who may not have the best ideas in the world, but who are good enough to perhaps take something from the startup/open source space and port it.
}
Royal Pingdom did an analysis of what "popular" sites are running beneath the hood (as easy as a query at Netcraft). Royal Pingdom reveal themselves as a certain "persona" (yeah, I'll overgeneralize for now) by their choice of sites: Technorati, Meebo, Feedburner and so on.
It probably isn't surprising that most of these sites run on Linux with Apache and MySQL involved somewhere on the back end. I'm surprised (of course I'm not in the LAMP game though) to see a bit of a surge in the use of Lighttpd - a more lightweight serving engine than Apache.
As a developer confined to the realm of Microsoft tools it's a bit disappointing albeit unsurprising. What lies beneath the statistics at Royal Pingdom is something bigger and more crushing: the people that seem to be at the forefront of thinking and building the web don't use our tools. Our tools are the favorite of the commoditized environment of your average big company - less thinking and less innovation.
In part I can see a chicken and egg scenario: people building startups and experimenting need a cheap platform upon which to do so. One doesn't license Windows Server, Visual Studio, SQL Server, and so on with a poor [wo]man's budget when comparable free tools exist. In other words, I would assume that some market economics are behind the choice of platform.
But if you're a person like me in the Microsoft space, perhaps a big part of the frustration of working within an environment that lacks passion and quirky inventiveness is that the birds of a feather live in a different place and use a different technology. Of course I work with a lot of people who are excited and innovative - and beyond my coworkers there are quite a few people pushing the envelope with Microsoft tools. But I'd say in general that a corporate developer has a different set of values and goals than the kind of person who would build at a startup. As time passes I see this less on a "success" angle - most types seem to do well enough for themselves - and more of a clustering of similar people.
The bright spark on Royal Pingdom's list is Alexaholic built buy Ron Hornbaker which follows a pattern I'd like to follow as an ideal - that a person can use Microsoft technology (with which I'm quite familiar) and implement any good idea. Beyond that, there is an advantage to a smaller pool of innovators - there is more room for folks like me who may not have the best ideas in the world, but who are good enough to perhaps take something from the startup/open source space and port it.
}
Monsterbugs: Any silver bullets?
{
A few weeks ago our client began to report errors with our Windows Forms (.NET 2.0) application when she'd retrieve certain records. It was a strange bug that would hang the program for about 60 seconds and then crash without reporting errors. We could reproduce it on the test machine, but in development even while pointing to the same database, everything worked. Perfectly.
I looked in the Event Log and noticed the following error:
So how do you pin something like this down?
My approach was as follows:
// code to load data
MessageBox.Show("Loaded data");
// code to display data
MessageBox.Show("Displayed data");
Our application is not small. The form that displays data contains 3300 lines of non-wizard generated code. Data is loaded from a set of methods in a separate library which itself may have upwards of 3000 lines, not to mention that that library references yet more libraries*... my point here is that it's not a small script to throw a dialog up after each line or call.
In the end I spent about 4 hours stepping through each of the major calls via dialog messages. I couldn't debug since our test machine doesn't have Visual Studio or other debugging tools on it (like all the other machines in their offices).
Although I think we've done a good job breaking the logic into pieces (ie. one method for getting data, one for display that is broken into methods for customizations on each object) it was still difficult to discover.
And in the end, of course, it was something small and subtle: calling the AutoColumnsResize method of a DataGridView can sometimes throw exceptions - because of the recursion of the resizing combined with the paint operation of the Windows Forms application. What was probably most annoying was that it wasn't even my code that was responsible for the hanging exception, it was the framework's inability to recover from an internal exception.
When I first started troubleshooting I thought I should have elaborated more on a "tracing" level in our application - we trace some exceptions but not all to the database. But when I finally found the bug, especially because it wasn't in the code we were responsible for writing, I doubt it would have done more than just save time. A stack trace would probably have helped as well, if caught at the point of the exception. But my big question is whether there are any well trodden techniques for finding and dealing with bugs like this, especially if they are in the framework and not in one's own code. How do you deal with stuff like this, or is it always a slog for which there is not silver bullet?
*I think the design of the application is okay (duh, I'm the one responsible) but it may sound more convoluted in that statement than it actually is. We've got a DataHelper library that is covered by unit tests which does all of our data access at the database level. It runs stored procedures, deals with parameters, and so on. One level of abstraction higher we've got a set of business layer objects for dealing with the entities related to our application: loans, disbursements, checks and so on. The Windows Forms application is what we use to let the user display/enter/modify data. We've got a few additional libraries for tracing, configuration, format, data validation, and Crystal Reports. Not so bad I hope...
}
A few weeks ago our client began to report errors with our Windows Forms (.NET 2.0) application when she'd retrieve certain records. It was a strange bug that would hang the program for about 60 seconds and then crash without reporting errors. We could reproduce it on the test machine, but in development even while pointing to the same database, everything worked. Perfectly.
I looked in the Event Log and noticed the following error:
"Faulting application epicenter.exe, version 1.0.0.0, stamp 45df84bf faulting module kernel32.dll, version 5.2.3790.2756, stamp 44c60f39, debug? 0, fault address 0x00015e02"Really, really helpful stuff. And especially because this wasn't something we could get in development, on any of our boxes, it was confusing. Google searches weren't giving specific answers - the error seemed to general in the realm of .NET 2.0 to make much of -
So how do you pin something like this down?
My approach was as follows:
// code to load data
MessageBox.Show("Loaded data");
// code to display data
MessageBox.Show("Displayed data");
Our application is not small. The form that displays data contains 3300 lines of non-wizard generated code. Data is loaded from a set of methods in a separate library which itself may have upwards of 3000 lines, not to mention that that library references yet more libraries*... my point here is that it's not a small script to throw a dialog up after each line or call.
In the end I spent about 4 hours stepping through each of the major calls via dialog messages. I couldn't debug since our test machine doesn't have Visual Studio or other debugging tools on it (like all the other machines in their offices).
Although I think we've done a good job breaking the logic into pieces (ie. one method for getting data, one for display that is broken into methods for customizations on each object) it was still difficult to discover.
And in the end, of course, it was something small and subtle: calling the AutoColumnsResize method of a DataGridView can sometimes throw exceptions - because of the recursion of the resizing combined with the paint operation of the Windows Forms application. What was probably most annoying was that it wasn't even my code that was responsible for the hanging exception, it was the framework's inability to recover from an internal exception.
When I first started troubleshooting I thought I should have elaborated more on a "tracing" level in our application - we trace some exceptions but not all to the database. But when I finally found the bug, especially because it wasn't in the code we were responsible for writing, I doubt it would have done more than just save time. A stack trace would probably have helped as well, if caught at the point of the exception. But my big question is whether there are any well trodden techniques for finding and dealing with bugs like this, especially if they are in the framework and not in one's own code. How do you deal with stuff like this, or is it always a slog for which there is not silver bullet?
*I think the design of the application is okay (duh, I'm the one responsible) but it may sound more convoluted in that statement than it actually is. We've got a DataHelper library that is covered by unit tests which does all of our data access at the database level. It runs stored procedures, deals with parameters, and so on. One level of abstraction higher we've got a set of business layer objects for dealing with the entities related to our application: loans, disbursements, checks and so on. The Windows Forms application is what we use to let the user display/enter/modify data. We've got a few additional libraries for tracing, configuration, format, data validation, and Crystal Reports. Not so bad I hope...
}
Friday, February 23, 2007
Configuration Ammendment
{
// get calling assembly settings classstring
assemblyName = System.Reflection.Assembly.GetCallingAssembly().FullName;
I had used the above in my previous code sample to retrieve the assembly name before obtaining settings from the config file. It works only if you are attempting to obtain configuration information from a library that is called by an *.exe. But what if you are in a library (*.dll) and you are using another library to read configuration information as I'd planned? The Assembly.GetCallingAssembly().FullName returns the name of the library, which as I mentioned before is not where the Configuration class naturally looks for settings. Using the following modification:
// get calling assembly settings classstring
assemblyName = System.Reflection.Assembly.GetEntryAssembly().FullName;
Ah, much better. A subtlety worth remembering: Assembly.GetCallingAssembly() returns a reference to whatever the caller, whether it's a library or executable whereas Assembly.GetEntryAssembly() will give you the name of an executable responsible for making that first call to the framework.
Interestingly, in an ASP.NET 2.0 application where the runtime is processing libraries directly, Assembly.GetEntryAssembly() returns a null.
}
// get calling assembly settings classstring
assemblyName = System.Reflection.Assembly.GetCallingAssembly().FullName;
I had used the above in my previous code sample to retrieve the assembly name before obtaining settings from the config file. It works only if you are attempting to obtain configuration information from a library that is called by an *.exe. But what if you are in a library (*.dll) and you are using another library to read configuration information as I'd planned? The Assembly.GetCallingAssembly().FullName returns the name of the library, which as I mentioned before is not where the Configuration class naturally looks for settings. Using the following modification:
// get calling assembly settings classstring
assemblyName = System.Reflection.Assembly.GetEntryAssembly().FullName;
Ah, much better. A subtlety worth remembering: Assembly.GetCallingAssembly() returns a reference to whatever the caller, whether it's a library or executable whereas Assembly.GetEntryAssembly() will give you the name of an executable responsible for making that first call to the framework.
Interestingly, in an ASP.NET 2.0 application where the runtime is processing libraries directly, Assembly.GetEntryAssembly() returns a null.
}
Thursday, February 22, 2007
Settings, Configuration, .NET 2.0
{
A while back I complained about configuration within Windows Forms applications, mostly because I lacked an understanding of the API. I hacked a simple xml file together wherein I could store simple name value pairs that we'd utilize for the application and surprisingly it's been the approach for quite some time.
I've been studying for the Microsoft 70-552 exam which would update my "MCAD" certification to "MCPD." I know, I know, certification is frown upon by so many people who think I should really be reading The Little Schemer to do cool parlor tricks. But this is a case where what I'd said earlier about certification rings true: it probes for weakness and exposes where you "fake it" with hacks without understanding the real structure and purpose of the technology. Case in point, configuration.
In my earlier post, I'd used Configuration.AppSettings which I now know as deprecated. Instead there's a nifty configuration/settings API one can leverage. What I've done here is based very heavily on Chris Sells's Windows Forms 2.0 Programming although I took liberty to modify some of the code to make it more reusable and generic (his intent was to show basics).
The first stop one needs to make is to add a Settings file to the project along with a reference to System.configuration (not sure why configuration is not Configuration).

Underneath the properties node if you "edit" the settings file, it's really a grid that allows you to enter settings with a key, datatype, scope, and value. The scope in here can be either as a user setting or an application setting - it's also possible to write your own section handler and extend the model.

After compiling this is converted into your app.exe.config file - the physical storage of your settings in the xml format well know to config files.

The code for retrieval is still, in my own view, a little verbose but it's easy to develop a simple accessor helper class. Even more slick in the design of the .NET Framework is that class library projects (DLLs) pull configuration settings from their hosted EXE so you the utility code here is from a DLL designed to be referenced and used from any application.
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
namespace SettingsGroperLib
{
public enum SettingType {
userSettings,
applicationSettings
}
public class ConfHelp
{
public static string GetConfSetting(SettingType settingType, string settingKey) {
// obtain current configuration
Configuration currentConfig =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
// obtain section utilizing enumeration
ConfigurationSectionGroup group =
currentConfig.GetSectionGroup(settingType.ToString());
// get calling assembly settings class
string assemblyName = System.Reflection.Assembly.GetCallingAssembly().FullName;
// yah, it's ugly, but it works
string friendlyName = assemblyName.Split(',')[0];
// obtain section by combining friendlyname to settings class
ClientSettingsSection section =
(ClientSettingsSection)group.Sections.Get(
String.Format(
"{0}.Properties.Settings",
friendlyName
)
);
// get setting key
SettingElement element =
section.Settings.Get(settingKey);
// return settings value as
return element.Value.ValueXml.FirstChild.Value;
}
}
}
Sorry about the format; you can download a nice formated version here.
It all seems so easy once you take the time. I think the unlearning was a big obstacle for me since working with config files was something I did all the time in .NET 1.x and old habits die hard. Oh yeah, the retrieval:
string test = ConfHelp.GetConfSetting(SettingType.applicationSettings, "DBUrl");
}
A while back I complained about configuration within Windows Forms applications, mostly because I lacked an understanding of the API. I hacked a simple xml file together wherein I could store simple name value pairs that we'd utilize for the application and surprisingly it's been the approach for quite some time.
I've been studying for the Microsoft 70-552 exam which would update my "MCAD" certification to "MCPD." I know, I know, certification is frown upon by so many people who think I should really be reading The Little Schemer to do cool parlor tricks. But this is a case where what I'd said earlier about certification rings true: it probes for weakness and exposes where you "fake it" with hacks without understanding the real structure and purpose of the technology. Case in point, configuration.
In my earlier post, I'd used Configuration.AppSettings which I now know as deprecated. Instead there's a nifty configuration/settings API one can leverage. What I've done here is based very heavily on Chris Sells's Windows Forms 2.0 Programming although I took liberty to modify some of the code to make it more reusable and generic (his intent was to show basics).
The first stop one needs to make is to add a Settings file to the project along with a reference to System.configuration (not sure why configuration is not Configuration).

Underneath the properties node if you "edit" the settings file, it's really a grid that allows you to enter settings with a key, datatype, scope, and value. The scope in here can be either as a user setting or an application setting - it's also possible to write your own section handler and extend the model.

After compiling this is converted into your app.exe.config file - the physical storage of your settings in the xml format well know to config files.

The code for retrieval is still, in my own view, a little verbose but it's easy to develop a simple accessor helper class. Even more slick in the design of the .NET Framework is that class library projects (DLLs) pull configuration settings from their hosted EXE so you the utility code here is from a DLL designed to be referenced and used from any application.
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
namespace SettingsGroperLib
{
public enum SettingType {
userSettings,
applicationSettings
}
public class ConfHelp
{
public static string GetConfSetting(SettingType settingType, string settingKey) {
// obtain current configuration
Configuration currentConfig =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
// obtain section utilizing enumeration
ConfigurationSectionGroup group =
currentConfig.GetSectionGroup(settingType.ToString());
// get calling assembly settings class
string assemblyName = System.Reflection.Assembly.GetCallingAssembly().FullName;
// yah, it's ugly, but it works
string friendlyName = assemblyName.Split(',')[0];
// obtain section by combining friendlyname to settings class
ClientSettingsSection section =
(ClientSettingsSection)group.Sections.Get(
String.Format(
"{0}.Properties.Settings",
friendlyName
)
);
// get setting key
SettingElement element =
section.Settings.Get(settingKey);
// return settings value as
return element.Value.ValueXml.FirstChild.Value;
}
}
}
Sorry about the format; you can download a nice formated version here.
It all seems so easy once you take the time. I think the unlearning was a big obstacle for me since working with config files was something I did all the time in .NET 1.x and old habits die hard. Oh yeah, the retrieval:
string test = ConfHelp.GetConfSetting(SettingType.applicationSettings, "DBUrl");
}
Tuesday, February 20, 2007
Monday, February 19, 2007
Top Ten Mistakes of Web Design
{
Jakob Nielsen just updated his list of top ten mistakes a web designer can make. I've got no clout like he does but my number one annoyance in web design is when people work against the browser.
The best example of this in my mind is the back button. On so many projects I've had "issues" submitted related to the use of the back button and had to write code to try to cheat the browser into not allowing its use. But the back button is there for a reason and working against the browser is almost always futile: trying to prevent using backspace, alt+arrow, right clicks, programmable mouse buttons, pasting to multiple browser sessions... at what point do we just allow users to keep their control?
I like apps that tolerate issues related to browser control - they let you do it but when they croak, it's an edge case that they aren't willing to reprogram the entire system for. I wish more people would grok the fact that browsers simply aren't fat clients and they've got to share control.
}
Jakob Nielsen just updated his list of top ten mistakes a web designer can make. I've got no clout like he does but my number one annoyance in web design is when people work against the browser.
The best example of this in my mind is the back button. On so many projects I've had "issues" submitted related to the use of the back button and had to write code to try to cheat the browser into not allowing its use. But the back button is there for a reason and working against the browser is almost always futile: trying to prevent using backspace, alt+arrow, right clicks, programmable mouse buttons, pasting to multiple browser sessions... at what point do we just allow users to keep their control?
I like apps that tolerate issues related to browser control - they let you do it but when they croak, it's an edge case that they aren't willing to reprogram the entire system for. I wish more people would grok the fact that browsers simply aren't fat clients and they've got to share control.
}
Language and Thinking
{
I'm fortunate enough to be sitting in on some training and the ice breaker at the beginning was to say which language one liked the most. Most in the room went with what they use for work, C#, but of course I had to break the flow and say I prefer Perl and Javascript in terms of raw language more than anything at the moment.
Talking about it later I brought up the old Sapir Whorf notion of language affecting thinking and problem solving and it's funny how you have a thought and seems to start jumping out at you all over the place. Tonight I ran into (courtesy of Raganwald) the following quotes regarding that idea:
}
I'm fortunate enough to be sitting in on some training and the ice breaker at the beginning was to say which language one liked the most. Most in the room went with what they use for work, C#, but of course I had to break the flow and say I prefer Perl and Javascript in terms of raw language more than anything at the moment.
Talking about it later I brought up the old Sapir Whorf notion of language affecting thinking and problem solving and it's funny how you have a thought and seems to start jumping out at you all over the place. Tonight I ran into (courtesy of Raganwald) the following quotes regarding that idea:
"The connection between the language in which we think/program and theproblems
and solutions we can imagine is very close. For this reasonrestricting
language features with the intent of eliminating programmer errors is at best
dangerous." - Bjarne Stroustrup
"The very fact that it's possible to write messy programs in Perl isalso what
makes it possible to write programs that are cleaner in Perlthan they could ever
be in a language that attempts to enforcecleanliness. The potential for
greater good goes right along with thepotential for greater evil." - Larry Wall
}
Wednesday, February 14, 2007
Wow
{
Microsoft's Vista Ad - quite a contrast to the Apple commercials. To the degree that commercials evoke a sense of a company's ideals, it's telling of something I've always thought of when comparing Microsoft to others - they are trying to solve harder problems than the home movie or virtual greeting card.
Of course, they could just be playing to my ideals and trying to make money out of it...
}
Microsoft's Vista Ad - quite a contrast to the Apple commercials. To the degree that commercials evoke a sense of a company's ideals, it's telling of something I've always thought of when comparing Microsoft to others - they are trying to solve harder problems than the home movie or virtual greeting card.
Of course, they could just be playing to my ideals and trying to make money out of it...
}
Saturday, February 10, 2007
Vote Hanselminutes
{
I'm just echoing the words of Chris Sells's post to vote for Hanselminutes on Podcast Alley. It's my personal favorite among technical podcasts.
}
I'm just echoing the words of Chris Sells's post to vote for Hanselminutes on Podcast Alley. It's my personal favorite among technical podcasts.
}
Wednesday, February 07, 2007
Queues with SQL Server 2005 Service Broker and C#
{
I recently had to set this up and didn't find all too many resources online. I don't have time for a full commentary but suffices to say this: SQL Server 2005 has some excellent reliable messaging capabilities through what's called Service Broker. If you, like me, are a complete skeptic when it comes to new products, this is what I think of as a compelling feature. In the following example, I'm setting up a queue for FileIDs - assume these are identifiers for files that need to be processed asynchronously. After I created my database in SQL 2005, I opened up the query tool and went ahead with the following TSQL:
-- you can attribute an hour to finding this requirement :(
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Password1';
GO
-- message, contract, queue, service creation
CREATE MESSAGE TYPE FileIDForQueue
VALIDATION = NONE;
GO
CREATE CONTRACT FileQueueContract
(FileIDForQueue SENT BY INITIATOR)
GO
CREATE QUEUE dbo.FileIDReceiverQueue
GO
CREATE QUEUE dbo.FileIDSenderQueue
GO
CREATE SERVICE SenderService
ON QUEUE dbo.FileIDSenderQueue
GO
CREATE SERVICE ReceiverService
ON QUEUE dbo.FileIDReceiverQueue (FileQueueContract)
GO
In order to leverage the queue, I wrote the following stored procedures to enqueue, dequeue, and peek:
/*
STORED PROCEDURE RESPONSIBLE FOR INSERTING A QUEUE ITEM
*/
CREATE PROC spSendFileToQueue
@FileID INT
AS
BEGIN TRANSACTION;
DECLARE @conversationID UNIQUEIDENTIFIER
BEGIN DIALOG CONVERSATION @conversationID
FROM SERVICE SenderService
TO SERVICE 'ReceiverService'
ON CONTRACT FileQueueContract;
SEND ON CONVERSATION @conversationID
MESSAGE TYPE FileIDForQueue(@fileid);
--END CONVERSATION @conversationID;
COMMIT TRANSACTION;
GO
/*
STORED PROCEDURE RESPONSIBLE FOR RETRIEVING QUEUE ITEMS IN FIFO STYLE
*/
CREATE PROC spGetFileFromQueue
@FileID INT OUTPUT
AS
RECEIVE TOP(1) @FileID = CONVERT(INT, message_body) FROM FileIDReceiverQueue
GO
/*
STORED PROCEDURE RESPONSIBLE FOR "PEEKING" INTO QUEUE
*/
CREATE PROC spPeekFileQueue
@FileID INT OUTPUT
AS
SELECT TOP(1) @FileID = CONVERT(INT, message_body) FROM FileIDReceiverQueue
WHERE message_body IS NOT NULL
GO
Now that my stored procedures are in place, I can test in TSQL:
-- to send it to the queue:
spSendFileToQueue 45
-- peek into the queue
DECLARE @F INT
EXEC spPeekFileQueue @FileID=@F OUTPUT
PRINT @F
-- to get it back
DECLARE @F INT
EXEC spGetFileFromQueue @FileID=@F OUTPUT
PRINT @F
From here it's trivial to port the procedure calls to C#:
public static void RunActionProc(string procName, SqlParameter parm) {
SqlParameter[] parms = new SqlParameter[] { parm };
RunActionProc(procName, parms);
}
public static void RunActionProc(string procName, SqlParameter[] parms)
{
SqlCommand co = new SqlCommand(procName, GetConnection(true));
co.CommandType = CommandType.StoredProcedure;
foreach (SqlParameter parm in parms)
{
co.Parameters.Add(parm);
}
co.ExecuteNonQuery();
}
public static void Enqueue(int value)
{
DBHelper.RunActionProc("spSendFileToQueue", new SqlParameter("@FileID", value));
}
public static int Peek(){
SqlParameter fileIdParameter = new SqlParameter("@FileID", SqlDbType.Int);
fileIdParameter.Direction = ParameterDirection.Output;
DBHelper.RunActionProc("spPeekFileQueue", fileIdParameter);
return Convert.ToInt32(fileIdParameter.Value);
}
public static int Dequeue() {
SqlParameter fileIdParameter = new SqlParameter("@FileID", SqlDbType.Int);
fileIdParameter.Direction = ParameterDirection.Output;
DBHelper.RunActionProc("spGetFileFromQueue", fileIdParameter);
return Convert.ToInt32(fileIdParameter.Value);
}
A sample project in C# can be found here.
}
I recently had to set this up and didn't find all too many resources online. I don't have time for a full commentary but suffices to say this: SQL Server 2005 has some excellent reliable messaging capabilities through what's called Service Broker. If you, like me, are a complete skeptic when it comes to new products, this is what I think of as a compelling feature. In the following example, I'm setting up a queue for FileIDs - assume these are identifiers for files that need to be processed asynchronously. After I created my database in SQL 2005, I opened up the query tool and went ahead with the following TSQL:
-- you can attribute an hour to finding this requirement :(
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Password1';
GO
-- message, contract, queue, service creation
CREATE MESSAGE TYPE FileIDForQueue
VALIDATION = NONE;
GO
CREATE CONTRACT FileQueueContract
(FileIDForQueue SENT BY INITIATOR)
GO
CREATE QUEUE dbo.FileIDReceiverQueue
GO
CREATE QUEUE dbo.FileIDSenderQueue
GO
CREATE SERVICE SenderService
ON QUEUE dbo.FileIDSenderQueue
GO
CREATE SERVICE ReceiverService
ON QUEUE dbo.FileIDReceiverQueue (FileQueueContract)
GO
In order to leverage the queue, I wrote the following stored procedures to enqueue, dequeue, and peek:
/*
STORED PROCEDURE RESPONSIBLE FOR INSERTING A QUEUE ITEM
*/
CREATE PROC spSendFileToQueue
@FileID INT
AS
BEGIN TRANSACTION;
DECLARE @conversationID UNIQUEIDENTIFIER
BEGIN DIALOG CONVERSATION @conversationID
FROM SERVICE SenderService
TO SERVICE 'ReceiverService'
ON CONTRACT FileQueueContract;
SEND ON CONVERSATION @conversationID
MESSAGE TYPE FileIDForQueue(@fileid);
--END CONVERSATION @conversationID;
COMMIT TRANSACTION;
GO
/*
STORED PROCEDURE RESPONSIBLE FOR RETRIEVING QUEUE ITEMS IN FIFO STYLE
*/
CREATE PROC spGetFileFromQueue
@FileID INT OUTPUT
AS
RECEIVE TOP(1) @FileID = CONVERT(INT, message_body) FROM FileIDReceiverQueue
GO
/*
STORED PROCEDURE RESPONSIBLE FOR "PEEKING" INTO QUEUE
*/
CREATE PROC spPeekFileQueue
@FileID INT OUTPUT
AS
SELECT TOP(1) @FileID = CONVERT(INT, message_body) FROM FileIDReceiverQueue
WHERE message_body IS NOT NULL
GO
Now that my stored procedures are in place, I can test in TSQL:
-- to send it to the queue:
spSendFileToQueue 45
-- peek into the queue
DECLARE @F INT
EXEC spPeekFileQueue @FileID=@F OUTPUT
PRINT @F
-- to get it back
DECLARE @F INT
EXEC spGetFileFromQueue @FileID=@F OUTPUT
PRINT @F
From here it's trivial to port the procedure calls to C#:
public static void RunActionProc(string procName, SqlParameter parm) {
SqlParameter[] parms = new SqlParameter[] { parm };
RunActionProc(procName, parms);
}
public static void RunActionProc(string procName, SqlParameter[] parms)
{
SqlCommand co = new SqlCommand(procName, GetConnection(true));
co.CommandType = CommandType.StoredProcedure;
foreach (SqlParameter parm in parms)
{
co.Parameters.Add(parm);
}
co.ExecuteNonQuery();
}
public static void Enqueue(int value)
{
DBHelper.RunActionProc("spSendFileToQueue", new SqlParameter("@FileID", value));
}
public static int Peek(){
SqlParameter fileIdParameter = new SqlParameter("@FileID", SqlDbType.Int);
fileIdParameter.Direction = ParameterDirection.Output;
DBHelper.RunActionProc("spPeekFileQueue", fileIdParameter);
return Convert.ToInt32(fileIdParameter.Value);
}
public static int Dequeue() {
SqlParameter fileIdParameter = new SqlParameter("@FileID", SqlDbType.Int);
fileIdParameter.Direction = ParameterDirection.Output;
DBHelper.RunActionProc("spGetFileFromQueue", fileIdParameter);
return Convert.ToInt32(fileIdParameter.Value);
}
A sample project in C# can be found here.
}
Saturday, February 03, 2007
The Future of Programming Languages
{
Imagine being able to pull Anders Hejlsberg, Chief Architect of C#, Herb Sutter, Architect in the C++ language design group, Erik Meijer, Architect in both VB.NET and C# language design, and a programmer's programmer, Brian Beckman into a conference room and have an hour's worth of conversation on programming languages - to hear about composability and functional programming and abstraction from people whose decisions literally shake our world from the top.
This recent video on Channel 9 is just that.
At the end, when they are getting kicked out because someone else is scheduled for the room I can't help but laugh. Guys like Anders Hejlsberg get kicked out of conference rooms too eh? They must be human.
Here are some quotes:
Anders -
"language is like the color of your glasses... "
Beckman -
"Scheme is sort of God's Lisp with all the noise boiled away..."
Meijer -
"By definition you cannot have too much abstraction because abstraction means leaving out the unnecessary detail. So if details are unnecessary you can abstract... sometimes you abstract from necessary details but that isn't true abstraction because you've taken away necessary detail"
}
Imagine being able to pull Anders Hejlsberg, Chief Architect of C#, Herb Sutter, Architect in the C++ language design group, Erik Meijer, Architect in both VB.NET and C# language design, and a programmer's programmer, Brian Beckman into a conference room and have an hour's worth of conversation on programming languages - to hear about composability and functional programming and abstraction from people whose decisions literally shake our world from the top.
This recent video on Channel 9 is just that.
At the end, when they are getting kicked out because someone else is scheduled for the room I can't help but laugh. Guys like Anders Hejlsberg get kicked out of conference rooms too eh? They must be human.
Here are some quotes:
Anders -
"language is like the color of your glasses... "
Beckman -
"Scheme is sort of God's Lisp with all the noise boiled away..."
Meijer -
"By definition you cannot have too much abstraction because abstraction means leaving out the unnecessary detail. So if details are unnecessary you can abstract... sometimes you abstract from necessary details but that isn't true abstraction because you've taken away necessary detail"
}
IDE Distrust
{
Some time back I read Charles Petzold's essay Does Visual Studio Rot the Mind which concerned itself with some of the negative aspects of how our tools drive us rather than us driving our tools. It's not just a handful of occasions where I've been called over to "troubleshoot" when a person's intellisense (or autocompletion) isn't popping up what they are expecting.
But Visual Studio does impress upon you the wrong ideas sometimes.

In this case it will show an error for a missing mime type on a script tag. Granted, this may be some part of XHTML validation but after listening to Douglas Crockford (and also, incidentally, running into it in the Rhino book), I discovered this type attribute isn't leveraged by any existing browsers.

If you give in for the sake of XHTML and supply this attribute, you'll notice that Visual Studio suggests text/javascript which is actually incorrect. It should be application/javascript.

Here is something even more concerning - Visual Studio is suggesting two parameters for a method that actually only requires one (I looked in the Rhino book).
Visual Studio is a great tool, don't get me wrong - as much as I'd love to be an Emacs junkie and do my demonstrations in it while showing off my profficiency, I like how effecient Visual Studio is at allowing me to focus on my code - not my libraries, or my classpath, or anything else.
With that said, it's important to master the tool, as opposed to being mastered by the tool. A healthy amount of distrust seems necessary to get the best out of it.
}
Some time back I read Charles Petzold's essay Does Visual Studio Rot the Mind which concerned itself with some of the negative aspects of how our tools drive us rather than us driving our tools. It's not just a handful of occasions where I've been called over to "troubleshoot" when a person's intellisense (or autocompletion) isn't popping up what they are expecting.
But Visual Studio does impress upon you the wrong ideas sometimes.

In this case it will show an error for a missing mime type on a script tag. Granted, this may be some part of XHTML validation but after listening to Douglas Crockford (and also, incidentally, running into it in the Rhino book), I discovered this type attribute isn't leveraged by any existing browsers.

If you give in for the sake of XHTML and supply this attribute, you'll notice that Visual Studio suggests text/javascript which is actually incorrect. It should be application/javascript.

Here is something even more concerning - Visual Studio is suggesting two parameters for a method that actually only requires one (I looked in the Rhino book).
Visual Studio is a great tool, don't get me wrong - as much as I'd love to be an Emacs junkie and do my demonstrations in it while showing off my profficiency, I like how effecient Visual Studio is at allowing me to focus on my code - not my libraries, or my classpath, or anything else.
With that said, it's important to master the tool, as opposed to being mastered by the tool. A healthy amount of distrust seems necessary to get the best out of it.
}
Thursday, February 01, 2007
Founders At Work
{
I'm looking forward to reading Jessica Livingstone's book, Founders At Work, which consists of interviews with various techie entrepreneurs. Joel Spolsky's interview, however, is available as a freebie and makes for some interesting reading. I've been a Joel "fanboy" for a while but it still impresses me how each time he writes (or comments) at length there's so much truth from which to learn.
There are several other interviews I'm looking forward to reading, particularly Philip Greenspun's on the making (and possibly breaking) of Ars Digita. A few years ago Philip did an interview on IT Conversations that impressed a lot of "lessons learned" upon me.
But back to Joel, the interview is insightful and there are many gleanings on consulting, founding, competition, learning, and making good software.
I'll get to the Woz interview this weekend.
}
I'm looking forward to reading Jessica Livingstone's book, Founders At Work, which consists of interviews with various techie entrepreneurs. Joel Spolsky's interview, however, is available as a freebie and makes for some interesting reading. I've been a Joel "fanboy" for a while but it still impresses me how each time he writes (or comments) at length there's so much truth from which to learn.
There are several other interviews I'm looking forward to reading, particularly Philip Greenspun's on the making (and possibly breaking) of Ars Digita. A few years ago Philip did an interview on IT Conversations that impressed a lot of "lessons learned" upon me.
But back to Joel, the interview is insightful and there are many gleanings on consulting, founding, competition, learning, and making good software.
I'll get to the Woz interview this weekend.
}
Tuesday, January 30, 2007
Are You Good?
{
A good way to get attention in the programming blogs is to draw a distinction between "good" and "mediocre" programmers and allow developers to question whether they can consider themselves "good."
Atwood posts that you're either good or mediocre at programming despite the amount of practice or effort you may decide to put in:
I wonder what it is in a programmer's DNA that leaves them with a self doubt? On the other end of the spectrum there are a lot of popular posts devoted to the topic of making oneself better - I found this old Steve Yegge post as a rebuttle to Atwood; that practice is not only a way to get better, but a necessity of the better programmers.
I have no idea how to categorize myself; I don't dare think of myself as good especially when people like Joel Spolsky can throw tests my way that pretty much leave me gaping and grasping.
But, although the blog post I bothered to take time to write speaks to the contrary, I'm not sure if questioning oneself is very productive. Most programmers I respect out there are unbelievably productive - there doesn't seem to be a lot of time for being paralyzed by self doubt.
Back to practice I go.
}
A good way to get attention in the programming blogs is to draw a distinction between "good" and "mediocre" programmers and allow developers to question whether they can consider themselves "good."
Atwood posts that you're either good or mediocre at programming despite the amount of practice or effort you may decide to put in:
"A mediocre developer can program his or her heart out for four years, but thatJoel Spolsky and a few others seem to use the tactic quite a bit; reeling people in by causing them to question themselves.
won't magically transform them into a good developer. And the good developers
always seem to have a natural knack for the stuff from the very beginning."
I wonder what it is in a programmer's DNA that leaves them with a self doubt? On the other end of the spectrum there are a lot of popular posts devoted to the topic of making oneself better - I found this old Steve Yegge post as a rebuttle to Atwood; that practice is not only a way to get better, but a necessity of the better programmers.
I have no idea how to categorize myself; I don't dare think of myself as good especially when people like Joel Spolsky can throw tests my way that pretty much leave me gaping and grasping.
But, although the blog post I bothered to take time to write speaks to the contrary, I'm not sure if questioning oneself is very productive. Most programmers I respect out there are unbelievably productive - there doesn't seem to be a lot of time for being paralyzed by self doubt.
Back to practice I go.
}
Monday, January 29, 2007
Querystring: Laziness or Design?
{
Mads Kristensen posted about retrieving items from the querystring by a series of checks against nullness (is that a word?) and type values. His starts with:
if(!Request.QueryString["foo"] == null){
// do interesting things
}
Continues with a little more elegance:
if(String.IsNullOrEmpty(Request.QueryString["foo"])){
// do interesting things
}
Finishes with a check on type integrity during the querystring check:
if(!String.IsNullOrEmpty(Request.QueryString["foo"]) &&
Request.QueryString["foo"].length == 5){
// do interesting things
}
I like seeing things like this because it's interesting to look at how someone does something I do all the time with a different twist. I'm a pretty lazy guy, and although I hope to attribute it to the perl affinity in me, I'm not sure if it's really a spade being a spade and I actually am lazy in a bad way.
For most of my projects (except when I'm at a client or somewhere that I need tocopy follow a defined pattern) I usually write a little "helper" class with static methods for this sort of thing:
class Helper{
public static string GetQS(Page page, string key){
return (page.Request[key] ?? String.Empty); // ?? is so slick yo.
}
}
When I'm reading out querystring values, I sometimes read and assign simultaneously:
string foo;
if((foo = Helper.GetQS(this, "foo"))!= String.Empty){
// do interesting things with foo
}
Of course this is a variation on Mad's theme, but one critical difference - a lazy one - is that my gut reaction is to intentionally allow failure on type integrity outside the querystring check. That failure usually invokes a more generic handler related to the operation in question rather than having to decide what happens the moment I know I have a bad querystring value. For example:
string quantity;
if((quantity = Helper.GetQS(this, "quantity"))!=String.Empty){
this.UpdateQuantity(Convert.ToInt32(quantity));
}
My rational is that I can write my exception handler for the operation "UpdateQuantity" rather than the specific querystring item. UpdateQuantity may throw different types of exceptions and I can capture them all in one fell swoop instead of defensively trying to test everything up front.
try{
string quantity;
if((quantity = Helper.GetQS(this, "quantity"))!=String.Empty){
this.UpdateQuantity(Convert.ToInt32(quantity));
}
}
catch(FormatException ex){
// specific exceptions I can of more assistance
}
catch(Exception ex){
// log and inform *shrug*
}
Of course that's lazy. I'd like to think it's lazy in a perl way rather than lazy in a couch potato way. What say you?
}
Mads Kristensen posted about retrieving items from the querystring by a series of checks against nullness (is that a word?) and type values. His starts with:
if(!Request.QueryString["foo"] == null){
// do interesting things
}
Continues with a little more elegance:
if(String.IsNullOrEmpty(Request.QueryString["foo"])){
// do interesting things
}
Finishes with a check on type integrity during the querystring check:
if(!String.IsNullOrEmpty(Request.QueryString["foo"]) &&
Request.QueryString["foo"].length == 5){
// do interesting things
}
I like seeing things like this because it's interesting to look at how someone does something I do all the time with a different twist. I'm a pretty lazy guy, and although I hope to attribute it to the perl affinity in me, I'm not sure if it's really a spade being a spade and I actually am lazy in a bad way.
For most of my projects (except when I'm at a client or somewhere that I need to
class Helper{
public static string GetQS(Page page, string key){
return (page.Request[key] ?? String.Empty); // ?? is so slick yo.
}
}
When I'm reading out querystring values, I sometimes read and assign simultaneously:
string foo;
if((foo = Helper.GetQS(this, "foo"))!= String.Empty){
// do interesting things with foo
}
Of course this is a variation on Mad's theme, but one critical difference - a lazy one - is that my gut reaction is to intentionally allow failure on type integrity outside the querystring check. That failure usually invokes a more generic handler related to the operation in question rather than having to decide what happens the moment I know I have a bad querystring value. For example:
string quantity;
if((quantity = Helper.GetQS(this, "quantity"))!=String.Empty){
this.UpdateQuantity(Convert.ToInt32(quantity));
}
My rational is that I can write my exception handler for the operation "UpdateQuantity" rather than the specific querystring item. UpdateQuantity may throw different types of exceptions and I can capture them all in one fell swoop instead of defensively trying to test everything up front.
try{
string quantity;
if((quantity = Helper.GetQS(this, "quantity"))!=String.Empty){
this.UpdateQuantity(Convert.ToInt32(quantity));
}
}
catch(FormatException ex){
// specific exceptions I can of more assistance
}
catch(Exception ex){
// log and inform *shrug*
}
Of course that's lazy. I'd like to think it's lazy in a perl way rather than lazy in a couch potato way. What say you?
}
Saturday, January 27, 2007
Yahoo Blew It
{
Just finished a Wired piece by Fred Vogelstein on how Yahoo fell behind Google. There's more detail in the tell but in a nutshell it boils down to a comment Joel Spolsky had made on his Venture Voice podcast: non-technical managers and CEOs are the doom of technology companies. Or, in the closing paragraph of Vogelstein's article:
It's a good morality tale and definitely one I see as true in the world around me. Especially as many non-technical people launch "Web 2.0" companies, I wonder how often it will be replayed for those of us with a different, more technical perspective.
But I'm not convinced that Yahoo is out for the count. There are a few things that I think they get right and with a change in approach can really capitalize on:
1. Mail - Yahoo makes my favorite web based mail client. I use the "beta" version of their mail software which was written by the folks from Oddpost. I wonder if they'd turn these guys loose to write some other cool software, like a killer RSS Reader to make Netvibes eat its heart out.
2. Curators - The craze at the moment is over user generated content but a model that I think will still remain profitable is that of having curated content; hiring someone who knows what they are doing to pick out what's interesting for others in a particular domain. Why can't Yahoo take what is done so well on Yahoo Picks and extend that to more specific content? Not overblown CNN style content heaviness, just a small group of people that find a few interesting things and keep the site sparse. What's ironic is that as "user generated" content seems to overtake the web, there is more need for people who can pre-parse it to find what's more special.
3. Developer APIs - One thing that made me happy about Yahoo's Developer Network was that it had to do with pushing out their philosophy and sharing what they standardize well. Their APIs are a bit bulky in my opinion at present, but there are some clever people over there who can really help developers be more productive.
4. Excellent content - Yahoo Movies, Yahoo TV to name a few. I keep going back because they are that useful.
There are more things but I'm an outsider who is simply commenting on what he likes. Yahoo has a lot of smart technical people they don't seem to be listening to. Reading Jeremy Zawodny and Josh Woodward shortly after the release of Google Finance seemed to confirm this sad fact.
Because the one thing about the Wired post that bothered me was that Vogelstein kept going back to the leadership of Yahoo under Terry Semel where I see as big of a problem in Yahoo not being able to leverage its developers for ideas beyond how to implement specifications. Semel's ability to make deals and encourage integration are a part of this, but it seems like it occured at multiple levels of management, not just at the top.
One more thing I can think of helping Yahoo stay relevent in their battle against Google and other web companies: why not buy some of Paul Graham's companies (or other "built to sell" companies that seem like winners)? Forget revenue models, forget integrations - forget all that MBA stuff for a moment. Thinkature (Yahoo anounces Visio modeling mixed with Powerpoint presentability for the future), Snipshot (Yahoo delivers online photo editing and hosting for the masses), Jamglue (Yahoo presents technology to mix/remix and make ringtones)... there are a lot more than these to be sure, but just of the top of my head - represent some ideas that can get people excited. Not only that, the young founders are the types of people who won't stop thinking even after their technology enters a bigger and perhaps more orthodox arena. Money doesn't grow on trees but Yahoo has a lot of resources and a big market capitalization to work with - it only takes one good idea to make the whole thing worth it.
I don't think Yahoo is done by any means. I sincerely hope they have a second life, not necessarily as a victor in a war against Google, but more as a successful web company staying relevant and making people happy.
}
Just finished a Wired piece by Fred Vogelstein on how Yahoo fell behind Google. There's more detail in the tell but in a nutshell it boils down to a comment Joel Spolsky had made on his Venture Voice podcast: non-technical managers and CEOs are the doom of technology companies. Or, in the closing paragraph of Vogelstein's article:
"At Yahoo, the marketers rule, and at Google the engineers rule. And for that,
Yahoo is finally paying the price."
It's a good morality tale and definitely one I see as true in the world around me. Especially as many non-technical people launch "Web 2.0" companies, I wonder how often it will be replayed for those of us with a different, more technical perspective.
But I'm not convinced that Yahoo is out for the count. There are a few things that I think they get right and with a change in approach can really capitalize on:
1. Mail - Yahoo makes my favorite web based mail client. I use the "beta" version of their mail software which was written by the folks from Oddpost. I wonder if they'd turn these guys loose to write some other cool software, like a killer RSS Reader to make Netvibes eat its heart out.
2. Curators - The craze at the moment is over user generated content but a model that I think will still remain profitable is that of having curated content; hiring someone who knows what they are doing to pick out what's interesting for others in a particular domain. Why can't Yahoo take what is done so well on Yahoo Picks and extend that to more specific content? Not overblown CNN style content heaviness, just a small group of people that find a few interesting things and keep the site sparse. What's ironic is that as "user generated" content seems to overtake the web, there is more need for people who can pre-parse it to find what's more special.
3. Developer APIs - One thing that made me happy about Yahoo's Developer Network was that it had to do with pushing out their philosophy and sharing what they standardize well. Their APIs are a bit bulky in my opinion at present, but there are some clever people over there who can really help developers be more productive.
4. Excellent content - Yahoo Movies, Yahoo TV to name a few. I keep going back because they are that useful.
There are more things but I'm an outsider who is simply commenting on what he likes. Yahoo has a lot of smart technical people they don't seem to be listening to. Reading Jeremy Zawodny and Josh Woodward shortly after the release of Google Finance seemed to confirm this sad fact.
Because the one thing about the Wired post that bothered me was that Vogelstein kept going back to the leadership of Yahoo under Terry Semel where I see as big of a problem in Yahoo not being able to leverage its developers for ideas beyond how to implement specifications. Semel's ability to make deals and encourage integration are a part of this, but it seems like it occured at multiple levels of management, not just at the top.
One more thing I can think of helping Yahoo stay relevent in their battle against Google and other web companies: why not buy some of Paul Graham's companies (or other "built to sell" companies that seem like winners)? Forget revenue models, forget integrations - forget all that MBA stuff for a moment. Thinkature (Yahoo anounces Visio modeling mixed with Powerpoint presentability for the future), Snipshot (Yahoo delivers online photo editing and hosting for the masses), Jamglue (Yahoo presents technology to mix/remix and make ringtones)... there are a lot more than these to be sure, but just of the top of my head - represent some ideas that can get people excited. Not only that, the young founders are the types of people who won't stop thinking even after their technology enters a bigger and perhaps more orthodox arena. Money doesn't grow on trees but Yahoo has a lot of resources and a big market capitalization to work with - it only takes one good idea to make the whole thing worth it.
I don't think Yahoo is done by any means. I sincerely hope they have a second life, not necessarily as a victor in a war against Google, but more as a successful web company staying relevant and making people happy.
}
Tuesday, January 23, 2007
view-source, javascript, about:config
{
A while back Aaron offhandedly shows me a slick trick with Firefox when I'm complaining about how it doesn't show namespaces on xml documents: you can use view-source as a protocol to look a website's source code. If you've got Firefox, check it out.
I've been making my way through the 5th edition of the Rhino book and Flanagan shows another technique of using your address bar with a protocol. You can type something like:
javascript:alert("Hello World");
into your address bar and just like that you've got a little play pen for your javascript. You can also extend it to include html that you'd like to render, for example:
javascript:alert("Hello There");<p>Hello</p>
Of course do not forget about:config as a way to configure Firefox. Any more of these goodies?
}
A while back Aaron offhandedly shows me a slick trick with Firefox when I'm complaining about how it doesn't show namespaces on xml documents: you can use view-source as a protocol to look a website's source code. If you've got Firefox, check it out.
I've been making my way through the 5th edition of the Rhino book and Flanagan shows another technique of using your address bar with a protocol. You can type something like:
javascript:alert("Hello World");
into your address bar and just like that you've got a little play pen for your javascript. You can also extend it to include html that you'd like to render, for example:
javascript:alert("Hello There");<p>Hello</p>
Of course do not forget about:config as a way to configure Firefox. Any more of these goodies?
}
Sunday, January 21, 2007
Certification
{
Jeff Atwood posted recently about certification, coming to the following conclusion:
Many of the comments are the predictable reactions to certifications: they suck, people who obtain them don't know anything, they are self taught without certification, those who can't code obtain certifications and so on.
Reading a lot of the comments makes me want to add my own perspective to the fray, as cluttered as it is, because I'm the product of certifications. My own conclusion on certifications doesn't fall far from Atwood's, but because I was and am tied to that world, I reach it by a different means.
My background is what led me to certifications. My degree was in Accounting, and the only company that took a serious look at me in the technology world as I frantically tried to leave the public accounting firm I worked at required them. In fact, during my interview, my interviewer told me that I was one of several candidates who they were considering, and the first of us to obtain a certification would probably get the job. I didn't really know where to start - I had some sparse computer experience from building web pages and working in my university computer lab, but I was limited in doing practical things with computers. I went to my neighborhood bookstore and inspected the shelves, settling upon the biggest book I could find (assuming it had the most content) to study for the Microsoft Networking Essentials exam. I spent my lunch breaks at the accounting firm memorizing differnent network topographies, cables, and protocols.
I failed the exam on my first try, but this was not because I missed anything in the book. I was a fairly good student, and I literally memorized large portions of the book. Rather, I failed because I didn't know how the test would relate to the material I had learned. Once in the "certification game" I understood how people study for the exams (practice exams, looking at exam objectives) and how to look for "keywords" - things that give away the answer to the question.
For that basic networking exam, relating Novel any time I saw IPX/SPX was half the hard work in finding an answer to the question. For example:
Q. You have connected several Novel print servers to your Network but users complain that they do not work. What should you do?
A. Verify that IPX/SPX protocol or client is enabled.
I never failed another certification exam. Well, alright, I failed a VB 6 Enterprise Application Development exam because I'd had a wisdom tooth pulled the day before and was under the influence of painkillers, but I'll pretend that didn't happen.
As the exams got more elaborate, I learned it was very important to know how questions were asked (use practice exams) and where I was weak (exam objectives). The exam objectives would tell you which part of a product you were weak on. For example, I was never very good at answering deployment questions when taking developer exams. Not only was this somewhat difficult (and boring) to simulate, it wasn't something I needed to do very often living primarily in the world of web application development.
Now that I've had some distance in the certification world, my conclusion for people - especially developers - is that people who certify are responsible for learning how to answer questions. Although these questions may be related to their experiences, experience and knowledge are not a sure way of passing an exam. One needs to know how the questions work. Even on exams that involve simulations, understanding what will be needed is critical.
I certified on SQL Server many years ago - I don't remember the exact year - but it was during the SQL Server 7 days. I will probably take the new SQL Server exams but much of this is based on simulations - I know this because a coworker recently passed on of the exams and told me about it. The interesting thing is that I've used SQL Server every day for at least 5 years and prefer to live in TSQL for most of what I do. I'd have to spend some time getting comfortable with the GUI in order to take this exam, but it would not be related to my experience. Even more frustrating - my time looking at the GUI would just be learning to do things I already do.
In this sense I share the frustration that many people have about certifications: ability to answer quiz questions doesn't translate directly into the workings of day to day development. Many of the typical questions even if unknown would be about a 1 minute trip to Google or the documentation.
Here is my "but:" certifications force exposure for the people taking them. I know a lot more about deployment than I would have if I based what I knew on what I was inclined to learn on the job. I know a lot more about networking than most of the people I work with simply because I did have to learn it to be "certified." I'm sure some of my time without certifications would have been spent on personal projects or readings of personal interest, but without discipline some of that reading is of only general benefit. And because certification objectives are very practical (if not boring) they usually result in knowledge that is more focused.
I had a friend who was largely self taught and extremely intelligent. His personal study took him into the world of C++ where he excelled, preferring to spend his time studying Open GL libraries. It's interesting stuff, to be sure, but it's not MFC or the Win32 API. As a result he could make a lot of cool demos, but he wasn't the type of person to write a banking application. He wasn't particularly interested in that but as a thought experiment what if he'd decided to endure some of the boredome and learn how to write MFC with database connectivity? Certification would have forced that exposure which, combined with his aptitude, would have made him quite a developer.
One final note before I give my own conclusion - similar to Atwood's but different enough that I felt compelled to write this. Atwood posts a comment from an older article on certifiction:
I recently realized that there is a little bit more economic activity in certification, not necessarily on the side of the big companies that sponsor them. Many people who have certification use it as a tool to restrict supply and drive up their own "value." For example, many Microsoft trainers are eager to have Microsoft require a "premier certification" in order to teach their coursework. The argument they use officially is that it will ensure that the trainer delivering content is knowledgable but the intersting facet of this argument is that obtaining and maintaining "premier certifications" (many of which have multiple exams) requires considerable effort (and massive opportunity cost - instead of learning the new GUI of SQL Server 2005 a person could be writing, say, a stored procedure generator using SMO). It leads me to believe that most of them know that increasing the amount of time and effort for certification is in the interests of their pockets as much as it keeps people "knowledgeable." I also observe this pattern in my own certification life: when I'm doing project work, which is usually intense and requires a lot of my off hours, I'm never certifying. When I'm between jobs, or if I'm asked to teach a class or do something that requires certification, I sit down and do what's necessary.
So my big conculsion? Everyone has a story of the MCSE who never installed Windows or the "certified" guy who had no practical experience. A lot of the time it's people like me - not disciplined in the work of computers and trying to put something on a resume. In that sense I don't disagree that a certification all by itself is meaningful. I defer to Atwood's comments about showing work that's been done and a track record of personal effort.
But.
Certifications in addition to a person's track record are a good thing to take into consideration. Not only do they show a person putting in some effort beyond work related requirements, it also means they've got some exposure (knowledge-wise) to areas of a technology outside of the context of immediate use.
In the end my apology is biased because I do have certifications. But there's a value to them that most people miss because they have had bad experiences with people that abuse them or try to compensate real experience and/or projects with them.
I'll continue to get certifications as a part of work related requests but I'll never get them again in the context I started with: a guy who loved computers and was trying to get a job and demonstrate to people effort and a little bit of knowledge. As I interview people and present myself I'll present my certifications as that original effort, not necessarily where I am now. I've got projects (day and night) to try to assert my credibility.
}
Jeff Atwood posted recently about certification, coming to the following conclusion:
"I don't believe in certifications. The certification alphabet is no substitute
for a solid portfolio; you should be spending your time building stuff, not
studying for multiple choice tests. But that doesn't mean they're worthless,
either. I don't think certifications get in the way, as long as you can
demonstrate an impressive body of work along with them. "
Many of the comments are the predictable reactions to certifications: they suck, people who obtain them don't know anything, they are self taught without certification, those who can't code obtain certifications and so on.
Reading a lot of the comments makes me want to add my own perspective to the fray, as cluttered as it is, because I'm the product of certifications. My own conclusion on certifications doesn't fall far from Atwood's, but because I was and am tied to that world, I reach it by a different means.
My background is what led me to certifications. My degree was in Accounting, and the only company that took a serious look at me in the technology world as I frantically tried to leave the public accounting firm I worked at required them. In fact, during my interview, my interviewer told me that I was one of several candidates who they were considering, and the first of us to obtain a certification would probably get the job. I didn't really know where to start - I had some sparse computer experience from building web pages and working in my university computer lab, but I was limited in doing practical things with computers. I went to my neighborhood bookstore and inspected the shelves, settling upon the biggest book I could find (assuming it had the most content) to study for the Microsoft Networking Essentials exam. I spent my lunch breaks at the accounting firm memorizing differnent network topographies, cables, and protocols.
I failed the exam on my first try, but this was not because I missed anything in the book. I was a fairly good student, and I literally memorized large portions of the book. Rather, I failed because I didn't know how the test would relate to the material I had learned. Once in the "certification game" I understood how people study for the exams (practice exams, looking at exam objectives) and how to look for "keywords" - things that give away the answer to the question.
For that basic networking exam, relating Novel any time I saw IPX/SPX was half the hard work in finding an answer to the question. For example:
Q. You have connected several Novel print servers to your Network but users complain that they do not work. What should you do?
A. Verify that IPX/SPX protocol or client is enabled.
I never failed another certification exam. Well, alright, I failed a VB 6 Enterprise Application Development exam because I'd had a wisdom tooth pulled the day before and was under the influence of painkillers, but I'll pretend that didn't happen.
As the exams got more elaborate, I learned it was very important to know how questions were asked (use practice exams) and where I was weak (exam objectives). The exam objectives would tell you which part of a product you were weak on. For example, I was never very good at answering deployment questions when taking developer exams. Not only was this somewhat difficult (and boring) to simulate, it wasn't something I needed to do very often living primarily in the world of web application development.
Now that I've had some distance in the certification world, my conclusion for people - especially developers - is that people who certify are responsible for learning how to answer questions. Although these questions may be related to their experiences, experience and knowledge are not a sure way of passing an exam. One needs to know how the questions work. Even on exams that involve simulations, understanding what will be needed is critical.
I certified on SQL Server many years ago - I don't remember the exact year - but it was during the SQL Server 7 days. I will probably take the new SQL Server exams but much of this is based on simulations - I know this because a coworker recently passed on of the exams and told me about it. The interesting thing is that I've used SQL Server every day for at least 5 years and prefer to live in TSQL for most of what I do. I'd have to spend some time getting comfortable with the GUI in order to take this exam, but it would not be related to my experience. Even more frustrating - my time looking at the GUI would just be learning to do things I already do.
In this sense I share the frustration that many people have about certifications: ability to answer quiz questions doesn't translate directly into the workings of day to day development. Many of the typical questions even if unknown would be about a 1 minute trip to Google or the documentation.
Here is my "but:" certifications force exposure for the people taking them. I know a lot more about deployment than I would have if I based what I knew on what I was inclined to learn on the job. I know a lot more about networking than most of the people I work with simply because I did have to learn it to be "certified." I'm sure some of my time without certifications would have been spent on personal projects or readings of personal interest, but without discipline some of that reading is of only general benefit. And because certification objectives are very practical (if not boring) they usually result in knowledge that is more focused.
I had a friend who was largely self taught and extremely intelligent. His personal study took him into the world of C++ where he excelled, preferring to spend his time studying Open GL libraries. It's interesting stuff, to be sure, but it's not MFC or the Win32 API. As a result he could make a lot of cool demos, but he wasn't the type of person to write a banking application. He wasn't particularly interested in that but as a thought experiment what if he'd decided to endure some of the boredome and learn how to write MFC with database connectivity? Certification would have forced that exposure which, combined with his aptitude, would have made him quite a developer.
One final note before I give my own conclusion - similar to Atwood's but different enough that I felt compelled to write this. Atwood posts a comment from an older article on certifiction:
I suggest that we have a perfectly fine selection mechanism at work today;
it's called the market. Some people get hired as software developers and some
people don't. It is a lot more competent than any appointed elite would be and a
lot more ethical.
I recently realized that there is a little bit more economic activity in certification, not necessarily on the side of the big companies that sponsor them. Many people who have certification use it as a tool to restrict supply and drive up their own "value." For example, many Microsoft trainers are eager to have Microsoft require a "premier certification" in order to teach their coursework. The argument they use officially is that it will ensure that the trainer delivering content is knowledgable but the intersting facet of this argument is that obtaining and maintaining "premier certifications" (many of which have multiple exams) requires considerable effort (and massive opportunity cost - instead of learning the new GUI of SQL Server 2005 a person could be writing, say, a stored procedure generator using SMO). It leads me to believe that most of them know that increasing the amount of time and effort for certification is in the interests of their pockets as much as it keeps people "knowledgeable." I also observe this pattern in my own certification life: when I'm doing project work, which is usually intense and requires a lot of my off hours, I'm never certifying. When I'm between jobs, or if I'm asked to teach a class or do something that requires certification, I sit down and do what's necessary.
So my big conculsion? Everyone has a story of the MCSE who never installed Windows or the "certified" guy who had no practical experience. A lot of the time it's people like me - not disciplined in the work of computers and trying to put something on a resume. In that sense I don't disagree that a certification all by itself is meaningful. I defer to Atwood's comments about showing work that's been done and a track record of personal effort.
But.
Certifications in addition to a person's track record are a good thing to take into consideration. Not only do they show a person putting in some effort beyond work related requirements, it also means they've got some exposure (knowledge-wise) to areas of a technology outside of the context of immediate use.
In the end my apology is biased because I do have certifications. But there's a value to them that most people miss because they have had bad experiences with people that abuse them or try to compensate real experience and/or projects with them.
I'll continue to get certifications as a part of work related requests but I'll never get them again in the context I started with: a guy who loved computers and was trying to get a job and demonstrate to people effort and a little bit of knowledge. As I interview people and present myself I'll present my certifications as that original effort, not necessarily where I am now. I've got projects (day and night) to try to assert my credibility.
}
Thursday, January 18, 2007
Stay on Java + Algorithms
{
Because I'm in C# all the time, my Java is passable with effort, but not pristine - like a Norwegian's use of Swedish or a Portuguese person required to use Spanish.
But there's good reasons to hang onto that Java; it seems like Google interviews may require rapid prototyping in the language.
Most algorithms are language agnostic (save the ones that leverage language features (think functional)) but it's also interesting to see that quick deployment of those with optimizations seems to be a part of the process.
}
Because I'm in C# all the time, my Java is passable with effort, but not pristine - like a Norwegian's use of Swedish or a Portuguese person required to use Spanish.
But there's good reasons to hang onto that Java; it seems like Google interviews may require rapid prototyping in the language.
Most algorithms are language agnostic (save the ones that leverage language features (think functional)) but it's also interesting to see that quick deployment of those with optimizations seems to be a part of the process.
}
Saturday, January 13, 2007
Crockford Javascript Presentation
{
I'm excited that next week I'll be in Los Angeles. I got the opportunity, along with some other people from Daktronics, to attend Developmentor training on Biztalk. Tonight I was going to watch a Biztalk presentation from TechEd but got a little sidetracked watching Douglas Crockford's excellent javascript presentation on the DOM.
Although the presentation is about the DOM which a lot of people think they know and understand, Crockford adds a lot of historical and insider information about how browsers work and what implications that has for writing DHTML. Really interesting.
There's a different presentation I was looking for - on javscript's prototype based inheritance, but I'll get to that on a different day.
}
I'm excited that next week I'll be in Los Angeles. I got the opportunity, along with some other people from Daktronics, to attend Developmentor training on Biztalk. Tonight I was going to watch a Biztalk presentation from TechEd but got a little sidetracked watching Douglas Crockford's excellent javascript presentation on the DOM.
Although the presentation is about the DOM which a lot of people think they know and understand, Crockford adds a lot of historical and insider information about how browsers work and what implications that has for writing DHTML. Really interesting.
There's a different presentation I was looking for - on javscript's prototype based inheritance, but I'll get to that on a different day.
}
Thursday, January 11, 2007
YAJL - Yet Another Javascript Library
{
I've been between libraries... did I post this before? Probably... anyway I've tinkered with Yahoo!, Prototype, and jQuery thus far and have yet to decide which poison is best or whether I roll my sleeves and reinvent the wheel a bit.
Anyhow, today I learned that Adobe Labs has released Spry - Yet Another Javascript Library out for public consumption. No time to dive in tonight but the documentation looks pretty good.
As an aside, not sure how I got there but here is some great documentation on Prototype.
}
I've been between libraries... did I post this before? Probably... anyway I've tinkered with Yahoo!, Prototype, and jQuery thus far and have yet to decide which poison is best or whether I roll my sleeves and reinvent the wheel a bit.
Anyhow, today I learned that Adobe Labs has released Spry - Yet Another Javascript Library out for public consumption. No time to dive in tonight but the documentation looks pretty good.
As an aside, not sure how I got there but here is some great documentation on Prototype.
}
Wednesday, January 10, 2007
IE 7 appendChild bug
{
I'm working on t3rse::proper to allow custom shortcuts but discovered a bug with IE 7 when using the appendChild method of an element. It will take a bit more time to nail down specifics but try the following:
var tr = document.createElement("tr");
var tdchar = document.createElement("td");
var tdtext = document.createElement("td");
tdchar.appendChild(document.createTextNode('foo'));
tdtext.appendChild(document.createTextNode('bar'));
tr.appendChild(tdchar);
tr.appendChild(tdtext);
// you need some table with the id as testTable
document.getElementById("testTable").appendChild(tr);
Pretty straight forward and does _not_ work in IE 7. Check it out in Firefox and it works like a charm.
But the bug doesn't seem to be that simple; if you are called appendChild on a DIV or SPAN outside the context of a table, it works fine in both browsers.
// make a div with an id attribute of 'test'
document.getElementById('test').appendChild(
document.createElement('span').appendChild(document.createTextNode('foo'))
);
I'll dig into this a bit more - I see comments on similar things via Google search but nothing definitive. Unless AJ has answers... you always have answers...
}
I'm working on t3rse::proper to allow custom shortcuts but discovered a bug with IE 7 when using the appendChild method of an element. It will take a bit more time to nail down specifics but try the following:
var tr = document.createElement("tr");
var tdchar = document.createElement("td");
var tdtext = document.createElement("td");
tdchar.appendChild(document.createTextNode('foo'));
tdtext.appendChild(document.createTextNode('bar'));
tr.appendChild(tdchar);
tr.appendChild(tdtext);
// you need some table with the id as testTable
document.getElementById("testTable").appendChild(tr);
Pretty straight forward and does _not_ work in IE 7. Check it out in Firefox and it works like a charm.
But the bug doesn't seem to be that simple; if you are called appendChild on a DIV or SPAN outside the context of a table, it works fine in both browsers.
// make a div with an id attribute of 'test'
document.getElementById('test').appendChild(
document.createElement('span').appendChild(document.createTextNode('foo'))
);
I'll dig into this a bit more - I see comments on similar things via Google search but nothing definitive. Unless AJ has answers... you always have answers...
}
Tuesday, January 09, 2007
Jifurahishi
{
... which means in Swahili to "be excited." It's interesting to me how Apple is so good at generating a buzz and feeding the frenzy of their users. My boss is using Vista right now on a brand new shiny laptop but no one is gathering around the machine to say "ooh" - but I guarantee if I had an iPhone in the cub area people would be crawling over each other to have a look.
To be sure a lot of it is design, but there seems to be something more. Apple seems to court their users with the new and the novel, Microsoft rolls out a new version of what you already have (operating system) or a copy of something else that's successful (Zune). Apple knows how to keep people guessing and drum up occasions like Macworld to wow people. Microsoft seems to release their products in a time warp (Origami, anyone?) and make things that seem to have no mass appeal (Origami == Newton 1994?).
Sigh.
I'm geeky enough, however, to be excited about Microsoft's products - specifically IIS 7.
Well, the iPhone is out of my price range (I always take the free with the service phones) but it's good eye candy.
}
... which means in Swahili to "be excited." It's interesting to me how Apple is so good at generating a buzz and feeding the frenzy of their users. My boss is using Vista right now on a brand new shiny laptop but no one is gathering around the machine to say "ooh" - but I guarantee if I had an iPhone in the cub area people would be crawling over each other to have a look.
To be sure a lot of it is design, but there seems to be something more. Apple seems to court their users with the new and the novel, Microsoft rolls out a new version of what you already have (operating system) or a copy of something else that's successful (Zune). Apple knows how to keep people guessing and drum up occasions like Macworld to wow people. Microsoft seems to release their products in a time warp (Origami, anyone?) and make things that seem to have no mass appeal (Origami == Newton 1994?).
Sigh.
I'm geeky enough, however, to be excited about Microsoft's products - specifically IIS 7.
Well, the iPhone is out of my price range (I always take the free with the service phones) but it's good eye candy.
}
Thursday, January 04, 2007
JSON Wars
{
Perhaps not war, but there seems to be an upswell in the JSON versus XML discussion. JSON as many describe much better than I do is a javascript object literal you can return directly to a page along the lines of:
{"name": "David Seruyange", "age":31, "preferredLanguages": ["C#","perl", "javascript","ruby"]}
If you type a lot, you can do the same thing with an xml style of notation, something along the lines of an element person, nested element name, nested element or attribute for "David Seruyange"... the whole thing gets to be quite a bit (I'm too lazy to type it out at the moment).
I first noticed Dare Obasanjo sniping a bit, after which I saw a few trails elsewhere - the post he was responding to by Tim Bray, and another referenced one from Don Box.
But it's extended - Simon Willison chimed in on flexibility of JSON in response to Dave Winer's post on JSON. Megginson makes a comparison here (in the end favoring XML), and so the conversation goes.
In terms of my own personal experience, I discovered and used JSON on my last project. It's a very, very seductive thing but I found killer gremlins in terms of making sure I used proper characters in my object literals. Javascript does allow you to use the \ character to escape quotes in strings but as you ship strings around you have to make sure you keep track of what you escaped - especially in my case where users would have to "see" things on screen (remove the escape) and then be able to push them to a database.
In the end I think JSON will prevail (by this I mean more and more developers will use JSON with AJAX than web services) not only because XML is more verbose but also because parsing out nodes in an xml document is more painstaking than leveraging the power of javascript to turn a literal into an object. I'm curious to see (or discover since they are probably out there) more JSON parsers than take care of things like escaped quotes and special characters. I'm equally curious to see server controls (or encapsulated code) that can ship data structures to a client as JSON - one night project I see coming up is a library that can take an ADO.NET DataTable, for example, and convert it to a JSON string.
Oh, one last thing. At the time of my last project when I was deciding how to proceed with Ajax, I took a long look at an early beta for Atlas. I was surprised that the JSON functionality hadn't caught on there and it seemed to use full blown SOAP encoding web services. This may have changed with the release candidate of ASP.NET Ajax but at the time JSON was pretty popular in the world of javascript.
}
Perhaps not war, but there seems to be an upswell in the JSON versus XML discussion. JSON as many describe much better than I do is a javascript object literal you can return directly to a page along the lines of:
{"name": "David Seruyange", "age":31, "preferredLanguages": ["C#","perl", "javascript","ruby"]}
If you type a lot, you can do the same thing with an xml style of notation, something along the lines of an element person, nested element name, nested element or attribute for "David Seruyange"... the whole thing gets to be quite a bit (I'm too lazy to type it out at the moment).
I first noticed Dare Obasanjo sniping a bit, after which I saw a few trails elsewhere - the post he was responding to by Tim Bray, and another referenced one from Don Box.
But it's extended - Simon Willison chimed in on flexibility of JSON in response to Dave Winer's post on JSON. Megginson makes a comparison here (in the end favoring XML), and so the conversation goes.
In terms of my own personal experience, I discovered and used JSON on my last project. It's a very, very seductive thing but I found killer gremlins in terms of making sure I used proper characters in my object literals. Javascript does allow you to use the \ character to escape quotes in strings but as you ship strings around you have to make sure you keep track of what you escaped - especially in my case where users would have to "see" things on screen (remove the escape) and then be able to push them to a database.
In the end I think JSON will prevail (by this I mean more and more developers will use JSON with AJAX than web services) not only because XML is more verbose but also because parsing out nodes in an xml document is more painstaking than leveraging the power of javascript to turn a literal into an object. I'm curious to see (or discover since they are probably out there) more JSON parsers than take care of things like escaped quotes and special characters. I'm equally curious to see server controls (or encapsulated code) that can ship data structures to a client as JSON - one night project I see coming up is a library that can take an ADO.NET DataTable, for example, and convert it to a JSON string.
Oh, one last thing. At the time of my last project when I was deciding how to proceed with Ajax, I took a long look at an early beta for Atlas. I was surprised that the JSON functionality hadn't caught on there and it seemed to use full blown SOAP encoding web services. This may have changed with the release candidate of ASP.NET Ajax but at the time JSON was pretty popular in the world of javascript.
}
Wednesday, January 03, 2007
Two Responses
{
One thing that gives me delight to no end is making tools that help people around me. I guess that's why I'm a software developer. Or, I guess, that's why I enjoy being a software developer.
I've worked on a few types of code generators to date, the idea of course being to save time when people have to do repetitious or monotonous tasks. Another big idea I've had was inspired by David Heinemeier Hansson's talk at Carson Workshops where he talked of the notion of convention over configuration (linked here in the context of spring, but a general enough design pattern). I thought: why not start with a bunch of conventions and, if need be, customize when necessary?
I've recieved two responses over the utilities I've written that seem to point to different philosophies regarding software development and how I win with some people and struggle with others.
The first was a developer who was excited when I showed him a utility for generating property stubs - a lot faster than using Visual Studio's class designer or code snippets. I could see that it was the idea that got him going, not necessarily the implementation because his following question was if he could have the source. This is no problem on my end - I always just ask for bugs people find and features they'd want so that I can put them in an updated version. Half of the fun is finding out what people want and then giving it to them -
The other response was from another developer who was a little bit more hostile to the notion of a utility that didn't come from a larger party (a company like Microsoft) and wasn't particularly interested in even seeing how the tool worked (let alone what improvements they'd want to make to it). In this particular scenario I prompted the person by asking if they were more interested in hand coding what needed to be done to which I got a quick but very sure nod.
I think the step further that makes these two responses interesting and sidesteps the question of whether what I've made is really all that good is that I know these two developers well enough to know that the first is a younger guy who is interested in open source - who prefers tools like Firefox and Thunderbird, and who has night projects - things he does on his own because he enjoys writing software. He reads technical articles and blogs. He is a familiar and enthusiastic user of RSS and syndication tools. The second developer is a "business" guy - less of a dreamer but very much a hard worker. When Microsoft (or big company X) releases a tool he uses it, and uses it as prescribed. He rarely has "time" to browse the web for leisure or interest. He also, and I think this is interesting, is the kind of person who keeps his Windows desktop as the default.
I think you can take these different archetypes and distribute them quite well - with varying levels of commitment, interest, and aptitude. The open source/mac/web world is full of people who are curious - who look at a problem or solution and think about how it applies to them. Moving beyond the open source "zealot" I see a lot of programmers like this - many in a non Microsoft sphere but quite a few avid Microsoft tool users. At the beginning of last year I thought of somehow trying to take ideas from the open source world and port them to the Microsoft sphere but it's been a delight to find so many people who use Microsoft tools who are still very passionate about technology, and the large contexts of problems and solutions.
On the other end of the sphere there are a considerable number of people who approach development without novelty, without interest in the process and more in a blue collar "just get it done" sense. Because the elegance and style are not important, it's best to go with tools that are proven by the majority - personal extensions and/or hacks are a waste of time because it counts against "getting the job done." People like this seem to have the ability to focus much more on the business or the task. That's why tool customization, hacks, and web reading (articles, blog posts, etc...) are beside the point. The point is the task. Create a XYZ. Write a method that stores ABC. Display MNO.
Of course with this divide I run the risk of upsetting people - especially the second developer (it's doubtful this blog post would ever be read, and even more doubtful that the person would guess themselves) but before I reap any backlash I want to say this: both the first and second developer are pretty effective at what they do because the nature of our work is constained by the type of software we write: big business apps that essentially boil down to CRUD (CREATE / RETRIEVE / UPDATE / DELETE). I think this sort of divide would show up a lot more if we were writing a web application framework, next generation web app, or a game.
It's not my goal to make anyone upset although even Microsoft's got the idea of different personas for developers - the question it leaves is where I can find that kind of nourishment from the first developer, even when an idea is too rough or unpolished to be useful. For people who work with Microsoft tools, without a doubt I think there's a great community in the blogosphere but even more so at conferences - a place where a guy like me can stop a Scott Hanselman and inquire as to this or that. But beyond the conference I think it has to do with (and this is very general) "open" tools and "vendor driven" tools. The open tools seem to have a community that collaborates and grows them - people who by nature are interested in making the process of software better and more enjoyable. People who have the audacity to think that a solution for them might actually help other people who are willing to give it a shot.
}
One thing that gives me delight to no end is making tools that help people around me. I guess that's why I'm a software developer. Or, I guess, that's why I enjoy being a software developer.
I've worked on a few types of code generators to date, the idea of course being to save time when people have to do repetitious or monotonous tasks. Another big idea I've had was inspired by David Heinemeier Hansson's talk at Carson Workshops where he talked of the notion of convention over configuration (linked here in the context of spring, but a general enough design pattern). I thought: why not start with a bunch of conventions and, if need be, customize when necessary?
I've recieved two responses over the utilities I've written that seem to point to different philosophies regarding software development and how I win with some people and struggle with others.
The first was a developer who was excited when I showed him a utility for generating property stubs - a lot faster than using Visual Studio's class designer or code snippets. I could see that it was the idea that got him going, not necessarily the implementation because his following question was if he could have the source. This is no problem on my end - I always just ask for bugs people find and features they'd want so that I can put them in an updated version. Half of the fun is finding out what people want and then giving it to them -
The other response was from another developer who was a little bit more hostile to the notion of a utility that didn't come from a larger party (a company like Microsoft) and wasn't particularly interested in even seeing how the tool worked (let alone what improvements they'd want to make to it). In this particular scenario I prompted the person by asking if they were more interested in hand coding what needed to be done to which I got a quick but very sure nod.
I think the step further that makes these two responses interesting and sidesteps the question of whether what I've made is really all that good is that I know these two developers well enough to know that the first is a younger guy who is interested in open source - who prefers tools like Firefox and Thunderbird, and who has night projects - things he does on his own because he enjoys writing software. He reads technical articles and blogs. He is a familiar and enthusiastic user of RSS and syndication tools. The second developer is a "business" guy - less of a dreamer but very much a hard worker. When Microsoft (or big company X) releases a tool he uses it, and uses it as prescribed. He rarely has "time" to browse the web for leisure or interest. He also, and I think this is interesting, is the kind of person who keeps his Windows desktop as the default.
I think you can take these different archetypes and distribute them quite well - with varying levels of commitment, interest, and aptitude. The open source/mac/web world is full of people who are curious - who look at a problem or solution and think about how it applies to them. Moving beyond the open source "zealot" I see a lot of programmers like this - many in a non Microsoft sphere but quite a few avid Microsoft tool users. At the beginning of last year I thought of somehow trying to take ideas from the open source world and port them to the Microsoft sphere but it's been a delight to find so many people who use Microsoft tools who are still very passionate about technology, and the large contexts of problems and solutions.
On the other end of the sphere there are a considerable number of people who approach development without novelty, without interest in the process and more in a blue collar "just get it done" sense. Because the elegance and style are not important, it's best to go with tools that are proven by the majority - personal extensions and/or hacks are a waste of time because it counts against "getting the job done." People like this seem to have the ability to focus much more on the business or the task. That's why tool customization, hacks, and web reading (articles, blog posts, etc...) are beside the point. The point is the task. Create a XYZ. Write a method that stores ABC. Display MNO.
Of course with this divide I run the risk of upsetting people - especially the second developer (it's doubtful this blog post would ever be read, and even more doubtful that the person would guess themselves) but before I reap any backlash I want to say this: both the first and second developer are pretty effective at what they do because the nature of our work is constained by the type of software we write: big business apps that essentially boil down to CRUD (CREATE / RETRIEVE / UPDATE / DELETE). I think this sort of divide would show up a lot more if we were writing a web application framework, next generation web app, or a game.
It's not my goal to make anyone upset although even Microsoft's got the idea of different personas for developers - the question it leaves is where I can find that kind of nourishment from the first developer, even when an idea is too rough or unpolished to be useful. For people who work with Microsoft tools, without a doubt I think there's a great community in the blogosphere but even more so at conferences - a place where a guy like me can stop a Scott Hanselman and inquire as to this or that. But beyond the conference I think it has to do with (and this is very general) "open" tools and "vendor driven" tools. The open tools seem to have a community that collaborates and grows them - people who by nature are interested in making the process of software better and more enjoyable. People who have the audacity to think that a solution for them might actually help other people who are willing to give it a shot.
}
Tuesday, December 19, 2006
Thank YOU
{
Time magazine selected "you" as person of the year with their definition of "you" encompassing people who posted user-generated content on the web. I wanted to pay tribute to all of the "you" out there who inform, motivate, and inspire me. My list is limited since I usually hit dozens of websites each week, but this is a list of the people who regularly reeled me in during the last year:
Raganwald - http://weblog.raganwald.com/
Thanks for the cut and dry honesty. Thanks for the delicious links.
Joel Spolsky - http://www.joelonsoftware.com/
I'm not a blue blooded programmer, educated at Yale, and you would be ashamed of how weak I am with C++ and pointers. But you give me an opportunity to learn and think about my craft. In the end I'm better for it.
Drew McLellan - http://allinthehead.com/
24 Ways. 'Nuff said.
Scott Hanselman - http://www.hanselman.com/blog/
You not only inform, you motivate. You're not arrogant. I can tell you're smart because you want to share the things you discover. You never make me feel like I went to the wrong school or that my pedigree is suspect, you focus on the technology. Your excitement is contagious.
Dare Obasanjo - http://www.25hoursaday.com/weblog/
You keep it real.
John Lam - http://iunknown.com/
You think different and still manage to be associated with Microsoft.
Eric Sink - http://software.ericsink.com/
Practical and smart. Open about what it's like to be an ISV.
Nate Koechley - http://nate.koechley.com/blog/
My inside track to Yahoo! and a good resource for general web developer issues.
Aaron Johnson - http://www.cephas.net/blog/
I can't believe that at one point you were my roommate and we never talked about programming. You're full of good stuff, I hope you never stop.
Ted Leung - http://www.sauria.com/blog
Another of the "programmer's programmer" people I latched onto a while back and keep visiting. I like the quality of your thoughts which refreshingly venture from programming from time to time.
Paul Graham - http://www.paulgraham.com
You're my idealist. I usually get a sense of excitement when you post a new essay and then print it out to read over lunch or at coffee.
Simon Willison - http://simonwillison.net/
Another connection to Yahoo! and a jedi at taking notes.
Steve Yegge - http://steve-yegge.blogspot.com
Keeping it as real as Dare, from Google. Saying what a lot of people think but are scared to admit. Another person who is down the path from me, whose footsteps I'd like to follow.
Larry O'Brien - http://www.knowing.net/
Educated gentleman who kept me awake for a while trying to prove to myself that I know my language (C#). I ported my Haar transform code to Java too. Also proof that you don't need to be in the throng of things because he's "holding it down" in Hawaii.
Mad Kristensen - http://www.madskristensen.dk/blog/
Another clever Dane, but very accessible to me. Every time I hit the site I learn something new that I can almost immediately use.
Aaron Swartz - http://www.aaronsw.com/weblog/
A smart kid. I can't concentrate through a lot of the stuff but every so often I find something darling. Maybe I should categorize this like a few I've mentioned above it as "good conversation" blogs or thoughts that inspire some thought.
Sam Gentile - http://codebetter.com/blogs/sam.gentile/default.aspx
A true blue Microsoftie. Staying on top of the blog keeps me on top, usually, of what I should be paying attention to from Microsoft: service packs, new releases, and so on.
Ian Griffiths - http://www.interact-sw.co.uk/iangblog/
Chris Sells's cohort in a recent WPF book and another good Microsoft-centric blog to keep a finger on the pulse.
Chris Sells - http://www.sellsbrothers.com/
Another clever jedi master who cares enough to share what he knows from time to time. Author (along with Ian, above) of some pretty good books that I own. One thing Chris said from a podcast with Scott Hanselman that stayed with me toward the end of the year was (I'm paraphrasing) that the information age will show a gap between people who can absorb a lot of information and those who can't.
Darren Niemke - http://markitup.com/
IM Conversation:
David - test
Darren - I read you.
David - got a sec for a question... ?
It's a bit strange that I can have someone like Darren on my IM list to bother from time to time. I usually get emails from published authors but having one who bothers to answer questions from some guy in South Dakota is quite a priviledge. Great ideas, great blog.
Mike Arace - http://mikeomatic.net/
Found as I searched for commentary on posts by Joel. After I'd put you in the aggregator I kept finding good stuff.
Jason Haley - http://jasonhaley.com/blog/default.aspx
You are the future of what the Time magazine selection means; you're a new type of curator, posting signs that people like me can follow.
Bart De Smet - http://blog.bartdesmet.net/blogs/bart/default.aspx
A programmer's paradox. How on earth do you stay productive enough to be as relevant (which you do) and maintain enough time to communicate it?
Reddit Kids - http://www.reddit.com/
Not only user-generated content, but relevant by democracy. I've especially enjoyed joel.reddit.com
Digg - http://www.digg.com/
Almost as good as Reddit.
Carl Franklin, Richard Campbell - http://www.dotnetrocks.com/
Love the podcast. I've got a love/hate thing going on with Carl's opinions, but I'm amazed that you keep it going and keep it as fresh as ever.
Josh McAdams - http://www.perlcast.com/
Love this podcast as well. You're pretty "aw shucks" about it but honestly you're the best interviewer of the technical podcasts I listen to regularly.
Markus Volter et. al. at Software Engineering Radio - http://www.se-radio.net/
Another great podcast from which to learn. It's intriguing to catch the Europeanisms as well and to hear something a bit more formal. Many of the podcasts I downloaded I had to listen to multiple times, not because of different accents, but because the content was that deep.
There are many other blogs, podcasts, and other online haunts that I gathered information (I'll pay tribute to the non-technical ones on my other blog) but every site listed above is a place I keep going back to and appreciating. I find it amazing that none of you have to do it and yet you keep on giving to your community. That's quite a gift.
Thanks!
}
Time magazine selected "you" as person of the year with their definition of "you" encompassing people who posted user-generated content on the web. I wanted to pay tribute to all of the "you" out there who inform, motivate, and inspire me. My list is limited since I usually hit dozens of websites each week, but this is a list of the people who regularly reeled me in during the last year:
Raganwald - http://weblog.raganwald.com/
Thanks for the cut and dry honesty. Thanks for the delicious links.
Joel Spolsky - http://www.joelonsoftware.com/
I'm not a blue blooded programmer, educated at Yale, and you would be ashamed of how weak I am with C++ and pointers. But you give me an opportunity to learn and think about my craft. In the end I'm better for it.
Drew McLellan - http://allinthehead.com/
24 Ways. 'Nuff said.
Scott Hanselman - http://www.hanselman.com/blog/
You not only inform, you motivate. You're not arrogant. I can tell you're smart because you want to share the things you discover. You never make me feel like I went to the wrong school or that my pedigree is suspect, you focus on the technology. Your excitement is contagious.
Dare Obasanjo - http://www.25hoursaday.com/weblog/
You keep it real.
John Lam - http://iunknown.com/
You think different and still manage to be associated with Microsoft.
Eric Sink - http://software.ericsink.com/
Practical and smart. Open about what it's like to be an ISV.
Nate Koechley - http://nate.koechley.com/blog/
My inside track to Yahoo! and a good resource for general web developer issues.
Aaron Johnson - http://www.cephas.net/blog/
I can't believe that at one point you were my roommate and we never talked about programming. You're full of good stuff, I hope you never stop.
Ted Leung - http://www.sauria.com/blog
Another of the "programmer's programmer" people I latched onto a while back and keep visiting. I like the quality of your thoughts which refreshingly venture from programming from time to time.
Paul Graham - http://www.paulgraham.com
You're my idealist. I usually get a sense of excitement when you post a new essay and then print it out to read over lunch or at coffee.
Simon Willison - http://simonwillison.net/
Another connection to Yahoo! and a jedi at taking notes.
Steve Yegge - http://steve-yegge.blogspot.com
Keeping it as real as Dare, from Google. Saying what a lot of people think but are scared to admit. Another person who is down the path from me, whose footsteps I'd like to follow.
Larry O'Brien - http://www.knowing.net/
Educated gentleman who kept me awake for a while trying to prove to myself that I know my language (C#). I ported my Haar transform code to Java too. Also proof that you don't need to be in the throng of things because he's "holding it down" in Hawaii.
Mad Kristensen - http://www.madskristensen.dk/blog/
Another clever Dane, but very accessible to me. Every time I hit the site I learn something new that I can almost immediately use.
Aaron Swartz - http://www.aaronsw.com/weblog/
A smart kid. I can't concentrate through a lot of the stuff but every so often I find something darling. Maybe I should categorize this like a few I've mentioned above it as "good conversation" blogs or thoughts that inspire some thought.
Sam Gentile - http://codebetter.com/blogs/sam.gentile/default.aspx
A true blue Microsoftie. Staying on top of the blog keeps me on top, usually, of what I should be paying attention to from Microsoft: service packs, new releases, and so on.
Ian Griffiths - http://www.interact-sw.co.uk/iangblog/
Chris Sells's cohort in a recent WPF book and another good Microsoft-centric blog to keep a finger on the pulse.
Chris Sells - http://www.sellsbrothers.com/
Another clever jedi master who cares enough to share what he knows from time to time. Author (along with Ian, above) of some pretty good books that I own. One thing Chris said from a podcast with Scott Hanselman that stayed with me toward the end of the year was (I'm paraphrasing) that the information age will show a gap between people who can absorb a lot of information and those who can't.
Darren Niemke - http://markitup.com/
IM Conversation:
David - test
Darren - I read you.
David - got a sec for a question... ?
It's a bit strange that I can have someone like Darren on my IM list to bother from time to time. I usually get emails from published authors but having one who bothers to answer questions from some guy in South Dakota is quite a priviledge. Great ideas, great blog.
Mike Arace - http://mikeomatic.net/
Found as I searched for commentary on posts by Joel. After I'd put you in the aggregator I kept finding good stuff.
Jason Haley - http://jasonhaley.com/blog/default.aspx
You are the future of what the Time magazine selection means; you're a new type of curator, posting signs that people like me can follow.
Bart De Smet - http://blog.bartdesmet.net/blogs/bart/default.aspx
A programmer's paradox. How on earth do you stay productive enough to be as relevant (which you do) and maintain enough time to communicate it?
Reddit Kids - http://www.reddit.com/
Not only user-generated content, but relevant by democracy. I've especially enjoyed joel.reddit.com
Digg - http://www.digg.com/
Almost as good as Reddit.
Carl Franklin, Richard Campbell - http://www.dotnetrocks.com/
Love the podcast. I've got a love/hate thing going on with Carl's opinions, but I'm amazed that you keep it going and keep it as fresh as ever.
Josh McAdams - http://www.perlcast.com/
Love this podcast as well. You're pretty "aw shucks" about it but honestly you're the best interviewer of the technical podcasts I listen to regularly.
Markus Volter et. al. at Software Engineering Radio - http://www.se-radio.net/
Another great podcast from which to learn. It's intriguing to catch the Europeanisms as well and to hear something a bit more formal. Many of the podcasts I downloaded I had to listen to multiple times, not because of different accents, but because the content was that deep.
There are many other blogs, podcasts, and other online haunts that I gathered information (I'll pay tribute to the non-technical ones on my other blog) but every site listed above is a place I keep going back to and appreciating. I find it amazing that none of you have to do it and yet you keep on giving to your community. That's quite a gift.
Thanks!
}
Monday, December 18, 2006
Grab the Silver Keyboard!
{
Steve Yegge's last post couldn't have come at a better time for me; I've been having a lingering feeling that I'm stuck in the mud, working too hard and having bad ideas.
I don't think it absolves me from having weak ideas or from lacking the most effecient approach to working outside of the office, but I know my direction is right. I need to work on my mechanics in future and make sure that while I strive to improve as a developer that I get better at picking what matters and solving problems that are this fine balance between learning something new and not being so challenging that they are unpractical.
I've been disheartened as well by the lack of community. People I know about online - my mentor list - make my life that much better but it seems rare that I meet people outside of conferences and the online world who have more desire for themselves other than getting a job done. In those dark moments I ask myself why I try and wonder whether it even will matter in the end.
But something in my intuition tells me I can't stop. That outside my "feelings" there are people like Steve who have walked a path I'm on.
This year I did become a better programmer. My skills as a designer improved. I created a bunch of tools that were useful not only to me but to others. My vindication came perhaps a month ago when I looked at a screenshot of a code repository program I'd written and forgotten about two years ago. I had rewritten a code repository program this year with tag support and as I compared the functionality and design I realized that I'd grown like a tree; the effect was visible over the long term but not on a daily basis.
}
Steve Yegge's last post couldn't have come at a better time for me; I've been having a lingering feeling that I'm stuck in the mud, working too hard and having bad ideas.
So how do you make yourself a superstar? Never stop learning. I've heard
people say they think this position is a crock, that it's ludicrous, that you
couldn't possibly spend your whole career learning new things.
But I think differently. I think every program you write should be the
hardest you've ever written. And that's what I blog about, mostly. Improving
yourself. Because most employers, the ones who matter in the long run, they'll
be able to see how great you've become, and they'll alter the very course of
their business plan, if necessary, to make the best use of you. Does that sound
incredible? Well, I've seen it play out both ways over my modest 20 years in our
industry, and that's how I see it.
I don't think it absolves me from having weak ideas or from lacking the most effecient approach to working outside of the office, but I know my direction is right. I need to work on my mechanics in future and make sure that while I strive to improve as a developer that I get better at picking what matters and solving problems that are this fine balance between learning something new and not being so challenging that they are unpractical.
I've been disheartened as well by the lack of community. People I know about online - my mentor list - make my life that much better but it seems rare that I meet people outside of conferences and the online world who have more desire for themselves other than getting a job done. In those dark moments I ask myself why I try and wonder whether it even will matter in the end.
But something in my intuition tells me I can't stop. That outside my "feelings" there are people like Steve who have walked a path I'm on.
This year I did become a better programmer. My skills as a designer improved. I created a bunch of tools that were useful not only to me but to others. My vindication came perhaps a month ago when I looked at a screenshot of a code repository program I'd written and forgotten about two years ago. I had rewritten a code repository program this year with tag support and as I compared the functionality and design I realized that I'd grown like a tree; the effect was visible over the long term but not on a daily basis.
}
Wednesday, December 13, 2006
foreach Considered Wack Quite Often
{
Don't get me wrong, it's not a jihad I have against the foreach in C#, it's just the fact that if I had a nickel (okay, a quarter to be realistic) for each time I changed a foreach to a normal for loop because I needed to track my position as I iterated through a collection and no underlying index was provided, I'd have enough money for coffee each week.
A simple example from the .NET world is the DataTable; when you iterate the Rows collection, the Rows don't expose an index. After seduction for the easy foreach, I end up with:
for(int i=0;i<myTable.Rows.Count;i++){}
There's only one time that a normal for loop got the better of me - I had to iterate and remove items from the collection. Modifying a collection that you're going through causes trouble but it's easily remedied - not with recursion as some would have it, but by simply going backward:
for(int i=myTable.Rows.Count -1;i>-1;i--){}
Besides its syntactic elegance, of what benefit is the foreach? By calling the underlying enumerator?
}
Don't get me wrong, it's not a jihad I have against the foreach in C#, it's just the fact that if I had a nickel (okay, a quarter to be realistic) for each time I changed a foreach to a normal for loop because I needed to track my position as I iterated through a collection and no underlying index was provided, I'd have enough money for coffee each week.
A simple example from the .NET world is the DataTable; when you iterate the Rows collection, the Rows don't expose an index. After seduction for the easy foreach, I end up with:
for(int i=0;i<myTable.Rows.Count;i++){}
There's only one time that a normal for loop got the better of me - I had to iterate and remove items from the collection. Modifying a collection that you're going through causes trouble but it's easily remedied - not with recursion as some would have it, but by simply going backward:
for(int i=myTable.Rows.Count -1;i>-1;i--){}
Besides its syntactic elegance, of what benefit is the foreach? By calling the underlying enumerator?
}
Tuesday, December 12, 2006
Epigrams on Programming
{
I am feeling my way around with CGI using perl so I took Alan Perlis's epigrams on programming and randomized them.
I think it will be my new homepage.
}
I am feeling my way around with CGI using perl so I took Alan Perlis's epigrams on programming and randomized them.
I think it will be my new homepage.
}
'Tis The Season
{
I'm quite fond of the different calendars with tutorials this season. From my first glances at this year's 24ways I should learn as much as I did last year. I also was delighted to discover the perl advent calendar. Any other decent holiday calendar/tutorials?
}
I'm quite fond of the different calendars with tutorials this season. From my first glances at this year's 24ways I should learn as much as I did last year. I also was delighted to discover the perl advent calendar. Any other decent holiday calendar/tutorials?
}
Thursday, December 07, 2006
Joel Rebuttal
{
Usually what Joel says is treated like gold by many developers, myself included. In a recent post he berated Om Malik for using a lego metaphor in describing how easy it was for startups to create software while paying homage to Fred Brooks's essay No Silver Bullet: Essence and Accidents of Software Engineering. Joel cleverly adds context to his comments by referencing a Business Week article from the early 1990s that uses the lego analogy with the idea of object oriented programming.
I've listened to Om Malik's podcast and can tell he is no programmer - in fact, I kind of laughed at a podcast on instant messaging where he called file sharing in instant messaging clients unnecessary (something nearly everyone I know from a working angle uses on a daily basis).
But what Om started was a good conversation which inspired Wesner Moise in his rebuttal to Joel asserting that Fred Brooks was as astute in his essay. Software development has advanced, Moise seems to be saying, well beyond what it was in the days of Brooks.
The desert for this travelling conversation was this story on programming Atari 2600 games. That sounds like tough work indeed.
Well, I'm off to play with regular bullets and legos.
Update: Some interesting comments from Phil Haack on the subject.
}
Usually what Joel says is treated like gold by many developers, myself included. In a recent post he berated Om Malik for using a lego metaphor in describing how easy it was for startups to create software while paying homage to Fred Brooks's essay No Silver Bullet: Essence and Accidents of Software Engineering. Joel cleverly adds context to his comments by referencing a Business Week article from the early 1990s that uses the lego analogy with the idea of object oriented programming.
I've listened to Om Malik's podcast and can tell he is no programmer - in fact, I kind of laughed at a podcast on instant messaging where he called file sharing in instant messaging clients unnecessary (something nearly everyone I know from a working angle uses on a daily basis).
But what Om started was a good conversation which inspired Wesner Moise in his rebuttal to Joel asserting that Fred Brooks was as astute in his essay. Software development has advanced, Moise seems to be saying, well beyond what it was in the days of Brooks.
The desert for this travelling conversation was this story on programming Atari 2600 games. That sounds like tough work indeed.
Well, I'm off to play with regular bullets and legos.
Update: Some interesting comments from Phil Haack on the subject.
}
Sunday, December 03, 2006
What we wish we could say
{
Daring Fireball had me in stitches with the following paragraph on his colophon:
Daring Fireball had me in stitches with the following paragraph on his colophon:
"If Daring Fireball looks like shit in your browser, you’re using a shitty
browser that doesn’t support web standards. Netscape 4 and Internet Explorer 5,
I’m looking in your direction. If you complain about this, I will laugh at you,
because I do not care. If, however, you are using a modern, standards-compliant
browser and have trouble viewing or reading Daring Fireball, please do let me
know. "
His most recent essay, Omnivapor, was referenced on Reddit but what got me going there was
his essay The Location Field is the New Command Line featured in Joel Spolsky's Best Software Writing I.
}
Friday, December 01, 2006
SearchDotNet
{
Dan Appleman, best known to me for his exhaustive book Dan Appleman's Visual Basic Programmer's Guide to the Wind32 API has had a sputtering blog over the last few years.
But recently it caught my eye because Appleman has created SearchDotNet which is a customized Google search engine for .NET sites.
It's nice to search for something like "Dictionary" or "Parallelism" and get relevant code despite the concept crossing language and platform barriers.
}
Dan Appleman, best known to me for his exhaustive book Dan Appleman's Visual Basic Programmer's Guide to the Wind32 API has had a sputtering blog over the last few years.
But recently it caught my eye because Appleman has created SearchDotNet which is a customized Google search engine for .NET sites.
It's nice to search for something like "Dictionary" or "Parallelism" and get relevant code despite the concept crossing language and platform barriers.
}
To Develop an Operating System
{
It's been around for a while but this powerpoint (linked directly as a *.ppt) is a presentation from Marc Lucovsky about the development process of the early iterations of Windows NT to Windows 2000.
Interesting things:
+ NT 3.1 was ~3 years late (I'm not feeling so bad about being behind on my current project)
+ The original team was only 6 people from DEC. That's astonishing. The eventual development team size was 200 with 140 people on the test team.
+ Quotes:
+ By Windows 2000, the development team was 1400. I wonder what Vista's team size is?
+ The evolution of source control and branching at Microsoft.
}
It's been around for a while but this powerpoint (linked directly as a *.ppt) is a presentation from Marc Lucovsky about the development process of the early iterations of Windows NT to Windows 2000.
Interesting things:
+ NT 3.1 was ~3 years late (I'm not feeling so bad about being behind on my current project)
+ The original team was only 6 people from DEC. That's astonishing. The eventual development team size was 200 with 140 people on the test team.
+ Quotes:
"To scale a development team, you need to establish a culture"
"Sloppiness is not tolerated"
+ By Windows 2000, the development team was 1400. I wonder what Vista's team size is?
+ The evolution of source control and branching at Microsoft.
}
Subscribe to:
Posts (Atom)