Thursday, August 17, 2006

In interviews I need to know how well the candidate knows databases and start off by going back to basics.  After establishing that the candidate knows that the 'R' in RDBMS stands for 'Relational', I follow it up by asking for a definition of 'Relation'.  I will accept answers along the lines of "... a set of tuples" or at a push, "... a table" (A table is a lay term for a relation, particularly when used in the context of SQL databases).  However, most times I receive an answer that starts something like "A relation is when you have another table with a foreign key...", at which point I ask "Are you talking about a relation or a relationship?", which is followed by stunned looks or muttered agreement.  I have interviewed hundreds of people over the years and only one or two haven't used a 'foreign key' based answer.

For some reason the concept of foreign keys in SQL databases have been confused with the relation.  I think it comes from the colloquial use of statements such as "Relate employee and employer on EmpNo" - the 'relate' really refers to a relationship but since the speaker may remember a single semester course in relational theory (apparently making him an expert) recalls that it sounds a lot like the 'relational' in relational database and thus the confusion starts.  Maybe it was the result of Bill Clinton's infamous statements where, I can imagine, during a brief period when mathematics was more practical than abstract, a group of exhausted mathematicians decreed "After much experimentation we can saefly say that 'sexual relations' are not part of the realtional model and probably refer more to the physical relationship between two somewhat consenting adults"

I'm no mathematician sitting in some old ivy covered building at an academic institution - I deliver systems based on SQL databases and (ADO) DataSets every day and am a big fan of the technologies that I use.  However, having had a background in more formal methodologies and working with great, intelligent people over the years - I have tried to understand the theoretical basis for what I use and a smattering of relational theory fits into that understanding - I think that some knowledge of relational theory is important to build systems on top of SQL Server.

With that as a background, hopefully you will understand why, when using ADO DataSets and Visual Studio, I cringe every time that I have to refer to the ADO version of 'relation'.  Even typing that last sentence makes my hair stand up. 

DataSets don't seem to officially claim to have anything to do with relational theory and with that as a disclaimer they don't do anything wrong.  Just as SQL Server or Oracle don't make any claims about fully supporting the relational model for fear of upset computer scientists and mathematicians spray-painting integrals all over the Microsoft campus.  However, since DataSets talk to SQL Databases which in turn are (sort of) based on the relational model - the distance between DataSets and relational theory is not that far - the inference that the DataSet relation has something to do with the relational model's relation does exist.   The only 'official' association that I have found is in MSDN (Datasets in Visual Studio Overview) which states "The structure of a DataSet is similar to that of a relational database; it exposes a hierarchical object model of tables, rows, columns, constraints, and relationships." - Which should be enough to upset a few theorists.

The ADO Relation is simply incorrectly named and propagates the confusion that people have about thinking about relations and relationship interchangeably.  The relation is a fundamental construct in relational theory and has formal relational algebra, relational calculus and other mathematics behind it.  The ADO relation is simply a badly named foreign key.  It is a fundamental error and is like calling the steering wheel of a car a chassis.

Not only does Microsoft abuse the term, they also use it inconsistently.  Visual Studio developers that have used the DataSet designer are used to the term 'Relation' as it is in the IDE (right click | Add | Relation) and I have myself said to developers things like "Create a relation (cringe) between those two DataTables".  However, the actual class that is being created is a DataRelation class.  Thankfully, the class is not called a relation and DataRelation is sufficiently devoid of significant meaning (like calling the aforementioned steering wheel a DirectionChassis) that one can get away with it.  But why then does Visual Studio call it a relation, and why couldn't they just have used 'relationship' in Visual Studio? 

Unfortunately it doesn't stop at Visual Studio.  The DataSet class has a property DataSet.Relations which returns, not a collection of DataTables as someone with some understanding of the relational model would expect, but rather a collection of DataRelations (er... foreign keys?).  DataSet.Relations.Add() does not add a new table, it adds a new DataRelation(ship).

To add to the confusion, the msdata schema definition (xmlns:msdata) uses the term 'Relationship' (msdata:Relationship annotation) or the xs:keyref annotation for foreign keys.  Generating DataSet Relations from XML Schema in MSDN recommends this after creating more confusion by stating "In a DataSet, you form an association between two or more columns by creating a parent-child relation." (aaargh! cringe! What on earth is a 'parent-child relation'?)

I think that Microsoft's abuse of the term 'relation' is shocking and breaks thirty-odd years of sound theory as well as breaking a few object orientation rules along the way by not naming things clearly and consistently.  I don't think that it is going to be an easy problem to fix, but the easiest change would be to rename 'Relation' to 'Relationship' in Visual Studio - most developers wouldn't even notice.  The DataRelation class is more core to the framework but is thankfully so badly named that it has no meaning anyway so it could almost be left alone.  I don't know how easy it will be to change the Relations property on the DataSet which is horribly orphaned and should have at least be named DataRelations from the beginning.

The number of people reading this post can never be as much as the number of developers going - Right click | Add | Relation - perpetuating the confusion.  I don't propose a Relational Vigilante Group that spray paints notations of set operators across the Microsoft campus and I imagine (sadly) that the generation that developed and believed in relational theory - the basis for nearly all our business systems - are literally a dying breed.  The father of relational theory EF Codd died in 2003 at the age of 79 and CJ Date, a driver of the relational model, is probably feeling a bit old and won't be able to compete with millions of young, energetic Visual Studio developers churning out thousands of blog pages every day.

Caveat Lector is is a Latin phrase meaning "Let the reader beware".  All that I ask is that as a .NET developer that you be aware of the terms 'Relation', 'Relationship' and their respective meanings in relational theory, ADO, visual studio and I suppose, the social sciences.

Simon Munro

kick it on DotNetKicks.com
8/17/2006 3:35:26 PM (South Africa Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  | 
 Friday, August 04, 2006

Over the last few months I have occasionally wandered over to Microsoft Learning to have a look at the 'new' certifications.  How can certification that has been available for months on a development platform (.NET 2) that has also been out months be considered new?  Apart from the lack of study kits and other logistical issues, it seems that most developers and employers don’t really care about the Microsoft certification.

 

It seems that there is a negative attitude towards certification that has been propagated by the concept of a 'Paper MCSE' where a ranter will say something like "An MSCE used to be worth something, now training institutions are churning out paper MSCE's" – implying that there are a whole lot of people out there with certification that cannot code.  I have interviewed hundreds of people over the years and always find myself needing good resources on any project that I am on – requiring constant interviewing and screening.  Funny thing is that I have never come across a 'paper <insert certification here>', but I have come across many useless developers.  It may not be statistically meaningful that of the last hundred development candidates that I have mentioned that there was not one that had certification and couldn't develop – but it would raise a statistician’s eyebrow.

 

Microsoft is apparently trying to revamp the certification by breaking it up into little bits and making it 'easier' to obtain certification aligned with job functions – something like an n-tier approach to certification (you shouldn't need certification to get that analogy).  Maybe they have a long way to go to convince the market that certification is required, but I think they have made a step in the right direction.

 

I will be the first to acknowledge that (correct) experience is the ultimate prerequisite for a developer and when interviewing, it is something that I will drill in to.  However, even 'experienced' developers can have huge gaps in their knowledge – depending on the projects that they have been on, a developer with a claimed two years' experience may in fact have one month of experience repeated twenty four times.

 

<rant>Don't get me started on bodyshops - that pound you with CV's of unqualified, uncertified contractors that they expect you to filter out.  Why, for the premium that they charge, don't they get their contractors certified - apparently they are so good that it would be a breeze.</rant>

 

If you think that certification is a waste of time, take this little challenge.  Have a look at the preparation guides for two exams for a Microsoft Certified Technology Specialist (Web Applications) (the lowest level of certification), namely the Application Development Foundation exam and the Web-Based Client Development exam.  Scroll down and see how much you know on each topic.

 

Done? Good.

 

Now if you are a team leader, architect, project manager or other senior role ask yourself the following questions:

  • Would it be better for my project if *all* the developers on my team even vaguely knew all of those topics?
  • How many of the developers on my team could answer questions on those topics accurately?

If you are a developer as yourself a more simple question. 

  • If I was being interviewed would I squirm like a worm on a hook if the interviewer asked detailed questions on all that stuff?

If you had positive 'no worries mate' answers to the above questions, then you are on a unique team and will be the envy of many.  If you had negative answers, then maybe you should review your position on certification and think about using it as a standard – either to find developers or to pitch yourself as a developer.

 

Personally, I can't think of any developer that I have interviewed, including 'senior' developers, who would not be taken out by most of the topics on those preparation guides.  Are the preparation guides biased by Microsoft and not representative of what a developer truly does?  I think that a 'senior' developer should at least know about every single one of the topics in the 'Technology Specialist' series – what with it being the lowest level.  Unfortunately few ‘senior’ developers do.

 

One of the ideas of certification is not just to provide the individual with knowledge, but to provide a standard so that everyone is on the same page.  In a recent quality review, when challenged on simple things like naming, error handling and so on – a developer commented something like "It (quality review of private methods) is not necessary because we are all good developers and write good code".  "By whose standards?" I asked "Are you certified?" (shake of head) and pointing to the developer next to him "Are you?" – another shake of the head; and so on around the room.  I have my own personal opinions on how those developers would handle me grilling them on those preparation guides and the expectations are not very high.  Not that they are bad or even mediocre developers, but I do need to spend a lot of time introducing them to the basics – to overcome the "one-month-of-experience-for-twelve-months" problem that I have.

 

If you are an uncertified developer, why are you not certified?  Is it because you are waiting for your employer to send you on training and give you permission to go to the toilet?  Are you scared that you won't pass?  Well then study and make sure you pass!  Are you a better developer than everyone else and above certification?  Well then step into the ring and prove it to us!  Are you worried that you will be lost amongst all the 'Paper MSCE's'?  Get your head out of the sand, there aren't any!

 

Regardless of the technical value of certification, it is only meaningful if people who are qualified to be certified, are certified.  There is no point in putting out a job advert that requires certification if nobody is certified – no applicants will come through.  The converse is true – why get certified if no employers even look at it?  As many people need to be certified as possible and in the .NET space I think that the Microsoft certification is good to get. 

 

If, after reading this, you think that such certification is worthwhile then go out and get it (as a developer) and start demanding it (as a leader/manager) – only by changing the dynamics of supply and demand will anything of value evolve.

 

Simon Munro

www.delphi.co.za

 

kick it on DotNetKicks.com
8/4/2006 4:29:32 PM (South Africa Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [1]  | 
 Wednesday, May 31, 2006

I have been interviewing for developer positions this year and although I have been accommodating of the ramp-up from .NET 1.1 to .NET 2.0 I feel that now, six months after the release of .NET 2.0 and Visual Studio 2005, that it is time for developers that are presenting themselves to the market to have .NET 2.0 skills.

 

On our project we were lucky to start development this year and are using full-bore .NET 2.0 and in this green fields project, the use of the new technologies makes a major difference.  It seems that just about every class we use has the ‘Note: This class is new in the .NET Framework version 2.0’ message at the top of the window when looking for help on MSDN.  I think that our project, with it’s recent start date, uses .NET 2.0 more than your average project or development shop that is migrating to the newer framework.  This means that when interviewing I am looking for *some* .NET 2.0 and VS2005 skills so that the learning curve for new developers on the team is not three to four weeks – before even touching the project.

 

By .NET 2.0 skills, I don’t mean that they have to be experts – with six months of real project experience on .NET 2.0 – but at least need to have ‘played around’ with the new stuff and have an opinion on what the main changes are and how it affects development.  For us, the changes are significant and the mindset of the developer needs to be in tune with those subtle, but far reaching changes.  We use, for example, well-structured strongly typed datasets and although in theory it is pretty straight forward, it makes a big difference to how we code and interface with the database.

 

Different projects and organizations have their own pace with which they move to the latest version on anything and there are many good, and practical, reasons for not tearing the shrink-wrap off a product and implementing it with wild abandon.  My concern is not with the well-established projects with an architecture which has a sound base in .NET 1.1.  My problem is that individuals are marketing themselves as .NET developers and don’t have a clue as to how things would work differently in .NET 2.0.  Even worse are the body-shops and development shops who are taking these developers from .NET 1.1 projects and pushing them into new projects without the tiniest smidgen of training in the newer technologies – something they should at least attempt for the rates that they bill their resources out at.

 

So, any developers out there who haven’t gotten around to learning .NET 2.0;  firstly, you are missing out on something that is cool and interesting. Secondly, if you are stuck on a .NET 1.1 project, please try and keep your skills up on .NET 2.0 for when you find yourself looking for another project or employer – at least your skills will be aligned to the market demands.  It is fairly simple to get up to speed – there is free training available from Microsoft for which you don’t even need VS2005 and there are also the express versions of Visual Studio available for free.  You should be able to learn enough in a few days/weekends/late nights.

 

To put it bluntly, if you are trying to get a job or contract and you don’t have some .NET 2.0 and VS2005 skills it indicates that you are either lazy or have a tenuous grasp of .NET anyway.

 

Most people reading this post will have some up-to-date skills or else they wouldn’t have found the post but unfortunately Huisgenoot and You magazine (which must be all you are reading if you haven’t heard about .NET 2.0) don’t really cater for technical blogs.

 

Simon Munro

 

PS: If you are a .NET developer looking for a contract on a .NET 2.0 project, let me know – I have an opening for you.

5/31/2006 11:54:10 AM (South Africa Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [1]  | 
 Monday, May 29, 2006

My previous post ‘The Missing Link - a Platform Developer’ was in part inspired by deployment efforts that I have been busy with over the last few weeks.  I found that this link on Scott Guthrie's Blog (a blog which if you are not reading frequently – you are simply not doing ASP.NET development) resonated my need for a Platform Developer.

 

The image below reminded me of how much developers need to understand deployment issues and the deployment platform.  It seems that Microsoft, in an effort to make deployment easier, is blurring the line between what is the responsibility of the developer, versus what facilities has to worry about.

 

You will see in the screenshot, icons for membership – something which is currently part of the development space, but being so integrated into IIS admin functionality it is becoming part of facilities.  Look at all the other properties, which were previously part of the development teams’ responsibility – connection strings, session state etc.  Final clues are that in IIS7 the administrators can delegate administrative control to developers or content owners, thus reducing cost of ownership and administrative burden for the administrator’ (it seems that developers do not have enough of a burden) and there is a .NET API for IIS 7 too.

 

So if there are any aspiring Platform Developers out there, deployment of applications on IIS7 is definitely something to pay attention to.  Project Managers and Architects, if you don’t want to surrender your architecture to the ‘burdened’ administrators – identifying a Platform Developer in your organization to focus on IIS7 is probably a good idea.

Simon Munro

5/29/2006 3:45:29 PM (South Africa Standard Time, UTC+02:00)  #    Disclaimer  |  Comments [0]  |