RSS 2.0
Journal / Blog
Monday, October 06, 2008
How To Display Your Amazon Reviews and Wish List (on your site) Using Amazon's Web Services
If you've ever landed on Amazon.com then you're probably familiar with their reviews and wish lists. Amazon provides access to these items (and many-many more) through their extensive web services - the Amazon web services can be complex and overwhelming when all you want is a review list and a single user specific wish list. For this site I wanted to pull in my reviews and wish list - displaying them alongside my blog. It's fair to note, that user reviews are available via an RSS feed (but this feed doesn't include all the details I wanted) and the wish list page still doesn't provide an RSS feed. So a custom Amazon web service request was in order.

Let me try to make this story short. I'm a geek that could ramble on about proxies, Jabba the Hutt, etc, so on, and so forth...

If you want to request your reviews and your wish list you need the following:
Once you have a wish list or review, you then need to:
Once you've collected all those bits, you need to:
  • Checkout and download the source code for the project and build the assembly or download the pre-compiled assembly.
  • Add the assembly reference to your project (remember, I'm assuming you're using .NET).
  • Make a call to the application which will generate XML files containing your respective reviews and wish list.
Setting up the call would look something like this:
IAmazonRequest amazonRequest = new AmazonRequest();
amazonRequest.AssociateTag = "adamkahtavaap-20";
amazonRequest.AWSAccessKeyId = "1MRFMGASE6CQKS2WTMR2";
amazonRequest.CustomerId = "A2JM0EQJELFL69";
amazonRequest.ListId = "3JU6ASKNUS7B8";

IFileParameters fileParameters = new FileParameters();
fileParameters.ProductFileNameAndPath = @"Products.xml";
fileParameters.ReviewFileNameAndPath = @"Reviews.xml";
fileParameters.ErrorFileNameAndPath = @"Errors.xml";

IAmazonApplication amazonApplication = new AmazonApplication(amazonRequest, fileParameters);

amazonApplication.Save();
   And Viola!
  • At this point you can do anything with your XML files (Products.xml, Reviews.xml, Errors.xml). I've consumed mine through an ASP.NET Repeater and displayed the contents within a web page (see it live here, view the code here).
If you'd like to provide some design guidance, fix a bug, or request a feature, then visit (or join) the project on Google Code. You might also be interested in the LINQ To Amazon source featured in the book LINQ in Action.

Happy coding!

Tuesday, September 30, 2008
The Three-step Sequence: Incorrect Assumptions and Experience
The preface of Object Oriented Software Construction literally introduced me to the three-step sequence:
the well-known three-step sequence of reactions that meets the introduction of a new methodological principle:
(1) "it's trivial";
(2) "it cannot work";
(3) "that's how I did it all along anyway".
(The order may vary.) - Bertrand Meyer
Naturally people consider themselves smart, which sometimes translates into knowing everything, and these three reactions are probably a manifestation of thinking you're overly enlightened. If we put ego aside - along with our natural predisposition for being lazy (trying to avoiding learning new things) - we often change our views altogether.

Looking back at my technological naivety: I was once wrongly convinced that client-side languages would never work and server-side languages / frameworks would dominate (until I really learned JavaScript), I had also mistakenly assumed that I was already doing TDD (until being introduced to the concept of Mocking), and I even thought that HTML table based design was the future (until I really learned CSS). With a little bit of knowledge and some experience I changed my views altogether.

Reflecting on these incorrect assumptions and decisions promotes growth - with every experience we grow. Which of my latest assumptions / reactions will change over time?

How have the three-step sequence of reactions effected you?

Saturday, September 20, 2008
Considerations For Choosing a JavaScript / AJAX Framework
I've noticed that a growing number of development teams are given the opportunity to choose their JavaScript / AJAX Frameworks. This choice is often thrown to the development team because the Architects are more concerned with the bigger picture, and the technical details are over the manager's head. Letting the development team decide on the JavaScript / AJAX framework produces some great benefits: it gels the team, fosters project buy-in, and creates project excitement.

Now, developers can be pretty skeptical, and getting them to agree has been likened to herding cats, but a couple core considerations / values seem to surface when the decision is being made.

Considerations for choosing a JavaScript / AJAX Framework:
  • Transparency - Who are the framework's development team and why should we trust them? Do these developers blog? Attend conferences? Are they featured on podcasts / videos? Is there a high or low turnover within the team? What are their passions? Is this just a job, do they like what they're doing, are they a cog on a wheel? Are they experts in their field?
  • Competency - Based on the information gathered in the consideration above (transparency), how competent do we feel the development team is?
  • Community Support - How well is the framework supported on forums and blogs? If something were to go wrong can we gain access to the framework's development team? Are there widespread experts using this framework readily available?
  • Reputation - How popular is the framework in the industry? Who uses it? Are there any white papers, success stories, case studies available?
One of the easiest ways for a developer to choose a framework is by looking at the developers that built it (and talking with those that are using it). As developers our day job will be stepping into someone else's code for the duration of the project, working with a framework created by competent developers makes our jobs easy. Frameworks without transparency don't allow us to gauge the competency of the developers or the framework.

Transparency is essential for JavaScript / AJAX Framework teams, JavaScript itself is open and transparent (not compiled yet), it follows that JavaScript / AJAX Framework along with their teams should also be transparent. When the decision for choosing a JavaScript / AJAX Framework is placed in the hands of developers the frameworks that don't meet the above criteria sink to the bottom of the list.
"The only way to succeed now is to be completely transparent, everything is exposed, everything you do" - Gary Vaynerchuk

Saturday, September 13, 2008
Everyone Is Special, I Wish I Was Special
I had x-ray vision as a child - that's right, I could see through walls, clothes, and presents. I was convinced I had super eyesight and my friends thought they had similar enhanced sensory powers - we thought we were super heroes.  In high school I was a wizard (one of a handful of computer enthusiasts).  University, College, and my first job were similar experiences - I felt special because most of my colleagues were fresh graduates void of the lifelong passion for computers.

Through all these experiences I was convinced that I was unique. Then I started becoming part of the bigger conversation. While engaging online I began learning that there were thousands of people like me: weened on computers, interested in good software design, and passionate about what they do.

Imar Spanjaars' signature always reminded me of this lesson:
Everyone is unique, except for me.
Yegge's recent post brought up this thought again:
people like to think they're unique and special, and that their tastes aren't necessarily widely shared by others. This is what drives fashion: the need to differentiate yourself from "the crowd", by identifying with some smaller, cooler crowd. ... The reality is that for any given dimension of your personality, there are oodles of people just like you. - Business Requirements are Bull****
David Heinemeier Hansson reiterates this:
it's somewhat counter intuitive ... for a lot of developers ...  it's counter intuitive for humans in general to think they're not that special, but when they do think they're special ... they kind of get these assumptions that they need very unique and special tools that will only work for them ... We as programmers aren't really unique or that special. - David Heinemeier Hansson, 37signals: "Friday Keynote"
Remember you're not really special. :)

Saturday, September 06, 2008
Noisy Work Environments are Counterproductive, But Compensating With Music Negatively Effects Creativity
Working in a noisy work environment and listening to music is counterproductive for intellectual demanding work. For example: we don't write exams in busy cafeterias, or write resumes through loud movies, and Libraries are quiet for a reason. Noise; whether it be music or background noise does negatively affect your ability to get things done.

DeMarco and Lister (in Peopleware) present the results of an interesting experiment:
During the 1960s, researchers at Cornell University conducted a series of tests on the effects of working with music. ... They put half of each group together in a silent room, and the other half of each group in a different room equipped with earphones and a musical selection.  Participants in both rooms were ... given a programming problem ...
They discovered that the majority of the people working in the silent room could pick out a pattern in the programming problem and could come to a quick clever creative solution. Whereas the people working with music playing were able to solve the problem, but didn't make the creative leap.

They go on to explain:
Many of the everyday tasks performed by professional workers are done in the serial processing center of the left brain. Music will not interfere particularly with this work, since it's in the brain's holistic right side that digests music. But not all of the work is centered in the left brain. There is that occasional breakthrough that makes you say "Ahah!" and steers you toward an ingenious bypass that may save months or years of work. This creative leap involves right-brain function. If the right brain is busy listening [to music], the opportunity for a creative leap is lost.
In their book they also make the point that open space work environments and cubical farms are not conducive to knowledge work, and that all employees (or at least groups of employees) should have the ability to close their door. Great companies do follow these guidelines, but many of the smaller companies or transitional companies (at least the ones I've worked in) tend to air on the dilbertesque side (the noisy cubical farms / open concept).

To compensate for the noise in the work place I've resorted to wearing noise canceling earphones without music. These earphones double as a metaphoric door - it indicates to those around me that I'm hard at work and not to be disturbed. Noise canceling earphones let me create my own personal audio walls, but eventually I become the weird guy with the earphones that aren't plugged into anything guy.

As a lowly developers it's hard to make the case to management for a quieter work environment (let alone an office with a door), but we can keep our eyes out for companies that share these values, start our own company, or take opportunities that let us work from home. In the meantime thank goodness for ear plugs (err.. I mean earphones).

Saturday, August 30, 2008
More on Naming Conventions: My Naming Heuristics
Following a hard rule for naming conventions in software development is difficult; it's always a compromise between how things were named in the past and where things are going in the future. Other dependencies like the size of the project, the number of developers, and the environment you’re developing in play important factors. In short, there’s never a great naming rule, but here’s my general (heuristic) approach to naming.
My heuristic approach to naming conventions:
New Development / Greenfield Work:
  • Follow the conventions of the language, or the standards used within the larger community, and pay attention to the API. For example: If you’re programming in .NET follow the naming conventions outlined in MSDN, in JavaScript look at the DOM API, in CSS look at the definitions.
  • If a formal naming convention exists for the organization and these conventions makes sense (they aren’t too far off the language APIs) then follow them. If it feels like the naming conventions were created in the dark ages by a very-very senior COBOL Developer then start asking questions.
Maintenance / Brownfield Work:
  • Follow the conventions of the existing code if you’re modifying an existing module.
  • If you’re creating new modules then consider following the conventions of the language and API.

This post was inspired by a podcast by Donald Belcham and Kyle Baley on Brownfield Applications.

Friday, August 29, 2008
Cross Language Naming Conventions: Avoiding Verbosity In The Presentation Layer
Most languages and technologies used in web applications come with their own unique naming conventions - which is unfortunate, but necessary, because diversity is important. Languages like JavaScript and PHP use camelCase, CSS uses-hyphenated-delimiters, and ASP.NET / Java / and the like adhere to the conventions used in their respective libraries and frameworks. Managing the different naming conventions in a web application can be difficult, but with discipline, embracing each language’s conventions can provide some great benefits.

A common mistake I've made in the past, was trying to make all languages adhere to a single convention. As a budding PHP / ASP developer I took the-single-convention-for-all-languages approach. In retrospect, I used this approach because I didn’t completely understand the language I was using, and in order to compensate for this lack of knowledge, I’d try to meld the languages into the mental model I understood best. This was a mistake.

Today, I find that working with the conventions of the language facilitates re-use (experts in the language understand what I’m doing), promotes portability (modules can be used across projects regardless of server-side technologies), encourages global collaboration (open source modules and plug-ins can be easily consumed and contributed to), and helps to a nurture a more maintainable application (developers from other language domains can easily maintain the application with a relatively small learning curve). Like a carpenter working with fine material, I embrace working with the grain of each language. It’s also fair to mention that breaking free from the monocultured (one-size-fits-all) approach to naming conventions provides a broader perspective, and also makes your development skills more universal - it might even open the door to different development domains in the future.

Then there’s the discussion on name length, verbosity, and using meaningful names. Steve McConnell suggests that the optimum name size for a variable or function is between 8 and 20 characters (Chapter 11, Code Complete), but with tools like ReSharper (for renaming / refactoring etc…) I find myself using names well over 30 characters. So names like GetApproveeTotalFromNamedBasket are a common occurrence in my code. However, like most things, verbosity does need balance (everything in moderation right?). In the business layer, descriptive names are a godsend - they jog my memory as I rediscover what the module I wrote last month was supposed to do. But... in the presentation layer languages (like JavaScript, CSS,  ASP.NET, or XHTML) you may want to reconsider using long descriptive names. Since verbose, long running descriptive names in the presentation layer are passed over the network and can degrade performance. Often times these verbose names are combined together - throw in ASP.NET name mangeling, start hooking in verbose CSS definitions, and then start inserting JavaScript events. All this compounds quickly and result in large page payloads filled with elements like the following:

    <div id="ctl00_ContentPlaceHolderForAllTheBestImprotantContent_
             PanelForTheBestReviews">
            <a onclick="LinkButtonClick_ThankYouForTakingTheTimeToReadThis();"
              id="ctl00_ContentPlaceHolderForAllTheBestImprotantContent_
                  RepeaterForAllMyFavoriteBookReiews_ctl00_
                  LinkButtonMarkReviewAsFavorite" 
              class="LinkFormatingCssClass SelectedLinkFormatingCssClass" 
              href="javascript:__doPostBack(
                   ctl00$ContentPlaceHolderForAllTheBestImprotantContent$
                   RepeaterForAllMyFavoriteBookReiews$ctl00$LinkButtonMarkReviewAsFavorite'
                    ,'')">Mark As Favorite
            </a>
Note: That mess of code above would fire a JavaScript event then an ASP.NET event. It's the result of placing an ASP.NET LinkButton, inside a Repeater, inside a Panel, inside a Masterpage, and adding a JavaScript event along with some CSS. We can see that using long names in the presentation layers results in a mess of text. It's also fair to mention that the ASP.NET MVC Framework lets developers write cleaner presentation code.
Sure, everyone cites premature optimization as the root of all evil, and we do live in a world of gzip file compression and JavaScript minifiers. But... keeping names short in CSS, ASP.NET, and XHTML isn’t hard as long as you’re mindful of the final goal. Smaller names in the presentation layer will reduce the amount of data transferred over the network which increase the performance of the application.

Joseph Smarr of Plaxo.com once said:
"Web applications are only slow if you let them get slow" – Douglas Crockford, Alex Russell and Joseph Smarr: On the Past, Present and Future of JavaScript [30:00]
My preference (project requirements warranting) is to keep things short and concise in the presentation languages while using longer descriptive names outside the presentation languages. What’s your preference?

Sunday, July 27, 2008
The World is Messy and Complex: Why Should Software Be Different?
Politics, religion, famine, pollution, and relationships; these are parts of our world. I’m messy, my hair falls out, and yours might too. The world is messy and complex, so what would make software different?

During my first real job after graduating College / University, I was horrified by the state of my project's source code. The code was spaghetti; it looked like someone crammed a stack of poorly written technical manuals through a blender that funneled into our source code. Regions (#region) were running willy-nilly, negated values were passing conditions; delegates were calling properties which were in turn calling delegates which were creating infinite loops… SQL rows were being sent across TCP/IP, centralized build servers were taboo, unit testing and TDD was unheard of. Each of the members of our team were build / release masters, developers, and ninjas.  Our job was to maintain this juggernaut and affirm the stakeholders that everything was OK.

But were things really that bad? Remember, I was a recent grad; I was used to creating pristine frameworks (like elevator simulators) crammed with design patterns and fascinating abstract data types. In a way, I was an architecture astronaut being rudely ejected into a toxic tailings pond. The courses I had taken in school, the projects I completed, the languages I used were a great start, but not a valid representation of the real world. In the academic world things were clean; out here (like the rest of the planet) everything is a mess.

I started coming to the realization that, producing software is more about managing people than science, technology, or math. Mistakes and human flaws are the norm, software entropy is inevitable, and technical decisions are often based on nontechnical considerations: time constraints, politics, religion, and relationships rather than sound research and science.

There is hope; realize that you can’t control everything, that the one-size-fits-all solution and silver bullets are myths. Then focus on what and how you can change yourself, your software, and your situation. Developing good software (like living a good life) is about making informed decisions, choosing opportunities that encourage growth, reducing complexity, and having a long term vision or goal. Today I still think software is messy, and I'm still horrified by most source code, but abstractions, n-tiered design and testing sufficiently help me manage the chaos.

Science often exists in a pristine clean vacuum, whereas software deals primarily with people. Software is not a science, and humans (like software) are inherently messy and complex.
"The tar pit of software engineering will continue to be sticky for a long time to come." – Fred Brooks, The Mythical Man-Month
What experiences have you had when moving from the world of academia or research into the real world?

Monday, June 23, 2008
Joining The Dual Monitor Club: Getting a New Computer: The Ultimate Developer Rig

In this picture: My Charles Babbage mug, books: Domain Driven Design, the Ruby Programming Language, the Definitive Guide to JavaScript, my Evoluent VerticalMouse, and lots of Red Rain empties.
One of my biggest pet peeves is trying to efficiently complete development work on a slow machine. In my mind, trying to work quickly on a slow computer is like asking a marathon runner to wear snowshoes then demanding they WIN the marathon. What ensues, is painful for the runner, painful for all who watch, and reaching the end goal feels impossible - bottom line good equipment matters. However, many client's overlook the relationship between getting stuff done and a slow machine, or they don't care, or they can't do anything about it.

Maybe they find it thrilling (in some sick way) to watch your soul fizzle away as you spend 300 minutes a day compiling your application (or running your tests). :)


In great organizations slow machines aren't an issue. According to the The Programmer's Bill of Rights: "Every programmer shall have a fast PC", and from the Joel Test: "[Organizations should] use the best tools money can buy?" But reality is often a different beast, and in my experience you have to make the changes you want (or "be the change you want to see..." - Gandhi).

I'm sure in Silicon Valley, good computers would be mandatory for most organization, but I live in Canada - we suffer through black flies, mosquitoes, 8 months of winter, and organizations with poor resources. :) Did you know that Canada's population is roughly equivalent to the population of the state of California alone!?

Anyhow, I started working from home full-time this year - up to this point most of my work has been done onsite using whatever machine the client provided (some with outdated hardware). My home desktop was a six year old PC that would make Frankenstein look sexy - it was a collection of old and new parts. Since, I do most of my work in Virtual Machines (I typically have three VMs running) performance is absolutely critical. After spending a month working on my dinosaur of a machine, it was clear I needed a new computer.

Leave me a comment requesting the details, and I'll happily bore you with the technical specs of my old machine including a story of where I acquired each component. :)


I based my specs on Jeff Atwood's and Scott Hanselman's specs for the Ultimate Developer Rig. The machine turned out to be economical, the prices have come down significantly since the initial post was published, and to top it all off, I was able to chop shop my old machine and sell every single part through eBay and Kijiji - for a surprisingly decent price too (who would have thought a 6 year old Sound blaster Audigy would sell for $50?).

Contrasting my setups:

ThenNow
ProcessorsTwo 32bit AMD MP 1.2GHz  Quad Core 64bit 2.4GHz
RAM3.5 GB8 GB
Monitor(s)A single 17"Two 22" Samsung SyncMaster 226BWs
Personal Pain Points  Excruciatingly painfulOccasionally painful (only Vista induced)
Working on my new machine is enjoyable. I find myself more productive without being distracted by the frustration of a slow machine, and having dual monitors also contributes to my productivity (Does More Than One Monitor Improve Productivity?). My favourite parts of the new setup are the monitors, the Ergotron stand, the speed, and the Case. You really get what you pay for with LCD monitors, the SyncMasters are easy on the eyes when compared to my old economic Acer, and the case is dead silent.

In the future, if I'm provided with a substandard PC, you can expect to see me hauling my new machine into the office. :)

Take a look at my old desktop setup in my older post: Something About the Cobbler's Children Having No Shoes

Have you ever had to use an outdated machine as a developer? How does working on a slow machine effect your work? What are your thoughts on taking matters into your own hand (like purchasing your own computer to replace the slow one at work)? Have you ever installed additional resources in the computer you use at work?

Sunday, June 15, 2008
Living The High-tech Illusion: Software Development is Not Rocket Surgery
#CalgaryBarCamp was swell. It was refreshing to meet such a diverse group of like minded people that all essentially do the same thing (create software), but do it in different ways using different tools, platforms, and languages. The ad-hoc discussions both in the bar and between sessions were my highlight. A reoccurring theme in our conversations was that technology, tools, and platforms don't matter that much. What really matters is: people, communication, ideas, taking risks, and motivation.

The topic of our discussions reminded me of something David Heinemeier Hansson said when talking about software development:
"You don't need to be a f***ing genius to make any of this stuff work, it's not rocket surgery!" - David Heinemeier Hansson at Startup School 08
DeMarco and Lister also echoed this outlook back in the 80's, and publicized: the High-Tech Illusion:
the High-Tech Illusion: [is] the widely held conviction among people who deal with any aspect of new technology ... that they are in ... high-tech business. [These people] are indulging in this illusion whenever they find themselves explaining at a ... party, say, that that they are "in computers" ... The implication is that they are part of the high-tech world. [These people] usually aren't. The researchers who made the fundamental breakthroughs in those areas are in the high-tech business. The rest of us are appliers of their work. - Peopleware : Productive Projects and Teams
If we were in the High-Tech business, then we'd be the bottom feeders (the parasites, the grunts), because our daily activities revolve around consuming other peoples research and work (programming languages, platforms, frameworks and the like). We are consumers, we're not on the cutting edge nor are we in the high-tech world.

Perhaps building software could be much like outfitting yourself for a day in the snow. You head off to the local shopping mall, you acquire the functional items to keep yourself warm, but brands and store choice don't really matter. Whether we're buying winter boots or choosing a programming language, technology doesn't really matter. There are an infinite number of ways to solve any problem, as well as an infinite number of technical permutations to form a solution. If we can solve the problem within the constraints of our problem domain then we've succeeded.

The High-Tech Illusion often permeates my world - I work as a Web Developer in the Microsoft realm. I continually see the High-Tech Illusion manifests itself in these situations:
  • Colleagues talking in vague opaque high-level metaphors that patronizingly shield you from the inter working of what they assume is beyond your comprehension
  • Fixations on specific tools, hardware, platforms, and methodologies while the problem that needs to be solved is diluted and any combination of these items could solve the problem
  • Colleagues that assume superiority and can't acknowledge that knowledge is acquired through research and a continual efforts to improve
Pretentiousness in the software realm (in teams, organization, and so on) is usually the byproduct of someone that's living the High-Tech Illusion.

I've been guilty of subscribing to the High-Tech Illusion. How does the High-Tech Illusion permeate your world? How can we get back to reality?

Saturday, June 14, 2008
How I Got Started In Software Development: Confessions of a Script Kiddie


The classic geek haircut. I still sport this cut today. :)

How old were you when you started programming?

Somewhere around the age of 8 or earlier, computers were always just there - they'd been in my life since I can begin to remember.

How did you get started in programming? What was your first language?

My dad went to College for robotics when I was around 8 years old. His robotics program involved lots of programming and together we worked through a couple BASIC programming books. I continued to mess around with BASIC and wrote scripts so I could get at my favourite games. Later I was frequenting BBSs (The Fisherman's Scroll), and surfing the internet through lynx (a text based browser). I eventually became a Script kiddie - being a Script kiddie was what really turned me on to programming. My friends and I would write IRC war scripts, play MUDs, and try to figure out how Trumpet Winsock, networks, and HTML worked - those were the days of Netscape 1 (the version with the big glowing 'N'). Later we tried writing our own version of NetBus with the help of C / C++ programmers on IRC - the fragments of the C language these programmers exposed to me were magical, and sparked an genuine interest in computer programming. In addition to all this my dad kept a constant supply of old and new computer parts funneling into our house, my brothers and I would build computers from the parts - today my closest brother is a Linux fanatic, evidently all this sparked his interest too.

Programming has always been a part of my life, BASIC was my first language.

What was the first real program you wrote?

I followed a couple game tutorials from my BASIC books, but my first real program would have been Pacman programmed in Turing - in my final year of high school I enrolled in a computer course, where the instructor let us write any program we wanted for half a school year I chose to write a game.

What languages have you used since you started programming?

I've spent most my time in C, C++, C#, JavaScript, SQL, and the mark-up languages. I primarily program for the web or at least for the network, but have used many other languages like COBOL and so on...

While using multiple languages are great, I really believe that we you should completely understand the fundamentals of at least two languages (like say a static language and a dynamic language), because:
"Once a programmer realizes that programming principles transcend the syntax of any specific language, the doors swing open to knowledge that truly makes a difference in quality and productivity." - Steve McConnell, Code Complete 2nd Edition.
What was your first professional programming gig?

I would have been 18. It was my first year of College, I needed a part-time job in order to pay rent, I initially worked on an assembly line, but would occasionally help the office workers troubleshoot their IT issues. I soon found myself working as the company's network admin / computer gopher. I went on to develop their cataloging system and a website. At the time I was going to school for Electronic Engineering, but decided to switch to a Computer specific program. Previous to this, I had freelanced a couple websites for local businesses while in high school.

If you knew then what you know now, would you have started programming?

Absolutely! The industry continues to instill a sense of wonder in me. I can't imagine doing anything else.

If there is one thing you learned along the way that you would tell new developers, what would it be?
  • Read! You'd be surprised how little progress has been made in the software industry over the past 30 years. By reading we can learn from the mistakes others have made.
  • Don't be intimidated by code or frameworks handed down by large organizations, their code isn't any different than yours.
  • Hard work always pays off, or as Thomas Edison said: "Success is 10 percent inspiration and 90 percent perspiration."
What's the most fun you've ever had ... programming?

Collaborative programming is always fun whether it be paired programming or working together on a project. It's hard to pinpoint the most fun I've "ever" had, because it's all fun. :)

This post was in response to Michael Eaton's initial post on: How did you get started in software development?

Now it's your turn to answer: How did you get started in software development?

Sunday, May 04, 2008
Necessary Skepticism: Skepticism is not Pessimism
In the software realm our opinions are often polarized (perceived in extremes) with no middle ground - you're a pragmatist or an idealist, you're a Windows or *nix person, "you're either with us or against us". This train of thought is referred to as Black-and-White Thinking, or All or Nothing Thinking. This thought process continually manifests itself in the software realm for good reason - we're under pressure to produce, but have limited time, and can't exhaust all permutations or combinations of technological possibilities. So we develop coping skills, and make quick decisions (even if they are wrong). As IT professional we're constantly in The Fight or Flight mentality:
"All or Nothing thinking ... is part of the most primitive of human responses: The Fight or Flight Response. When faced with a life-threatening situation, we must make a snap decision and act on it. There is no time for 'maybe this', or 'maybe that'." -All or Nothing Thinking
Some Polarized Views

Views or labels that seem to be commonly applied to people, organizations, and people:
  • A Pessimist or an Optimist
  • A Cynic or an Proponent
  • A Skeptic or a Dreamer
  • A Pragmatist or an Idealist
  • A Tigger or an Eeyore
These labels are generally mutually exclusive - you're usually labeled a Pessimist or an Optimist, but not both. Then there's this general acceptance that Skeptics are Pessimists and these are Curmudgeons, and Eeyores (but everything in moderation). Switching between views is healthy and advisable (be a Skeptic and an Optimist), because inherently "[a]ll programmers are optimists" (1) and too much Enthusiasm, and Optimism often results in Hype, and "Hype is the plague on the house of software" (2).

Why not embrace all these views? Take on the role of a Skeptical Dreamer, then an Optimistic Cynic, or a Pragmatic Idealist. Let's throw off these polarized thinking models and fill in the gray areas. As Fred Brooks once said: "Skepticism is not Pessimism", and critical thinking is also not Skepticism.

(1) Fred Brooks, The Mythical Man-Month (2) Robert Glass, Facts and Fallacies of Software Engineering

Monday, April 21, 2008
The ASP.NET AJAX Framework is for DUMMIES!
The ASP.NET AJAX Framework is an embarrassing server-side centric approach to DHTML / AJAX web development. While most programming languages and frameworks come with both good and bad parts, the ASP.NET AJAX Framework is probably an example of an overall bad part of ASP.NET - on the contrast the ASP.NET MVC Framework looks to be a good part.

What's wrong with the ASP.NET AJAX Framework?
1 .NET Developers are DUMMIES!
The ASP.NET AJAX Framework appears to have been designed under the assumption that .NET developers are dummies and can't learn or don't want to learn JavaScript. That .NET Developers would rather hobble along with their familiar languages, then to learn something new. I understand that the ASP.NET community's only real problem is education, so let's ask: What is wrong with the ASP.NET Community? Then educate ourselves rather than becoming the .NET Developer statuesque. It's patronizing to use a framework that assumes learning a new language is beyond our capabilities. Many of these other programming languages also happen to be more expressive than the statically typed .NET languages.

2. The "don't write a line of JavaScript" abstraction leaks like a sieve
The Framework is intended to shelter .NET Developers from the big bad JavaScript language. Which, like driving a car across North America without knowing how to pump gas, stops you dead. Either you depend on someone to pump your gas - depend on something like the ASP.NET AJAX Control Toolkit and the many authors to write your JavaScript - or you stop moving. As Web Developers, sooner or later learning how to pump your own JavaScript becomes a mandatory skill.

3. Client-side programming from the Server-side is a absurd
The AJAX Framework does back flips to translate server-side code into JavaScript, and then requires that you write JavaScript anyway. Save yourself the pain, learn JavaScript. One day The Law of Leaky Abstractions comes into play, the gas station attendant fills your gas tank with diesel - your AJAX Control Toolkit blows up (requires debugging) so you have to learn JavaScript anyways.

4. Bloated, poor performance, bad user and developer experience
The AJAX Framework extends many of the native JavaScript objects as it attempts to turn JavaScript into a staticly typed programming language, and tries to hook into the ASP.NET life cycle, but all these features are unneeded as they are ALL already achievable through the native JavaScript language - if it walks like a duck and quacks like a duck, then... err... could someone remind me why we need typed languages in a web browser? Anyhow; all these object extensions, enhancements, and upgrades, contribute to more scripts that need to be downloaded and increases the number of scripts running in your browser. Then to make matters worse there's partial-page rendering and Update Panels which do full page post backs under the guise of AJAX -bad-bad! Client-side scripting is supposed to enhance the user experience not make it worse. Other AJAX Frameworks are built with performance as their number one goal, but in the ASP.NET AJAX Framework. Adding more widgets to JavaScript seemed to be the first priority, and performance an after thought.

5. Working against the grain is a waste of time
The AJAX Framework works against the grain, it would be nice if it embraced the JavaScript language. Very few of the concepts and metaphors used in the ASP.NET AJAX Framework transcend AJAX techniques or frameworks - your time is probably better spent learning how JavaScript works or how the other AJAX frameworks work.

6. Disconnected from the ASP.NET MVC Framework
The ASP.NET MVC Framework throws the ASP.NET life cycle away leaving more dead weight ASP.NET AJAX Framework script and rendering many of the AJAX Framework techniques moot.

7. The ASP.NET AJAX Framework almost over looks the 'J' in AJAX - 'J' stands for JavaScript, and that is GOOD
JavaScript is the glue of the web, even the ASP.NET Framework depends heavily on JavaScript, it is not something to shy away from.

8. Aside from local intranet sites, no one really uses the ASP.NET AJAX Framework.
The AJAX Framework isn't widely used. The ASP.NET AJAX site showcases 25 sites using ASP.NET AJAX. None of these applications appear to be high-traffic or moderately high-traffic applications. On the other hand, the YUI site showcases 89 sites, out of these sites, 6 sites (flickr, Slashdot, Linkedin, Paypal, O'Reilly, My Opera) could be considered high-traffic. Other AJAX libraries like jQuery, and Dojo compare similarly. Your time might be better spent learning one of the other AJAX frameworks.
If we (.NET Developers) are going to claim we know AJAX, then let's focus on the core of AJAX (JavaScript) and stop obscuring it in poor frameworks. Frankly the ASP.NET AJAX Framework is embarrassing, the web development community is laughing at the ASP.NET AJAX Framework and the Developers touting it.

Wednesday, April 16, 2008
How To Choose a Good Technical Book
The quality of technical books have wide variations between publishers and authors. While choosing a book based on the author is reliable, depending on a publisher or brand name is not reliable, and choosing a book based on advertisements is even less reliable. It makes sense to choose your books wisely since most technical books live a short life (the duration of a single project), cost money, and require precious time to be read.

When choosing a book I follow this heuristic approach:
  • Ask experts in the field (friends, forums, newsgroups) for recommendations
  • Ask these experts to differentiate between the high level books and the books that take a technical deep dive.
  • Filter out (discard) the high level recommendations.
  • Filter out (discard) all recommendations that contain the following keywords in their title:
    • Cookbook
    • Problem - Design - Solution
    • Hacks
    • Tips
    • Learn X in 24 hours
  • Look for recognizable authors.
  • Cross reference these recommendations through Amazon's Reviews:
    • Books with over 100 excellent ratings on Amazon are instant winners - the Amazon community is rarely misleading.
    • Books that haven't received more than 50 ratings should be considered with skepticism - visit a local book store and skim through the text in question before making the purchase.

Wednesday, April 09, 2008
The ASP.NET AJAX Learning Curve
The ASP.NET AJAX framework comes with a lot of baggage err... I mean... a huge learning curve when compared to other AJAX Frameworks like JQuery, YUI, Dojo, Prototype / Scriptaculous.

Here's a running list of the technologies, and concepts you'll encounter when digging into ASP.NET AJAX:
  • ASP.NET
    • The Page Life Cycle
    • The Control Life Cycle
    • Web Controls
    • User Controls
    • View State
    • Session State
    • Events
  • .NET / Classical Language
    • Interfaces
    • Inheritance
    • Delegates
    • Multicast Delegates
    • Assemblies
    • Properties (Get / Set)
    • Constructors
In addition to these, you also have the technologies universal to all JavaScript libraries:
  • JavaScript:
    • Closures
    • Object Literals
    • JSON
    • Events
    • DOM Manipulation
    • Prototypical Inheritance
    • Constructors
    • XMLHttpRequest
  • Cascading Style Sheets (CSS):
  • Web Services
The ASP.NET AJAX Framework is more complex than other AJAX frameworks, I'm continually lost in it's ambiguity as it attempts to skirt around the JavaScript language - I think this learning curve (and all it's confusion) is precisely why Silverlight has so much potential.

I'm still diving into the low-level details, but my first impressions of the ASP.NET AJAX Framework are:
  • Obscure, ambiguous, no clear vision - it offers multiple (resource intensive) ways to avoid writing JavaScript, but then requires that you write JavaScript anyways
  • Too server centric
  • Too heavy weight (I'm not appreciating how they're trying to turning JavaScript into a Java, C#, .NET clone, the overhead within the browser for these conversions seems like a huge performance bottleneck)
  • Has the potential for poor performance
Most of the other AJAX libraries have been written with performance, browser responsiveness, and User Experience as their number one priorities - I'm still not sure about ASP.NET AJAX.

How many ways can we try to avoid writing JavaScript? If an AJAX library doesn't enhance the User Experience then why use it? Regardless, I'm still digging deeper.