Quantcast
Channel: James Grenning's Blog
Browsing all 22 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Hiding Non-standard C Keywords for Off-Target Testing

Some silicon vendors extend the C language so the programmers can easily interact with the silicon. Using these extensions tie production code to the silicon vendors compiler and consequently the code...

View Article



Image may be NSFW.
Clik here to view.

Code Coverage’s Mixed Message

I’m in agreement with Robert Glass when he says “100% test coverage is insufficient. 35% of the faults are missing logic paths.” It’s not controversial, but I’d like to give my perspective on it. If...

View Article

Image may be NSFW.
Clik here to view.

Unit testing RTOS dependent code – RTOS Test-Double

When you’ve got legacy code that depends on the Real-time Operating System, you have a challenge to get your code off the target for unit testing. If you want to test with the concurrency provided by...

View Article

Image may be NSFW.
Clik here to view.

Unit testing RTOS dependent code – RTOS Test-Double – Part 2

In the last article, the OSSemPend() test-double was coded to handle a specific OSSemPend() application and test need. The semaphore was being used to signal when there is a message to process. It was...

View Article

Image may be NSFW.
Clik here to view.

Unit testing RTOS dependent code – RTOS Test-Double – Part 3

I’m going to bend the example a little, and look at how to write tests that interact with an interrupt service routine and again with a semaphore. I’ll also get some help with the tedious parts of...

View Article


Image may be NSFW.
Clik here to view.

TDD and the Real-World

One of the attendees of my training objected to TDD stating “TDD does not resolve the real-world (temperature, pressure, timing, noisy signals, etc.) issues that my project is encountering.” You are...

View Article

Image may be NSFW.
Clik here to view.

“My Code is Exceptional, I Don’t Need TDD”

Another attendee of my training tells me “The quality of my application is exceptional, adding TDD is an overhead that brings no added value.” You statement makes me ask a few questions. How did you...

View Article

Image may be NSFW.
Clik here to view.

Can TDD Help Reduce Integration Time?

A recent TDD for Embedded C attendee asks me “TDD does not help reduce the time I spend in the lab during system integration testing” (This is asked in the context of embedded development. But the...

View Article


Image may be NSFW.
Clik here to view.

“TDD ignores the design”“No it doesn’t”“Yes it does”– Part 1

TDD ignores design; that is a frequently stated misconception. Many people get this idea from the code focus of TDD. TDD does not call for the creation of any non-executable design documentation. So...

View Article


Image may be NSFW.
Clik here to view.

“TDD ignores the design” “No it doesn’t” “Yes it does” – Part 2

This is the second article addressing the misconception that TDD ignores design. In the previous article, I explained how TDD acts as a design rot radar. In this article, I’ll explain why I think TDD...

View Article

Image may be NSFW.
Clik here to view.

Accessing static Data and Functions in Legacy C — Part 1

And a Happy Leap Year Bug It’s a new year; last year was a leap year; so the quadrennial reports of leap year bugs are coming in. Apologies are in the press from Apple, TomTom, and Microsoft. Trains...

View Article

Image may be NSFW.
Clik here to view.

Accessing static Data and Functions in Legacy C — Part 2

Maybe you read Part 1 of this article. If you did you’ll know it concerns adding tests to legacy code (legacy code is code without tests). You will also know that the code has file scope functions and...

View Article

Image may be NSFW.
Clik here to view.

Engineers and Programmers, Stop Writing So Much Firmware

(this article is not just for embedded developers) A few months back I was reading Doug Schmidt’s blog, on The Growing Importance of Sustaining Software for the DoD, and he made the claim “although...

View Article


Image may be NSFW.
Clik here to view.

Business People Don’t Think They Care About Clean Code

Do business people care about clean code? They behave like they don’t. Well, they do and I can prove it using proof by contradiction. For the best results, read this proof first. Suppose that a...

View Article

Image may be NSFW.
Clik here to view.

Is Software like Building?

I’ve heard people say that software should be like building. You make a plan; buy the materials; and build it. Would remodeling be like new construction? Kind of. You make a plan, find a contractor,...

View Article


Image may be NSFW.
Clik here to view.

Having Trouble with Small Steps? Why? You already do them.

One of the biggest challenges for someone experiencing TDD the first time is working in the small steps. The small steps of TDD appear to be an independent discovery of John Gall’s observation...

View Article

Image may be NSFW.
Clik here to view.

Seeking the Light – A question from a recent TDD training attendee

Here is a good question, and my reply, from a recent attendee of my Test-Driven Development for Embedded C training. Hi James, As I work more with TDD, one of the concepts I am still struggling to...

View Article


Image may be NSFW.
Clik here to view.

I’ve got integration and system tests, why do I need unit tests?

Kent Beck told me years ago, if the code does not need to work, then there is no need to test it. He continued and observed, why bother writing it if it does not need to work. Since hearing that and...

View Article

Image may be NSFW.
Clik here to view.

Inspiration from Leonardo da Vinci

While in Singapore, we visited the Leonardo da Vinci exhibit at the Marina Bay ArtScience Museum. We took the guided tour with expert from Milan. We think he was a Catholic priest by the roman collar....

View Article

Image may be NSFW.
Clik here to view.

Report from the field on TDD in embedded development

Thanks James. Upper management actually asked me to share my TDD experience as well & so I just published an article internally to our Embedded Software newsletter describing how TDD helped my...

View Article
Browsing all 22 articles
Browse latest View live




Latest Images