Tag: Programming

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

[twitter-follow screen_name=’Versalytics’ show_count=’yes’]

Vergence Analytics
Advertisements

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

[twitter-follow screen_name=’Versalytics’ show_count=’yes’]

Vergence Analytics

On Target Tangents

Time Tangents

Our world is full of distractions and we often find ourselves on a path that seems so distant from our original plan. We wonder where the time went and ask ourselves …

“How Did We Get There From Here?”

Are tangents disruptive impulses that take our eyes off of the goal, causing us to lose focus, and drain away our valuable time? Or, do we embrace them as an extension of “how we think” and seize the opportunity to expand the scope of our original thought processes.  Our desire to learn fuels our passion to …

Explore New Options

Some time ago we expressed our interest in learning the C++ programming language.  C++ is an amazing language and we have gained a real appreciation for object oriented programming.  While learning C++, we discovered that another very powerful language, Python, was written in C++.

Naturally, we decided to check out Python to see the power of C++ in action.  To our surprise, we learned that Python is readily available at no charge from https://python.org, is very powerful, and is an extremely versatile Object Oriented Programming language.  Python is also relatively easy to learn and is now our language of choice for rapid prototyping and development of complex solutions.

Today we discovered yet another language:  “Go”.  Coincidentally, we stumbled upon a post at TechCrunch.com titled, “Google’s Go:  A New Programming Language That’s Python Meets C++”.  We downloaded “Go” from GoLang.org to explore what this language brings to the table.

We’re committed to continue learning C++, however, we would be remiss if we decided to simply stick to the straight and narrow path of one language alone.  Where speed of execution is a factor, C++ prevails.  Where speed of execution, small size, and a “close to the metal” solution is required, Assembler takes precedent. However, where speed is less of a concern, a solution in Python is heavily favoured.  As we’ve stated many times before:

“There’s always a better way and more than one solution.” ~ Redge

When Opportunity Knocks … Answer

It would be easy to ignore the distractions that seem to stall our progress and keep us from reaching our destination, however, sometimes the journey is best enjoyed when we stop and take in the sights along the way.  In this case, the ride has been an eye opening experience.

Although we started our learning process with Python 2.7.6, we’re currently using Python 3.4.1.  Python is available and runs across the three platforms that concern us most:  Windows, OSX, and LINUX.  Soon after, we also downloaded Anaconda Python from Continuum Analytics.  The reasons for downloading Anaconda Python will become clear once you’ve had a chance to delve into the world of Python and all it has to offer.

Though we may have strayed from our C++ learning process for a short while, the Python experience has been and continues to be a tremendous journey.  Python has presented a realm of significant possibilities in Object Oriented Programming that would otherwise have remained a mystery.

Learning Python

A simple Google search for “Python Programming” will yield a host of web sites that offer tutorials, books, and so much more.  We started with a few simple books and added a few more that we purchased from our local book store to gain a sense of what Python had to offer:

The number of books available on the store shelves pales in comparison to the offerings available on Amazon.  We have since purchased a number of e-books that are easily and readily accessible using Kindle across multiple devices including my iPad and Surface Pro.  If you haven’t had a chance to work with Kindle, we highly recommend it.  It is an excellent app that makes reading e-books a breeze.

Unlocking Potential

Certainly this recent tangent has opened more doors than we could ever have imagined and we’re grateful for the experience.  While this may seem to have little to do with Lean or OEE, we would suggest otherwise.  Each program or script is comprised of multiple processes or series of processes and the environments in which they run are as diverse as the machines we find in manufacturing operations.  From our perspective, programming serves as an excellent surrogate to demonstrate lean practices and the effectiveness of our operations.

Just when you think you have all the answers, consider that one of them may hold more questions than you ever imagined.

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

[twitter-follow screen_name=’Versalytics’ show_count=’yes’]

Versalytics Associates

Executable Python on Windows

We provide solutions to our clients in a variety of forms.  Customized software solutions is just one of them and knowing more than one programming language makes it possible to choose an effective and efficient platform accordingly.

Python is a relatively simple yet powerful language. I was concerned that anyone wanting to use programs written in Python would also have to install Python on their system. After spending a little time researching Python on the internet, I was pleased to learn that Python programs can be converted into executable files – at least on Windows.

You can visit the py2exe.org website for more information including a tutorial and links to download the software required for your version of Python. To quote the first line of the py2exe.org Tutorial page:

py2exe turns Python programs into packages that can be run on other Windows computers without needing to install Python on those computers.

The py2exe installation wizard checks the version of Python installed on your machine. Be sure to select the py2exe version that matches the version of Python installed on your system.  The wizard will not install py2exe otherwise. I’m running Python version 2.7.6 on my Surface Pro 2 and successfully installed py2exe from Source Forge – py2exe for py 2.7

If programming is of interest to you, check out Python for yourself. Like so much on the web today, you can get everything you need to get started free of charge.  All you need is a computer, time, and a little determination.

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

[twitter-follow screen_name=’Versalytics’ show_count=’yes’]

Versalytics Analytics

Back to Class with C++

What does C++ have to do with lean?

The language itself may not do much for lean as we know it, however, learning a new language affords us the opportunity to become students once again.

When we share and teach lean principles, it’s easy to forget what it’s like to be on the receiving end of all that information.  In other words, we often lose sight of what it means to be the student.

  • We ask questions:  Who, what, where, when, why, and how?
  • We overcome resistance to change when we recognize and value our vested interests in the current state.
  • We have a threshold for learning – small units at a time improve absorption and keeps us from getting overwhelmed.
  • We imprint – we learn by doing to improve retention and enhance our learning experience.
  • We understand and work on the premise that there’s always a better way and there’s more than one solution.
  • We celebrate our successes.

Computers are a part of our everyday life both at work and at home. Learning another language provides the opportunity to create and develop software applications that enhance our experience and the experience of others in the future.

Why C++?

Computers have evolved over the years from desktops, laptops, and netbooks to tablets, mobile phones, and even watches! This rapidly changing ecosystem has enabled new technologies that require more evolved object-oriented languages like C++. A growing number of platforms and devices makes choosing a language to support them that much more difficult. Our decision to choose one language over another is dependent on the Operating System and / or hardware that will run our applications – Apple, Microsoft Windows, Unix, Linux, or Android.

There was a time when we used Basic, Fortran, Assembly (x86), and C to develop applications. As Microsoft’s Office suite became more popular, we even extended our expertise to include visual basic for applications (VBA). Assembly language is a low-level language that requires a thorough knowledge of both the hardware and the operating system for a given machine. A medium to high level language such as C/C++ allows us to concern ourselves with the functional aspects of the application rather than the details of the hardware itself.

C++ is fast, fully compiled, object-oriented, portable, and standardized (ANSI and ISO). Standardization assures a higher level of stability and support for a minimum set of language features across multiple platforms. While other object-oriented programming languages exist, like Java and C#, we selected C++ for now. Texts for Java and C# are also part of our language library for consideration on future projects.

Getting Started with C++

The first book you read on a given language will become the lens through which all others are viewed.  In other words, your first book will establish or heavily influence your baseline thinking going forward.

Before selecting any book on programming, read the inside and outside covers as well as the introduction to determine if the book meets with your level of experience and requirements. You should also note that authors typically choose a development system that forms the basis for the lessons that follow.

Though a standard exists for the C++ language, use of the Integrated Development Environment (IDE) and compiler options depends on the product you choose.

The books:

Each book discusses the resources, including software, required to successfully set up C++ and the applicable Integrated Development Environment on your computer. Using a well designed Integrated Development Environment (IDE) simplifies the process of programming, compiling, and linking your programs.

We successfully installed CodeBlocks with the MinGW compiler as well as Microsoft’s Visual C++ Express. Use the internet to see what resources are available – you’ll be surprised at the amount of information that’s available and much of it is free. It’s worth your time to Google “C++” to see what’s out there.

Our Goal

Our goal is to review each book’s ability to teach us the C++ language. As we are learning the language, we cannot attest to the “correctness” or integrity of the content being taught in these books. We’ll share our experiences and thoughts as we dig deeper into the world of C++.

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

[twitter-follow screen_name=’Versalytics’ show_count=’yes’]

Versalytics Analytics

Thinking Outside of the Box

A spreadsheet of my construction showing how n...
Image via Wikipedia

I am always intrigued to find evidence that supports the application of lean outside the realm of manufacturing.  This morning I was pleasantly surprised to find an article published by Bill Wake titled “Lean Manufacturing and Software” where Bill discusses software development from a lean perspective.  Even if you aren’t a programmer or software developer, the article offers some interesting insights and perspectives into a different application of lean principles.

Perhaps seeing this article should not come as a surprise to me.  Some time ago, I published “Lean Office with Excel and VBA” that was featured in an article on Daily Dose of Excel titled “Learn VBA to be Lean“.  Even more interesting were comments that included candid responses from some of the more well-known Excel guru’s including John Walkenbach, a renowned author of numerous books on Excel.

On another occasion, I attempted to demonstrate some basic lean tenets and Standardized Work in “22 Seconds to Burn – Excel VBA Teaches Lean Execution“.  Finally, “Lean Paralysis” makes reference to a simple software development decision to select a sorting algorithm.  When we consider the thousands of lines of code that comprise a software solution, it is noteworthy that each instruction is executed with a specific intent to present a solution to the user.

So, somehow it seems apropos to see an article on software development featured here.  On an even greater scale, this demonstrates unintended collaboration for the greater benefit of all.  Just as stories are an excellent way to communicate and teach new ideas, analogies and “surrogate” applications can also serve to help improve our current level of understanding.

We benefit from the software community where it becomes painfully clear that every instruction represents a step that brings us closer to the eventual solution.  The software development community benefits from lean to improve their software development process.

As I mentioned in “Lean – A race against time“, the application of lean has extended beyond the walls of manufacturing and is further demonstrated in “The High-Velocity Edge: How Market Leaders Leverage Operational Excellence to Beat the Competition” by author, and recipient of the Philip Crosby Medal, Steven J. Spear.  This book exemplifies how lean thinking has emerged in a diverse range of industries including health care, air lines, the US Navy, Automotive, Manufacturing, and Mining.  Even our own local governments are pursuing lean to improve government agencies and services.

I am impressed by what we can learn from others and look forward to learning more.

Until Next Time – STAY lean!

Vergence Analytics
Twitter:   @Versalytics

Lean Is …

A scrapyard.
Image via Wikipedia

What is lean?  The following definition is from the Oregon Manufacturing Extension Partnership website, http://www.omep.org:

Lean Is

A systematic approach for delivering the highest quality, lowest cost products with the shortest lead-times through the relentless elimination of waste.

The eights wastes that accompanied this definition include:

  1. Overproduction
  2. Waiting
  3. Transportation
  4. Non-Value-Added Processing
  5. Excess Inventory
  6. Defects
  7. Excess Motion
  8. Underutilized People

It is very easy to become overwhelmed by the incredible amount of information on the subject of Lean.  I always like to refer back to the basic tenets of lean to keep things in perspective.

Until Next Time – STAY lean!

Vergence Analytics

Twitter:  @Versalytics

An e-Letter from Daniel T. Jones

I received an e-mail today from Daniel T. Jones (Lean Thinking – Womack and Jones) titled “The Financial Consequences of Lean”.  As the content of this e-mail is so relevant to our past discussions, I decided to share it in it’s entirety.  Enjoy.

Dear Redge,

Why is it so hard to see the financial consequences of lean? Failure to answer this dilemma has derailed many lean initiatives. This is not such a problem if top management really understands the significance of focusing on getting everything to flow right-first-time-on-time to customers. Like top management at Toyota and Tesco, they know that good processes lead to good results. Alternatively if you have an experienced Sensei who knows where the gold lies buried and who has worked on similar situations before, there is a good chance that they can help you to deliver the kind of results you expect from lean.
But in my experience help is needed if you are pioneering lean in your organisation while at the same time trying to convince top management that it can deliver lasting financial results. This is particularly true when you are dealing with a complex shared pipeline with multiple steps and routings through which many different products or services flow. It becomes much harder to see where to act to deliver the greatest gains for the organisation and for its customers. And as my colleague John Darlington has shown traditional accounting systems and even sophisticated product costing systems end up rewarding the wrong kinds of actions.
As John puts it, they encourage overproduction by valuing what has been made not what has been sold, they do not recognise the importance of bottlenecks and constraints, they encourage point optimisation rather than flow, they have nothing to say about lead times, they promote the idea that bigger batches lower the unit cost and they encourage cost reductions that often prove to be mirages. In other words they fail to show the power of focusing on compressing lead times, which lies at the heart of lean. Struggling against this kind of headwind is almost impossible for any length of time.
Unlike Financial Accounting for reporting results to the outside world, we are free to choose how to construct our internal costing systems to drive the right kinds of actions. For instance lean organisations use Target Costing systems to focus improvement efforts in new product development. Why do we not do something similar to design and improve how well we run our end-to-end processes or value streams, particularly where they involve shared resources and cross several departments?
John shows how adding operating expenses to value stream maps for all the products going through these shared resources and turning inventories into time gives us the basis for Flow Costing, which relates the time products take to flow through the value stream (rather than to the cycle time through each operation) to the operating expenses of running it. Inventories (and delays in services) are the richest source of insight into how well we are using our capacity to generate money through sales. Shorter throughput times increase the ability to respond to quality problems and to introduce engineering changes, they may make it possible to raise margins and postpone the need for new investment, and meet due dates with lower finished goods stocks.
The real value of Flow Costing is to help set the priorities for lean improvement actions by being able to see the financial consequences in terms of increased sales, less cash tied up in inventories, reductions in operating expenses and postponed investments. These priorities can then be built into the policy deployment goals for each department, and the resources in their budgets to accomplish them. Flow Costing is a powerful way to help to bring throughput times much closer to value creating times, by which time the differences between Flow and Product costing systems almost disappear.

 
Yours sincerely
Daniel T Jones
Chairman, Lean Enterprise Academy

For more on this subject please visit our website at www.leanuk.org where you can…

Please feel free to forward this message to your colleagues, friends, customers or suppliers who you feel would benefit from Lean Thinking.   If this e-letter was forwarded to you and you would like to learn more just visitwww.leanuk.org to sign up to our free Lean community.

I agree with Daniel’s perspective as presented here.  Feel free to leave your comments on this topic.

Until Next Time – STAY lean!

Vergence Analytics

Twitter:  @Versalytics

Achieve Sustainability Through Integration

Innovation
Image via Wikipedia

It’s no secret that lean is much more than a set of tools and best practices designed to eliminate waste and reduce variance in our operations.  I contend that lean is defined by a culture that embraces the principles on which lean is founded.  An engaged lean culture is evidenced by the continuing development and integration of improved systems, methods, technologies, best practices, and better practices.  When the principles of lean are clearly understood, the strategy and creative solutions that are deployed become a signature trait of the company itself.

Unfortunately, to offset the effects of the recession, many lean initiatives have either diminished or disappeared as companies downsized and restructured to reduce costs.  People who once entered data, prepared reports, or updated charts could no longer be supported and their positions were eliminated.  Eventually, other initiatives also lost momentum as further staffing cuts were made.  In my opinion, companies that adopted this approach simply attempted to implement lean by surrounding existing systems with lean tools.

Some companies have simply returned to a “back to basics” strategy that embraces the most fundamental principles of lean.  Is it enough to be driven by a mission, a few metrics, and simple policy statements or slogans such as “Zero Downtime”, “Zero Defects”, and “Eliminate Waste?”  How do we measure our ability to safely produce a quality part at rate, delivered on time and in full, at the lowest possible cost?  Regardless of what we measure internally, our stakeholders are only concerned with two simple metrics – Profit and Return on Investment.  The cold hard fact is that banks and investors really don’t care what tools you use to get the job done.  From their perspective the best thing you can do is make them money!  I agree that we are in business to make money.

What does it mean to be lean?  I ask this question on the premise that, in many cases, sustainability appears to be dependent on the resources that are available to support lean versus those who are actually running the process itself.  As such, “sustainability” is becoming a much greater concern today than perhaps most of us are likely willing to admit.  I have always encouraged companies to implement systems where events, data, and key metrics are managed in real-time at the source such that the data, events, and metrics form an integral part of the whole process.

Processing data for weekly or monthly reports may be necessary, however, they are only meaningful if they are an extension of ongoing efforts at shop floor / process level itself.  To do otherwise is simply pretending to be lean.  It is imperative that data being recorded, the metrics being measured, and the corrective actions are meaningful, effective, and influence our actions and behaviors.

To illustrate the difference between Culture and Tools consider this final thought:  A carpenter is still a carpenter with or without hammer and nails.

Until Next Time – STAY lean!

Vergence Analytics

Twitter:  @Versalytics