Merging modern software development with electrons and metal
Random header image... Refresh for more!

“A Bad Technician Is Worth Negative Money”

“A Bad Technician Is Worth Negative Money” is something I said a lot back in the days when I had to go around and fix all the stuff the night shift technician had screwed up. A technician who causes problems is worth negative money because not only does he not do his job, he sucks up the time of others who must fix his mistakes.

Larry O’Brien comes to a similar conclusion about software developers: bad programmers are not slow programmers – they are programmers who are actively counter productive to the code base. In a fascinating post, he argues that the goal isn’t a silver bullet for programmer productivity, but a silver codebase, which bad programmers make impossible. Larry started all this discussion by dissecting the myth of the super-programmer.

My take – he makes sense to me. I’ve had to clean up code from some, well, people who shouldn’t have been programming, and it was not pretty. I’ve seen how a well designed codebase can make adding functionality much easier. On the other hand, I currently have an inherited codebase that needs some serious refactoring before it’s anything close to silver.

Tony

February 1, 2008   No Comments

The purpose of Test Driven Development

I was going through an old stack of JDJ‘s (Java Developer Journals), and saw an interesting commentary on Test Drive Development (TDD). The author said its purpose was to help you write the minimal amount of code necessary to meet the current requirements, and that having a test suite available was a nice side affect. His TDD development sequence is:

  1. Write tests that show your requirements, based on the perfect client interface
  2. Write just enough code to compile successfully
  3. Write just enough so that all the tests pass
  4. Refactor

Now apply this idea to the world of factory automation software. Hmm, could be interesting, but it wouldn’t work with PLC’s (rllUnit anyone? I don’t want to even imagine porting xUnit to IEC61131.)

Tony

July 21, 2007   No Comments

Software Development Trends

Here is my quick overview of modern software development trends. It’s somewhat quirky, but software development is a big area, all the way from programming $0.50 PIC micros in toaster ovens to massive web services and supercomputers.

Where do I pick up these trends? From trade magazines (after applying my hype discount factor), web blogs, discussions with other programmers, and what works for me.

  • Version Control and Bug Tracking that work. These are essential for good development, but I suspect that most automation developers, at least at small companies, still do not use them.
  • Design Patterns – a good way of talking about software architecture.
  • Unit testing and Test Driven Development – somewhat hard to apply to automation software, but definitely making waves right now in desktop and web development.
  • Refactoring – restructuring and improving existing software, instead of doing a ground-up re-write.
  • Agile Development – iterative, customer focused development instead of BDUF (Big Design Up Front).
  • Dynamic languages – allow rapid development, better re-use of existing components, run time customizations.
  • Mixed language development – use appropriate tool for the job. A desktop example is Adobe Lightroom, written in Lua and C. I do a lot of this (especially when including IEC 61131 as a language)
  • Web technologies – interesting stuff, but I think factory software developers should not get caught up in the hype.
  • Open Source – some very good products to add to your toolkit.

I plan on discussing many of these techniques in the future, using concrete examples of the tools I use and like. For example, I will use Subversion when discussing version control.

Comments 4/5/2011: still good stuff, but unfortunately I haven’t followed up (limited by lack of time and my fun excursions into PCB and MCAD land).  I need to write more about these topics.

Tony

June 21, 2007   No Comments

Trends to use – Open Source Software

Open source software is a great resource. If you’re going to use and modify open source code in your machine, then you have to look at licensing issues very carefully. But there is another way to take advantage of open source software – by using open source projects such as Subversion to enhance your development process with no licensing worries.

Even if the majority of open source software can safely be ignored, there are many rock solid, high quality, well documented, Windows-friendly projects. Examples include:

  • Subversion for version control with TortoiseSVN client for Windows
  • Trac for project management and bug tracking
  • Apache web server
  • xUnit for unit testing
  • Wix for MSI installers (OK, its documentation is a little weak, but it’s still what I use to create Windows installers)
  • Programming languages such as Python, IronPython on .NET, and Lua.

What are some of the advantages of these top notch projects?

  • High quality. For example, Subversion has a better reputation than Microsoft’s SourceSafe.
  • Low cost, both in money (nothing) and time (due to good documentation).
  • Ease of deployment – with Subversion, I don’t have to worry about how many users there are. Adding another user costs exactly $0.00, unlike adding a user on a commercial version control system
  • No licensing hassles; there are no hardware keys, no software keys, and no chance of any software license audits.
  • More stable path – no forced upgrades (upgrade when you’re ready), no worries about the vendor going out of business, no vendor agendas to worry about.
  • Often commercial help is available if desired – so far I’ve done fine with the documentation and Google.

Tony

June 14, 2007   No Comments