Category: Programming

High-Performing Python

I was pleasantly surprised to see some very useful downloads when I opened the November 2017 issue of the Intel Developer Products Newsletter:

  • Intel Distribution for Python – Accelerate Python Performance – Powered by ANACONDA, and
  • Intel Performance Libraries – Download these free libraries today to create better, more reliable, and faster software applications.
    • Intel Data Analytics Acceleration Library (Intel DAAL)
    • Intel Math Kernel Library (Intel MKL)
    • Intel Integrated Performance Primitives (Intel IPP)
    • Intel Threading Building Block (Intel TBB)
    • Intel MPI Library (Windows Package)

Rather than write about these free offerings from Intel, click on the links above to see and choose the tools that will serve you best.  The files are relatively large and you may want to reserve your time for when and how you download them to your machine.  Versions are available for Windows, MacOS, and Linux.

Anaconda is my Python installation of choice if not simply for the ease of maintaining the many Python packages that are available.  That the Intel distribution for Python is powered by Anaconda is not surprising.

Although I’ve expressed my fair share of caution when using code libraries written by others, I have no concerns with Intel as the documentation is more than thorough.  If you’re truly interested in a comprehensive Python installation, consider this package offering from Intel.

Until Next Time, stay LEAN!

Versalytics

 

 

Advertisements

Simply the best – Logitech’s Craft Keyboard

Craft Keyboard BoxI pre-ordered Logitech’s Craft Keyboard several weeks ago and it just arrived – a week earlier than expected!  The Craft Keyboard is compatible with Logitech’s FLOW technology and is a perfect companion to my MX Master 2S mouse.

I use computers extensively in my line of work and I’m always looking for the ultimate keyboard experience.  I was also looking for a single solution that would allow me to work on more than one machine using the same keyboard and mouse.

Logitech’s Craft keyboard coupled with the MX Master 2S mouse and Logitech’s FLOW software technology is the answer to that quest.  I can now work seamlessly between my SurfaceBook Pro and MacBook Pro machines all while using the same keyboard and mouse.  The keys on the Craft keyboard are labeled for both PC and MAC machines.

IMG_4564The top left dial, referred to as the CROWN, is one of the unique features of the Craft keyboard.  The CROWN presents either a smooth or ratchet style feel when turned depending on the current context of the application.

The touch sensitive CROWN integrates seamlessly with Microsoft Office, Adobe, and other applications.  Even browsing the web is a slightly enhanced experience.  You can perform context specific tasks from within an application by simply tapping, pressing and / or turning the CROWN.

As a premium keyboard, my expectations were high and for the most part, Logitech has delivered .  The Craft keyboard provides the best typing experience of any keyboard I have literally had the opportunity to lay my hands on.  The backlit keys are very quiet, highly responsive, and require minimal travel and effort to actuate.  The tops of the keys are slightly concave and your fingers naturally settle into them.

F6-F7 Backlight BrightnessThe backlit keys turn on immediately as your hands approach the keyboard and turn off approximately 5 seconds after you move them away.  You can use the F6 and F7 function keys to decrease or increase the brightness level of the backlit keys respectively.  There are 15 levels.  This is worth noting as the backlit keys work regardless of the ambient light levels in the room.

Simultaneously pressing the “fn” and “esc” keys toggles the shift state of the function keys between standard and assigned features.  The assigned function key features can be repurposed to perform a variety of tasks using Logitech’s Options software.

Visit Logitech’s web page for a complete review of the Craft Keyboard’s many features and capabilities.  I ordered my keyboard directly from the site and I’m extremely pleased with my purchase.

Craft Advanced Keyboard.jpg

Although the Craft keyboard carries a steep price tag, when I consider the many hours that I spend working on my computers, the quality of the keyboard itself, and the new found real estate on my desk top, it’s worth every penny.

 

Increased productivity and creativity are just two of many reasons that make Logitech’s Craft Keyboard my new keyboard of choice.

Until Next Time – STAY lean!

VersalyticsRelated Resources

Logitech’s Craft keyboard offers premium typing with big bonuses, Darrel Etherington, TechCrunch.com

Logitech Craft Keyboard – Review, Curt Blanchard, mymac.com

This Dial Controls Everything! – Logitech Craft keyboard, Hardware Canucks

MX Master 2S Mouse (Versalytics.org)

 

 

Lean Code and Productivity

Writing code can be a very time-consuming process and finding ways to be more productive is typically welcomed by professional programmers.  While many new programmers are anxious to learn their language of choice, few spend any time learning about the Interactive Development Environment or IDE they are using to write their code.

Programmers can increase productivity by taking advantage of the many keyboard shortcuts that are built into their IDE or editor of choice.  Many IDE’s are designed to work on any platform and makes learning them that much more valuable.  In this context, choosing the right IDE can be just as important to your productivity as knowing the language itself.

A short list of the primary IDE’s I use includes:

  • IntelliJ IDEA HelloWorldMicrosoft:  Visual Studio 2017 (C, C#, C++),
  • ActiveState:  Komodo IDE (TCL/Tk),
  • JetBrains:
    • CLion (C++),
    • PyCharm Professional (Python),
    • IntelliJ IDEA Ultimate (Java),
    • PhpStorm (PHP),
    • RubyMine (Ruby),
  • NetBeans IDE:  NetBeans (Java).

Most of you reading this are likely familiar with the more common key combinations such as <Ctrl>+<s> to save a file, <Ctrl>+<c> to copy highlighted text, or <Ctrl>+<v> to paste text.  Many IDE providers have developed key combinations that provide much more functionality than typically offered by primitive text editors.  Extended features may range from basic editing and code navigation to code selection, code completion, code generation, code refactoring, and so much more.

IntelliJ IDEA SecretsVisual Studio 2017 (Microsoft), Komodo IDE (ActiveState), IntelliJ IDEA Ultimate and PyCharm (JetBrains) are just a few examples of IDE’s where key combinations exist to perform a wide variety of tasks.  Also knowing certain shortcuts that can be used while entering code can save a significant amount of time.

A premium IDE is well worth the investment in both money and the time required to learn it.  Extending IDE functionality to include automated code generation, code formatting, import optimization, and support for version control systems are just some of the reasons for using a premium IDE.

Once you discover the key combinations that are available to you, remembering them will be the next challenge.  Practice makes perfect and the more often you use them, the more likely it is that you will remember them.

CLionMenuDropDownIf you’re accustomed to working with your mouse when navigating the menu options inside your IDE, make note of the keyboard shortcut that may appear next to the menu option you are using as pictured in this CLion IDE drop-down menu.  If not this time, perhaps it may be worth trying the next time you find yourself reaching for the mouse to perform a task.

Aside from attempting to remember everything you read in the documentation, you can also perform a simple Google Search for “Cheat Sheets” on the language of your choice.  You will quickly discover that you are not alone when it comes to memorizing keyboard shortcuts and you will be presented with a vast array of options that are best suited for you and your specific IDE.

Increase your productivity and take advantage of all the power at your fingertips.  You will save yourself a tremendous amount of time and effort writing your code and developing your application.  By learning all there is to know about your IDE of choice, you may surprise yourself to see how much time you can save using a simple key combination that you never knew existed.

Until Next Time – STAY lean!

Versalytics - Logo (293x293)Related Content

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:

 

Pro SQL Server Relational Database Design and Implementation

My copy of the book “ProSQL Server Relational Database Design and Implementation , 5th Edition” by Louis Davidson with Jessica Moss arrived this week.  I’m excited to work my way through it.

A well designed database will significantly increase the performance of your database and greatly improve your ability to write efficient and effective SQL queries.  From a lean perspective, an effective database design is equivalent to “quality at the source”.  Your ability to work with your data is inextricably intertwined with the design of the database itself.

Improving a car’s performance begins with the very engine that drives it.  The same is true for your database.  At 14 chapters and 791 pages, the content of the book is thorough and logical, covering the latest features and enhancements to SQL Server 2016.

Although many developers are inclined to control database activities from the client side “front end”, greater performance can be achieved on the server side.  SQL Server 2016 is a powerful relational database management system where the greatest benefits are reaped by implementing a well designed relational database.

For more information or to purchase your copy, just click on the link below!

Pro SQL Server Relational Database Design and Implementation – Fifth Edition – Louis Davidson with Jessica Moss, Apress

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