Free Workshop: Test-Driven Development in C++, Wednesday, April 30, 2014

Have you heard about that new thing the kids are doing called test-driven development and wondered what it’s all about? Is it about testing? Is it about design? Is it good or is it bad?

Come join me for an evening workshop where I will show you what it’s all about and you’ll have a chance to try it out for yourself on a problem large enough to be interesting, but small enough that you can make progress on it during the workshop. The workshop will use the Boost.Test and Turtle libraries.

Thanks to Fusion-io for the meeting facilities, WiFi access, food (pizza from The Pie) and refreshments.

Seating is limited, so please RSVP to reserve your space.

Date Wednesday, April 30, 2014
Time 6 PM – 9 PM
Location Fusion-io (Google maps)
2855 E. Cottonwood Parkway
Suite 100
Salt Lake City, UT 84121

Read the rest of this entry »

Three Sessions Accepted for Spring 2014 Utah Code Camp!

Of the sessions I proposed to the Spring 2014 Utah Code Camp, they accepted “Walk Down GPU Lane” and “C++ User Group Bootup” talks. Later, one of the speakers cancelled and they needed to fill a slot, so I’m going to present a dry-run of my C++ Now! 2014 talk “Build your own C++ refactoring tool with C++ and clang”.

Read the rest of this entry »

Two Sessions Accepted for C++ Now! 2014 (May 12-17, 2014)

I’m pleased to announce that two of my proposed sessions for C++ Now! 2014 have been accepted! I proposed three sessions to the conference: create a refactoring C++ tool in C++ with clang, test-driven development with Boost.Test and Turtle Mock, and automated acceptance testing with FitNesse. I would have been pleased if just one session were accepted and I’m quite happy that two sessions were accepted, even if it does mean a bunch of work for me. Both sessions will be workshop-oriented, meaning we’ll be looking at code and very few, if any, slides. Death to powerpoint! Long live the code!

Read the rest of this entry »

Spring 2014 Utah Code Camp: March 15th, 2014

The Spring 2014 Utah Code Camp is coming up and I’ve got some proposed sessions. Utah Code Camps are by the developer community and for the developer community. Utah Code Camp is always free! Spring 2014 Utah Code Camp will be held on March 15th, 2014 at the University of Utah Spencer Fox Eccles Business Building.

Read the rest of this entry »

Refactoring: Sort Members by Visibility

You have a C++ class that shows readers its implementation details before it shows readers its public interface.

Reorder the class members in order of decreasing visibility, preserving the relative order of the declarations within each visibility category.

Read the rest of this entry »

Visual Studio Bugs

Visual Studo 2012 had a nice add-in called the Microsoft Visual Studio 2012 Feedback Tool that lets you quickly report a bug to the connect website. I’ve found that making it easy to report bugs in VS has increased the likelihood that I actually will report bugs. With Connect, any user can add a “me too!” vote to someone else’s public bugs so that the product team has a better idea of the people affected by it. You can also add your own comments to someone else’s public bugs. This post will be updated over time with bugs I’ve filed so that you can add your own “me too!” vote or comment to the bug.

Visual Studio 2013 included a similar bug reporting tool. This list now includes bugs reported in Visual Studio 2013.

Unfortunately Visual Studio 2015 replaced the nice bug reporting tool with a “send a frown” feature. This files a bug report into a black hole where you can never see anything about that bug report again. This forces us to go back to the connect site and log bugs by hand. Why can’t they leave good features alone? I will continue to add bugs to this list filed against VS 2015, but man they are sure making it hard for me to provide feedback in a way that’s useful for me.

Read the rest of this entry »

Fall 2011 Utah Code Camp Schedule Posted

They’ve posted the schedule for the Fall 2011 Utah Code Camp. I’ve got two sessions: one on push notifications with Windows Phone 7 and a roundtable discussion to get a C++ user’s group going in Utah. C++ for the win!

Utah Fall Code Camp 2011

The Utah Fall Code Camp 2011 is coming up and I’ve proposed a number of talks and volunteered to present some that didn’t yet have speakers. If any of these sessions sound interesting to you, please visit the Utah Code Camp web site and vote for them.

  • Open Source Development Track: Recursive Descent Parsers with Boost.Spirit
  • Microsoft Development Track: Powering Managed Applications with the GPU and SlimDX
  • Architecture Track: High Performance C++, or How to Make Friends With the Cache

The following talks already existed but had no speaker yet, so I volunteered to give them:

  • Mobile Development Track: Push Notifications and Tiles for Windows Phone
  • Mobile Development Track: Game Development for the Windows Phone 7.5

Read the rest of this entry »

“Domain Specific Languages” by Martin Fowler

In 2011, Martin Fowler wrote “Domain Specific Languages” published by Addison-Wesley. Examples of domain specific languages you might have encountered before are regular expression specifications, Makefiles, Direct3D’s high level shader language (HLSL), OpenGL’s GL shader language (GLSL), the Wavefront object file format (.obj) or input specifications to the compiler tools lex (.l) and yacc (.y). Fowler defines a domain specific language as “a computer programming language of limited expressiveness focused on a particular domain.” Domain specific languages (DSLs) have been around for a long time, but to date there hasn’t been any general treatment of the techniques and characteristics of DSLs in general, as opposed to the traits of a particular DSL. Fowler’s book is a good first entry.

Read the rest of this entry »

Need Tessellation?

Try libtess2, a refactored version of the GLU tessellation code from OpenGL. Brought to you by Digesting Duck.

Channel 9 Video: Stephan T. Lavavej on the Standard Template Library

Stephan T. Lavavej has created another great video on the C++ Standard Template Library (STL) over on Channel 9. I’ve watched Stephan’s videos before and they always prove illuminating and worthwhile. Check it out!

Channel9: STL: Some Underlying Algorithms, Data Structures, and More with Stephan T. Lavavej

On Channel 9, Stephen T. Lavavej gives a presentation about C++ and the Standard Template Library. Stephan really knows the standard library (or STL, if you prefer) and his presentations are always worth your time. The video is about an hour in length.

C++ Refactoring Tools Test Suite Available

I created a test suite for C++ refactoring tools. You can download release 1.0 for yourself to see the tests. Results of the tests are included for ReFactor!Pro v9.1.10.

Read the rest of this entry »

C++ Mock Object Workshop on January 13th

Zhon Johansen and I will be covering C++ mock object frameworks at the January, 2010 meeting of XP Utah. Zhon will cover googlemock, the Google C++ Mocking Framework, and I will cover mockpp, Mock Objects for C++. XP Utah meets from 7pm to 10pm on the second Wednesday of every month at the Borders bookstore in Murray, UT.

During this workshop, we will practice test-driven development in C++ using mock objects. We will be using Boost.Test as the underlying unit testing framework. The workshop will be organized as a programming kata, first with mockpp and then repeated with googlemock. By repeating the same exercise with the same unit test framework but two different mocking frameworks, participants will be able to compare and contrast the two mock frameworks for C++.

The workshop is free and open to all.

To participate, bring a laptop with a C++ programming environment. There is free wireless at the Borders bookstore. You will want to have downloaded and installed Boost.Test before the workshop. We will start promptly at 7pm in order to work through the kata with both mock object frameworks. If you are unfamiliar with writing unit tests in C++, consult my tutorial on unit testing with Boost.Test.

Direct3D Test Doubles, Part 1

When developing Direct3D code using test-driven development, you need test doubles to stand in for interfaces used by your code. This way you can control the interaction of your system under test with its environment. This post is the first in a series of posts that discuss several ways you can create test doubles for the COM interfaces used by a Direct3D application.

Read the rest of this entry »

“Xcode 3 Unleashed” by Fritz Anderson

My first exposure to Macintosh programming was with THINK’s Lightspeed Pascal in 1988. I was a graduate student at the University of Utah and the teaching assistant for the introduction programming course using Pascal. The student machines were Mac SEs running Macintosh System 2. Pascal provides a fairly encapsulated runtime environment to simplify its use in teaching programming, so it wasn’t really “Macintosh programming” although you could interact with the toolbox if desired.

Twenty years later, I find myself working at a digital content company and our content creation applications support both Windows and Mac OS X as a customer platform. While we largely rely on UI toolkits to isolate our applications from UI differences between platforms, we still need to build and debug code on Mac OS X. All of this work is done in Xcode. I was in a weird situation: I needed to know how to use Xcode, but I didn’t need to know how to program Mac native applications. I needed a book that would tell me about Xcode and how to accomplish typical developer tasks in it, but I didn’t need a book that would spend too much time on Objective C, Carbon APIs, Cocoa APIs and other Macintosh specific coding tasks. “Xcode 3 Unleashed” by Fritz Anderson is just the book I needed.

Read the rest of this entry »

A Good Online C++ Standard Library Reference

C++ is a language that lets you express yourself in many ways. One of the ways you can express yourself is with very low-level detail oriented code. The kind that deals with raw character pointers instead of string classes, the kind that has you writing your own linked list instead of using std::list. Many times in C++ programming newsgroups and on we counsel new programmers to use the standard string class, the standard resizable array class and so-on, but they seem completely oblivious to their existence.

Read the rest of this entry »

“Effective C++”, 3rd edition by Scott Meyers

Effective C++

"Effective C++", 3rd ed.

At the last agile roundtable, I picked up a copy of Effective C++: 55 Specific Ways to Improve Your Programs and Designs, 3rd edition, by Scott Meyers. There are some programming books that I read in chunks over time, like Design Patterns, or Refactoring and then there are books that I prefer to absorb in one big intellectual gulp. “Effective C++” is in the latter category.

Read the rest of this entry »

boost::shared_ptr redux

Emil Dotchevski from Reverge Studios has written a series of blog posts on boost::shared_ptr that are quite interesting:

C++ Static Analysis

Static analysis refers to analysis of source code outside the context of its execution. For C++, static analysis can identify simple mistakes in your code that you can catch before you ship your code to a customer. Static analysis can be performed during your automated nightly builds alerting you to problems early. In this post, I’ll discuss some tools and techniques for static analysis of your C++ code.

Read the rest of this entry »