Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Sunday, December 6, 2009

Opensource phones vs. operators

According to the PCMag, the current state of opensource platforms for mobile phones is not very promising since the wireless carriers in the US "hate the unexpected" which is argued to be one of the key attributes of open source technologies. The author basically argues that if you provide phone users too much power through an extendable OS like Linux, the networks would go "poof" as somehow a lot of "geeks" would start overusing the network.

I do agree that the author has a point in that open source tools and technologies are less likely to have a predictable development path, thus making it harder for incumbent operators to re-train and re-deploy their huge staff. Not to mention the trouble with documentation that (does not) come with opensource tools and technologies.

However, I don't think that the operators are worried about geeks "overusing" the network. The operators actually have quite solid tools for monitoring and operating the network, and they are actually very good at denying access to network hackers, barring the DDoS crowd.
Besides, in all networks the "geeks" make up a very small percentage of total user count. Network planners certainly would not make major network planning decisions based on the behaviour of this marginal group.

The author of the PC Mag article also argues that some of the incumbent operators like T-Com and Sprint were fully focused on becoming a sort of 'telecom for geeks' . I would like to point out that no large operator, could ever split even, let alone make profit if it was focusing on a very small group of users. The reason is that these already have made huge investments in software and hardware platforms and need a very stable cash flow just to cover their operating expenses.

Having discussed the importance of geek portion of market for operators, now imagine say, 50% of network, "average users" using an advanced opensource platform phone in the network.
The so-called average users are much more likely to (check all that apply) :

a) do something wrong with the advanced platform
b) not notice that they did something wrong
c) have their phone eventually malfunction as a consequence of a) and b)
d) forget what exactly they did wrong since they did not understand what they did in the first place
e) call support staff
f) call support staff again
g) decide that the operator sold them a broken phone
h) switch to a different operator

Due to their technical incompetence, the non-geek users are far likely to make trouble by using a thirdy party app they do not understand (and which could theoretically be malicious software).
Since they do not understand what they did in the first place, they are less likely to be able to self-recover from the problem, and possibly giving a lot of trouble to the operator's support staff.
As a reaction to this problem, the operator would invest more in staff, software and hardware in order to provide better "user experience". This step will not actually solve anything as each operator tries to get a larger market share so under the presumption of an ever increasing number of users additional investments to support department are required.

Eventually, the number of available 3rd party apps, and custom-made extensions makes things so complex for maintenance that operator decides to scale back. Since the staff, software and hardware investments are cut down, so is the support for the platform, and operator goes back to supporting the simple and predictable platforms.

Therefore I conclude that the core issue with the open source on mobile phones is the same as open source on desktop computers - it's simply not simple enough for the average user.


Saturday, May 30, 2009

On .NET : Components.Efficient.Design



Recently, as I was extending a product my company is working on,  I found something that in my humble opinion can be treated as an inconsistency of Microsoft .NET development team. 

First of all, let me point out that my views are heavily influenced by OO and I usually try to enforce as much encapsulation as possible in my UDTs , because that's one of the core benefits of OO . For me that's the most important benefit of the OO, as it reduces my stress level when managing components in a project. 
So, my issue is with .NET System.Windows.Forms.ListView component . You see, if I'm  creating one or more  ListViewSubItem instances via the new ListViewSubItem(ListViewItem owner, string name) constructor, I am expecting that the .NET will automatically copy this sub-item into ListViewItem's SubItems collection. However it does not, and I have to invoke the AddRange method on that collection each time I'm doing an operation on a ListView.   Now for me , it just creates unecessary overhead, almost always incurs additional time costs as I practically always forget about this tiny fact . 

To be honest, surely, I too  make such mistakes when designing my own components, so I've come up with an evergrowing checklist for OO component compliancy enforcement. Bear in mind that these are here just so that one can reduce the stress factor, and not to claim that one follows some fancy philosophy, for the sake of it. 

W/O further ado :
1. If you find simple code sequences repeating themselves, put them in a method

2. If you use an empty constructor, and afterwards setup the UDT instance by various method calls or value copying, consider a constructor that does this for you.

3. Test-case your UDT's method to check for possible inconsistencies. For example , if you find your self writing code like this: 

UDT a= new UDT();
int nFirst = a.First;
int nLast = a.Last;
if(nLast!=nFirst)
{
DoSomething();
}
You might be better off with something like this : 

UDT a= new UDT();
if( a.IsEqualityOK() )
{
DoSomething();
}
In the latter example , you have not only reduced the clutter in main logic block, but have also made it much easier to maintain your  comparison logic later on, as you might need to check for equality in other code blocks as well. 


4. When creating  complex data types, layered one on top of another, make sure that one method call does all that is required . 

5. When primitive types  count starts growing in your UDT (i.e. you have 50 string properties), it might be wise to group them into smaller UDTs, and provide accessors . This of course is managed by your own prefs. And there is always the issue on not overdoing with the UDTs. In my experience, a UDT is of optimally managed when it contains at most 10 properties and at most 5 methods. Of course, this is my ideal case, which is not always possible to maintain.

6. Design your components before you start coding, but do so in an environment-aware setting. That is , make sure you understand  how your component will be used. Setup a scenario on the whiteboard, explore possible interactions with other pieces of components , explore why these make sense (or not). This is IMHO the single most important step, altough it is often understood well only after running into trouble with a quick-designed component. Yeah, happened to me a few times too ..

7. If at all possible, try to keep one constructor for your component .

8. Reject the "Code first, refactor later" rule. If on the other hand you use this rule to write code efficiently and on-time, please accept my sincere apology and envy. In my humble opinion this rule is of no good.

9.  When you need to use threads, use .NET method delegates instead of standard threads (if your particular application need does not specifically call for use of System.Threading namespace of course) . It will make thread management far easier , as .NET creates and manages these threads for you, which bring us to point 10.

10. Keep program flow as simple as possible. And here is how I do it : I usually enforce a predictable program flow eventhough I really overuse the .NET delegates and events, by making all events and delegates go through a single "worker" class instance ,which is responsible for dispatching them further . That way I know that no matter what happens in my program, I have a single entry/exit point for all program data . It also gives additional benefit of  stripping other smaller UDT components of responsibility for main processing logic , so it narrows bug tracking to two essential areas :
  • Main logic
  • Data formatting and forwarding by UDTs
And that's about it. Simple, no ?