Posts

Showing posts from May, 2006

RSS--> JSON--> On-Demand Script Tags and ASP.NET [AJAJ]

"You can observe a lot just by watching." --Yogi Berra, Berra's Law I've been experimentng with some server side code that I already had, namely, a method that will get any RSS Url and turn it into a DataTable. What I've done with that is to add the ability to convert that DataTable into a JSON data object, wrapped in a callback. With that done, it is a relatively simple matter to create a javascript source file that will "inject" not only the call to the aspx page that serves as the dynamic javascript "src" generator, but also the the UI for the DOM to display the results, and the callback method itself. It really doesn't take a lot of code to do this; in fact I used Jason Diamond's Manager class from the Anthem.Net framework to generate the JSON from the datatable more or less "out of the box". The neat thing about this sort of approach is that there are now so many services and sites that return content and news via RSS...

Coding Standards Redux

I complained today about having to work on two web projects where there are now not one or two, but FOUR separate generic SQL Server Data Access classes, all of which do essentially the same thing! They all do it differently, because individual developers have taken it upon themselves to "roll their own" without consulting with the team about best-practices coding standards and what we already may have, or not have, to work with. In addition, developers have "cobbled in" references to things like Anthem.NET, a WAV COM Library, and other dependencies into these Data Access assemblies that have NO BUSINESS being in a generic data access class. When I worked at a banking software firm back in early 2001, doing our first big .NET project, we had 17 developers in two teams working together. We all sat down in the conference room at the beginning and argued, and we all agreed to use the "SqlHelper" class from the Microsoft Data Access Application Blocks sample c...

Lessons Learned: Selective Reading and Human Nature

Psychologists will tell you that humans "see what they want to see", "hear what they want to hear". They also "read what they want to read". That's why police identification lineups of suspects are notoriously flawed. When I publish my articles on our developer site, eggheadcafe.com, I almost always put one of my little article-specific discussion boards at the bottom of each article. I do this because I want to encourage feedback. It gives the reader a sense that if they have something to say, they are free to do so, and I've gotten a lot of good suggestions from some of their posts, many of which have helped me to become a better writer. Once a month or so, I run a little cleanup SQL Script that lets me get rid of the relatively few "ASDF" "ASDF" posts left by mindless curiosity seekers (I say mindless because they never quote Shakespeare or Chaucer, it's just "ASDF"). On one recent article, "ASP.NET: Obfu...

Is your development process "Broken"?

Recently I was asked to add something to an internal web project that has gone through a number of iterations and also a number of developers. I spent the better part of an afternoon, and part of the next morning just getting everything out of Sourcesafe to build. I complained, because most of this was due to either developer lack of knowledge, lack of professional standards, or just plain "don't care". This is a list of some of the initial recommendations I made when asked: List of items that should be fixed with development process: 1) Developers should always arrange their projects, solutions, and the way they are source controlled with a view toward making it easy for new developers to be able to begin work on the solution with the minimum amount of hassle. This includes: a. Put 3 rd party assemblies in the solution as Solution Items and have them checked in with the solution so that people don't need to set mapped drives to shares containing libraries. These ...

And Another Thing: Apple, IPod, ITunes and DRM

I probably never would have gotten to the point of this rant if it weren't for the totally insulting experience I had to go through to get the latest version of Quicktime for a program that is completely unrelated to digital music. Apple now package ITunes with Quicktime, and there doesn't seem to be a legitimate way to get around the 35 MB download of Quicktime with ITunes piggybacked onto it. Or should I say, ITunes with a "free bonus" of Qucktime? So you go to install it, thinking you'll see a checkbox that says "Install ITunes" that you can uncheck , right? Nope. Those BASTARDS are gonna make you install the WHOLE FRICKIN' THING. Only when it's done can you finally go into Control Panel, Add/Remove, and get rid of their stupid bloatware ITunes thing and hopefully, QuickTime will be left alone. What's wrong with this? I'll tell you what's wrong. I don't like software being shoved down my throat , that's what's wrong! ...

.NET Debugging Tips Redux; Javascript Context Search

Image
There are two major deficiencies I've noticed with newer developers that seem to be rampant, based on my unscientific analysis of newsgroup and forum post questions that I've read or answered. First , many new developers (and some older ones too, unfortunately) haven't learned how to use the Try / Catch / Finally block semantics to catch an exception and examine the results. A simple example pattern would be: try { // Your buggy code here } catch(Exception ex) { // place a breakpoint on the next line: System.Diagnostics.Debug.WriteLine(ex.Message + ex.StackTrace); } This will save you hours of time wasted on making reallyreallyDUMB newsgroup posts and waiting for answers, because 9 times out of 10, the Message and StackTrace will tell you not only WHAT happened, but exactly WHERE it happened, no matter how big the "Your buggy code here" block of code is. The modus operandi is "teach a man to fish". By simply replacing the word Debug with "Trace...