The October 2013 issue of Overload includes an article by Steve Love on building a range library that enables LINQ like syntax in C++.
This looks pretty good and is along similar lines to the approach in cpplinq.
The October 2013 issue of Overload includes an article by Steve Love on building a range library that enables LINQ like syntax in C++.
This looks pretty good and is along similar lines to the approach in cpplinq.
Filed under C++, Programming
Short interview with Bjarne Stroustrup where he comments briefly on Go and Swift.
Apparently, Stroustrup is currently working for Morgan Stanley – hence his interest in C++ for financial applications.
Filed under C++, Programming
You never know when this tip from Kiri Osenkov might come in handy – how to investigate why Visual Studio keeps rebuilding before running, even when you think nothing has changed.
Filed under Programming
The BBC reports that American physicists have found a way to purify silicon better than ever before.
The good stuff is silicon-28, and physicists in the US have worked out how to produce it with 40 times greater purity than ever before.
Even better, they can do it in the lab instead of relying on samples made ten years ago in a huge, repurposed plutonium plant in St Petersburg.
Filed under Technology
One of the many features provided by GTest is the ability to generate test at runtime. One useful application of this is that you can execute data-driven testing by obtaining a list of test file names, then generating a test for each of them. It’s actually very simple to do this in GTest – they call these value-parameterized tests (see documentation). Here’s a snippet of code to demonstrate how little overhead is involved:
#include <gtest/gtest.h>
using namespace testing;
// placeholder - could be used for test setup/cleanup
class MyTest : public ::testing::TestWithParam<std::string>
{
};
TEST_P( MyTest, IntegrationTest )
{
std::string test_file_name = GetParam();
// open file and run the integration test
}
std::vector<std::string> test_file_names();
INSTANTIATE_TEST_CASE_P( MyLibraryName, MyTest, test::ValuesIn( test_file_names() ) );
On one hand, this approach isn’t really in the spirit of unit test – data-driven tests have a habit of quickly escalating to integration tests between libraries. However, such integration tests also have their place in a testing strategy, and this is a neat way to accomplish it with minimal overhead.
Filed under C++, C++ Code, Programming
Filed under Restaurant Review
This article provoked a lot of discussion about software development and architecture where I work.
With a few more weeks for managing the transitions between the phases of development, some extra time for last-minute fixes to both the beta and the final build, and a few weeks to recover between versions, the result was a two-year development process in which only about four months would be spent writing new code. Twice as long would be spent fixing that code.
For me, this paragraph sums up where multi-year release cycles are just plain wrong:
In addition to making the Visual Studio team enormously unresponsive, this development approach wasn’t much good for team morale. A feature developed during the first development phase wouldn’t properly get into customer hands for the better part of 18 months. For Windows and Office, with their three-year cycles, the effect is even worse. A developer could be waiting more than two years before the work they did would ever make it to end users. Most developers actually want their software to be used; it’s just not that satisfying to know that you’ve implemented some great new feature that nobody will actually use for years. With Microsoft’s long development cycles, a developer may not even be on the same team—and may not even be at the company—by the time their code makes it to desktops.
Filed under Programming
Article from NBC news on IBM’s new computer chip. Apparently it has 5 billion transistors on a single chip.
Filed under Technology
In this book, Deaver introduces yet another new character, John Pellam (that’s along with Lincoln Rhyme and Kathryn Dance who are both sort of investigators). It took a while to get to know John Pellam, unlike the others, to whom Deaver cleverly introduces the reader in each other’s books. He’s not the typical star of a thriller – he works in the movie business, yet this book isn’t set in Hollywood or even on a film set, so the book plodded along until the real plot emerged. Fortunately, Pellam turns out to have experience as a stunt man, just as the action gets tough and he needs to roll with the punches.
Filed under Book Review
The quality of writing by Jo Nesbo (or possibly the translator?!) hits you as soon as you begin his books – this one is every bit as good as The Redbreast. Whilst some of the Harry Hole books are grisly, this one doesn’t rate too high on the bloodthirsty scale (although one incident with a vacuum cleaner isn’t for the squeamish).
Filed under Book Review