Sunday, January 30, 2011

EIKO–Experience In Koran Out…

I originally consider EIGO, Experience In Gospel Out, but felt that EIKO sound better.


On one of the Linked-In groups there was a lengthy discussion on architecture stack to use. What became very apparent was the trend to advocate a particular architecture primarily on the fact that you have experience with it. Opinions follow the same type of brand loyalty that you see with cars (Toyota, VW, Ford), computers (Linux, Mac, PC) and event TVs (Sony, VIZIO, Panasonic).


If MD followed the same brand loyalty –they would likely be deemed to be unprofessional and perhaps facing malpractices. One of the keys of being a responsible architect is to be profession which means become familiar with the different brands and to make rational decisions based on solid criteria. This means not slipping into plagiarizing marketing literature (which by definition, is not objective or rational), or opinions on the groups you frequent (most groups are inclined to a biased, self-affirming attitude.


Before even looking at REST versus SOAP versus COM versus whatever, you really need to get out of the technical ghetto and make sure that you have heard what the customer wants (remember the customer is always right!)

  • What’s the budget?
  • What’s the delivery time line?
  • How risk-adverse is the customer?
  • What’s the best case and worst case for load today and for the next 5 years (a decade ago, it was 10 years, when I started in this business – 20 yrs was not uncommon)
  • What are legal requirements?
    • Accessibility – ADA
    • Privacy Laws
    • Degree of security needed (often something like REST will be excluded immediately if the customer is risk adverse – REST is a minefield for security)
  • Then there’s a ton of semi-technical questions:
    • Web
      • Which browsers and versions
    • Application
      • Which OS (and versions)
      • Which Mobile OS (and versions)
    • IT Security Practices and Standards
      • There is nothing like going into final testing and discover that Security veto some key aspect of the system

A common pattern that I have seen is folks going with their  favorite brand and then “fixing” problems found (“Oh, we just need to raise the car and put in different shock absorbers”) or doing polemics (“The gas mileage is actually quite good given the safety ratings of the car”) or the classic overloading of the listener with technical details that are really irrelevant but is successful in turn the green field project into a sheet of ice (from the excellent snow job),


It is natural for folks to want to keep to familiar ground – it should be part of the architectural design if you are working with an existing staff – but as an architect or development manager you should make sure that this human factor does not make for poor decisions…

Wednesday, January 26, 2011

Windows Phone 7 Emulator in a web page

Lifeware Solutions is using the Windows Phone 7 emulator in a web page to demonstrate their windows phone 7 app. This is too cool to pass up.

The web page looks like:

The associated HTML code is:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="432" height="768"> 
       <param name="source" value="DMSL/DeluxeMoon.xap"/> 
       <param name="onError" value="onSilverlightError" /> 
       <param name="background" value="white" /> 
       <param name="minRuntimeVersion" value="4.0.50826.0" /> 
       <param name="autoUpgrade" value="true" /> 
       <a href="" style="text-decoration:none"> 
       <img src="" alt="Get Microsoft Silverlight" style="border-style:none"/> 

Tuesday, January 25, 2011

Handling time-interval searches in SQL Server

Often with SQL Server you are faced with the situation of finding records (event) that overlap a search interval as illustrated below.


Often I have seen this code up as something complex that follows the above diagram:

WHERE (EndAt BETWEEN @StartDate and @EndDate AND StartAt =< @StartDate) OR (StartAt BETWEEN @StartDate and @EndDate AND EndAt >= @EndDate) OR (StartAt BETWEEN @StartDate and @EndDate AND EndAt BETWEEN @StartDate AND @EndDate) OR (StartAt =< @StartDate AND EndAt >= @EndDate)

Needless to say,  8 expressions and 3 ORs is a bit of pain…  An alternative solution is to interchanges the search and event time intervals resulting in a simpler evaluation consisting of 6 expressions and 3 ORs, some improvement.. but still not ideal

WHERE (@StartDate BETWEEN StartAt and EndAt) OR (@EndDate BETWEEN StartAt and EndAt) OR (@StartDate =< StartAt and @EndDate >= EndAt) OR (@StartDate >= StartAt and @EndDate <= EndAt)

Another technique that can work well if the search intervals are restricted to DATE instead of DateTime is to create a trigger on the table and then insert the record primary key and the integer value for every date that the event occurs on. This transforms the above into a much simpler query as shown below:


Now the search walks an index and ORs are totally avoided.  Performance has now improved by a factor of 10 to 1000. The number of indices have dropped. The size of an index is reduced (an Int index takes half the space as a DateTime).  Events Insert are typically a rare event, Search is a frequent event. Doing more work for a rare execution (trigger code)  and less work for a frequent execution is often how you can improve performance.


IMHO, often SQL Developers do not look at the net Expected Work when tuning – instead, they look at tuning on an item by item basis resulting in poor optimization.

Monday, January 24, 2011

Hot technology makes Intellectual Property easy to acquire hot goods…

Last Friday I attend a talk by Mark Anderson,  Futurist and analyst with a 93+% success records for forecasts over the last decade (you can hear him on the BBC on Jan4,2011). The key item is that nation’s wealth comes from intellectual property, the knowledge (to produce goods) that other nations do not have. His concern is that the US is loosing it’s IP to other nations, China specifically – who does not protect foreign IP very much. When Boeing has to share it’s technology to get sales – it leads to a rather large hole in the foot.


A few years ago I was attending a security conference at the National Institute of Standards and Technology and heard that it was normal for most military firms to apply crazy glue to USB and firewire slots on every PC (forget about DVD or C D Burners). When I was teaching at NSB Bangor, one could not (legally) take a phone with a camera onto the base. With today’s technology, the amount of disabling is even more:

  • No USB or Firewire to prevent IP from being transferred to removable storage
  • No bluetooth because with smart phones, you can move data to the phone
  • No WiFi because many mobile phones can act as hotspots and with a clever trojan in an app (like one downloaded for free), the app can proceed to scan the local PCs and upload data to servers in Russia (for Identity theft) or China (or IP theft)

There is a major dilema facing business: how to protect IP. Protecting IP from theft by competitors in the US is easy – the courts. When dealing with China this option disappears. It can be done – the key is to spell out strict security with ZERO tolerance for failure. It may mean that everyone must surrender every smart phone at reception and having the internal interwork having zero access to the real internet – not even through a proxy.


Ok – you say that’s one big hassle – well, so is having no IP left and thus no wealth. One of the rumors that I have heard off and on for a couple of years is that some chips made in China has built in Trojans. Code burnt on the chip that access the computer bus and attempts to connect to the internet once a month or year. Allegedly, the response may execute more code to run. This is a particular concern with China’s PLA (Army) businesses selling cut-rate internet routers (with foreign IP property) to Europe and trying to get into the US market


Whether these rumors are true or not is actually moot. If it was done, how could anyone detect it? If it was done --- then the US and Europe would be sitting with a massive 5th column embedded across all of the critical financial and corporate systems…. Is it hard to do this? Nope – very easy to hide 30K of code on most chips…

Thursday, January 20, 2011

Oops, someone fouled up a tooltip in Sql Server Management Studio



I suddenly noticed that replace only works on ONE CHARACTER strings ….  at least that is what the tooltip claims…

Tuesday, January 18, 2011

Startups: The Intellectual Properties dimension

This is a continuation of my startup series consisting of the prior posts of:

If you want to do a startup there are three things to consider for Intellectual Property:

  • Patents
  • Trademarks
  • Servicemarks


Patent means that some is new (novel) in how you are doing things. This may be something that seems minor like “One-Click” (Amazon). You can apply for patent on almost anything, and the track record for the US Patent office is that you will likely get one (even if the idea is really not new). Having one or more patents give the appearance of value to Angels or Venture Capitalists. A patent can also be used to intimidate competition. Odds are that any patent you get would be tossed out(unless really a new invention) if a competitor takes it to a court – but the cost is typically over one million dollars in legal fees. So, it may be cheaper for them to buy a license than to overturn the patent (interesting business model).

“Patent Pending” – means that you have filed a patent application. If you have not filed at least one patent application, then you will be fined if caught. Since you have up to a year after discovery to file a patent application, one technique is to file a patent application for something trivial and toss “One or more Patent Pending” on the software product and then delay filing for 11 months. Once you file, typically the patent documents are not available to the public for 18 months after filing … so the patent stays not-public for 29 months. On the flip side, someone may have already filed an equivalent patent which you will not be able to locate today…. If this happen, the person who can produce objective evidence of the earliest invention wins – provided that it was within the required 12 months of original patent filing.

Trademarks – You do not have to file an application to use a (tm) on your product. A (tm) means that you intend to use. a ® means you have filed an application AND it has been approved by the trademark office. Beware of trying to trademark items like “app store” or “email server”, they will generally be disallowed because they are too generic. Find a product name that:

  • Has not domain registration against it
  • Ideally will end up with zero hits on Google
  • Slap a (tm) after it and you are likely good to go for a while..

ServiceMarks or (sm) is for service offering (not product offering) and usually do not apply to products (but does to web sites offering services).

Bottom Line

Securing IP adds value to the firm, generally a lot more value than the cost (unless you go to expensive lawyers). Of course, getting the value out is another issue. If you get a patent, the patent can often be sold to “patent trolls” if the startup goes no where…

Monday, January 17, 2011

So you want to find overqualified proven track-record resources CHEAP?

No, you don’t go offshore or elsewhere – you employee-hunt on the Microsoft Alumni Network site or the equivalent Linked In list or the official list.


Let me tell you a common tale…  Not too long ago, you could walk down corridors at Microsoft and count “1 little, 2 little, 3 little developers,

4 little, 5 little, 6 little options holders, 7 – another millionaire”. Yes, 14+% were millionaires. With Microsoft Stock often doubling every year, it was not uncommon for a good developer to have $2,000,000 of stock options by year 5 or 6. Life expectancy as an employee  was often 6-7 years.


Let us consider, a MSFTee retiring with 3 million in stock. In those days, a 10% return was not unusual… that’s $300,000 a year. They locate anywhere in the world they want – some folks that I worked with ended up with a big ranch in Montana, another moved to Colorado, etc. They are down to $2.4 million sitting is sweet stock after dropping bucks on a nice home and some time-off travel.


A bubble burst and they loose 33% of their stock value (remember they are code genius, and likely financially naïve). So they are down to capital of $1.6 million. They do a little trimming of spending habits and move to conservative treasuries (been burnt by stock). So they are getting 5% on 1.6 million or $80k/yr. A little trimming of spending and using of capital and they continue to be retired (perhaps their wife work [one friend did well, married an MD when he retired and became a home daddy for the kids] or they do some local putting in part time work).


Zip forward to 2011, interest rates are down to 1%. So the $1.6 million is now bring home $16,000/yr – not exactly the retirement they expected.


So what do you have – the crème of the old Microsoft developers that are located away from the software ghettos they slaved away in. Many of these folks would be very happy to land a job paying $100+K that allows teleworking (perhaps with 25% on site). Why are they willing to work for well less than their market worth? They have their family where they want them to be and do not want to move them back into the Redmond ghetto. Even if they are willing to move, selling their existing place would take years (I know, I am still trying to sell my old place: 25 acres in Kingston [with passenger ferry to downtown Seattle walking distance down the road] that is zoned R9 for 5 acres…).


If the salary and working conditions is sufficient to allow them to keep their preferred living location – they will take it (life priorities).


What do you have? A highly skilled experience developer, architect etc with a solid track record that is likely to exhibit strong employer-loyalty at a fraction of market rate. You also have someone that is likely to tell you their hard-nose assessment of projects and issues; instead of someone that is trying to climb the career ladder by being yes-men.


Where do you find them? The above groups is one possibility. Another is to contact Murphy and Associates, because many of the people that I cite above have worked through them (myself included) – because of their transparency to their consultants. If you are alumni (with 4.0’s or 4.5 on reviews) looking for telework supplemental, drop them your resume (be patient, a job may not appear for a few months).


As a FYI, two of the sharpest, nicest folks that I worked with were75 – an old Unix expert working for; and a 72 yo IBM retiree working as a consultant for an Indian company..  It is not whether they know the latest tool praised to the 5th heaven by marketing, it is whether or not they can think and sort issues out.

Thursday, January 13, 2011

Is it time to start insuring Software Projects?

Recently on several LinkedIn groups there have been much discussion on the professionalism of the software industry.  The analogy that seems to work is that of regular building construction. The term “construction worker” and “software development engineer”  appears to be equivalent for the lack of meaningful information.

First item is the “development” in the phrase. Many SDE’s have never done any development (build new houses), instead, their work life is maintenance(fixing bugs) or renovations (adding new features).


A construction worker could mean:

  • A journeyman brick layer
  • A journeyman stone mason
  • A brick layer trainee that still needs to be supervised for mixing brick mortar
  • A licensed electrician
  • A draftsman creating building plans
  • An architect designing the building.

Titles in the software industry (and the associated job description generated by HR from the title) are equally unclear and contributes significantly to the high rate of software project failures (i.e. houses that collapse in the first wind storm, shifts in the first heavy rain, condemned by the county inspector, deemed not insurable by insurance companies [which means no conventional mortgages], rejected by the person that commissioned the house because it was not what they asked for, etc.). The analogies are strong because the human-ware problems are the same. The software industry uses Patterns – well, the concept of patterns came from the building industry – specifically the work of the architect Christopher Alexander at the University of California, Berkeley  (I have most of his books in my library – they are an excellent read to understand what patterns should be and how to find them).


When you build a house, there are 3rd party independent inspection at almost every stage. Before building, the county reviews a host of documents like zoning (legal), geology (flood, landslide area), and utilities. If there is a building loan involved, the bank will inspect the plans for items like costs to connect utilities, drill wells, septic systems etc. Once construction starts, there are regular building inspections – these inspections are often mandated by the insurance industry which will refuse to insure the building if they are not independently inspected. Whenever the building is subsequently transferred, there may be requirement for a building inspection, and a new inspection by an insurance agent.


When you build a software system, these safety checks do not happen. Often there is no independent review (or a conflict of interest reviewer is used: for example – using an Accenture reviewer when the project will be staffed by Accenture consultants).


The solution is actually interesting – require the software project to be insured. Where do you get such insurance, well the tradition source for unusual insurance is Lloyd’s of London.

They will mandate due-diligence before giving a quote, they will likely give recommendations on how to reduce their premiums, and if the project fails – you are insured!


The result of such insurance is that the industry will become more mature and professional. There will be less risk for each software project – after all, professional independent risk managers will be involved to prevent foolishness often seen today.


  • Startups can run without insurance, but established firms should have every project insured.

Embedding a PowerPoint Presentation in a LiveOffice Web Site

The family chiropractor wanted to have a PPT embedded in her web site that’s running on LiveOffice. LiveOffice is a “sandbox” hosting services that denies code level access so it’s small business user friendly. While I could upload the PPT and link to it, I could not cause it to be embedded in a web page through the ordinary means.


The solution was to export it as image slides and then create a basic slide show.  No major rocket science, but beyond the typical business user comfort level.


You may see the result at:  Pro Health Chiropractic. Microsoft code has a minor defect with the slide show, if you have a slow connection then the first image may not be found on the first load of the page.


Sorry for not doing posts lately, but I’ve been working in an IP area and thus very restricted on what I may post about


How to do it in detail

1. You can upload a Powerpoint (to allow it to be downloaded), but the limited features prevent it being an embedded presentation. To get around this, we convert it to a slide show.

a. Open it in power point

b. Click on Icon, [Save As], [Other Formats]

2. The Save As Dialog appears. Change the Save as Type to:

a. PNG Portable Network Graphic Format

b. Click [Save], a dialog will appear:

c. Click [Every Slide]. After a few seconds:

d. Note the location of files… we will need it below.

3. Login into Web Site. In the left margin, click [Image Gallery]

4. Your existing images will be there. Click the [Upload] button

5. Click [Upload], a new windows appears, in the left, navigate to the location specified above.

a. WARNING: If you are planning to REPLACE files, delete the old ones first.

6. Click [Select All]. All of the slides will be checked..

7. Click [Upload Now]. A dialog appears showing progress.

8. The images will now appear in the Image Gallery

9. Select the page and click Edit

10. On the page, select to the desired location.

11. One the menu click [Module]

12. In the drop down, click [Slide Show]

13. The slide show dialog appears.

a. Change Album Layout Style to: Basic slide Show.

i. New controls appear. Change to 10 seconds, and check for controls.

b. Select and drag the desired pages to the right.

c. Click [Finish]

14. Click [Save] to save the page. Open the site and verify it is working.