Jesper Boeg on Priming Kanban
In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Abel Avram on Dec 12, 2008
After open-sourcing their C++ Test Framework a few months ago, Google has just open-sourced the Google C++ Mocking Framework (Google Mock) under the BSD license.
Google Mock is used in over 100 projects inside Google and it is inspired by jMock and EasyMock, according to Zhanyong Wan, a Software Engineer at Google. The framework can be used on Linux, Windows or Mac OS X, and it addresses C++ developers. Zhanyong offers a mocking example:
class TaxServer { // Returns the tax rate of a location (by postal code) or -1 on error.
virtual double FetchTaxRate(
const string& postal_code) = 0;
virtual void CloseConnection() = 0;
};class MockTaxServer : public TaxServer { // #1
MOCK_METHOD1(FetchTaxRate, double(const string&));
MOCK_METHOD0(CloseConnection, void());
};
TEST(ShoppingCartTest, StillCallsCloseIfServerErrorOccurs) {
MockTaxServer mock_taxserver; // #2
EXPECT_CALL(mock_taxserver, FetchTaxRate(_)).WillOnce(Return(-1)); // #3
EXPECT_CALL(mock_taxserver, CloseConnection());
ShoppingCart cart(&mock_taxserver); // #4
cart.CalculateTax(); // Calls FetchTaxRate()
// and CloseConnection().
} // #5
Derive the mock class from the interface. For each virtual method, count how many arguments it has, name the result n, and define it using MOCK_METHODn, whose arguments are the name and type of the method.
Create an instance of the mock class. It will be used where you would normally use a real object.
Set expectations on the mock object (How will it be used? What will it do?). For example, the first EXPECT_CALL says that FetchTaxRate() will be called and will return an error. The underscore (_) is a matcher that says the argument can be anything. Google Mock has many matchers you can use to precisely specify what the argument should be like. You can also define your own matcher or use an exact value.
Exercise code that uses the mock object. You'll get an error immediately if a mock method is called more times than expected or with the wrong arguments.
When the mock object is destroyed, it checks that all expectations on it have been satisfied.
Useful links: Home Page. Complete documentation. Binaries download. Google Mock for Dummies is a quick introduction to Google Mock accompanied with examples and explanations.
Why NoSQL? A primer on Managing the Transition from RDBMS to NoSQL
Using Drools? See what you're missing! Get the Power of Drools with the Assurance of Red Hat
In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.
Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.
Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
No comments
Watch Thread Reply