Monday, April 16, 2018

No posts in a very long time....

I've been writing some of the most challenging code in my career.  It's been a lot of fun.

Coding should be fun (work should be fun).  With a good job, you should feel rewarded at the end of a long day.  For those of us creating software and systems, we need to keep our creative juices going and do new and challenging things.  This is what my last few years have been.

However, no posts in a very, very long time....

Friday, June 17, 2016

Embedded Python

In a previous post on Python, "why I like Python", I discussed how I am really liking Python.  For years I did very little with Python because all our scripts were Perl or shell.  My teams were comfortable with Perl when they needed to write complex scripts.  However, we now are refreshing technology and Python is an excellent choice.

A few years ago I read about the ESP 8266 wifi module.  This $2US module is great for adding wifi to Arduino systems via a serial interface.  Last fall, I saw an article about a really cool new ESP 8266
module, the NodeMCU.  However, the NodeMCU comes with the language Lua installed which is a yet another scripting language.  Then I found MicroPython!

 MicroPython allows Python3 to run on bare metal!  This means that the system comes up with the Python REPL (Read Evaluate Print Loop) interface -- a Python prompt.  You can program the NodeMCU (or other device) via a USB interface using a terminal program like Picocom, or via a simple web-based program WebREPL.  Note that WebREPL also allows one to write Python scripts or other files directly to a virtual disk on the device.

Boards that can run  MicroPython are available from:

For the NodeMCU, the documentation can be found at MicroPython on the ESP8266

I will post more here after I play with my NodeMCU a bit more!

Happy Hacking!

Monday, February 8, 2016

The Next Big Thing

Which of these will be the "Next Big Thing"?

  1. Internet of Things (IoT)
  2. Roll-up OLED displays
  3. Personal Space Travel
Last year a company found how to shake up the razor market.

Will it be a company shaking up the garbage market?  The baking market?  

EE Times Predictions for 2016

Wired Next Big Thing

Will it be an evolution of something that is already taking off like Cloud computing, docker, containers, big data?

Will it be personal space travel?

What are your thoughts on The Next Big Thing?

Tuesday, January 5, 2016

Love the USPS

USPS is on our Naughty list this year.

Our son Will and his new wife moved about an hour away and did a change of address for Will Hampton V and Lohryn Hampton.  Suddenly, we were receiving no mail at our house for anyone including us (Wade and Laura).

We found out that the USPS only looks at the first letter of the first name and first 4 letters of the last name, not full name, and especially not suffixes (I'm IV, he's V), so all mail to W Hamp or L Hamp went to my son's new address an hour away (via a post office near Manassas, VA).  All mail took an extra week or more, then they had to meet up with us to give it to us.  To make matters worse, his wife had health issues and ended up in the hospital an hour away from their house (2 hours from us).

I went in to the USPS and did the form to revert it.  At the time, they said it was OK and should be fixed in a couple of days (up to a week -- why so long?).  A week later, I went in again and they said the form was incorrect and had to be done differently, plus explained the first letter of first name, etc. rule.  Nice of them to explain that now, but why not when the first forwarding was done?.  The next day we called and they said they did a computer entry and it was now fixed. A few days later it still was not fixed and required yet another visit and form.  Eventually, it took multiple visits by my wife and me to get it fixed.

It took nearly a month to fix the forwarding problem, which is simply an entry in a computer and updates at the local office.  That's efficiency!

This snafu messed up Christmas gifts, bills, invitations, etc.

Warning:  this can happen to you too (a co-worker had a similar experience)....

Monday, January 4, 2016

Self Replicating Machines

Can machines reproduce or replicate?  Reproduction implies the ability to mutate and implies evolution. Machines need to replicate, or make new copies of themselves with the same capabilities as the original (typically at the macro level).

See:  Wikipedia entry on Self-replicating machines

This is a very good book on self replication:  Kinematic Self-Replicating Machines (read it on-line).

What happens when we make machines that can replicate (or even reproduce)?

Years ago, I read several of the Berserker SF stories by Fred Saberhagen.  Basically, some race millions of years ago created self-replicating war machines and we discovered them near the center of the galaxy.  It scared me so much that I didn't sleep well for weeks.  

Berserker Fan Site

What are your thoughts on self-replicating machines?

Will this be a problem?

Will this be the next level after the singularity?

Friday, December 4, 2015

Why I Like Python

Python is a simple, easy-to-learn language that is in widespread use, especially in the open source community.  In most Linux distributions(Fedora, CentOS/RHEL, Ubunu/Debian) many system tools are written in Python and it is used for GUI configuration tools, for example with Python+GTK.  It is largely replacing Perl and other languages for scripting tasks.

The language syntax is simple and easy to learn.  The simple syntax encourages best programming practices.  Variables are defined when they are used and the data types are easy to understand.  As a result Python is being taught as a first computer language in middle schools through colleges.

Python is mainly an imperative programming language supporting both functional programming like C, and object oriented capabilities like C++/Java (python classes).  However, Python has some features that allow it to be used as a declarative programming/functional programming language such as its lambda function.

The language has many features that make it ideal for solving fairly complex problems:
  • forced structure with indents, optional “;”, and no “{}” for loops/procedures
  • quick startup and runs fast (slower than compiled languages, however)
  • interpreted, but modules are byte-compiled, which improves speed
  • widely used in open source projects 
  • supports multiple graphical extensions such as GTK for development of GUIs
  • included in most Linux distributions
  • very extensive set of standard modules
  • many add-on modules from many sources
  • numeric python and scipy are great for scientific and engineering tasks/data analysis
Python is a great language for many things, but not all.  For example since it is interpreted, it is not as fast as C/C++, nor as suitable for hard-realtime (for example due to garbage collection -- a problem that Java also has).

Most Python code is interpreted and runs in the C-based Python interpreter (cPython).  However, there jPython allows Python to run in the Java virtual machine and there is even a micropython that allows a subset of Python to run on bare metal in a microcontroller:

Perl is great for small, quick scripts, but Python is better for larger, complex scripts, and for jobs that would have been implemented in C/C++/Java a few years ago, such as signal processing or analysis of large data sets.  Some functionality such as regular expressions and system calls are easier in Perl. However, Python is much cleaner, resulting in code that is easier to understand, share, and reuse.  If you share it or must maintain it, Python is the preferred language.

Python is also challenging Matlab/Octave for engineering tasks and signal processing.  Numeric Python (Nympy), Scientific Python, Astro Python, and Matplotlib ( are several of the projects extending Python for scientific processing.  Many of the features that can be done in Matlab/Octave can now be done easier in Python, and since Python is a more mainstream language, they can be understood by a wider audience.

Some useful links:

Wednesday, November 4, 2015

The Connected Office

In today's world, it is not sufficient to use standalone word processors and e-mail for collaboration. In the Windows world, many have embraced Sharepoint and it seems to be the one-size-fits-all shoebox that is used whenever collaboration is mentioned.  For example we have seen migration of well-functioning web sites to Sharepoint as "that is the standard" -- this seems to be the mantra.

However, one-size-fits-all is rarely a good model.  This is especially true if you need to be cross-platform and if you want to base your tools in open source technology.

Today, we still need our standalone tools like spreadsheets, word processors, and presentation tools, but we also need many social and collaborative tools including blogs, wikis, discussion boards, collaborative editors, content management systems (CMS), shared file repositories, bug tracking systems, configuration management systems, and many other types of collaborative, social, shared systems/applications.

These shared systems should be accessible both via standard "accessibility" requirements but also via the wide assortment of devices users now have. The tools need to be:

  • low-cost (preferably free and open source)
  • cross platform (Linux, Mac, Windows, Android, iPhone)
  • support multiple form factors (desktops, laptops, tablets, phones)
  • easy to use
  • secure (not tied to a big company like Google or Microsoft)

It is no-longer adequate to email a document from one user to another every time we have data to exchange.

This site has on open source suite that looks very interesting:

Does anyone have any recommendations for tools?  Any experience with modern, secure collaboration that goes beyond e-mail or Shrepoint?