September 2, 2012
Teachers, Please Don't Start Kids On SQL. kthxbye.SQL.
Yes, the horror.
But, in the non-ideal world we live in, most programmers need to know at least some SQL. On account of businesses insisting we stick most of our data in relational databases. The swines!
But I would not recommend a SQL-centric view of software. Data-centricity is a mindset that we find tends to lead to all manner of issues, from the software designs that start at the back with tables and relationships and sort of build an application on top of that to connect the users with their data, to the maintainability problems that tend to result from data-centric architectures where blobs of data get passed around by functions that do stuff to them.
Which is why, even though I know we all need some SQL and RDBMS skills, I would heartily recommend not starting your programming career at what I consider to be the horse's arse.
So it makes my nerves jangle like so much falling cutlery when I hear teachers suggesting that SQL would make a good first language for students to learn programming with.
No, no, no, no.
I've seen where that leads, and it doesn't lead anywhere pretty.
Software should be tackled from the front. The first question should always be "who or what will be using this program, and what will they be using it for?"
Programs - even data-intensive ones - need to be built to allow people to do useful things with them. The top-down, outside-in approach to design wasn't invented just for jolly larks and cakes.
A database is a consequence of that outside-in, usage-driven design. Just like packing a case is a consequence of your trip, not a reason for it. We decide on the destination and only then decide on what we'll need to pack.
Software designed from the database is up is a vacation planned from the suitcase's point of view. Which is why database-centric designers tend to pack very heavy suitcases, because until you know what the trip will require, the tendency is to pack everything you could possibly need. Just in case.
And even then, how many projects have we worked on where the database designer packed every manner of summer clothing for what turned out, upon reading the use cases, to be an arctic expedition?
So, no. You don't start young impressionable minds with SQL.
Don't you dare!
Posted 2 weeks, 2 days ago on September 2, 2012