Tuesday, October 4, 2011

Creating Objects Design Situations

 

Understanding how to create an object goes beyond the new() syntax, a good designer will think about the current requirement and future requirements to ensure decoupling layers, build in flexibility and maintainability. For example,

So you have an object that needs to create another class, however

…it cannot anticipate the class of objects it must create

…it wants only its subclass to specify the object it wants to create

…it wants to localize knowledge of which helper subclass is the delegate

How would you design for these quality attributes?

How about the following:

A client class needs a complex object, however it also

… wants to vary the product’s internal representation

…isolate code for construction and representation

…gives you greater control over the construction process

How would you design for these quality attributes?

 

What if you wanted to:

… isolate the concrete class from the client that needs it, and

… allow for exchanging classes of products easily

…enforce a common consistent product interface across families of products

What’s going to be the pattern of choice, designer?

If you answered Factory, Builder and Abstract Factory – then that’s pretty darn good – you remember your GOFs, which are like the ABCs for software architects (or should be).

Monday, October 3, 2011

Java EE 5 Security

Enterprise Java provides abstracted security APIs and concept that sit on a robust security foundation at the Java Language Specification and implemented by Java Virtual Machines:

Automatic Memory Management

Secure Class Loading

Strong Typing

Byte code Verification

At the time the security design was unprecedented, nothing came close to the security model of an interoperable platform. However with the advent of Java Applets and sandboxing, clunky jar signing processes and key stores, users and system designers shed away.

Java EE 5 continues to build and extend a robust security platform for its EJB and Web containers – the simplified API looks for isCallerInRole and isUserInRole respectively. Unfortunately not all real security threats can be handled from within the container.

Denial Of Service attacks require man-in-the-middle and session hijacking to be addressed, typically outside the container – at the network layer. Additionally, nothing can be done to prevent social engineering. That’s a human only vector.

Saturday, September 24, 2011

JMS Header Values, who sets what

JMS API defines headers for messages that are sent asynchronously to a message destination (Queue or Topic).

A Client that sends a message has the ability to select 3 values:

1. JMSCorrelationID

2. JMSReplyTo

3. JMSType

 

These 3 values have meaning to the receiver of the message, and may have pre-defined semantics.

These can be useful to Browse the messages, a QueueBrowser object can read and display messages that are sitting in the queue by reading its header messages. Note, that the API doesn’t support browsing topics. It is advisable to keep an internal xml database record of messages that are destined for a topic, and wrap the commit atomically using a 2 phased commit protocol.

Sunday, May 8, 2011

Updating Grub 2 Config

Updating Grub 2 - 

If you want to change your grub configuration (reorder, change, remove etc) - there are TWO steps

1. Make The Change

2. Update Grub

 

For example, If you want to change the selected OS to boot from (usually the first one is selected by default).

rohit@lenovo:~$ sudo gedit /etc/default/grub 

rohit@lenovo:~$ sudo update-grub

Generating grub.cfg ...

The steps above, essentially means, I opened the grub file in a text editor, made changes and saved it. Then I ran update-grub to cement my changes. Done

Sunday, May 1, 2011

5 Things Ubuntu STILL needs your support on

I have been an avid Ubuntu user for 4 years and Linux user for 10, there have been significant several improvements over the years that have made it a pleasure to use Linux 80% of the time.

But listing these will help guide the next few releases and help early adopters understand the risks.

 

TOP 5 Missing Features in UBUNU (and Linux)

5. Speed

Ubuntu boots up way faster than Windows XP, Vista and Win7. However, once Gnome (or KDE) startsup the user-perception of performance lags. Ubuntu/Gnome and Kubuntu are markedly slower to start applications than Win Xp or Win7.


4. Office 2010-like features

OpenOffice and OfficeLibre don't compare with Microsoft Office 2010. Features like One Note and Smart Art, MS Visio (yes, it's still better than Dia), has left the open source community challenged to meet or beat the new features provided in Office. 


3. Better screen real estate utilization

Screen real-estate is precious, and Win Xp did an awesome job on rendering the toolbars and icons to optimize on both low resolution monitors as well as high resolution monitors. For WSXGA screens, XP is still far better that Gnome 2x. A partial workaround is to use a compact theme, but it does not suffice. KDE does a better job than Gnome, and XP does a better job than KDE in screen real estate utilziation.


2. Support for Apple products: iPad, iPod

Support for iPads and iPods is essentially missing. You cannot use iTunes on Linux. Shame on Apple. Not only is iTunes a poorly designed and resource hungry software, it is not cross-platform. Windows is the only 'other' OS that is supported.


1. Support for Netflix

Shame on MIcrosoft and Netflix. Microsoft has not allowed DRM to be ported. Netflix seems committed to Silverlight. The combination has left Linux and Android operating systems in the cold, when it comes to Netflix movies. This is major strategic risk to Netflix. Not from Linux, but from Android users. Watch for Amazon in the this space. If Amazon supports a true cross-platform movie-watching experience Netflix will have a serious competitor.

 = No Linux or Android

Conclusion

If you are planning to check out Linux and any of its distributions for the first time, I strongly reccommend Ubuntu/Gnome or Kubuntu which is closer to the Windows user experience. Be aware of the missing features on the platform. In the next 3-5 years, Linux needs support from you and the corporations to be a viable platform for day to day computing needs.

 

 

Thursday, March 31, 2011

3 rules to understand attitudes and actions

Here are my 3 rules to understand people's attitudes and actions.

 

Rule #1. If you want to understand people's attitudes, first understand their motives.

Rule #2. If you want to understand people's actions, understand their incentives.

Rule #3. If you want to understand people politics, read Rule #1, Rule #2.

 

----
Case in point 

 

Health Care Reform, War

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, January 2, 2011

Offline Desktop Blog Clients for Linux

Live Writer works like Microsoft Office (or OpenOffice Writer), once you're done writing your document, you can simply Save, and/or Publish to your blog.

I have Live Writer installed on my XP slice that I run on my linux laptop. Running Virtual Box does take away CPU when running XP - and frankly I wanted to be able to use Linux for all my needs.

I was disappointed. After using several offline desktop oriented blog clients for Linux , the verdict is that none of them offer the features that LiveWriter does.

GnomeBlog (Blog Entry Poster)

 

This is the User inteface - it is minimal, does not have off line save options, cannot be used by any serious blogger.

 

 

If you're looking to post casual updates, almost tweets or micro blogs - from your desktop then this may be a fit. But why bother? Just get a Twitter account and use TweetDeck that runs on Adobe Air.

GTKBlog


For some reason GTK blog looked attractive but would never run on Ubuntu10.10 - I did not bother to find out why. I did get a screen shot from their website.

rohit@lenovo:~$ blogtk

Traceback (most recent call last):

  File "/usr/bin/blogtk", line 14, in <module>

    import gtkhtml2

ImportError: No module named gtkhtml2

Ok -so its missing some dependencies - and needed to be installed - it wasn't there in the repos. I don't want to compile it from source. Just.

ScribeFire

So I proceed to install ScribeFire - which is an add on to both Chrome and Firefox.

 

Let's you open it from Chrome (or Firefox) and lets you manage the text offline.  

You CANNOT place images in Offline mode. This is a huge flaw.

 

Drivel Journal Editor

 

Drivel has more features but does not handle images in offline mode with any grace.

Drivel, too cannot manage images without being connected to the Internet. 

Conclusion

None of the Desktop Blog clients on Linux manage images offline with any grace. LiveWriter from Microsoft is superior to all Linux Desktop clients that I have used.

If you were to still choose, I would go with ScribeFire. Hope that someone will take the time to upgrade or write a new Desktop blog client in 2011.

The Human-AI Partnership: Why Mastering Touch Typing is Your Next Generative AI Superpower

Generative AI requires humans to establish thought partnership rather than allow AI to take over critical thinking skills. I believe that ty...