Category: Computers

Lean Code – Part 2

Our article on “Lean Code” strongly suggests that the principles of lean can also be applied to the realm of software development, applications, and more specifically, programming.

Python has evolved to become a very popular and powerful programming language.  However, as mentioned in “Lean Code“, the performance of your application or program is as dependent on the skills of the programmer as they are on the capabilities of the programming language itself.

An example of skill versus language can be found in “Python for Data Science – For Dummies – A Wiley Brand” by John Paul Mueller and Luca Massaron (ISBN:  978-1-118-84418-2).  Page 106 of the book states:

It’s essential to realize that developers built pandas on top of NumPy.  As a result, every task you perform using pandas also goes through NumPy.  To obtain the benefits of pandas, you pay a performance penalty that some testers say is 100 times slower than NumPy for a similar task.

The functionality offered by pandas makes writing code faster and easier for the programmer, however, the performance trade-off exists for the end user.  Knowing when to use one module over the other depends on the programmer’s understanding of the language as opposed to simply providing a specific functionality.

Python for Data Science provides sufficient information to decide the best fit case for either pandas or NumPy.  The relevance of sharing this is to stress the importance of continually reading, learning, and understanding as much as possible about your language of choice for a given application.

From the end user’s perspective, performance matters and everyone wants it “yesterday”.  So, the question is, “Do we code quickly and sacrifice performance or sacrifice delivery for quick code?  What would you do?

Until Next Time – STAY lean!

Versalytics - Logo (293x293)

Related Articles / Books:

 

Advertisements

GUI’s, wxPack, and wxWidgets

The official wxPython logo
The official wxPython logo (Photo credit: Wikipedia)

wxWidgets and GUI’s

In our post “Where’s the Graphics? Learning from our Roots (Tcl / Tk)” we focused on Tcl/Tk as a primary GUI development language.  We also mentioned QT as a viable alternative.  QT provides a more powerful GUI development API when compared to Tcl/Tk, however, the licensing schema for QT is also more complex.

To paraphrase the description from the wxWidgets website, wxWidgets is a C++ library that includes bindings for C++, Python and other languages to create cross-platform applications for Windows, Mac OS X, Linux, and more.

wxWidgets is available free of charge and offers a comprehensive collection of widgets that make it ideally suited for advanced GUI intensive applications. By using the native platform API, wxWidgets provides a native look and feel to your applications.

The latest version of wxWidgets is 3.0.2 as announced in the latest news release dated October 6, 2014.

wxPack

Thanks to wxPack, we’ve expanded our list of cross-platform GUI’s to include wxWidgets.  wxPack greatly simplifies the task of installing and setting up wxWidgets on your machine.  wxPack is a full wxWidgets Development Kit, complete with wxWidgets source and binaries, wxFormBuilder (RAD Tool), and more.  Without wxPack, installing wxWidgets is a task best left to more seasoned developers.

wxFormBuilder

From a development perspective, wxFormBuilder is the tool that ultimately caught our attention.  More specifically, wxFormBuilder offers the following features that are ideally suited to our language base and development environments:

  • Visual design of wxWidgets dialogs, frames, panels, toolbars and menubars
  • Source code generation for C++, Python, PHP, Lua and XRC
  • Support for wxWidgets 3.0 widgets (wxRibbonBar, wxPropertyGrid, wxDataViewCtrl, …)
Python and Qt
Python and Qt (Photo credit: Wikipedia)

Selecting Your GUI Tool Kit

The wealth of information available to learn and implement Qt suggests it is one of the better supported GUI tool kits in general. TKinter (Tcl/Tk) is also well supported due to it’s inclusion with the standard Python distribution.  Regardless of the tool kit chosen, the initial learning curve can be rather steep for more complex applications.  The number of widgets and options available with each package only add to the challenge of which package to choose.

Keeping it Lean

Too many options can make for more complicated interfaces than are necessary to meet the needs of the application and it’s end users.  For Python, TKinter provides a minimal widget set that serves the majority of our requirements.  That it’s already included with the standard Python distribution makes TKinter an even more convenient and attractive option.

There are times where a higher level of complexity and sophistication is necessary.  Of course, to learn every GUI kit available isn’t an option available to everyone.  The wealth of information and code samples available for QT make it a highly regarded option.

wxWidgets may just be the Goldilocks solution, falling somewhere between simplicity and sophistication where the tools available make it “just right” to get the job done.  A quick review of the wxWidgets Class List suggests there are more than enough features to develop a robust GUI for your application.

Ultimately, the right choice is the tool kit that is both effective and efficient for the given application.  Simplicity serves the purpose best especially during rapid development cycles and iterations.

Your feedback matters

If you have any comments, questions, or topics you would like us to address, please feel free to leave your comment in the space below or email us at feedback@leanexecution.ca or feedback@versalytics.com.  We look forward to hearing from you and thank you for visiting.

Until Next Time – STAY lean

Vergence Analytics

ActiveState Tcl 8.6.2.0

Tkinter demo: many widgets
Tkinter demo: many widgets (Photo Leancredit: Wikipedia)

It’s hard to believe that one day after we published “Where’s the Graphics?” ActiveState released Tcl 8.6.2.0.  Though the link to the download page remains the same, we updated the context of our post to reflect the latest version number.

Visit the ActiveState Tcl 8.6 page for more detailed information.  ActiveState’s ActiveTcl Community Edition is a free, ready-to-install distribution for Windows, Linux, and Max OSx.

Though other GUI options exist, Tcl/Tk is a proven technology that has persisted for more than 25 years.  The latest release offers features that continue to keep Tcl/Tk relevant and at the top of our GUI toolkit.

In addition to the numerous resources listed in our “Where’s the Graphics” post, a wealth of information can also be found at wiki.tcl.tk.

Your feedback matters

If you have any comments, questions, or topics you would like us to address, please feel free to leave your comment in the space below or email us at feedback@leanexecution.ca or feedback@versalytics.com.  We look forward to hearing from you and thank you for visiting.

Until Next Time – STAY lean

Vergence Analytics

Where’s the Graphics? Learning from our Roots (Tcl / Tk)

Tkinter demo: many widgets
Tkinter demo: many widgets (Photo Leancredit: Wikipedia)

One of our “side bar” challenges is developing software solutions (applications) for our clients.  Simple or complex, they all have one element in common, a Graphical User Interface or GUI.

Imagine the surprise and disappointment on the faces of many beginning programmers and developers when they discover that powerful languages like Assembler, C, C++, and even Python start by teaching you how to write software from the command prompt!

We’ve been there too!  When we decided to learn Python – a powerful, high-level, dynamic interpreted scripting language that is quickly becoming the language of choice for new developers – we were just as surprised to be writing and running programs from the command line (C:\).  Even Python’s Interactive Development Environment (IDLE) uses a “prompt” driven interface.

Basic Fundamentals

Our journey with Python originated with our interest in learning C++.  When we discovered that Python is written in C++, we were curious to see how C++ could be used to create an even more powerful dynamic language.

Learning a language and creating a GUI are related but they are not necessarily the same.  Developing an application requires a solid understanding of the core language itself including its capabilities and constraints.  A GUI “simply” serves as a means of interacting with the core application without concern for how the program actually functions or performs internally.

By way of analogy, driving a car does not require us to understand the intricate functions of the engine and powertrain.  As drivers, we use a key to turn the engine on or off, a gear selector, the accelerator and brake pedals, and the  instrument panel – all of which are the equivalent of a GUI in terms of function – to control and monitor the vehicle.  As developers, however, we are more concerned with ensuring that the engine and powertrain function as expected.  In other words, the GUI can wait but it should still be a consideration during the development process.

Where’s the Graphics?

The result
The result (Photo credit: Wikipedia)

Is writing applications with a nice, clean, graphical interface a mystery that only professional programmers can master?  This answer may surprise you.  Anyone can create a GUI and there is yet another language for doing just that:  Tcl/Tkinter. Tcl is a general purpose scripting language developed by John Ousterhout in 1988 and was designed to enable communication between applications.   Tkinter is a cross platform toolkit that provides a variety of widgets for building GUI’s in many languages.

Most introductory books on Python are concerned with teaching the core fundamentals of the Python language itself, though some may provide a brief introduction to Tkinter.  It is significant that Tkinter is included as part of the Python distributions that are freely available for download from the Python.org website.  Including Tkinter in the Python distribution enables the development of simple to complex GUI’s for your application.

Back to the Beginning

Although other packages such as wxWidgets and PyQt are available, that Tkinter is included in the standard Python distribution makes it much easier to integrate and explore.

To fully understand the Tcl/Tk programming language, we decided to search for more information.  We discovered an excellent Tcl/Tk Tutorial at TutorialsPoint.com where we are served with a wealth of information for both Tcl and Tk.  This is certainly enough to whet your appetite for more.

The TutorialsPoint Tcl/Tk  Tutorial describes several features of Tcl and this is one that caught our attention:

 “You can easily extend existing applications with Tcl. Also, it is possible to include Tcl in C, C++ or Java to Tcl or vice versa.”

What seems like an overly extended tangent from our original pursuit of C++ has become a worthwhile journey.  One of our greatest frustrations while learning C (and C++) was the lack of information for developing a graphical interface for our applications.  It looks like we may have discovered something that will help us along the way for a variety of languages.

Tcl/Tkinter Resources:

If you are using an Apple computer, Tk and Python are already installed on your system as part of the OSx.  The versions installed depend on the version of OSx you are running on your computer.

We recommend visiting SourceForge.net and searching for the term “Tcl/Tk”, without the quotes, using the site’s search box.  You will be presented with the latest version of Tcl (8.6.2) and variety of other related tools including several Tcl extension packages and IDE’s.

To get the latest copy of ActiveState‘s version (8.6.2.0) of Tcl/Tk for your system (Windows, Linux, Mac OSx) visit the ActiveState.com download page.  The community version is free and will be more than sufficient to get you started.  Click here to see some interesting code snippets or “recipes” on the ActiveState site that demonstrate some of the key features of Tcl/Tk.

We already suggested that TutorialsPoint offers an excellent introduction to Tcl/Tk Programming, however, we have also discovered several books that are worth mentioning to get you started:

Python and Tkinter GUI:

Python and Other GUI’s:

C++ and Qt:

English: Screenshot Qt Designer Русский: Скрин...
English: Screenshot Qt Designer Русский: Скриншот Qt Designer (Photo credit: Wikipedia)

While some are comfortable to accept the tools at face value, we found it helpful to delve into the core of Tkinter and Tcl to fully appreciate and understand the underlying language and tools that are available to us.

Finally

As Operating Systems continue to compete for market share, it is good to know that we have cross platform GUI options that will allow us to write applications that will work on all of them.  To this end, we’re less concerned about “who wins” and more concerned about writing efficient and effective applications for our clients.

Your feedback matters

If you have any comments, questions, or topics you would like us to address, please feel free to leave your comment in the space below or email us at feedback@leanexecution.ca or feedback@versalytics.com.  We look forward to hearing from you and thank you for visiting.

Until Next Time – STAY lean

Vergence Analytics

Apple-opoly: It’s Not a Game

money
money (Photo credit: 401(K) 2012)

Some people can hardly contain their excitement when a company like Apple is thriving with sky high profits in the midst of a dismal global economy. Yet, this same excitement is seldom shared when banks or oil companies report similar results. Wouldn’t we all prefer reduced fees or lower gas prices over excessive profits from the very companies that portend to serve our best interests?

This past week a colleague forwarded an article from cultofmac.com titled Apple’s Astonishing Profit in Context. My colleague’s opinion of Apple’s incredible performance is also echoed in the article itself. Of course, I would be hard pressed to disagree with them as I’ve written many times before that “The proof of wisdom is in the results.” The following quote from the article puts Apple’s “wisdom” in perspective:

From October 2011 to September 2012 Apple made more money than Microsoft, Ebay, Google, Yahoo! Facebook and Amazon combined. In that same period, Dell, Asus, Intel, Acer, IBM, Lenovo, and HP (basically the entire PC industry) only made $19.3 billion in profit, which is less than half of Apple’s profit.

Who can argue?

Apple has effectively advanced available technologies into unique devices that have dominated several market segments including: Computers (Mac), Smart Phones (iPhone), Tablets (iPad), and Media Players (iPod). Although Apple did not necessarily “invent” the core technologies that define their devices, they did find innovative ways to integrate them to provide an extremely user friendly experience.

Hardware is not Apple’s only source of revenue as the “App Store” is yet another venue that continues to feed Apple’s bottom line. If I understand the terms correctly, Apple receives at least 30% of every App Store purchase and as Apple is quick to mention more times than not, the number of available apps is in the hundreds of thousands and continues to grow every day. That in and of itself is an incredible feat.

I contend that the level of success enjoyed by Apple has peaked. This article, “Apple Losing Lustre On Wall Street: 3 Theories Why” is one of many that have surfaced recently as Apple’s stock has plummeted over the past few days. As stated in my recent post, Apple’s Best Kept Secrets … May Be Their Worst Enemy, Apple’s products are expensive and are subject to higher rates of planned obsolescence giving people cause to “wait” before buying.

Waking Up The Competition

Many would suggest that there is no competition when it comes to Apple’s products and, to some extent, there may be some truth to that. The question is, “What really sets Apple apart from it’s competitors?” I contend that a key component of Apple’s success is driven by their exclusive integration of the iOS operating system into virtually all of their devices. When compared to the number of competing companies selling electronic devices based on the Windows and Android operating systems, we quickly learn that Apple is the sole proprietor of it’s core hardware / software environment and the current court battles with Samsung strongly suggest that Apple wants to keep it that way.

In other words, while there are a number of competitors in any given segment, Apple has no direct competitors that manufacture computers using their operating system thus allowing them to command the price at which their devices are sold. In this context, Apple can determine it’s own price points, void of any threat from a competing manufacturer. From a financial perspective, Apple’s strategy to stay the course is a huge success – at least it was until now.

Image representing Windows as depicted in Crun...
Image via CrunchBase

The wisdom of Apple’s strategy to integrate hardware and software is perhaps a lesson learned by Microsoft as they too have joined the tablet race with the introduction of the Surface RT and soon to be launched Surface Pro. There is, however, a very stark difference. Whether Microsoft intended to become a tablet manufacturer is open to debate but Microsoft did not exclude or attempt to prevent their competitors from developing devices based on the Windows operating system. Microsoft certainly intentioned to develop a hardware environment that will best reflect the capabilities and performance of the Windows 8 operating system.

Competition inspires innovation as manufacturers attempt to earn a bigger share of the market with more differentiating features and ultimately lower prices. As a result, margins are strained on Windows 8 devices and competing products using Google’s Linux based Android operating system among others. Unlike the exclusive Apple-opoly market, consumers continue to reap the greater benefit of an open competitive market in the “non-Apple” world.

There is indeed a price to be paid to sustain a company that attempts to maintain an exclusive monopoly in the market place. I contend that Apple has more to lose and very little to gain as competitors continue to define and differentiate themselves in their applicable market segments.

The “App” Store – Remember Your Roots

Chart showing downloads and available apps on ...
Chart showing downloads and available apps on the app store over time, since the App Store was opened in 2008. (Photo credit: Wikipedia)

If Apple’s devices are the cash cow, then the App Store is the cash calf. As mentioned above, Apple’s take is 30% of every App Store purchase. For a developer, losing 30% for the opportunity to sell an “app may be a great deal but … to a company like Microsoft, nothing could be further from the truth. Presently, Microsoft is subject to the same “App Store” rules of engagement as any other developer and this has now become a major point of contention between the two companies.

When it comes to Microsoft, Apple’s memory seems to be lapsing. In 1997 Apple (very much like RIM) was struggling to stay afloat and Microsoft’s Bill Gates stepped in to bail them out. It seems this gesture of goodwill has waned as Apple has subsequently grown to become a monopoly of it’s own making. In the world of Windows, Microsoft’s Office suite is unparalleled and I suggest the same can only be true in the world of Apple.

It appears that relationships between people still matter in the world of business and we can only wonder if Steve Jobs would feel differently about giving Microsoft a break in the App Store. Clearly, Apple would be a different company – or not exist at all – without the injection of Microsoft’s support as announced on August 6, 1997 at Mac World Boston. As Steve Jobs himself said during the conference:

“We have to let go of this notion that for Apple to win, Microsoft has to lose.” – Steve Jobs

Steve Jobs encouraged the audience in this video to “think differently”. Perhaps those who have succeeded Steve Jobs have forgotten (or never had the opportunity to remember) what it was like all those years ago when they were struggling to just to stay afloat. If there was ever a move to burn bridges with a once “rival turned ally”, the app store’s rules of engagement is one of them.

The Extremes

Remember RIM and the BlackBerry? They too have an exclusive operating system and hardware platform that at one time lead the smart phone segment by storm. The BlackBerry Messaging (BBM) service between BlackBerry devices is second to none and now includes BBM voice calls. Apple’s iPhone was a major disruption to both hardware and software as we knew it, offering users a substantially improved experience with available technologies. RIM’s market share and stock prices decreased dramatically for failing to introduce fresh, innovative technologies in a timely manner. Whether RIM’s OS10 can reignite the passion for their products and the profits in kind remains to be seen.

So hopefully what you’ve seen here today are some beginning steps that give you some confidence that we too are going to think differently and serve the people that have been buying our products since the beginning. Because a lot of times people think their crazy, but in that craziness we see genius and those are the people we’re making tools for. – Steve Jobs

Today, RIM is in a place where Apple once stood. Unfortunately for RIM, there is no rival stepping up to bail them out. In today’s world, rivals simply wait for their competitors to fold or file for bankruptcy before swooping in to reap what’s left behind. It is unfortunate, but as time will tell, consumers who are left with empty pockets will soon part ways with companies that choose to monopolize a market that serves the best interests of their shareholders and the bottom line.

Lessons Learned

Value is Not Market Share – In the delicate ecosystem of finance and business, the underlying theme is the perception of “value” for the consumer, the company, and it’s shareholders. I commend and praise Apple for the design and quality of their hardware with few exceptions although I have expressed my dissatisfaction with the frequency at which these devices change. As for their software offerings, I am also somewhat underwhelmed, at least from a business perspective. As for connectivity, Apple provides a seamless bridge between devices with unparalleled ease.

However, knowing that up to 40% of the purchase price is gross margin, the question for Apple devices still remains, “Does the price reflect the true market value?” Fundamental economics would suggest that the value of a product or service is determined by the price the consumer is willing to pay. I contend that in a society based on capitalism, competition will yield a price that better approximates the true value of a product or service.

“Success breeds complacency. Complacency breeds failure. Only the paranoid survive.” — Andrew Grove, co-founder Intel

Competition = Innovation – The Windows 8 and Android operating systems give us a greater appreciation for how real competition can lead to innovative hardware and software technologies at lower prices that benefit consumers versus those that ultimately aim to benefit shareholders. RIM’s new BlackBerry 10 reaffirms the inertia that exists within a company where only two options exist – to survive or die. With that inertia, we now see momentum building for the unveiling and launch of another new and innovative solution in hand held devices from BlackBerry.

Hansei / Reflection – Success can be both a blessing and a curse. Too few companies take the time to reflect on their history to appreciate their current state of affairs. Very few companies like Apple can claim to have risen from the ashes to become a self sufficient world renowned icon. However, in their wake, Apple’s success has also led to a certain “ego” or culture of arrogance that suggests “nothing can stop us now.” As we consider the current court battles with both rivals and allies, it’s difficult to discern which is which.

Collaboration = Mutual Successes – Success is seldom the result of one person’s effort and typically the result is greater than the sum of its parts.

We can choose to fight for the current state to preserve “what is now” or we can – in the words of Steve Jobs – “think differently”.

Until Next Time – STAY lean

Vergence Analytics

Transition Versus Change – 2013

Change Management
Change Management (Photo credit: larry_odebrecht)

The time between Christmas and New Year’s eve is one of transition as we consider the events that occurred over the past year and prepare for the new year ahead. Experts are sure to present their annual summaries and will also attempt to “predict” what may be in store for us in the year to come. As lean leaders we also recognize the necessity to make and take the time for introspection and hansei (reflection).

Lean is by definition a perpetual transition from the current state to an ideal future state as we understand it. As our culture and technologies evolve, we continue to open doors to more opportunities and perhaps an even greater potential than first imagined. As such, we seek to advance our understanding as we pursue our vision of lean and it’s scope of application.

Lean is often described as a journey. While the vision is clearly defined, the means for achieving it continue to evolve and, as we’ve stated many times before, “There’s always a better way and more than one solution.” From a lean perspective, the Plan-Do-Check-Act (PDCA) cycle challenges us to consider every change as a temporary state where each subsequent iteration ultimately brings us closer to realizing our vision.

Recognizing that we are in a continual state of transition should give us cause to embrace the ideology that the nature of change can only be viewed as a temporary condition. True resistance to change should only occur when the vision itself is compromised. Similarly, the absence of a clear vision is also cause for resistance. We contend that where the purpose or vision remains constant, the means or the methods of achieving it – incremental or disruptive – are more readily adopted.

The “Change Curve” presented in the diagram above clearly suggests that the commitment to change progresses from Leadership to Change Agents and finally to the End Users with each “group” requiring an increasing span of time to absorb and embrace the change accordingly. A potential for frustration and resistance to change occurs when the next iteration is introduced before the change that precedes it has been adopted and “experienced”. For this same reason and as suggested in our post, “Apple’s Best Kept Secrets … May Be Their Worst Enemy“, companies (including Apple) must be careful to manage the frequency at which change occurs to avoid frustrating employees and potential customers in the process.

The absence of change or lack of evidence that change is coming is and should be cause for concern. Research In Motion’s (RIM) continued delays in releasing the BlackBerry 10 (BB10) resulted in lost confidence from investors and share prices dropped sharply in return. RIM’s attempts to “talk” through the company’s strategy and the future of the BlackBerry could not sustain their one time dominance of the smart phone market. Thankfully for RIM, the BlackBerry, slated to launch on January 30, 2013, is receiving raving reviews as a high quality next generation smart phone. Only time will tell if too much time has passed to win people over.

Lean leaders recognize that real change begins in the hearts and minds of every stakeholder and is a pre-requisite before any physical changes can occur. A learning organization embraces the concept of “transitional” thinking where each change represents the current level of knowledge and understanding. Where perpetual learning occurs, transitional thinking ensues, and subsequent changes mark our progress along the journey.

As we look forward to 2013, we thank you for your continued support and wish you the best of successes in the New Year ahead.

Until Next Time – STAY lean

Vergence Analytics