Successful Endeavours - Electronics Designs That Work!

Good Documentation

Good Documentation makes it possible for other people to leverage work already done. It can be the difference between something being usable and it being scrapped or ignored. We have already looked at some aspects of how Software Documentation can be created. An example being shown below.

 

Doxygen Call Graph

Doxygen Call Graph

This is only one form of documentation. To use a Software Module you will want the API definition. Here is an example in Doxygen format of a readily usable interface. Not much mystery here. Note that the hyperlinks have been removed to stop is using links you can’t access. Normally every definition is hyperlinked so you can go right to it.

Module MS_RNG

A 32 bit Pseudo Random Number Generator which passes the Die Hard test suite for randomness. It also provides 8 and 16 bit random numbers and a complex seed arrangement.

Functions
void MS_RNG_Seed (U32_t seed1, U32_t seed2)
use the seed values to churn the seed as much as you can
U32_t MS_RNG_Get_U32 (void)
get the next U32 value in the random number sequence
U16_t MS_RNG_Get_U16 (void)
get the next U16 value in the random number sequence
U8_t MS_RNG_Get_U8 (void)
get the next U8 value in the random number sequence

Function Documentation

U16_t MS_RNG_Get_U16 ( void  )

get the next U16 value in the random number sequence
Returns U16 random number

 

  U32_t MS_RNG_Get_U32 ( void  )

get the next U32 value in the random number sequence
Returns U32 random number

 

U8_t MS_RNG_Get_U8 ( void  )

get the next U8 value in the random number sequence
Returns U8 random number

 

void MS_RNG_Seed ( U32_t  seed1,
U32_t  seed2 
)

use the seed values to churn the seed as much as you can

Parameters

seed1 = first seed component
seed2 = second seed component

Returns void

So it should prove straight forward to use a module documented like this. Of course I’ve picked a simple example.

O’Reilly recently published a great article on this and so I’m going to summarise here and you can check out the full article for the rest of the details.

  • Write documentation that is inviting and clear
  • Write documentation that is comprehensive, detailing all aspects of the project
  • Write documentation that is skimmable
  • Write documentation that offers examples of how to use the software
  • Write documentation that has repetition, when useful
  • Write documentation that is maintained and up to date
  • Write documentation that is easy to contribute to
  • Write documentation that is easy to find

Seems perfectly sensible to me. If you want you software to be reused, make it as inviting as possible for subsequent developers to be able to engage with, understand, and quickly leverage what you have already done.

You can read the complete article at the eight rules of good documentation.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

Software Development Estimation

in Software Costing we looked at some typical ways of determining the likely cost of a Software Development project. One way was to look at how much typing was involved. This is not considered the best approach as the cartoon below demonstrated.

Software Estimation

Software Estimation

I prefer to spend more time thinking about the problem and less time typing. Among other things this reduces the amount of typing required.

The other example was by looking at the study by VDC Research where the median Software Development project had a cost of US$12.5o per line of code. Which is also very expensive by our reckoning. But these are actual figures. The hard part is working out how many lines of code (LOC) will be required before you have written them.

Estimation by Function Points

So I was interested when The Embedded Muse, a software development newsletter authored by Jack Ganssle, published some data from Capers Jones who is a legend in the Software Development industry for his statistics on the Software Development Process.

Capers Jones & Quote

Capers Jones & Quote

My first thought was that I fully agree with the quote. Let’s have a look at it in detail.

High-quality software is not expensive. High-quality software is faster and cheaper to build and maintain than low-quality software, from initial development all the way through total cost of ownership.

The assertion is that if you have a way to measure Software Quality, and you stick to good Software Development Process and the creation of High Quality Software, the overall cost will be lower. This might seems counter intuitive to some of our prospects given the development process requests we get, but I think it is spot on. Here are the other items of interest.

According to Capers Jones, a very rough guide to estimating the number of people needed on a project, and the project’s duration, is:

  • Number of developers = (function points)/150
  • Calendar months = (function points) x 0.4
  • One function point is approximately 130 lines of C Code

So for a typical 20,000 lines of C Code project, we would expect 154 function points with 1 developer required and it would take 5 years. If I look at one of the Industrial Control projects we did then that was 60,000 lines with 3 developers (that part works) and 8 months overall (rather than 5 years). So I’m not convinced the time component of the formula works. Maybe it is too heavily influenced by larger projects. But the number of developers seems to be about right.

Again, these are actual project figures and not some abstract model. And if you don’t use good Software Development Process then the cost of debugging and fixing issues in the field will typically dwarf the cost of writing the code.

Software Development Metrics

So I thought I’d do a summary of the Software Development Metrics we have accumulated over time as this may help with the Software Estimation process. This is what it looks like in our world of typically smaller projects (less than 100K LOC) reflected through the data above:

  • Number of developers = LOC  / 20,000
  • Number of months = LOC / ((number of developers) x 6600)
  • Cost of development = $4.80 per LOC

This assumes good process and average project difficulty. Things that will push a project way past this are code space constraints, processing power constraints, poorly defined requirements and substantial changes of direction mid project. But it does give some way to at least know the ballpark.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

Big Data

Big Data has been touted as the answer to many problems. Currently many organisations are collecting everything they can get their hands on in order to try and make sense of it, either now, or eventually. And then of course to leverage that for profit, advantage, protection, whatever…

But there is a massive flaw in one aspect of this. For instance, you can determine that there is a statistical correlation between 2 sets of numbers, but that doesn’t mean it is causative.

Tyler Vigen

Tyler Vigen

Tyler Vigen has written Spurious Correlations to demonstrate just this issue. Below are 2 examples.

Spurious Correlation #1

Spurious Correlation #1

So it looks like the US spending on science correlates with suicides. But does it cause it? Or is this merely a coincidence?

Spurious Correlation #2

Spurious Correlation #2

Same here. Would suggest spelling bees stick to short words only to limit the damage they could be doing.

And this is what we need to be careful of. Now this doesn’t mean our own thinking can’t be fooled. Rolf Dobelli in The Art of Thinking Clearly documents 99 more common cognitive biases we can suffer from. Think of these as bugs in our thinking algorithms. An example is Confirmation Bias. Most people believe they are above average. Nearly half of them are wrong. This is called Illusory Superiority.

So the danger is concluding there is a cause and effect relationship when there is not. Leading to decisions being made and outcomes not working out as expected. There are no simple answers here. The above examples are selected because it is easy to conclude there isn’t a direct relationship. It is harder to discern when the data is big and an auto-correlating algorithm is coming to it’s own conclusions.

The Art of Thinking Clearly

The Art of Thinking Clearly

And to round off, here is Rolf Dobelli talking about The Art of Thinking Clearly.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

Artificial Intelligence

There has been hype about Artificial Intelligence, or AI, ever since we starting thinking about creating it. Moves to create truly independently thinking systems are still struggling but expert and self-learning systems have made a lot of progress.

So I was interested to get an email from Karthik Reddy of 16best.net  with a new blog post from them about how brands are using AI to enhance their marketing.

Here is a snippet. Click on it for a more readable version.

Artificial Intelligence Use Now

Artificial Intelligence Use Now

The projection that really interested me is “100% of IoT initiatives will be supported by AI by 2019″. That is a pretty substantial claim. And of course not all the support will be in field as the processing power to make a difference is usually in the back end systems. Given we do a lot of projects for devices that fit the Internet of Things category I’m fairly confident that this is likely to be true. I’m not convinced it will be 100% but it will be high. And this is because once you have devices in the field gathering data, you start making connections between the data and outcomes, and then it becomes valuable.

A good example of this is the arcHUB Smart Cities Sensor devices. Once you have the data, you can learn a lot from it. And then you can start making better decisions. And then you can actually measure the improvements.

You can see all the details in How Brands Use AI including detailed statistics from many well known companies on how they are using AI.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

New Product Development

In Product Development Process we looked at all the steps in Product Development. The need can vary a lot and so it is also useful to hear from those who have bright new products to market. So it is with pleasure I can direct you to an excellent resource with 8 lessons from top executives.

Here is the list of lessons:

  • Melissa Perri: Learn what your users want before shipping
  • Marc Rubner: Deliver a tangible impact for your customers
  • Christophe Gillet: Assess market viability
  • Brian Tubergen: Prioritize the best opportunities
  • Andrea Schneider and Lauren Gilchrist: Educate stakeholders on modern best practices
  • Jeff Gothelf: Define objectives in terms of business problems
  • Jeetu Patel: Build teams that are motivated to execute
  • Eric Ries: Prioritize experimentation

The collation is by Mike Fishbein who interviewed each executives and there are also podcasts expanding on the ideas.

Mike Fishbein

Mike Fishbein

So check out New Product Development: 8 Lessons From Top Executives and enjoy. And thanks Mike for bringing it to my attention.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

 

 

Self Driving Cars

Waymo, the Google spin out that is progressing their Self Driving Car technology, also know as the Autonomous Vehicle, has released a video showing how the current technology works and what being in a Self Driving Car looks like for a passenger.

Enjoy.


While this is still an emerging technology, it is also quite mature. And this is understandable given the consequences of failure. So far they have 5 million miles of self driving experience. So how is the safety progressing? To quote big think “Google’s self driving car is ridiculously safe” with the conversation moving in the direction where we might find manual driving outlawed. The feature some commentary from Brand Templeton which is well worth listening to.


So this is no longer an issue of if, but of when.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

 

 

C Programming Language

The C Programming Language was developed by Dennis Richie and Ken Thompson at Bell Laboratories between 1969 and and 1973. It was the successor to B and used to create Unix. The recent bad experience with the Multics time sharing operating system development had made Bell Laboratories sensitive to that sort of cost blowout so the project was not widely promoted until the first working version was complete.

Ken Thompson and Dennis Ritchie

Ken Thompson and Dennis Ritchie

So what did C bring to the table that made it such a valuable asset? Here is a list:

  • can be used to directly interface to and manipulate hardware and IO
  • so it allows you to get close to the hardware itself
  • was a procedural programming language supporting structured programming
  • can be used to write an operating system
  • or sits very close to the operating system
  • had flexible naming conventions
  • had flexible memory allocation (static, local, global and dynamic)
  • could be compiled to machine language with a relatively simple compiler
  • is portable (mostly)
  • compiles to very fast executing code
  • compiled program can run without an operating system and do not need a virtual machine or any other components

The disadvantage compared to more modern procedural programming languages is that you usually do more typing to achieve the same outcome, it isn’t object oriented by nature and the variable typing is flexible so you can create some spectacular program failures if you get the cast wrong or convert a void pointer (no type associated with it) to the wrong data type. And one big compatibility issue is Endianness where different computing architectures store multi-byte data with the high byte at the top or bottom of the word so you can’t just swap binary data and expect it to always work. So you surely you would think we would have moved on to something better?

Programming Language Usage Trends

A recent study of computer language trends over the past 10 years by Embedded Gurus shows that unlike the anticipated rise of the C++ Programming Language in embedded systems, the use of C is rising and C++ falling. You can read the full article at C: The Immortal Programming Language where we see that Assembly Language use is falling as expected, the use of  C Programming Language is actually rising.

Programming Language Use Trends

Programming Language Use Trends

Now to be clear, this is for Embedded Software Development. In Top Programming Languages 2017 we see that Python is the most used programming language in the world across all domains with the  C Programming Language coming in second overall. This is a very big jump for Python but also a jump for the C Programming Language.

Successful Endeavours Programming Languages

At Successful Endeavours the majority of our embedded systems code is written using the C Programming Language . Our Windows code is a mixture of C and C++. For website development it is PHP and Python. So that’s 4 of the top 10 programming languages listed in Top Programming Languages 2017 .

Top Programming Languages 2017

Top Programming Languages 2017

So I expect we will be continuing to program systems using C for quite some time to come. Especially smaller system that don’t have an Operating System. Now maybe someone should focus a but more attention on teaching C to the next generation of programmers.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

Embedded Systems Safety

In The Internet of Insecure Things we got a glimpse into the source of some of those security issues. Today we benefit from another infographic reproduced courtesy of the Barr Group. This time it is a look at the underlying Software Security that is so important to improving the future and no making it even more vulnerable. So read through the list of areas you might not be paying enough attention to. I know there are a couple we are still working on.

The State Of Embedded Systems Safety

The State Of Embedded Systems Safety

Food for thought. Above I reproduced a low resolution version with their permission. You can get a full resolution version by registering at the Barr Group website.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

Insecurity in Cyberspace

This is not one of those topics that makes you feel better initially. In IoT Security we looked at how the emerging IoT world needed to protect itself against attacks. This is a different problem to pure Software Security which has its own challenges.

It was with recent interest that I received a copy of the Barr Group 2018 Embedded Systems Safety & Security Survey . We contribute and so get access to a free copy. I recommend you do the same if this is an area of interest.

They have also put together an infographic that speaks to the The Internet of Insecure Things and I am reproducing a low resolution version here with their permission. You can get a full resolution version by registering at the Barr Group website.

The Internet Of Insecure Things

The Internet Of Insecure Things

It speaks to where the insecure aspects come from. As usual, better Embedded Software Development practice leads to better and more secure products.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

Light L16 Wins CES Award

Yesterday I wrote an update on the Light L16 and how it was a good example of Disruptive Innovation in Photography

Light L16

Light L16

Today I learn that CES agrees and awarded it the CES 2018 Best of Innovation: Digital Imaging.

CES 2018 Best of Innovation

CES 2018 Best of Innovation

There are now several industry articles recognising the significance of the multi-camera technology. For additional details see:

The last link is a Wired review from mid 2017 and is a good reflection on both the promise and challenge of new technology as well as how much time it can take to overcome those challenges.

So congratulations again to the team at Light.

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

Next Page »