Posts

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...

Dotnet Zen: Learning to Wipe Your Own Ass.

"The greatest challenge to any thinker is stating the problem in a way that will allow a solution." -Bertrand Russell. I try to be patient, really I do. But the "poor little me" pattern just keeps coming up in all these newsgroup posts and forum messages. Let me explain; basically it works like this: 1) Post to a forum or newsgroup. Typical Subject, "Need help, SelectedIndexChanged Event of a combo box". 2) User posts some sample code. First thing you see is that they haven't a clue whats going wrong or where it may be happening. It doesn't look like they've even tried. (Sometimes they don't even post any sample code; they expect you to be telepathic - I just reply asking them for Jon Skeet's quintessential "Short But Complete" code sample.). I'm a big fan of fellow MVP Skeet's work, he is pedantic to a fault, but that serves a valuable purpose for clarity, and I commend him for it. 3) User usually says something l...

How to Get Rid of the "XXexmodulae.exe" Virus/ Trojan.

This is a particularly nasty mass-mailing worm that not only disables certain antivirus and antimalware software (the very software you would need to delete it) but it also does some VERY NASTY masquerading as Windows System files! The text below is from a Brazilian poster on a French BBS - the only guy I found who got it right! I've edited and numbered it to make it easier to read in English. Hello, I live in Brazil and I was having the same problem described above, and I found a solution (I´m sorry for posting in english, I can´t write in French, had to use Babelfish do translate your messages above). This was the sequence of actions I used to get rid of these damn files: 1) Check the processes of Windows Task Manager for .exe files with numbers followed by "exmodula" plus a letter, for example: 46exmodulag.exe As above, this name varies, in my computer I had several different files, some using "exmodulaf" and "exmodulag". End the process. 2) Next, ...

IIS, ASP.NET and 64-bit performance considerations

Now that 64-bit OS versions and machines to run them are widely available, developers are seeing that the biggest benefit of using the 64-bit platform is its ability to break through the memory addressability limitations of 32-bit platforms and allow applications to utilize much more memory. This can be particularly important for the performance of servers that potentially serve thousands of concurrent users and manipulate large amounts of data and/or potentially cacheable files on disk. This includes database applications (such as SQL Server), mail servers such as Exchange, terminal-server based Windows applications, and with . NET 2.0 64-bit , middle tier . NET applications that can cache or otherwise need to manipulate large amounts of data in-memory on the middle tier, including ASP.NET Apps. 32-bit computing platforms treat physical memory addresses as 32-bit integers. A byte-addressable 32-bit computer can address 4 gigabytes of RAM directly. It’s possible to put more than 4 giga...

IE 7.0 Beta 2 - 64-Bit Nuclear Meltdown? And Firefox Javascript

I guess I'm just a sucker for BETA software. At work, I installed the latest "offishul" Interenet Explorer 7 Beta 2 and it seems to work fine. I especially like the RSS stuff and the tabbed browsing. So when I got home last night, I said "OK, they finally have a real 64-bit version so let's have fun". Bad decision! At least on my AMD machine running Windows Server 2003 x64 edition, this puppy is an absolute "NO GO". Just trying to set Toolbar settings and common properties, the windows would freeze up and refuse to close, and I'd have to kill the sucker out of Task Manager. It didn't take me more than about 20 minutes of wasted time to realize I had made a big mistake, and it was "bye - bye, IE 7". I'm not even going to take the time to put in bug reports on something this bad - I got work to do. You know, I understand this is BETA software. But at a minimum, there is a certain presumption of basic functionality before you e...