Why I'm Unimpressed With Rawness Of Skillz

by Jon 8/7/2008 6:40:00 AM

Since forever, geeks who take themselves seriously have loved to brag such things as, "I use Notepad to edit web pages". Carrying this over to actual programming, "I never click into the designer when editing my ASPX", or "I never design a database using designer tools, I always design it all using raw T-SQL," or "I always update my SVN from the command line". (Someone in a local tech user group bears the post signature, "Real men use Notepad.")

Puhleeze. I'm not impressed, and frankly I think anyone who brags like this should get a swift kick in the pants.

IMO, there are three levels of elevation to guruism:

  1. Awareness: Discovering the tech and the tools (like the WYSIWYG web editor .. "I'm a WEB MASTER, and you can, too!").
  2. Intelligence: Swearing by Notepad and proudly refusing to use the WYSIWYG editor.
  3. Wisdom: Knowing when to use the right tool at the right time in order to either save time or to produce the best output. Yes, that means being fully capable of staying away from the WYSIWYG editor or the designers, but it also means being completely, 100% unafraid of such tools if they serve the purpose of helping you write better code, more productively.

I get really turned off when co-workers smirk and look down their noses at me when I mention that I'm a tools collector, as if their refusal to use anything but the textual view of SQL Query Analyzer, the C# plain-text editor, and the command prompt somehow made them superior. The fact of the matter is, these are the people who produce output that share predictable characteristics:

  • Web pages are thrown together without thought to design.
  • Web page markup is excessive due to hit-and-miss browser testing rather than design-mode utilization.
  • Code is disorganized and messy.
  • Class libraries and databases are designed ad hoc and without thought towards the bigger, conceptual picture.
  • Databases lack indexes and referential integrity.
  • Buggy implementations take ages to be debugged due to refusal to fire up a debugger.

Yes, let's look at that last item. I don't know about you, but I am, and have always been, an F5'er. (F5 invokes the Debug mode in Visual Studio.)

Learn how to debug. With a debugger.

At a previous job, I discovered for the first time in my career what it was like to be surrounded by hard core engineering staff who refused to hit F5. Now, granted, the primary solution that was fired up in Visual Studio took literally over a minute to compile--that means F5 would require a one-minute wait for the simplest of changes if it wasn't already running in Debug mode. But even so, it's such a straightforward and clean way to get to the root of a problem that I don't see how, or why, anyone would want to do without a solid debugger to begin with?

Re-invoking code and then reading the resulting error messages is not an acceptable debugging methodology.

Instead, set breakpoints and use the introspection tools. Here's how I debug:

  1. Set a breakpoint at the top of the stack (where the code begins to execute). If using browser-side Javascript, add the line "debugger;" to the code.
  2. Hit F5.
  3. If the user (that's me at this point) needs to do something to get it to reach the breakpoint, do it.
  4. Once the breakpoint is reached use F10 (Step Over) or F11 (Step Into) to follow the execution path.
    • Always watch the value of each and every variable before proceeding to the next line of code. I can monitor variables by monitoring the Locals window, or if some method needs to execute to fetch a value or if he variable is in broad scope then I put it in the Watch window.
    • Always watch the values of each and every source property before it gets assigned to something, by hovering over it with the mouse and letting the tooltip appear that exposes its value. For example, in "x = myObject.Property;", only myObject will appear in the Locals window, and I won't see the value being assigned until it is already assigned, unless I hover over ".Property" or add it to my Watch window.
  5. If a nuisance try...catch routinely occurs such that it becomes difficult or tiresome to find where in the stack trace the exception was thrown, I might try commenting out the "try" and the "catch", or find the option in the Exceptions dialog (to find that dialog you'll have to right-click a toolbar and choose Customize and find the menu item to drag it up to the menubar and add it, as it's not there by default) that stops the debugger on all exceptions.

90% of the time, I can catch a bug by careful introspection in this manner within a couple minutes.

What the "raw skillz" folks would rather do is go backwards. Oh, it's puking on the data? Let's go to the database! Fire up SQL Query Analyzer! SELECT this! F5! SELECT that! F5! (F5 in SQL Query Analyzer, or Query view for SQL Management Studio, doesn't debug. It executes, raw. SQL doesn't have much debugging support.) Hmm, why's that data bad? Let's clean it up! UPDATE MyTable SET SomeField = CorrectValue WHERE SomeField = WrongValue ... Now, why'd this happen? Why's it still not working? I dunno!!

Oh just kill me now. That's not fixing bugs, that's fixing symptoms. If roaches ate all the pizza, this would be like replacing the pizza where it sat. Feast!!

Worse yet is when the whole system is down and the fellas are sitting there doing a code review in the effort to debug. Good lord. Shouldn't that code review come before the system went live? And, once again, F5 can and should save the day in no time at all.

Use SQL Profiler and the management code libraries.

In the SQL Server world, the closest equivalent to Visual Studio's F5 is the SQL Profiler. If you're seeing the database get corrupted and you're trying to troubleshoot and figure out why, use the Profiler. There's also the management libraries, which might provide some insight in the goings on in database transactions, from a programmatic perspective.

Ironically, shortly after I joined the team at my previous job, I introduced SMO to the database guru. Nearly two years later, after I had put in my resignation, the same fellow introduced me to SMO, apparently forgetting that I introduced it to him to begin with. But in neither case did either of us actually do much, if anything, with SMO.

SQL transactions are a tool. Use them.

There's nothing like watching a database get corrupted because of some bug, but it's despicable when it stays that way because the failure didn't get rolled back. Always build up a transaction and then commit only after doing a verification.

Don't hand-code database interop with user views. 

Let's look at ORM tools. Put simply,

  • If it saves coding and management time, it's an essential utility.
  • If it performs like mollasses, its crap.
  • If it is always dispensible, it's accepable.
  • If it gets "rusty", needs routine maintenance, or was built on a home-grown effort, it's junk.

Code generators are iffy. They're great and wonderful, if only there are enough licenses to go around and they're always working. I was recently in a team that use CodeSmith, but the home-grown templates broke with the upgrade to a recent version of CodeSmith, so everything died out. Furthermore, all of the utilization of CodeSmith revolved around a home-grown set of templates that targeted a single project, and no other templates were used. And last but not least, there were only two or three licenses, and about four or five of us. So between these three failure points, it was shocking to me when my boss got upset with me for daring to want to deviate away from CodeSmith and consider an alternate tool for ORM such as MyGeneration or SubSonic when I began working on a whole new project.

Later, I met the same frustration when LINQ arrived. Hello? It's only as non-performant as one's incapacity to learn how it ticks. And it's only as unavailable as our willingness to install .NET 3.5, and, by the way, .NET 3.5 is NOT a new runtime, like 3.0 it is just some add-on DLLs to v2.0.

Writing code should be tools-driven too.

Do basic designs before writing code. Make use of IntelliSense (for SQL, take a look at SQL Prompt). Use third party tools like Resharper, CodeRush, and Refactor! Pro. Mind you, I'm a hypocrite in this area; I tried Resharper and ran into performance and stability issues so I uninstalled it. I have yet to give the latest version a try, and same is true of the other two. But some of the most successful innovators in the industry hardly know how to function without Resharper. It doesn't speak well for them, but it does speak well for Resharper. There are lots of other similar tools out there as well.

UPDATE (8/26/2008): I've finally made the personal investment in Resharper. We'll see how well it pays off.

Don't be afraid of the ASPX designer mode.

I like to use it to validate my markup. Sometimes I accidentally miss a closing '>' or something, and the designer mode would reveal that to me much faster than if I attempted to execute the project locally. Sometimes it also helps to just be able to drag an ASP.NET control on the page and edit its attributes using the Properties window; this is purely a matter of productivity, not of competence, and fortunately the code editor supports InteliSense sufficiently enough that I could accomplish the same job without the Designer mode, it would just be a little be more work and, being manual, a bit more prone to human error.

Automate your deployments.

Speaking of human error, I have never been more impressed by the sheer recklessness of team workflow than the routine manual deployment of a codebase across a server farm. At a previous job, code pushes to production would go out sometimes once a week and sometimes every day, and each time it took about half an hour of extreme concentration by the person deploying. This person would be extremely irritable and couldn't handle converations or questions or chatter until deployment completed. Regularly, I asked, "Why hasn't this been automated yet? You can bump those thirty minutes of focus down to about one minute of auto-piloting." The response was always the same: "It's not that hard."

To this day I have no idea what on earth they were thinking, except that perhaps they were somehow proud of going raw--raw as in naked and vulnerable, such being the nature of manual labor. Going raw is stupid and dangerous. One wrong move can hurt or even destroy things (like time, sanity, and/or reputation). There's nothing to be proud of there. Thrill seekers in production environments don't belong in the workplace. Neither does insistence upon wasting time.

Design like you care.

Designers aren't just good for web layouts. I've particularly noticed how supposed SQL gurus who don't design database tables using the designer and prefer to just write the CREATE TABLE code by hand tend to leave out really important and essential design characteristics, like relational integrity (setting up foreign key constraints), or creating alternate indexes. Just because you can create a table in raw T-SQL doesn't mean you should.

The designers are essential in helping you think about the bigger picture and how everything ties together -- how things are designed. Quick and dirty CREATE TABLE code only serves one purpose, and that is to put data placeholders into place so that you can map your biz objects to the database. It doesn't do anything for RDBMS database design.

I used to use the Database Diagrams a lot, although I don't anymore simply because I hate the dialogue box that asks me if I want to add the diagram table to the schema. Even so, I'm not against using it, as it exposes an important visual representation of the referential integrity of the existing objects.

Failing that, though, lately I've been getting by with opening each table's Design view and choosing "Relationships" or "Indexes/Keys". I then use LINQ-to-SQL's database diagram designer, where inferred relationships are clearly laid out for me, assuming I'm using LINQ as an ORM in a C# project. If I see a missing relationship, I'll go back to the database definition, fix it, and then drop and re-add the objects in the LINQ-to-SQL designer diagram after refreshing the Server Explorer tree in Visual Studio.

vi is better than Notepad.

If you must edit a text file in a plain text editor, vim is better than Notepad. No clicky of the mouse or futzing with arrow keys. The learning curve is awkward, but NOTHING like Emacs so count your blessings.

I'm kidding, but the point is that there's nothing "manly" about Notepad. Of course, for the GUI-driven Windows world, better than vi or vim or anything like that, these two free Notepad replacements are pretty nice, I use both of them.

In any case, there's nothing wrong with using Notepad or some plain toolset to do a job, but only if you're using the simpler toolset out of lack of available tools. You might not want to wait for two minutes for Visual Studio to load on crummy hardware. You don't want to wait for something to compile. Whatever the limitation, it's okay.

But please, don't look down on those of us who opt for wisdom in choosing time-saver tools when appropriate, you're really not helping anybody except for your own rediculously meaningless and vain ego.

kick it on DotNetKicks.com

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Software Development | Opinion

Related posts

Comments

8/4/2008 6:57:41 PM

mikedopp



<rant><mso>so you would rather use frontpage/dreamweaver to edit your html/xhtml? Wow. I would rather a serious kick in the pants than to use those types of applications to "shortcut" my html/xhtml development. </mso></rant>
***This comment wrote in frontpage***

mikedopp us

8/5/2008 12:48:43 PM

sirrocco

" Don't be afraid of the ASPX designer mode. " -> actually BE afraid - it has happened more than once that the designer decided to insert crap all over the aspx file (VS 2005).

What I use the designer for is : Drag login (or some other membership control) and - create template ( or something like that) then back reaaaly fast to source mode Smile.

Other than that , all the other points are valid.

sirrocco ro

8/5/2008 1:08:40 PM

Jon

sirrocco, VS 2008 doesn't have that problem. FrontPage had that problem and VS 2005 (and previous versions of VS) had that problem, although VS 2005 had the problem a lot less than previous versions, but Expression Web and VS 2008 do NOT have that problem hardly at all.

The point is, be wary, not afraid. Make educated decisions, not blanket prejudiced boycotts of things you haven't even tried to use or work around.

Jon us

8/5/2008 5:17:04 PM

Mike Borozdin

I like your thought. Tools save our time greatly and by disregarding them you lose a lot of time.

Mike Borozdin ru

8/5/2008 8:55:05 PM

Cassio R Eskelsen

"Real" website, driven to SEO, require fine tunning and the ASP.Net designer of Visual Studio put a lot of junkie code.
Personally, I'm more produvite with "code mode" of the designer.

But, I agree with you: notepad sux for code and create/mantain database with script code is insane!

Cassio R Eskelsen br

8/5/2008 11:18:53 PM

Kevin Raffay

Great points. You would think that debugging code, using tools, or cleaning up the HTML so that the VS2005 designer can render the page would be obvious. If you apply the HTML validation settings, you can save yourself a lot of time dealing with cross-browser issues. And no, Visual Studio does not re-write the HTML - that was fixed with VS2005.

As for debugging, stepping through code was second nature to old VB programmers, but with the advent of the web, many people got into the bad habit of writing "Response.Write (insert variable name)" and "alert('I am here');". For you folks out there still doing this, please -- learn to use the debugger. I get tired of seeing blocks of commented out code in .NET applications that are there just so the developer can enable them when he gets in trouble. Or at least just turn on Tracing.

As for tools, I swear by CodeRush, and will take a decent (not home-grown) code generator any day over writing boilerplate code. The best code is the code that you don't have to write.

Kevin Raffay us

8/6/2008 9:20:49 AM

Tim Fischer

Any tool you do not immerse yourself in and learn how to use it properly is probably a tool you will not like, will not trust, and will not produce your desired results.

Those that are afraid of the designer in VS2005/8 are those I can guarantee have not taken the time to really learn it. It is quite possible to generate very tight code when used correctly. I have had nothing but problems with code that was "hand" coded - nested tables/divs are almost assured of having missing end tags or poorly formatted code - even when the page is minimal in size.

Working in Team environments makes that kind of code a complete nightmare.

Tim Fischer us

8/6/2008 5:31:34 PM

Richard Lowe

Yes! I think you have it absolutely right, Jon. I think it's very reasonable to claim that the right tools used at the right place will factor out a lot of potential human error more consistently product a better quality product faster.

I would even say that tool that simplify some of the messy details of programming are substantively *no different* from abstractions in the form of complexity-hiding code patterns like encapsulation, inheritance etc. They do the same functional job - keep unnecessary details away from the developer, or at least keep them on a need-to-know basis.

Richard

Richard Lowe us

8/7/2008 12:57:19 AM

que0x

hehe ! i totally agree , coding in Notepad won't make you exceptional, except in stupidity ! but asp.net coders should not relay on the designer mode, that's crap !

que0x eg

8/7/2008 9:09:22 PM

Romeo

The saddest thing about this is that they brag about their Microsoft .NET certification in Visual Studio 2005 whatnot. Well, personally I would be least impressed when they keep on asking me to debug them.

Finally, somebody blogged something about this. Smile

Nothing's better than throwing ego out to make room for real coding.

Romeo ph

8/7/2008 10:52:21 PM

James Hofmann

I think there's a gradient of cases where "rawness" is legitimately used:

-Better tools not available
-Better tools require a setup procedure
-Better tools require a training procedure
-Better tools require a setup and training procedure
-Better tools require additional coding to become useful in the environment

And within those categories there are additional subcategories. Maybe the setup procedure is going to a web site and using the click-through installer wizard. Or maybe it means compiling from scratch using obscure libraries which you have to hunt down, on a platform the original code wasn't meant for.

The very bottommost one is probably the most thorny of all. Advocates of programming environments that are integrated with the language (particularly Lisp and Smalltalk environments) can point to the results as triumphs of integrated development -- the moment any code at all fails, anywhere on the system, debugging can begin immediately. However -- that means you're stuck with one language for all computing purposes, since the rich toolset only works within that context. So you're *still* "going raw" in the sense that you can't get additional code from other languages, or at least are facing a major battle if you do.

James Hofmann us

8/17/2008 1:56:02 PM

dabears

anyone who uses the asp.net webforms designer is a tool. tools are for tools. your value is auto generated. i hope you feel extremely relevant for being a pro at copy paste and drag and drop. you feel intimidated by the people who have the ability and the knowledge to perform their job efficiently, without the need for every rad tool they can get their hands on.

www.charlespetzold.com/.../...tudioRotTheMind.html


@romeo

you're suggesting throwing out real coding for some auto generated "real coding". how is not writing code "real coding"? you contradict yourself.

dabears us

8/17/2008 9:03:27 PM

Jon

@dabears,

The question becomes, what do you do? Code? Or design?

If you code, don't waste time CODING your design. Design your design. Leave the code view to coding tasks.

That said, I (being the author of this blog entry) almost never use WYSIWYG editors. I think in code. The keyword is "almost". The times I do use WYSIWYG editors or enter Design mode, and I see some cowboy hackjob looking over my shoulder telling me I surely have no skillz if I dare click into that Design view, really, really, REALLY tick me off. Hence, the purpose of this post.

One should NOT be ashamed for using tools to save time, period. As long as, at the end of the day, he's focusing on what matters and been most productive while still given time and attention to clean and accurate output.

Don't write off an entire toolset just because it can be abused by people with no skill. It's people like you I despise.

Jon us

10/3/2008 4:40:08 AM

Chris Martin

I aint no inovator but, I can't code no .net without ReSharper!!!

As for the rest of the rant, I say do whatever works for *you*! I know dudes that can create some really good code with the assistance of a designer. It's really, just like anything, all about how much you know. The only problem I can see with WYSIWG tools is that they let people, that have no business being here, into my profession. That's OK though. More work for me, if I choose to accept it. Wink

Enough of that rant...

I find myself using desingers just enough to get the basics done and then I'll tweak.

Most code generators, in the sense that you're talking about, are crap. But, don't even start talking crap about ORMs. Wink

Chris Martin us

10/5/2008 4:41:40 PM

mjt

Jon - you're obviously showing your development adolescence.

The LCD is the text editor and compiler, period. Everything else
is just gravy - merely helper tools to get you there faster. But
if you dont know what's going on to begin with, the high-level
toolset(s) wont pull you out of the mud.

And, BTW, *real* programming - that on a grand scale, happens on
the Unix/Linux platform, where scalability is part of the game.
Clients who really understand *it*, don't run on anything but
Unix/Linux, which provides breadth and scalability. Your
references to Notepad, even if jokingly, reflect your blinders.

regards, mjt - author, "Inside Linux".

(PS - you mention developing professionally since 1997, which
is why I mention your development adolescence - I've been a
consultant since 1985, so I've seen it over and over again).

mjt us

10/5/2008 5:02:59 PM

Jon

mjt, thanks for your post. I used to love your book. Even just today I was hanging out in the #fedora IRC chat rooms while trying to get VMWare to work with it. I gave up again a couple hours ago when I realized that the tooling was forgotten again, apparently there was a meltdown of communication between VMWare and GNOME regarding who the hell owns the mouse coordinates.

Linux. Gawd. I give it the benefit of a doubt from time to time. But on GUI apps, Adobe, Microsoft, and Apple *get it*. Cocoa, WPF, even old Windows Forms are real tools, made by people who *get it*. On the web space, yesterday I just discovered somebody who *gets it*, and that's Laszlo. Real tools. Don't waste your time, just get a beautiful thing made.

I'll be sure to look you and your references up if I ever need an arcane bash script or a rock solid network service, .. which I won't ...

Considering who you are, I wouldn't have wanted to make this an antagonstic reply, but you're the one who came talking down to me. I'm not impressed. Go back to your bit twiddling.

Jon us

10/5/2008 5:18:55 PM

Jon

Incidentally, for the record, I do admire *nix. I'm typing this on a Mac, for instance, which a *nix variant.

But this blog article wasn't a Windows vs. *nix discussion. Mac is just about the *nix flavor I can admire right now on the OS end, although for servers I'm curious about OpenSolaris and CentOS. But when it comes to getting @#$% done, you're talking about development tools, and on that I cannot develop without a workstation environment--a desktop environment--that emphasizes productivity. Vim and even Emacs is such a "single-threaded user experience workflow", so to speak, that it is extremely difficult to take seriously. On the tools end, I have some respect for Eclipse, but really only the Aptana flavor. For compiled code I admire Xcode far more than Eclipse .. even though it's very different. Xcode is a commercial tool. And way more than Xcode, I admire Visual Studio. A real tool, to get @#$% done.

I also want to point out that nothing in this blog post suggests to ignore the lower-level intricacies of what's actually going on in code. mjt: "But if you don't know what's going on to begin with, the high-level toolset(s) won't pull you out of the mud." Duh. Comments like that just show that you don't know how to read, because I pretty much argued the same thing on a two-sided coin.

Jon us

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

11/21/2008 6:52:45 AM


 

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Jon Davis Jon Davis (aka "stimpy77") has been a programmer, developer, and consultant for web and Windows software solutions professionally since 1997, with experience ranging from OS and hardware support to DHTML programming to IIS/ASP web apps to Java network programming to Visual Basic applications to C# desktop apps.
 
Software in all forms is also his sole hobby, whether playing PC games or tinkering with programming them. "I was playing Defender on the Commodore 64," he reminisces, "when I decided at the age of 12 or so that I want to be a computer programmer when I grow up."
 
Jon is currently in a temp-to-perm contract with a media corporation that primarily produces B2B magazines. The insanely complete and powerful Content Management System that they are switching to is SiteCore CMS, which is arguably the richest and most complete ASP.NET 3.5 based CMS on the planet.
E-mail me Send mail

Most Recent of Many Library Investments

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
346789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Pages

    Recent comments

    Authors

    Tags