Use tasks you have to do around the house to improve your development skills

A somewhat unorthodox and non-traditional suggestion I admit, but as Brad Meltzer often asks: “This may seem unlikely, but go with me on this…”

How many times have you had to build that piece of furniture from Ikea, install window blinds, etc? In each case, you are solving a problem. You have to analyze and organize. It’s really not that different from development. It’s a project like anything else. It has a beginning, middle, end. Like development, if you misinterpret the requirements, you have to go back a few steps. That next thing you were going to do has to get pushed to a later time.

This past weekend, I had to install some Levolor Blinds into our spare bedroom. I also happened to be listening to the  This Developer’s Life Podcast. I was listening to Episode 1.0.6: Abstraction. A great episode (as they all are – and like really good things – you have to go through them a few times because you are likely to pick up something new and useful that you missed before.) The part that really struck me was the interview with Ward Cunningham. It was then that I decided to use my blind installation task as an analog of sorts for development. The interview with Ward was the inspiration. The end game is to then reverse the flow – to perhaps use development as an analog for the blind installation task – assuming of course the blind installation task is successful!

It begins with us…..

The one thing that really struck me about Ward was his motivation – that he builds things form himself. The same was true with John Ressig and Dan Bricklin. Then it struck me that this is really a craftsmanship issue. True craftsmen always reserve the best stuff for themselves. Indeed, much of that good stuff accrues to the benefit the things that are released for public consumption. Craftsmen work product also shares another characteristic – what they produce is pleasing to look at and use by the harshest critic of them all – the craftsmen themselves.

Turning back to my window blind example, I wanted to ensure they would function properly, be pleasing to look at – much like what we strive for in our software.  For a satisfactory end result however, there has to be some measure of planning. Since I had two blinds to install, I wanted to make sure the second one had the benefit of the first – as to process and as to a completed product. My benchmarks were simple:

Did I thoroughly understand the requirements?

Did I have a plan?

Was I organized?

As to tooling, did I have what I needed and were those tools readily available?

Was there improvement in the process?

The great thing about tangible projects – particularly those you have to do around the house or wherever you may be, those projects provide immediate feedback. You know whether they look right. You know immediately whether something was hacked together. You know whether the finished product is pleasing to look at.  You also know what is lurking beneath the surface. I’m in the middle of the Steve Jobs bio by Walter Isaacson. Jobs was obsessive about quality (perhaps to an unhealthy extreme!!). His [Jobs] obsession was centered around the fact that quality of thing not seen was at least as important as what is seen.   That consideration absolutely applies to the software world. When we see properly working software, we can take pride that the things people don’t see are well constructed. With home projects – we know that something is not going to break or fall apart because the things people don’t see (like screws into the wall being well anchored) are well done.

Food for thought as you contemplate ways to continuously improve.

Posted in Continuous Improvement, Software Engineering | Leave a comment

WebAPI Developer Preview 6: Self Hosted Mode Example

In case you missed it, the WebAPI Developer Preview is up to version 6. The CodePlex site provides all of the information you need to get started. To illustrate how to build a simple WebAPI, this example uses ASP.NET MVC as the host. While the example makes reference to the fact that you can create this example in self-hosted mode (not using ASP.NET/ASP.NET MVC) – there is no code that illustrates how to do this.

To get started, create a Console Application and follow the steps in the ASP.NET MVC example to use Nuget to download the WebAPI references and to create the Contact Manager classes. Once you have those items in place, all you need to do is outfit the application to fire up the web host. To do that, use this code:

using System;
using ContactManagerSelfHost.APIs;
using Microsoft.ApplicationServer.Http;

namespace ContactManagerSelfHost
{
    class Program
    {
        static void Main(string[] args)
        {

            using (var host = new HttpServiceHost(typeof(ContactsApi), "http://localhost:9000/api/contacts"))
            {
                host.Open();
                Console.WriteLine("Press any key to stop host...");
                Console.ReadKey();
            }
        }
    }
}

Simply run the app and navigate to the URL. That’s it!

Posted in .NET, WebAPI | Tagged | Leave a comment

Great post on why the patent system in the US is broken

You can read the post at SFGate. It’s a great interview with a Google attorney who lays out in pretty simple terms why the patent system in the US is broken. The comments are also worth a read. Some of them are quite insightful.

In a nutshell, to be patentable, the given subject matter must cross two thresholds:

  1. The subject matter must be novel
  2. It must be non-obvious to those who are skilled in the art.

Ideas and discoveries are not patentable. Inventions are patentable. i.e. things that do something. Great examples are the microprocessor, the internal combustion engine, the  machine that produces Slurpees, etc. The big question is whether software is patentable. It’s settled that software is copyrightable in that it can be expressed in document form. But as we know as professionals in this business, software, like it’s machine and hardware counterparts, actually does something – whether it is controlling hardware, carrying out a business process, etc. A software process can be described in a patent claim just as the processes for how a microprocessor works can be documented (in reality, multiple patents will cover complex things like a microprocessor, combustion engine, etc.)

A good example of a software patent was FoxPro’s Rushmore Technology which, simply stated, was a data access method that used indexes to optimize data retrieval. A bad example of a software patent was 1-Click Buying. Setting aside the obviousness problem here, let’s consider whether something like 1 Click Buying was novel. By novel, does something build on prior art? I think it is safe to say that 1 Click Buying most certainly built on prior art that Apple didn’t own. When you consider how big Apple has become, don’t just think of the iPod, iPhone, IPad, etc. In 2000, Amazon licensed 1-Click from Apple. How much in licensing and royalty fees do you reckon Apple has cashed in on?

I agree with the Google attorney, the system is broken and has been broken for quite some time.  That’s not to say that software cannot and should not be patentable. I contend that software is just as patentable as anything else that has the potential for being patentable subject matter. The notions of novelty and non-obviousness seem to have been discarded by the USPTO. Some claim that it is very difficult to discern whether something is actually building on prior art. Peraps if claims where drawn up in a more standardized way, it would be easier. But you see, this is where the lawyers come in. The goal is always to draw up claims that are broad and vague. The broder the claims, the more your patent covers – something that patent trolls strive for. The gate keeper to protect the system is supposed to be the USPTO. They have been totally asleep at the wheel. It’s also been the court system that has been asleep at the wheel. Often, the USPTO will actually get it right – only to be reversed by the federal courts.

Now…before you think this is something that is just limited to technology, think again. Do you remember those orange trashbags that you could fill with leaves? They had a picture of a pumpkin stamped on them. Was that novel? I don’t believe so as it most definitely built on prior art. Was it non-obvious?  I thnk it is safe to say that in reality, the bags were obvious. The USPTO rejected the patents. The Circuit Court however, in 1999, reversed the USPTO. The Dembiczak and Zinbarg case is a good one to read because it is instructive on the gap that existed between the law and common sense. The USPTO was reversed on technical grounds based on evidence that was not in the record – but nevertheless could have been. This was a case where there the narrow teaching/suggestion/motivation standard for obviousness under 35 U.S.C. §103 was applied. Fortunately, in 2007, in the KSR v. Teleflex decision, the SCOTUS finally brought in notions of common sense. IMO, had the KSR decision been around when 1 Click was applied for, the patent would have been rejected.

Things should get better, but it would appear they are not because of business reality. The fact is, companies with a lot of money have the threat of litigation on their side – and that causes many more other companies to cave in. The Google attorney interviewed commented, as I have in the past that the only way you get to a definitive word is to litigate and get a court decision as to what is novel and non-obvious. The difficulity is that these are mixed questions of law and fact.

Bottom line, it’s going to be a while before things actually get better in the patent landscape.

 

Posted in IP Law, Patents, Uncategorized | Leave a comment

jQuery 1.7 Released – Event handling in a better, simplified and consolidated way

In case you missed it, you can find the announcement here. Apart from the improved delegate performance (which turned out to be a wonderfully simple solution!) – the nicest feature IMO is the standardized way to bind events. The new .on() and .off() methods handle the new method of event binding. In a nutshell, we don’t have to worry about different methods such as .live(), .bind() and .delegate(). We also don’t have to worry about the event specific methods like .click(). We also don’t have to worry about the .unbind() method either. The simplified .on() and .off() methods consolidate these disparate methods into single, simplified, shortened and consolidated methods. Because of the improved performance with delegates, these methods are recipients of those improvements, assuming of course that a delegate is what will be manifested.

As to the .on method, the one are that requires special attention is the optional selector argument. To explain, let’s assume you have an element that has child elements and you wish to bind a click handler. I will use the example provided in the jquery documentation.

//in this example, a click handler will be attached to every table row.
$("#dataTable tbody tr").on("click", function(event){
 alert($(this).text());
});

The preceeding example could be quite expensive if you have a lot of rows. Note the following example which uses the optional selector argument:

//in this example, the bound element is the tbody, not the tr's under the tbody.
//the second argument in the .on call is used, in this case, we pass the "tr" selector.
$("#dataTable tbody").on("click","tr", function(event){
 alert($(this).text());
});

The difference between these two examples may seem semantic. The difference is anything but. In the second example, the handler is attached to one element – the tbody. The event is then delegated to the tr elements – which is directly beneath the tbody. Per the jQuery documentation, when you delegate events, be sure to define them as close in proximity to the child objects that will actually be used to fire the events. Otherwise, jQuery has to work harder to traverse through the object hierarchy.

Finally, if you want an event that runs one time only and then detaches itself, check out the new .one() method.  How many times have you defined an action the user can only do one time. All of that code that you wrote to manually unbind the event is no longer necessary thanks to the new .one() method!

Posted in jQuery, Uncategorized | Leave a comment

Telerik’s ASP.NET AJAX Controls – Check them out

UPDATE:

Telerik is offering a prize to one of you, ASP.NET AJAX developers: a FREE developer license for RadControls for ASP.NET AJAX (worth $799)! To participate in the drawing for this prize, you need to help Telerik spread the news about this learning resource by simply:
1.       Tweeting this blog post (title and URL)
2.       Use the following hashtag in the tweet: #TelerikDemos

I’ve been proud to be associated with Telerik because of the high quality of their tools. Telerik has just released a new version of their ASP.NET AJAX controls. If you are an ASP.NET Webforms shop and have been looking for an easy way to add some pizazz to your applications, you really need to check out these tools. As with all things Telerik, it’s not just the tools that are solid, the demos are superb. One of th4e most common use cases we encounter is the need for management dashboards. Decision makers want quick access to the most important information with at a glance efficiencies. One of Telerik’s demo applications is just that – a sales dashboard. This is an integrated demo that ties multiple tools together: RadToolbar, Script Manager, Style Sheet Manager, and many more. Yes, this is a ASP.NET Web Forms app, but it also brings in modern  elements with Ajax and jQuery.

One of the cool features RadListView which provides a nice navigation tool to quickly access a specific employee’s sales data. You will find the code for that in the default.aspx page under the a comment that reads — Employees List –. What’s nice about the demo is that it shows you how easy it is to combine these user controls with JavaScript and CSS. The JavaScript that handles  the onmouseover and onmouseout events is encapsulated in a RadCodeBlock that is also contained in the default.aspx page.

While you can click on a particular employee, you can also use the Page Slider control to navigate to another page of employees. The code in the default.aspx page show how easy it is to bind that control the employee list view. You may be thinking “There must be a lot of messy code behind.” In any web forms app, there is some code behind. The Telerik Demos are architected quite nicely to minimize the code behind. As you will see, the various order categories and statistics have been encapsulated into their own classes.

Other demos include typical use cases such as event management and mail/Outlook integration. Other Telerik tools such as the OpenAccess ORM Reporting are highlighted and demonstrated.

Bottom line, if you are looking to add some cool features to your ASP.NET web forms applications and you want demos that have sound architectual guidance, you will definitely want to consider adding the Telerik’s RadControls for ASP.NET Ajax to your development toolkit.

Posted in Ajax, ASP.NET | Leave a comment