Sunday, February 24, 2013

Are Android implementations lightweight/superficial?

Recently I found that two feature sets of Android to be seriously lacking. There is also a feeling that other features (motion sensors) are “punt ware”. The biggest short fall has been implementation of Low Energy Bluetooth --- something that runs find on apple devices– is totally lacking.

    Issue 43473: Bluetooth Smart (Low Energy) on Android

    Issue 37525:android api support for Bluetooth

    Issue 33371: Support for Bluetooth 4.0 Low Energy Profile on Galaxy Nexus

Recently, I did some work with a friend on Near Field Communications. The Android libraries work – sort of, they allow demo code showing simple operations to be written but fail to fully implement the complete specification.


Recently I have also been working hard to use the motion sensors and found that they work adequately for game play but if you are wishing to use them for internal navigation , there is great angst in code-ville…


Having spent time in Microsoft Developer’s Division of days of old, I see the trend to do agile development/sprints as part of the cause. Sprints tend to cherry-pick the essential or easiest items to implement. The result is that given a specification (like BLE or NFC),  the top 80-90% of the specification gets done and the rest falls below the radar and is never implemented. In the old traditional world, there was often a goal to insure 100% compliance and possible certification. Certification is no longer a significant marketing aspect; “We support XYZ” no longer means we implement all of XYZ – instead, it is “We do some of the things in the specification – the IMPORTANT ones…”


I believe that this is just a phrase, one that will run it course in time….but until that happens, beware of marketing hype of what is supported!

Thursday, February 14, 2013

Object-Relational Mapping (ORM) Frameworks–knowing the price tags!

I own Telerik’s OpenAccess ORM, I have consulted professionally on Microsoft Entity Framework, this week I had a long conversation with senior types on Hibernate issues. My experience with ORM or ORM-like implementations, go back to 2001, when I was joined Vision Compass and had to immediately investigate and fix major performance problems. While the C++/SQL Server application was not generated by a ORM tool, the design followed what a ORM tool would produce.


Wikipedia wise, it has been described as

“(ORM) is a programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages. This creates, in effect, a "virtual object database," which can be used from within the programming language. There are both free and commercial packages available that perform object-relational mapping, although some programmers opt to create their own ORM tools.”

Humanware wise: the lack of availability of skilled database people (as well as communication issues between OOP types and RDBMS types) has resulted in a na├»ve layering of a database with templates on how to access the data. For many systems, this is sufficient to get the system built and released. The OOP types move on to their next project with a “success” notched on their belts.


I said “for many”, the problem is that for high load systems (relative to hardware supporting it) the side effect may be 4 to 10 times more hardware expense then needed if a good database person was involved that knows their stuff.  Often, when scaling issues arrived, techniques like sharding will remove blockage and contention issues. While sharding allows better scaling, it can also make it more difficult/time consuming to build reporting or investigative components on the system.


Other issues can arrive when one database is shared by multiple applications, each with their own versioned ORM. While these can be reduces by moving the ORM into a common library that is shared by all of the applications, the problem remains of having to retest all of the applications with each ORM drop; and then, potentially having to update all of the live applications concurrently. If one has to be rolled back, then all may need to be rolled back.


The real cost of the ORM is that much of the internal business logic that would be in triggers and stored procedures is moved to higher levels with the result that the core data may become very corrupted in some circumstances. There is no longer a moat and high walls around the cities, instead, the walls are torn down so every street runs into the country side.  It is much easier for a thief to make a living; or a vandal to paint bomb store fronts. In one case, the city is much more secure and safe but commerce may suffer from having to go through a few guarded gates; in the other case, commerce may thrive but then every merchant may have to hire their own guards.


The real question is what happened when an enemy comes knocking (corporate espionage, spying), if the city is wide open then the pickings are good, a troop of raiders can ride in and carry out much easily. If the city is gated and guarded, success is much less likely.


Just like outsourcing and offshoring seemed like a good idea 15 years ago because it appeared to save money, the trend is increasing to on-shore or repatriate work. ORM saves money and reduce the time to delivery – just like offshoring promised. When you look at long life, evolving systems that keep adding applications, the maintenance costs and complexities start to multiple. You can pay upfront or down the road (or discard the system in 4 years and build your next short lived implementation).

Saturday, February 2, 2013

Facebook: Reducing Advertisements

This post arose from several friends asking for help because the number of ads that were appearing on Facebook almost made it unusable (too much to wade through for the benefit received).  These are normal people and not nerds. The common root cause was doing “Likes” that result in add appearing.  The selling of this feature to business is described here. This is an older problem that was reported by the likes of NBC in stories.  In a recent story, Zuckerberg reports that more and more ads are being done this way.The bottom line is NOT to like anything except actual posts (not reposts or shares or….).  Like People you know posts and not products or firms.


The solution is to be kind to your friends (as shown below), ask your friend to do the same (and if they do not, then you may need to unfriend them if their facebook friendship continues to spam you). You may wish to FORWARD this page to them first…


SPAM because of Friends!

If you friends like stuff, the ads will appear in THEIR newsfeed to you. There are a few things that you could do…

  • Click on the down error on the left and pick “Report story or Spam”
    • This may have limited effect – after all Facebook is making money from showing it!


SPAM Coming from a PAGE

If you click the name, a dialog appears …  You can UNLIKE it….


As each irritating item appears, change your Liked to Unliked.


A Friend that “does TOO much sharing”

Click on THEIR NAME on any of they posts, this will change to THEIR page.


Then click as shown below.

Uncheck as much as you feel appropriate.


For example, only Status Updates and Photos. SHARED items will appear  unless you select Important Only


Apps Posting

  • Often ads appear because you granted some app to post on your behalf (often in the long distant past) in exchange for playing a game, etc. You will see on the left side of the page,
    • Click App Center. A new page will appear, on the left side of the page you will see:
    • Clicking this will show your applications.
    • You want to reduce them to only the ones that your REALLY want to have available NOW.  You can always re-install them
    • If you click “Settings” you may be shocked with what the application is allowed to do!
    • On the RIGHT side  under “This app can also” are some “x”, if you click each one of them, the permissions disappear (one by one --- remember, those permissions make money for Facebook – so they will not make it easy!).
    • An additional item that you should do ON BEHALF of all of your friends, is change “Posts on your behalf” to “Only Me”
    • If you want to REMOVE the application, then it more steps still (remember – Facebook makes money from keeping this!). Click on the App Name, this will take you to the app page. Now on the left side at the bottom you will see:
    • Click “Remove”… You may then be notified: ---Ugh, they get to keep YOUR Information unless you jump through more and more loops….
    • Click Remove..
  • If you return to your app page, the application should now be removed. You can speed direct app removal from this page by hovering over an app and then a small “x” will appear:
  • This results in immediate removal.
  • You REALLY want to reduce the number of Apps to as few as possible
  • You REALLY want to review the permissions for each to just those you REALLY want to give!
  • You REALLY want to NOT SPAM friends, so set posts to go to yourself only

Deleting Past Likes

This is where paying the piper happens!  You have to go to the page that you liked and unlike it!  -  To do this, click your name. You will see


Just click the Likes and start to UNLIKE them. As expected, the critical ones are at the bottom of the page… group year by year.


Cutting Other Spams

An alternative starting point is

It allows you to get rid of some spam (like requests that you are not interested in)


And get down to a simpler:

Put yourself elsewhere in the world!

You will notice above that I am using English(UK).  Some “cut the ads” routines would be to move to somewhere else in the world, You may need to be ruthless (for example remove Mobile Phone – which identifies your country and thus an advertising scope!).


Click [Your Name] at the top of the page and then [Update Info].


I will use to locate a small town or city elsewhere in the world and then “move there virtually”.

For telephone numbers, you may get an invalid telephone number.  Fear not, go to

and look for an appropriate match.  US and Canada have a NSN of 10.   You may need to locate a country that also match your Area Code. In my case, Mali did not work, but ITALY did Smile


Facebook is a business that seeks to make a profit (unlike Wikipedia) from your friendship, the correct term is exploit. In time, I expect Facebook will fade away like MySpace (so do not buy stock in it… it will fade).