Experiences with Test Driven Development (TDD) for logic (chip) design in Verilog or VHDL

I write code for FPGAs, not ASICS… but TDD is my still my preferred approach. I like to have a full suite of tests for all the functional code I write, and I try (not always successfully) to write testcode first. Staring at waveforms always happens at some point when you’re debugging, but it’s not … Read more

TDD FIRST principle

It’s not Repeatable as not everyday is Tuesday 🙂 If you run this test on Monday you will get one result, if you run it on Tuesday, a different one.

TDD and JPEG compression

Joel’s question was something like this. Suppose you wanted to set a bit somewhere that caused a low resolution image to be displayed rather than a high resolution image. How would you use TDD to get that to work? Would you write a test that scraped the screen to show that the image was in … Read more

Dependency injection in TypeScript

I have developed an IoC container called InversifyJS with advanced dependency injection features like contextual bindings. You need to follow 3 basic steps to use it: 1. Add annotations The annotation API is based on Angular 2.0: import { injectable, inject } from “inversify”; @injectable() class Katana implements IKatana { public hit() { return “cut!”; … Read more

What is a good sample class to demonstrate TDD?

How about using the 1st section of Kent Beck’s Money example. It starts out very simply but when you arrive at addition of two different currencies, TDD suddenly shows you the falisity of up front design, or YAGNI (you aren’t going to need it). Another good example is uncle Bob’s bowling score TDD example. I … Read more

Applying TDD when the application is 100% CRUD

“The only purpose of the app is basically to pull a list of contacts” Okay. Test that. What does “pull” mean? That sounds like “logic”. ” display them on a page” Okay. Test that. Right ones displayed? Everything there? ” display a form to send a message,” Okay. Test that. Right fields? Validations of inputs … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)