Category: IDE

Lean Programming – 5S for Code

I enjoy coding and learned many programming languages over the years. As diverse as these languages are, there is one trait that is consistent among them all: every instruction matters.

The principles of Lean, defined as “the pursuit of perfection to achieve excellence through the continual elimination of waste,” can also be applied to programming. The seven forms of waste are:

  • Defects: Bugs in our Code. Avoid using clever tricks or complicated code where a simple statement or expression is just as effective.
  • Overproduction: Features or functions that are not required,
  • Waiting: Synchronous versus asynchronous processes, load times, code sequencing, multi-core threading, distributed networking,
  • Inventory: Redundant Code,
  • Motion: Inefficient algorithms, poorly designed UI,
  • Over-processing: Unnecessary functions or capabilities. Deliver the solution requested per the scope of the application, no more, no less.
  • Transport: Movement of resources or data. Consider in memory processes versus disk intensive transactions, or client side versus server side data processing.

There is a notable difference between “sloppy programming” and clean code written by someone who knows better. Have you ever spent hours attempting to decipher someone’s code, or even your own? A clean, readable, and well documented file is much easier to work with and, more importantly, understandable.

5S Your Code

We can minimize some forms of waste by using a method known as 5S. IDE’s such as those offered by JetBrains, allow us to create a workspace for a given application, but we can extend this concept to each file or script too.

  1. Sort (Seiri): Eliminate all unnecessary tools, functions, comments, and resources. Choose meaningful file and variable names to minimize tedious and redundant comments in your Code.
  2. Set in Order (Seiton): Use an effective directory management strategy to organize all your files for quick and easy reference. Deploy an effective “Model, View, Controller” strategy when developing your applications. Restrict your functions to a single purpose to better enable re-usability.
  3. Shine (Seiso): Set and follow standardized coding guidelines and naming conventions. Deploy rigorous version control standards.
  4. Standardize (Seiketsu): Publish coding guidelines and maintain your Code accordingly.
  5. Sustain (Shitsuke): Cascade requirements and communicate expectations throughout the organization. Continually review and update the guidelines accordingly.

5S is one of the fundamental elements of Kaizen and, when practiced regularly, helps to minimize the seven wastes, allowing you to work effectively and efficiently.

Until Next Time – STAY lean!

Related Articles and Resources

What is 5S? – kanbanize.com

Advertisements

Lean Code and JavaScript IDE

BracketsJavascript is one of the more popular programming languages in use today and its use and capabilities are further enhanced by a variety of available frameworks, such as Node.js and AngularJS, and other libraries.

Although you can use almost any text editor to write Javascript, a language based Interactive Development Environment (IDE) or Code Editor can greatly improve your ability to write code more efficiently and effectively.  This is especially true where syntax and case sensitive languages – like Javascript – are concerned.

I use WebStorm by JetBrains for the majority of my web-based applications, however, a number of less capable cross-platform IDE’s and editors are also available for writing JavaScript, HTML, and CSS.  One such editor is Brackets created by Adobe Systems.

Review:  The 10 best JavaScript editors” by Martin Heller, Contributing Editor, InfoWorld (May 17, 2017) presents a number of JavaScript editors for consideration of which Brackets is among them.  I prefer to use cross-platform tools wherever possible and I use a variety of IDE’s and editors that are best suited for the project at hand.

Brackets is a light-weight open-source cross-platform editor equipped with sufficient functionality to efficiently write HTML, CSS, and JavaScript code.  A number of extensions are also available to further enhance your experience using Brackets.

Extensions are often written by third-party programmers or developers and should be installed with caution.  I highly recommend researching and reading reviews by others to ensure they are worthwhile and trustworthy.

If you are just learning JavaScript or writing a quick a script, consider the simplicity of using an editor like Brackets where you can focus on writing your code rather than get bogged down with learning all the details and nuances of a full-featured IDE.

If you’re wondering what kind of programs can be written using JavaScript, HTML, and CSS, you’ll have Brackets to serve as your source of inspiration as one of the many possibilities.  For more information, visit the Brackets web page.  As of this writing, Brackets 1.11 is available for download.

The excitement of learning a new language is often met with varying degrees of chaos and confusion when selecting the right tools to get started.  I recommend starting with something simple and less distracting that will allow you to focus on the task at hand.  Brackets is one such editor.

In time, you will learn which tools will best serve your needs and you can adjust your working and coding environment accordingly.  Feature filled IDE’s and Editors will do little to serve your needs if you have yet to learn or don’t know how to program.

Until Next Time – STAY lean!

Versalytics

Related Articles, Resources, and References