Wednesday, January 31, 2007

The About Box

I found a Code Project article describing an about box which the author rolled out as a .NET winforms control. He offers both .NET 1.1 and 2.0 versions of this control. What I found interesting is that his goal was to create a simple set of 'dogtags' for an application, rather than anything fancy.

Which is a fine and noble goal for .NET 1.1, but .NET 2.0 already has a simple About Us form control as a standard part of it's templates.

Sure, his does extra things like display the version for each of the DLL's in the application, but frankly, those are better served in a configuration file somewhere, and only used during updates. Or even if there's an error, THEN display that type of information to the user (as a bug report to be sent to the developer). Ultimately, users don't need to know all the information which the author provides in his about box, and while I find it neat and interesting, I can't see where it would be useful from a user experience or user accessibility point of view for a standard user.

A standard user, just doesn't care that much about it.

Tuesday, January 30, 2007

Do What? Functional Programming on the way back in?

I first learned to program via functional languages. BASIC and then PASCAL were the tools I learned the fundamentals of programming.

It was after my course in COBOL that I stumbled into C++ which was the first language which we could actually use the nonsensical object-oriented stuff that some of the professors were jabbering on about. Of course, from there on out, it was all about the objects. PASCAL and COBOL disappeared from the university's curriculum replaced by JAVA and C/C++.

Not really surprising, it happened on campuses across the nation. But what is surprising is this blog entry by Microsoft's Wes Dyer. In it Mr. Dyer advocates the return of functional logic to programming - and makes a good case for it. One has to wonder when folks will realize that we need both paradigms to create truly wonderful code.

Monday, January 29, 2007

PDF ISO Standard.

Not to be out done by Microsoft and the Open Source movements to standardized their own open document frameworks, Adobe has announced that they are finally submitting PDF to ISO as an open standard (press release).

And though, PDF has been available for anyone to develop against for years, this marks the first time that Adobe has allowed active development of the standard to shift out of their hands - and into the hands of the community.

To be honest, I despise PDF format documents. From a usability point of view - they interrupt the flow of my web surfing, and if I'm not desperately in need of the information on one, I'll go back to Google and keep looking for a more easily accessible format. The other reason I dislike them, is opening the PDF reader takes forever. While I'm not on the fastest machine in my company, it shouldn't have to pause and think when opening a document served over the web - yet that is what consistently happens when I open up a PDF file.

What I would like? I would love for Adobe to release the source to Acrobat Reader to the wild, and see if the Open Source community can improve the load time and memory footprint of that piece of software. Or even better, have the renderer for PDF be built directly into the web browsers. If a PDF behaved like a normal served-over-the-web file, I would be much happier about this situation, and much more likely to use them.

Friday, January 26, 2007

WATIR: Web Application Testing in Ruby

I am so excited about this. It's probably one of the niftiest tools for use in black-box testing websites/web applications that I have ever found.

WATIR is a ruby based system which allows you to create small scripts that drive your installed instance of IE. Using code that looks like thus:

require 'watir' # the watir controller

# set a variable
test_site = ''

# open the IE browser
ie =

# print some comments
puts "## Beginning of test: Google search"
puts " "

puts "Step 1: go to the test site: " + test_site
puts " Action: entered " + test_site + " in the address bar."

puts "Step 2: enter 'pickaxe' in the search text field"
ie.text_field(:name, "q").set("pickaxe") # q is the name of the search field
puts " Action: entered pickaxe in the search field"

puts "Step 3: click the 'Google Search' button"
ie.button(:name, "btnG").click # "btnG" is the name of the Search button
puts " Action: clicked the Google Search button."

puts "Expected Result: "
puts " - a Google page with results should be shown. 'Programming Ruby' should be high on the list."

puts "Actual Result: Check that the 'Programming Ruby' link appears on the results page "
if ie.contains_text("Programming Ruby")
puts "Test Passed. Found the test string: 'Programming Ruby'. Actual Results match Expected Results."
puts "Test Failed! Could not find: 'Programming Ruby'"

puts " "
puts "## End of test: Google search"

That script listed above actually works, and will drive an IE browser to the Google homepage and force it to search for the term. So, as we build complex web applications, we can build these testing scripts, and when we roll out new capabilities, rather than having to spend hours upon hours doing formal tests for regression, you just spend a little bit running all the scripts again.

Thursday, January 25, 2007

Extending Windows Forms

A lot of my job is building WebForms and websites. Yes, we're a MS shop so I'm using ASP.Net and it is a very powerful tool. The extension model which allows developers to create custom server controls is wonderful - and I've even gone and used some concepts normally found only in Rich-Client applications in my web applications.

So, of course I knew that you could extend and build custom controls in Windows Forms in the same way one could do it in Web Forms, but DevX has an article up on it here. All in all, it's not a bad tutorial on doing it.

Wednesday, January 24, 2007

ORD Template?

Of all the annoying things. I've found myself having to re-create a series of documents due to a massive change of scope in my current project. While doing this, I decided I needed to check to ensure that my Originating Requirements Document matched the standard for this document. So I first looked into the IEEE library. No standard. That's fine, I thought. I can always try DoD.

Well, the closest thing to a DoD ORD standard is DI-IPSC-81430A Operational Concept Description.

This particular document has a structure like thus:

  1. Scope
    1. Identification
    2. System Overview
  2. Referenced Documents
  3. Current System or Situation
    1. Background, objectives, and scope
    2. Operational policies and constraints
    3. Description of current system or situation
    4. Users or involved personnel
    5. Support Concept
  4. Justification for and nature of Changes
    1. Justification for change
    2. Description of needed changes
    3. Priorities among the changes
    4. Changes considered but not included
    5. Assumptions and constraints
  5. Concept for new or modified system
    1. Background, objectives, and scope
    2. Operational policies and constraints
    3. Description of the new or modified system
    4. Users/affected personnel
    5. Support Concept
  6. Operational Scenarios
  7. Summary of Impacts
    1. Operational Impacts
    2. Organizational Impacts
    3. Impacts during Development
  8. Analysis of proposed system
    1. Summary of Advantages
    2. Summary of Disadvantages/limitations
    3. Alternatives and trade-offs considered
  9. Notes
While that is all well and good, it is heavily geared towards developing a customized or modified version of an existing system. There are rather large blocks of the document which I would need to tailor out just because I'm developing a new system.

Well, since I cannot find an Originating Requirements template that effectively meets my needs, then I am going to be kind of forced to design one. My initial thoughts are thus:
  1. Identification
    1. Purpose
    2. System Overview
  2. References
  3. Operational Scenarios
  4. Originating Requirements
  5. Notes

When I get a chance, I'll toss this into Word with a bit more thought behind it and worded like an appropriate template for this type of stuff.

Tuesday, January 23, 2007

Microsoft XNA

Microsoft has recently released their game development framework, entitled XNA. Coding4Fun has now put up a tutorial on using it and building a pong clone called Tiny Tennis. Hopefully, I'll soon have the time to be able to play around with this new technological wizardry.

Monday, January 22, 2007

Firefox Extensions.

I love Firefox. It's a great browser, and my favorite part of Firefox is the extensions which you can add into to expand the browser's functionality.

Things such as ColorPicker, MeasureIt and Nuke Anything Enhanced I have long had on my browser. Lately, I've been playing around with GreaseMonkey. But I routinely look through the extensions to see if something new has been released that I would like to use or that would be helpful for me as a web developer. The last time I checked, I only found GreaseMonkey and Lori (a life-of-request information status bar extension). Tonight though, I had a bit of extra time and found myself three great new extensions.

  • JSView. This extension allows you to view linked in files (such as style sheets and external JavaScript files). Quite often when I am viewing source, these files are what I'm hunting down to look at, so I think this is a great little tool for my toolbox.
  • Header Spy. I'm not 100% certain on how useful this thing will be. But it's going to show me my HTTP headers on my status bar. It should be fun, at least for a bit.
  • OperaView. I've long had IEView in my extensions list, as I find it useful to not have to launch the full browser, especially when I'm at home with only one monitor to look at. So when I found this one, I just had to add it into my little stash of things.
And of course, since I now also run GreaseMonkey, I also have to search for useful GreaseMonkey scripts.

Such as this one, which ensures that all URLs displayed in the browser are clickable links. I don't know how many times I've come across some blob of text, usually on some social or Web 2.0 website where it's a non-clickable URL. Unfortunately, the usefulness of GreaseMonkey scripts are not always 100% apparent.

Friday, January 19, 2007

Plugin Architecture for .NET

I've used this architecture for building a plug-in system for .Net 1.1 in the past. I liked it, it stored the information about the various DLL's in the application configuration file. Using reflection and a custom configurationHandler one is able to load in the classes at run time.

Of course, I'm building an application using .Net 2.0 and have run into a system where a pluggable architecture makes sense and would be very useful. Well one of the improvements of .Net 2.0 over 1.1 is the modification of how information is stored and accessed in the configuration file.

Oh, the annoyances.

Well after a bit of searching, I found this article on dynamically searching for a plug-in. Basically, it's looking in the application path for any DLL's which have a class that implements the interface that someone is looking for. While, I like the thought of having the information about the classes in a configuration file which I can instantiate using the System.Reflection. But in a pinch, this will work as well.

Thursday, January 18, 2007

Web Froms 2.0

The Web Hypertext Application Technology Work Group (WHATWG) is in the process of developing HTML5 and more specifically Web Forms 2.0. Now these things I am excited about. For the more general HTML5, I'm very interested in the new CANVAS attribute. This will allow for many new features in the web world - such as drawing in HTML for graphs and games. And most importantly, it does the rendering for these graphics on the fly. Imagine an AJAX game which is able to render beautiful images without round trips to the server.

The other things I'm waiting expectantly on are of course the new tools in Web Forms 2.0. These new suggestions will contain a host of features which I now spend hours coding JavaScript for. Among the most interesting capabilities are:

  • The Required Attribute
  • Autofocus Attribute
  • A Regular Expression Attribute
  • Min/Max Attributes
  • A Datetime Control
  • And extensions to attributes such as Maxlength (to add support to Textarea controls)
Some of these items are already being developed and included in the Opera browser - especially the CANVAS tag - and it looks great there. But of course, I can't embrace these new technologies until Microsoft acknowledges their existence and supports them in IE. Then and only then can developers truly start using these controls. Ah, but when they do....

Wednesday, January 17, 2007

CMMI Technical Solution.

Technical Solution in CMMI is described as thus:

The purpose of Technical Solution is to design, develop, and implement solutions to requirements. Solutions, designs, and implementations encompass products, product components, and product-related life-cycle processes either singly or in combinations as appropriate.

Of course no one ever tells you just what that means - or how to apply it to real life. College courses nowhere build classes around CMMI (because it was created at Carnegie-Melon University as opposed to being developed in-house), so for the most part a degree is a useless piece of paper where CMMI is concerned. And good luck on finding any formal training. A quick Google search revealed pretty much nothing.

Oh well. Hopefully I can teach myself enough to get by, either that or bug our Lead Systems Engineer for the knowledge that I need.

Tuesday, January 16, 2007

A good reason to get data via Stored Procedures.

And that reason is, poorly designed databases.

I have a simple survey application. It's database has two tables (a models table and a results table) and the website itself has only two pages. The survey and the results page.

It worked great, until the market folks decided to change the models which are being surveyed under. When that happen, guess who was stuck having to make changes. Of course I can't just remove the existing models, because that means you wouldn't be able to see the results for those models.

So after I added in a logical deletion bit to the models table, I then had to go in and rebuild the web application to filter based on the deletion bit. It's not complicated, but it's a matter of finding the source code, making the changes, recompiling and then re-deploying. Time consuming and frustrating more than problematic. Of course if I had used Stored Procedures (or even VIEWS) to populate the various pages then I could have just made a few extra changes in the database and been done with it.

Oh well. I've probably not learned my lesson though.

Monday, January 15, 2007

Exporting Large Dataset into Excel

I like CodeProject. I like it a lot, and it is one of the sites I hit while searching for answers to questions.

Of course, on occasion, they get articles like this one. Basically, it's the author's idea on the ONLY way to take a large data table and place it into an Excel file in a fast manner.

His algorithm is basically a method, which accepts a data table and a filename. He then walks the data table and builds a tab-delimited string using the StringBuilder class. The next thing he does is pass that StringBuilder to another method to write the data out to a file.

My first question is what version of Excel is he writing to? To me, it seems that he would be easier to put the data table into a dataset and export that as XML which Excel can natively accept in the newer versions of Excel.

If he's writing to an older version, why not create a Excel file, and then use ADO.Net to open that file for Data Access, and merge the Excel file with the Data Table?

And then there's the overhead of running this in two separate methods, with what amounts to nested Try/Catch blocks. The author of the article is using the Try/Catch blocks to do error handling rather than checking for the possible issues which would generate an error.

So while there is nothing wrong with this implementation, it cannot be the 'fastest' way of doing things. Not with the overhead of the two methods and two Try/Catch blocks. Likewise, I would drop the use of constructs such as IsDBNull, and IIF. Rather do a null check with a construct such as "stringParameter is DBNull.Value."

Friday, January 12, 2007

Shipping API

I've recently had the horror of using UPS's and FEDEX's XML-based shipping API's. And while UPS's is infinitively better than FEDEX's, both still are rather lacking in functionality.

The major screwed-up functionality that is lacking in both systems is for their RateQuote request to actually verify if the shipper can ship to a specified location. Instead, they wait until the Shipper requests a shipping label, and then throws up there. Bad design.

Another move that I think UPS did dumb, is that the software I built is tied intimately to my username/password. If for whatever reason, I decide to change my password, i have to go back and make modifications to any client apps that use the software. They already require a valid UPS Account Identifier AND a developer key. There was no need to have the developer's UPS website username/password included in the XML messages. VERY bad design.

In the end, I've found the experience, a bit annoying, and hope it will be a decent while before I have to suffer at the hands of shipping API's again.

Thursday, January 11, 2007

UI Usability.

A freelance project I'm working on involves manipulating large datasets of random numbers tied to a specific date. There are about 6 or 7 different algorithms which the dataset gets passed through.

My first intention was a tabbed setting, displaying a tab for each algorithm and the processed data always there for the user to view. Additionally there was going to be an Overview tab which provided just the results for the algorithms.

Yet the more I work with this layout the more I realize that it sucks. It's clunky and not very user-friendly. After all, what the user is truly after is the result sets not the actual crunched data sets themselves. And while the user may want the ability to view the crunched numbers (and make simple modifications to the way the datasets are crunched) that is not the primary focus of the application.

In my zeal to display information to the user I forgot the fact that the user really doesn't care about it.

All they are concerned about is the results.

At least I caught onto this glaring mess of an UI before I delivered.

Wednesday, January 10, 2007

IE Developer Toolbar Beta 3

I love my Firefox extensions. They do everything from telling me if my HTML/CSS is valid & 508 compliant to giving me download times for a webpage in milliseconds. I have an array of them for Firefox to make my job of creating streamlined webpages fast and easy.

And that's one of the good things about IE7 is its ability to be given extensions like Firefox. Though the only one that I have bothered installing so far is the IE Developer Toolbar beta 3.

While not quite as well done as the tools in my Firefox arsenal, it's a welcome addition of similar capability in IE, with some nice features that are missing from my Firefox tools.

Tuesday, January 9, 2007

Database Design Document

This is probably the most sneaky of all the documents I'm writing for my current project at work. One would think it would be an easy build, just a simple document telling the design for the database tables.

One would think.

On the surface it is. The document is built in this manner:

  1. Scope
    1. Identification
    2. Database Overview
    3. Document Overview
  2. References
  3. Database-wide Design Decisions
  4. Detailed Design of the Database
    1. Conceptual Design
    2. Physical Design
    3. Data Elements
  5. Detailed Design of Database Access/Manipulation Software
  6. Requirements Traceability
  7. Notes
    1. Acronyms & Abbreviations
    2. Glossary and Definitions
It appears reasonably straightforward, but of course it's not. While I have long been able to design/draw out a database on a whiteboard for implementation - this is the first time in producing one of these documents.

I guess it's not really that hard, at least once the needs document was fully explained to me. I can only assume that my problem came in because I couldn't find any good examples of this document type anywhere.

Monday, January 8, 2007

Windows Home Server

Link to article about Windows Home Server.

I've long desired a simple, home server so that I can do things like store profiles there, which would allow me to share my email data between my disparate PC's. Well it looks like I might be getting my wish.

Or it LOOKED that way, until I was reading up data on this particular product and discovered that it will require the high-level Vista (Vista Ultimate) to get the full range of features out of it.

I am very wary of Vista, the EULA I have read appears very draconian - and even indicates so much that I cannot implement a technical solution on Vista. Very scary theory, but EULA's aren't the topic here.

Quite frankly, if I pay for a product (Windows Home Server) I expect to be able to access ALL of its features - regardless of if I'm on a Windows XP box or a Linux box.

And that also begs the question on will this work nice with other OS's? How will Mac's and linux boxes integrate with the Home Server? Will they be included in the back-up scheme or will it be since they're not Microsoft's product that they'll get left out in the proverbial cold?

No, I was excited about this, but the more I read, the more I think I might just get a linux distro if I ever get around to getting a home server.

UPDATE: The article at this link, tells us that Home Server will be computer agnostic (using SMB to transfer data across the pipe) but it also tells us that any streaming media it provides will be limited more to a Microsoft format. I still like Linux better for a Home Server solution.

Friday, January 5, 2007

.NET 3.0 Was Released

Microsoft's .NET 3.0 Framework was recently released to about a quarter of the fanfare of its older brother, .NET 2.0. Of course, that might be because from everything I've read, 3.0 is just a superset of 2.0 with a bunch of new features for Windows Vista©. Things everyone needs like:

  • Windows Communications Foundation (WCF)
  • Windows Presentation Foundation (WPF)
  • Windows Workflow Foundation (WF) - (A/N: We can't forget that WWF is so important to some wildlife fund)
  • Windows Cardspace
What these mind-boggling features are exactly for? Who knows. I'd heard some rumors about 3.0, but had not looked into it, because I assumed it was a big upgrade push.

To me a more important question is: If I upgrade to .NET 3.0, and the rest of my co-workers don't will I still be able to work on the same projects as them. Or will they all be forced to go to 3.0?

The documentation (as usual) isn't exactly clear on this, but it does firmly state that .NET 3.0 is not a generational release (i.e. it should actually be .NET 2.1) and that .NET 2.0 applications will run in it.

I nearly had a heart attack when I read that line. Microsoft made a version of their .NET Framework backwards compatible with previous versions! I was dumbfounded and amazed. Of course, there's still no compatibility between 1.0, 1.1. and 2.0.

So back to my important question. I guess I'll just have to upgrade and see if anyone complains. That's basically what happened at my job which made us figure out that .NET 1.0 and 1.1 were not compatible with one another.

Wednesday, January 3, 2007

Software Patents

I'm not entirely certain on where I stand concerning patents for software. Part of me likes the idea, but another, larger portion of me cannot quite see how an idea, an algorithm, can be patentable. Copyrighted? Yes, that makes sense to me, but patents - I had always thought they were for tangible objects.

This blog entry at the Free Software Magazine discusses it in more detail, especially with a potential court case involving the legitimacy of software patents due to appear before the Supreme Court soon. Maybe they will solve the problem for us all.

GotAPI :: Documentation Search

gotAPI Screenshot
gotAPI is a wonderful little tool which allows you to search for information concerning web programming. My only complaint, no .NET searches.

Tuesday, January 2, 2007

CSS Cheat Sheet

I love my Cheat Sheets!

Lack of .NET Blogging Software

I try to do everything on my personnel website in .NET. And I was considering moving this blog to my own website. Yet, I went searching for freeware Blogging software utilizing .NET and found very little.

Which I found a bit odd, since Microsoft was kind enough to release .NET 2.0 with the VSE editions for free.

Maybe that will be my next spare-time project after I complete my current one. Now to start thinking about which features I'll want.

Things I'll probably want it to do:

  • Code/Design separation
  • Comments
  • WYSIWYG Editing in both FF & IE
  • Comment Moderation
  • IP Banning
  • Maybe the ability to include it within other web applications?
Regardless if I do this BLOG thing or not, with my next side-project, I'll be going from Design to Maintenance here in my little blog.

Monday, January 1, 2007

Overcoming Coder's Block

While playing on the web earlier, I found this link which is a discussion on overcoming "Coder's Block."

I can understand how easy it is to be interrupted by things, and like some of the ideas which he advocates.

Blog Widget by LinkWithin