March 2003 - Posts
OK, I'm motivated to moving from an advanced user to a programmer. I know it'll take two years. That's my goal. Now, I have a few advantages over advanced users. I used to edit Visual Basic Programmer's Journal. I understand at a basic level how Windows works. I've actually read most of "Code Complete."
Why will I focus only on .NET? Well, I only want to write apps for Windows and I need to start somewhere. If other things get more important over the next two years, then we can switch, but I don't think they will.
Advice is already flowing in from around the globe. One guy said "don't learn on Visual Studio, use the .NET Framework SDK. The problem with starting with VS.NET is it hides a bunch of stuff, leads you down certain development patterns, that might not make sense. I think if you learn the SDK tools first, then move onto VS.NET, you'll better understand what it's doing for you." Simon says.
You'll enjoy the constant discovery. After a decade of doing this professionally (and a decade of doing it in amateur mode), I'm still learning. In fact, there's so much to learn now that you couldn't possibly learn it all. It's good, because it means everyone you meet will know things you don't, and you'll know things they don't. So in one sense, you'll know a TON after two years, but in another, there's a whole lot you won't know. The best you can hope for is to know what you don't know, so you know when it's time to learn new things.
I sort of agree with Simon. If you VS.NET and use the wizards, it should be an important thing for you to understand what they're doing to take the magic and mystery out of it. You never know when you're going to need to debug into code the system wrote for you, and it helps to know what it all does.
[The .NET Guy]
+1. I've always maintained that code generative facilities/wizards of tools should serve to make the programmer more efficient, not supplement their knowledge.
Plus, my inbox is empty. This book talks about why you shouldn't keep action items (or reference material) in your inbox, and how to get it to empty. A good read!
Guilty. I had taken steps to ameliorate this problem, but I'm still not where I'd like to be.
The trouble I have is that my email is used for action items, support requests, server notifications, ad nauseum. Clients/pointy-hairs generally expect a fairly quick response, so it requires me to check it constantly. I wrote an email handler using Craig's PopRouter in an attempt to handle much of this process autonomously. If they need a status update, they send me an email. If they need to add an action item, they send me an email. The requests are then emitted to an XML file which I annotate throughout the day. If they want a status update the handler simply emails them their request by applying an XSLT stylesheet to their request from the XML file.
I need more time to participate in mailing lists like DevelopMentor and ASPAdvice :-).
Abstraction and Detail (SOURCE:Daniel Berlinger's Archipelago)-Nice!
Put Abstractions in Code, Details in Metadata
The Pragmatic Programmer is one of my favorite books. It was so easy to read it seemed at times almost like a novel rather than a technical book.
There are some other great interviews on that site, including the one with Scott Meyers and Martin Fowler.
I always found it annoying that I couldn't view the XSLT output in Internet Explorer of my stylesheets when using the xml-stylesheet processing instruction. I had used CLI tools of my own, and others like Sablotron to view the output. Chris Sells linked to a tool by Microsoft for Internet Explorer that also helps with this.
Currently, when browsing XML files using Microsoft® Internet Explorer, the XML documents are not validated. In addition, when viewing the source of the document, only the XML is returned and there is no way to view the output from the XSL or XSLT style sheet that may have been used to transform that XML document.
The Internet Explorer tools for validating XML and viewing XSLT output will enable a shell option when viewing XML files to see the processed XSL output. In addition, you can also validate XML against an embedded schema when loading XML via the Internet Explorer MIME viewer. This can be a useful tool when you are trying to debug XSL formatting problems in Internet Explorer or are doing quick schema validation.
[Internet Explorer Tools for Validating XML and Viewing XSLT Output]
Yet another tool I didn't know existed that would have certainly made life easier.
I saw the following two tools referenced in the ASPAdvice ASP.NET Databases list and thought others might find them useful.
ASP Enterprise Manager is a web-based interface for Microsoft SQL Server and MSDE written using ASP.Net, VB.Net and C#.Net. This project was developed to allow many SQL Server and MSDE design and administration tasks to be performed from any computer with a web browser.
[ASP.NET Enterprise Manager]
The Web Data Administrator is a utility program implemented in ASP.NET that enables you to easily manage your SQL Server data wherever you are. Using its built-in features, you can do the following from Internet Explorer or your favorite Web browser:
- Create and edit databases in Microsoft SQL Server 2000 or Microsoft SQL Server 2000 Desktop Engine (MSDE)
- Perform ad-hoc queries against databases and save them to your file system
- Export and import database schema and data
[Web Data Administrator]
Performing running totals in XSL is a horrible pain. A google shows countless techniques, countless XSL extensions, and suggestions to ratify the standard itself.
In one of my Win Forms applications I employ the XML->XSLT->XHTML pattern for the reporting facilities. The reporting needs were, at least initially, a rather ancillary feature to the application. All was well until the customer requested verbose reporting from the log files created by the application, including running totals. A bit of googling and I was able to whip up a little incantation using XSL templates. The XML data represents the log file of the application and has a structure like the following:
<Item PartNumber="12345" Quantity="2" Price="10" />
<Item PartNumber="54321" Quantity="2" Price="26.65" />
Pretty simple really. The trouble comes when trying to aggregate the totals for each PurchaseOrder node by multiplying the quantity by the price. I tried many variations of the template incantations, but all of them were unacceptably slow with MSXML and Sablotron. I ended up employing a variation of Martin Fowler's Two-Step View pattern by creating an interim stylesheet that would aggregate the totals for me without using templates.
When applying the interim stylesheet I would simply for-each the Item nodes and multiply the quantity by the price. The resultant XML has a structure like the following:
<Item PartNumber="764677017241" Total="20"/>
<Item PartNumber="764677042885" Total="53.3"/>
I now have a total for each line item that I can use to total purchase orders using the standard XPath functions. This reduced the total display time of the report from literally minutes to just a few seconds. I'm certain someone with more XSL/XPath knowledge than myself could derive a "pure" XSL/XPath solution, but I could find nothing as computationally palatable as the above.
I am proud to say that I now work for Thoughtworks. Back of the net!!
Congratulations! Thoughtworks, along with DevelopMentor, Microsoft, and handful of others, is a company I'd enjoy working with simply because of the caliber of people working there.
Like many of you, I read a seemingly endless array of newsgroups, blogs, mailing lists, and websites each day. In doing so I often encounter an article that I'd really like to read but haven't the time. I've developed the habit of printing the article to a PDF file using Adobe Acrobat's (the full version, not just the reader) PDFWriter printer driver to read for later, otherwise I'd forget about it. I could certainly just save it using Internet Explorer, or even wget, but I like having the article as a single contained unit.
There are three steps to a free PDF printing utopia:
- Download and install Ghostscript, a Postscript and PDF interpreter.
- Download and install RedMon, a redirection port monitor.
- Follow the PDF Writer instructions in the RedMon Overview.
Technically that's more than three steps, but there's no sense in retyping the already lucid steps from the overview.
Hopefully someone finds this useful.
Thanks to Edgar Sánchez I have my next book to read. I enjoy reading books like these, and after PoEAA, I needed more to muse.
Pretty cool write up by Richard Caetano on bamboo.Prevalence.
Cool indeed. I had added Bamboo.Prevalence to my queue of tools to check out, but this read sparked more interest and put it near the top.
I see prevalence systems shining in many scenarios. The first that comes to mind is a web application that needs state. The perfect example is a shopping cart. It needs to track products, quantities, discounts, and a customer if it exists. Some scenarios may require more business related factors but for the most part that's a simple shopping cart system. Using the model listed above you could store all the shopping cart information in the prevalence system but when the customer checks out the data is committed to the backend database. On the front end production information is added to the shopping cart via the business layer which reads from the product database.
Microsoft's Site Server Commerce 3.0 (perhaps earlier/later versions as well, but I haven't used them) employed a similar model: using a collection of COM components one would (de)serialize the shopping cart using to a table in the database. You would simply deserialize the shopping cart, add/update/remove fields, and serialize the shopping cart again. When an order was placed it would again deserialize the shopping cart and pass it off to a chain of responsibility'esque handler that would run (in|out)side of MTS called a "pipeline." Using another collection of COM components one would have the header and detail information for the order inserted into the appropriate tables as individual records.
It certainly wasn't a domain model; you were always dealing with the same deserialized object with an arbitrary set of fields of type VARIANT. Although we ended up designing an entirely new architecture sans Site Server Commerce, we did derive some good ideas from its use.
More Posts Next page »