Thursday, February 3, 2011

When the Demon wants your Wallet

Ubuntu 10.10 has an issue when you run Gnome and KDE.
On startup KDE prompts 'KDE Daemon' has requested to open the wallet 'kdewallet'.


The solution is to install WICD



rohit@lenovo:~$ sudo apt-get install wicd

 

[sudo] password for rohit: 

Reading package lists... Done

Building dependency tree       

Reading state information... Done

The following extra packages will be installed:

  python-iniparse python-wicd wicd-daemon wicd-gtk

The following NEW packages will be installed:

  python-iniparse python-wicd wicd wicd-daemon wicd-gtk

0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.

Need to get 562kB of archives.

After this operation, 3,121kB of additional disk space will be used.

Do you want to continue [Y/n]? Y

WARNING: The following packages cannot be authenticated!

  python-wicd python-iniparse wicd-daemon wicd-gtk wicd

Install these packages without verification [y/N]? y

Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick/universe python-wicd all 1.7.0+ds1-5 [76.8kB]

Get:2 http://us.archive.ubuntu.com/ubuntu/ maverick/main python-iniparse all 0.3.2-1 [19.8kB]

Get:3 http://us.archive.ubuntu.com/ubuntu/ maverick/universe wicd-daemon all 1.7.0+ds1-5 [277kB]

Get:4 http://us.archive.ubuntu.com/ubuntu/ maverick/universe wicd-gtk all 1.7.0+ds1-5 [147kB]

Get:5 http://us.archive.ubuntu.com/ubuntu/ maverick/universe wicd all 1.7.0+ds1-5 [41.0kB]

Fetched 562kB in 6s (80.3kB/s)          

 

                                      

 

Preconfiguring packages ...

Selecting previously deselected package python-wicd.

(Reading database ... 258926 files and directories currently installed.)

Unpacking python-wicd (from .../python-wicd_1.7.0+ds1-5_all.deb) ...

Selecting previously deselected package python-iniparse.

Unpacking python-iniparse (from .../python-iniparse_0.3.2-1_all.deb) ...

Selecting previously deselected package wicd-daemon.

Unpacking wicd-daemon (from .../wicd-daemon_1.7.0+ds1-5_all.deb) ...

Selecting previously deselected package wicd-gtk.

Unpacking wicd-gtk (from .../wicd-gtk_1.7.0+ds1-5_all.deb) ...

Selecting previously deselected package wicd.

Unpacking wicd (from .../wicd_1.7.0+ds1-5_all.deb) ...

Processing triggers for ureadahead ...

ureadahead will be reprofiled on next reboot

Processing triggers for man-db ...

Processing triggers for python-gmenu ...

Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...

Processing triggers for desktop-file-utils ...

Processing triggers for hicolor-icon-theme ...

Processing triggers for menu ...

Processing triggers for python-support ...

Setting up python-wicd (1.7.0+ds1-5) ...

Setting up python-iniparse (0.3.2-1) ...

Setting up wicd-daemon (1.7.0+ds1-5) ...

 * Starting Network connection manager wicd                              [fail] 

Setting up wicd-gtk (1.7.0+ds1-5) ...                                           

Setting up wicd (1.7.0+ds1-5) ...

Processing triggers for python-support ...

Processing triggers for menu ...

localepurge: Disk space freed in /usr/share/locale: 828 KiB

localepurge: Disk space freed in /usr/share/man: 20 KiB

localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB

localepurge: Disk space freed in /usr/share/omf: 0 KiB

localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB

 

Total disk space freed by localepurge: 848 KiB

Sunday, January 30, 2011

Weather.com Software Platform: Open Source

This is a snippet from a 2004 article that I never publicly published, but is serves as a good case study relevant in 2011 (and beyond).

In 2004, weather.com site served more than 50 million pages on stormy days, and it ran almost entirely on open-source software and commodity hardware. The Atlanta-based Web site’s adoption of a new architecture and open source products “has slashed IT costs by one-third and increased Web site processing capacity by 30%”  (King 2004). However cost slashing was not their primary goal of switching to an open source product. The quality of open source products was its main “selling” point. Weather.com claimed that their transition from IBM’s server software product to open source Apache Tomcat to run their website served correct operations, ease of use and better quality attributes overall. Of course, there are different organizational dynamics that lead to a decision to drop COTS (and support) to an open source solution.

Performance and scalability issues were cited as the main reasons for switching to Apache’s web server. The team switched from IBM’s commercial offering to Apache’s open source implementation primarily for its quality. Apache’s open source web servers host 68% of web servers in the world according to an August 2004 analysis of Netcraft (Gustafson, Koff).

 

Graph: Totals for Active Servers Across All Domains June 2000 - June 2010

 

IBM has since started to use a modified version Apache Web Server in it’s commercial offerings. This is a trend that is likely to repeat itself across multiple technology domains depending on various factors: it remains to be seen if the penetration projections hold true over time.

Sunday, January 9, 2011

6 Traits of an Impoverished Leader

Impoverished Leadership Style
  1. Uninvolved: Is not involved with the effort at hand
  2. Unmotivated: Does not motivate and is not moved by the effort
  3. Indifferent: Does not care about the outcomes or your efforts
  4. Noncommittal: Does not provide straight answers and is not ready to support the effort.
  5. Resigned: Is not positive about the effort and is basically non caring.
  6. Apathetic: No emotion, no enthusiasm.
Have you worked for a manager in your career that you thought was disconnected and unmotivated? The LeaderShip Grid (developed by Ohio State University) defines what they call the "Impoverished Leadership Style". Rest assured - this is a common leadership patter in dysfunctional organizations.

Sunday, December 5, 2010

InoxMovies.com - an example of what NOT to do

One message for "InoxMovies.com" : Establish an Exception Handling Architecture

 


Server Error in '/' Application.

Server was unable to process request. --> Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Services.Protocols.SoapException: Server was unable to process request. --> Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SoapException: Server was unable to process request. --> Object reference not set to an instance of an object.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431766
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
WebReference.SeatBook.ShowSeats(Int64 TheatreId, Int64 BookingId, String ShowClass, Int64 NoOfTickets, String PartnerId, String PartnerPwd) +195
seatlayout.Seat_Layout() +743
seatlayout.Page_Load(Object sender, EventArgs e) +3161
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 


Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

 

Wednesday, December 1, 2010

Removing Oxy Mouse Pointer

I have been using Linux off an on for the past 10 years for personal needs. Having never tried KDE, I installed it on the latest Ubuntu distribution. It is quite fancy and has lots of good features, however it has its share of issues too.
Surprisingly one of the features leaked into my Gnome sessions: the mouse pointer.

For whatever reason KDE's Oxygen theme with its weird mouse pointer would refuse to go away in Gnome - no matter how much I tried changing the theme.

rohit@lenovo:~$ uname -a
Linux lenovo 2.6.32-24-generic-pae #42-Ubuntu SMP Fri Aug 20 15:37:22 UTC 2010 i686 GNU/Linux

After scouring the net, and not finding much help I decided to "reset"; this turned out to be difficult as well. No matter which other default theme I selected, it still did not remove the offending pointer style. Oxy persisted. Here's what worked - I  removed the theme files under ~/.theme. Brutal, but it works. Now I have a nice black pointer.

Sunday, November 28, 2010

COTS versus OSS: Why

Open Source versus Commercial Software is an important consideration that is often overlooked. This article provides a high level overview of open source considerations.

Open source is being adopted by developed nations and corporations at a greater pace than developing economies. Organizations of all kinds are consciously adopting open source software for critical business needs: Deutsche Börse Group, Deutsche Bank, the Danish government, BlueScope Steel, NASA, the Associated Press, J.P. Morgan Chase and Google.

There have been many government initiatives around open source software, as governments in Brazil, China, India, Korea, Japan, Europe, Australia and the United States, as well as the United Nations, considers open source policy and options. And large information technology vendors such as IBM, Intel, Hewlett- Packard, Oracle, SAP, Sun Microsystems and Dell are supporting open source (Gustafson, Koff n.d.).

What is the catch? Like all software – open source too has its costs. Maintenance and support costs are left to the adopter to absorb. Koch (2003) elaborates, just because you download open-source applications for free doesn't mean you won't have a whole host of associated costs such as maintenance, integration and support. Security concerns have often been raised “because anyone can see the code” is debatable. This notion is easily dismissible.

Licensing can be tricky for smaller companies who are vulnerable to lawsuits through lack of indemnity in open source products. The “as-is” aspect of open source software is risky. There is a possibility that part of open source software “copied code” from some other licensed product. It is very difficult for the companies to identify or compare open source with licensed software products to identify theft. This exposes the company using open source software to lawsuits from companies claiming that the open source software violates their intellectual property rights. New markets and emerging economies should take note of this risk.

Price is another factor: since open source software can be traded in markets just like any other kind of artifact one cannot definitely tag open source software as having zero price, explain Scacchi (2003). Programmers often explain this seemingly incongruity with simple shorthand: when you hear the term “free” software, think “free speech” not “free beer”; or ‘software libre’ not ‘software gratis’. The fact that open source software is free can be confusing to skeptics and adopters. Scacchi (2003) explains the meaning of “free” in open source software. He elucidates that “Proprietary source code is the touchstone of the conventional intellectual property regime for computer software. Proprietary source code is supposed to be the fundamental reason why Microsoft can sell Windows for around $100 or why Oracle can sell its System 8 data management software for many thousands of dollars”. Open source software process “inverts this logic” (Scacchi 2003).It differs from commercial software in one fundamental aspect – source code is distributed with the runtime binaries of open source products. All documentation, source code and the runtime binaries are provided by the development community for free.

Adopters must be able to bare the hidden costs associated with open source software. The success of open source software is surprisingly not attributed to its zero monitory cost of purchase. Schadler (2004) attributes the success of open source to high availability, self-training opportunity, and support. He contrasts this with commercial software and underlines the non-availability of software and self-training.

Although open source is free, it is not free of obligations and lack of guaranteed support. This makes it less attractive for emerging economies and risk averse entities. Just as free speech is not intended primarily for oppressed dictatorships, in the same way open source is not intended for poor or developing nations and economies alone. Not only emerging economies, but all types of economies and corporations should consider a policy of open source software adoption.

Saturday, October 16, 2010

Support Open Source Initiatives

A survey by Boston Consulting Group in of developers using SourceForge found that respondents were, on average, 30 years old and had 11 years of programming experience. These were experienced professionals contributing to quality software products for free. Open Source is so pervasive now that people don’t talk about it or discuss it anymore. The assumption is that quality software will continue to be available for free. Without donations and support this is not possible, especially in tough economies. I have been an active user of OSS at work for almost every single project. Software development projects utilize a plethora of components that are open source. Open Source Object Relational Mapping frameworks, Model-View Controller frameworks to full scale operating systems, application servers and databases are used across business applications everywhere. So what is the basic idea behind the open source movement ?

“The basic idea behind open source is very simple: When programmers can read, redistribute, and modify the source code for a piece of software, the software evolves. People improve it, people adapt it, (and) people fix bugs. And this can happen at a speed that, if one is used to the slow pace of conventional software development, seems astonishing.” (opensource.org)

Community credibility is an underlying motivator for joining an open source project. The lure of open source includes solving technical challenges; drawing of making a contribution the rest of the community can use; the enhanced skills and reputation (marketability) that comes from being an active member of the community; and the potential for providing fee-based services for open source software. Developers are motivated by the opportunity to branch out and work with products they don’t normally work with in their day jobs – say, video programming – and they are also motivated by pure fun (Gustafson and Koff). Every single corporate entity in the U.S. has some open source utilization today in either a desktop environment, server environment, in the cloud environment or all. It exists at all level and is pervasive across the board. OSS is here to stay: did you use an OSS today? If so consider donating to software foundation that supports it.


Sunday, September 12, 2010

Point-to-point SOA

Service Oriented Architectures realizations are coupling departments within large organizations. Web-Services are being developed without compliance or guidance from any actionable enterprise architecture design. Without a full soup-to-nuts solution architecture template available to teams, well-intentioned developers are unfortunately creating a web of point-to-point systems architectures with SOA tools and technologies.

Vendors, marketing, tooling and technology isn't helping integration architectures evolve and arrive at the optimal quality attribute tradeoffs. Most quality attributes, like loose coupling, high cohesion, performance, scalability etc are skewing negatively.

It cannot be stressed enough that SOA is more dangerous with out a proper design in place, than no SOA at all. WSDL, SOAP, XSD, REST etc are still not properly understood or realized appropriately in many organizations. Basic systems architectures are unable to evolve due to a significant lack of skills, organizational constraints, poor processes, personnel and such.

Thursday, September 2, 2010

A Combination Algorithm

The problem: Write an algorithm that can provide combinations of a given word. The combinations need not contain a new word with the same letters.

Input: ABCDE

OUTPUT: ABCDE, ABCD, BCDE, ABC, BCD, CDE, AB, BC, CD, DE etc.

There are several algorithms out there that describe how to create effective combinations, SEPA does permutations, bubble sort and nested loops etc.

After spending some time looking for what’s been done - the one I liked the most was as follows: [0,0,0], [0,0,1], [0,1,1] [1,1,1]: null, A, AB ABC etc.

Incrementing decimals, start with zero, get a binary representation and map it to the array positions. This will give the combinations in constant time. A very efficient algorithm.

   /**
    * Take a word and return a collection of combinations
    * @param sortedWord
    * @return
    */
   public Collection<String> generateCombinations(String sortedWord)
   {
       Collection<String> c=new HashSet<String>();
       char[] broken=sortedWord.toCharArray();
       int combinationLength=new Double(Math.pow(2L, (new Long(sortedWord.length())).longValue())).intValue();
    //  System.out.println("Combination len="+combinationLength);
       for(int loop=combinationLength-1;loop>0;loop--)
       {
       String binary=fillWithZeros(Long.toBinaryString(loop),sortedWord.length());
       char[] bins=binary.toCharArray();
       StringBuffer wb=new StringBuffer();
       for(int a=0;a<bins.length;a++)
       {
           Integer binValue=new Integer(""+bins[a]);
           if(binValue.intValue()==1)
           {
            wb.append(broken[a]);  
           }
       }
       c.add(wb.toString());
       }

 

While there is a nested loop, the loops can be replaced with other techniques.

This is a very high performance combination creation technique. Comments/Improvements are welcome.

Wednesday, March 31, 2010

Debate over Domain Agnostic Connections

I recently introduced after a proof of concept and technology Service Integration Bus to enable Event Driven Architecture style integration across the commercial enterprise.

The first team implemented it exactly as the POC specified. The second team that was responsible to be the durable subscriber raised concerns about Domain Agnostic Connection factories.

The claim was that using domain Specific Connection Factories makes life easier. The basic difference between the two is that one uses for example TopicConnectionFactory to create a TopicConnection, whereas the domain independent connection factory lets you look up a ConnectionFactory to create either a TopicConnection or a QueueConnection. This lets you get flexibility in the app and is basically a new feature in JMS specs.

Anyway the second team was up in arms about using domain agnostic connection factories. “Why is architecture recommending this? It’s making life difficult for us!”. Of course the first thing you learn in software architecture school is :make life hard for the development community. The tone and attitude changed at the end of this debate – architecture was a friend and developers happily followed the direction. How ? Surprised me. This blog entry is probably a note to myself.

How do you convince developers to do the right thing, ‘change’ and adopt a new way of doing things? Sift through words and select the right bytes. Software architects must recognize ‘code’ in spoken language. Understanding the subtle hints and uncovering the real issues. This is the key. Sounds like management skills? Yep, a little bit.

This is not science and they don’t teach you this in college. Negotiation and arguments must be approached uniquely each time based on context. When this ‘senior’ software dev was lamenting about how hard his life is going to get because architecture decided – he was starting getting an audience that did not understand the topic. He kept saying that we should not use Domain Agnostic Connection factories, I needed to break it down quickly and stop the nonsense. Usually when there is resistance to change, it is mostly because this new change has not really sunk in mentally. Addressing concerns objectively is the first step.  Use technical facts, lay it down straight. This needs to be the corner stop of every architect and a must-have skill. If you don’t know why you’re recommending something, just don’t. If you do -  SEI’s ATEC skills comes in pretty handy here.

In this particular case, the facts were that the recommendation had clear advantages. However, this did not seem to satisfy the senior developer. After some social digging it turns out that the fact that the architectural decision to use Domain Agnostic Connection Factories was made without the sr developer in question being involved was a contributing factor to the resistance. This little tit-bit of information was gathered from his peer. I opined that this was the key to his constant lamenting. With this hypothesis I formulated the next steps. Now, one has to be careful because this is the type of situation when people start looking backward and not forward. Even in hindsight, it was not possible to predict this engineer’s interest in the topic. It was explained that these decisions were made along with a host of other decisions through a Proof Of Concept and technology evaluation. This was reviewed and approved by other senior stakeholders. It was documented on the wiki and the link was sent via email. I worked with the technical person senior to him in his team – and explained the matter in technical terms. He heard from him and me, saw that others were on the same page too. A few more emails with links to document and an encouraging note – things started to look better. The attention he received probably made him realize that it wasn’t a purposeful exclusion on that decision but the natural process of technology selection by a whole host of senior technologists. The technical reason for using domain agnostic connection factories is sound and makes sense for advanced JMS systems that don’t want to have 2 connection factories depending on what messaging resource they are connecting to.

He replied back saying that he would follow this direction. It turns out that the direction was finally adopted. So what is the moral of the story ? Sometimes it matters how you make others feel about technology regardless of what the technology does for them.

Wednesday, February 24, 2010

Are DSLs simply XML Hell?

DSL : what is it ? You have used a Domain Specific Language. Trust me. Demystify DSL: it simply a narrowed and specific semantic problem that solves a narrow set of problems.

Model-View-Controller (MVC) is a common pattern for Web development, Apache Struts has come to the rescue in the past. Each Struts application uses a configuration file (XML). The language (dialect) of the XML specifies exactly how the MVC pattern would be implemented for the specific implementation this is DSL.

Object Relational mapping was a common problem made worse by general purpose languages and APIs(e.g. Java and JDBC), along came the a natural ORM (e.g. Hibernate) with specific configuration files that mapped POJOs to Tables. The configuration file (XML) supported a dialect (ORM DSL), of course it was not called DSL back then they were simply configuration files (aka XML Hell).

DSLs don’t necessarily mean XML. For example, running rules in Java was ‘simplified’ by a Rules Engine implementation e.g. Jess. This used a DSL - Jess 7 has its own declarative XML rule language called "JessML" (a DSL).

What is the advice for people who are trying to learn DSLs and master them ? Don’t. Try not to master DSLs instead focus on the domain of the problem, understand the software architecture and how it fits, understand what the pattern of problems are, figure out how best to apply design patterns that solve them. Understand the pain of the domain (e.g. web-site design, object-relational mapping framework, rules etc), understand the inefficiencies, then focus on an over all design within the domain that solves most of the problems. Finally, look at the DSL as a tool to solve the problems in a specific efficient way. Then you will see there is no XML but simply a graceful solution.

Is WSJF "better" than traditional ROI calculations for Applications?

I love road trips, and i like analogy.   The Premise: Two couples are planning a road trip. The "Perfection" group: This group spe...