C++ Rename Shootout: Visual Studio 2017 vs. ReSharper for C++

In programming we have to come up with names for lots of things on a day-to-day basis. Naming things is hard. Lots of times we come up with names that we’re not particularly happy with, but it may be the best name we could think of at the time. Later we get a better idea for the name but now we have to update all the locations in the code that used the old name and change them to use the new name. Sometimes, responsibilities change and the names we originally chose no longer match the new responsibilities.

Getting help from your development environment for renaming identifiers can be a huge productivity boost. It lets you quickly and easily improve the names of things in your code. In this post, I’ll review two automatic renaming tools for C++ in Visual Studio: Visual Studio 2017 Community Edition 15.5.7 and ReSharper for C++ 2017.3.2.

Read the rest of this entry »

Two-Character Unix Commands

Here’s a fun survey question: name as many two-character Unix commands as you can and say what they do.

Let’s be precise about what we mean by a “command”:

  • Shell aliases like la are not commands.
  • Shell built-in commands count as commands; over time the shell incorporated directly things that were previously separate executables in Unix.
  • Commands not available in a wide variety of Unix distributions by default don’t count. In other words, if you have to install some optional package to get the command then it isn’t a “Unix” command.
  • Optional: Only allow commands included in a “classic” Unix from Bell Labs.

Ready? Let’s go.

Read the rest of this entry »

Embedded C++ Development for the Game Boy Advance at OpenWest 2017

OpenWest 2017 has accepted my proposed talk on Embedded C++ Development for the Game Boy Advance. I will be presenting this talk on Wednesday, July 12th from 4:00 pm to 4:50 pm. If you are interested in C++ for embedded development, I think you will enjoy this presentation. We’ll be showing how the “Zero Overhead Abstraction” of C++ lends itself to creating clearer code for embedded platforms without losing anything in efficiency. I’ll see you there!

Daz Studio 4.9.3 Released


Daz Studio 4.9.3 has been released, with an updated implementation of NVIDIA’s IRay. Daz Studio is the first to market with this new version of IRay bringing support for Pascal generation GPUs from NVIDIA. We’ve also added automatic login to make it more convenient to purchase and install content directly from the Daz store. We continue to improve the Smart Content experience for browsing large libraries of purchased and installed content and making it easier to compose scenes by finding the appropriate content at the appropriate time.

As usual there are the sprinkled bug fixes and usability improvements; you can read the full list in the release notes. Download now and enjoy! It’s free!

The Mystery of Ctrl+[

Tommy Bennett gave a great lightning talk at CppCon 2016 entitled “Algorithm Mnemonics: Increase Your Productivity With STL Algorithms”. This was really two lightning talks jammed into one. In the second half, Tommy talks about how to increase your productivity with the vim editor simply by learning to use Ctrl+[ instead of ESC because of the distance traveled by your fingers on the keyboard. In the talk, Tommy wonders why Ctrl+[ works for ESC. This short post will explain the mystery of Ctrl+[ along with other interesting characters you can type on your keyboard.

Read the rest of this entry »

Utah C++ Programmers July, 2016: SIMD Parallelism with CPU Intrinsics (MMX, SSE, AVX, etc.)

At this month’s Utah C++ Programmers meetup, I’ll be presenting the basics of invoking SIMD CPU instruction set extensions using compiler intrinsics functions.

SIMD Parallelism with CPU Intrinsics (MMX, SSE, AVX, etc.)
Wednesday, July 13, 2016
6:00 PM – 8:00 PM

Food will be provided, courtesy of our sponsor Apremis Technology Placement. Thanks, Apremis! Please RSVP through the above link so we have a proper head count for food.

Refactoring to Learn a New Code Base

When you join a team with a large existing code base, it can be intimidating. How long does it take to become familiar with a million lines of code? I don’t have the answer to that question, but based on my past experience it easily takes several years if not more. Meanwhile, the rest of the team is adding and changing code all the time. When I apply small, focused, systemic refactorings to a code base, I visit lots of code that may be unfamiliar to me. Visiting unfamiliar code and making the same kind of systematic change throughout can help me become more familiar with the code.

Read the rest of this entry »

Utah C++ Programmers: Concurrency and Parallelism with <thread>

This month, Greg Hodgson will give us a presentation on concurrency and parallelism with <thread>. Thanks for presenting, Greg!

Slides for Utah Code Camp Presentations

I have posted the slide decks for my Spring 2016, Utah Code Camp are available on slideshare.net:

Thanks to everyone who attended Code Camp and a very special thanks to all the sponsors that make the event happen!

Proposed Utah Code Camp Spring 2016 Talks

It’s that time of year again and I’ve proposed the following talks for the 2016 Utah Code Camp. Please vote for those you’d like to see as I doubt I will be able to give all of them :-).

Vote here: Utah Code Camp Spring 2016 Sessions

Update: Two of my talks were accepted, thank you for your votes! That’s quite a bit of work for me in such a short time, but I will give it the old college try and do my best not to disappoint anyone. See you at Code Camp!

Proposed talks:

  • Software Practices and Principles
    • Why TDD is a Design Activity

      Do you think design is that thing you do at the beginning before you start implementation? Oh pshaw, waterfall thinker! Design is an activity. Designs evolve. Software is the most mutable substance known to mankind. TDD embraces that evolution and malleability and changes design from a phase into an activity we practice every day.

    • Accepted: Modern C++

      Has it been a while since you looked at C++? Do you have a “backwards looking” perspective on C++ based on poorly written old code? Come take a look at modern C++ and dispel your misconceptions about C++. Embrace lightweight abstraction mechanisms with efficient implementations that make your phone’s battery last longer! C++14 is stable and is implemented across all major platforms. C++17 standardization is underway. Compilers are implementing C++17 support in anticipation of the standard, instead of waiting until it is released. The library working group in the standards committee has additions to the C++ Standard Library coming your way.

  • Microsoft Technologies
    • Accepted: Developing iOS and Android Apps with Visual Studio

      In this presentation, we’ll take a look at the additions to Visual Studio 2015 that support the development of iOS and Android applications. We will emphasize cross-platform development of a single code base.

    • NodeJS for Visual Studio

      In this presentation, I’ll give a quick tour of the NodeJS integration for Visual Studio.

Slides for Consuming and Creating Libraries in C++

I have uploaded my slides for my presentation on Creating and Consuming Libraries in C++. Not every word of what I discussed is in the slides, but there should be enough there for you to follow the discussion.

Utah C++ Programmers: Consuming and Creating Libraries

In this month’s Utah C++ Programmers meetup, I’ll present the basics on consuming and creating libraries for C++ programs. ConsultNet is now a sponsor of Utah C++ Programmers and will be providing us with food for the meeting. Thanks, ConsultNet!

Read the rest of this entry »

Visual Studio 2015 Update 2 RC Released

Microsoft has released a release candidate of Update 2 for Visual Studio 2015. Of interest to C++ developers are the completion of C++11, C++14 and current C++17 library features as well as numerous performance and bug fix improvements to the IDE and the compiler. There are some breaking changes for existing code bases that were not written in conformance with the ISO C++ standard, but instead relied on the old non-conforming behavior of the Microsoft compiler.

SLC Software Craftsmanship: Rewrite or Refactor?

Tomorrow the Salt Lake City Software Craftsmanship group will be holding their 2nd meetup. The reading discussion topic for this month is Rewrite or Refactor?. Dinner will be served and there will be a programming exercise after the reading discussion. See you there!

Refactoring Test Suite Results for Visual Studio 2015

Last Friday I updated the test results for my C++ refactoring test suite to include results from Visual Studio 2015 Update 1. Visual Studio 2015 is the first release of Visual Studio to support refactoring for native C++ projects without any additional add-ons. Prior to Update 1, Visual Studio requried a free add-on for Extract Function and Extract Method, but this has since been folded into Update 1 and made available to all Visual Studio users. Extract Function and Change Signature are disabled by default and can be enabled in Tools / Options / Text Editor / C/C++ / Refactoring.

Read the rest of this entry »

Daz Studio 4.9 with In-App Purchase of Content


Daz Studio 4.9 has been released today. Daz Studio 4.9 features an integrated content store so you can directly manage your free and purchased Daz content. Downloading and installing content has never been easier! Daz Studio 4.9 offers improved workflows for using content with the Smart Content Pane. Daz Studio is free and includes the fully-posable base human figure content. NVidia’s IRay physically-based renderer is still included and has been updated for this release. IRay is a great way to explore physically-based rendering, all the way down to authoring NVidia material definition language files and directly consuming them with Shader Mixer in Daz Studio. For graphics programmers and graphics researchers this is a wonderful way to explore the power of MDL with a great rendering engine and great content.

Download today!

CppCast #17: Exercism.io and Refactoring

CppCast interviewed me for episode 17 of their C++ podcast last night. We had a great time talking about exercism.io and refactoring in C++. Check it out!

DAZ Studio 4.8 with IRay Physically-Based Rendering


DAZ Studio 4.8 has been released with NVidia’s IRay physically-based renderer running on the GPU. DAZ Studio is free, including the IRay renderer. It’s a really great way to play around with a physically-based renderer using a rich application environment and a rich library of content. Have fun rendering this summer!

You might recognize at least one name on the About… box pictured above :-).

Fixing the Windows 7 Weather Gadget

Recently, my Windows 7 weather gadget started spontaneously saying that it “couldn’t connect to service”. This was odd, considering I’d configured this gadget years ago and hadn’t touched it since. If this is happening to you, here is how I fixed mine.

Read the rest of this entry »

Advice for Software Engineering Job Seekers and Employers

Over the past several years, I worked on an expanding team and interviewed many candidates for software engineering positions. What follows is my advice for those of you seeking a new software engineering job. The advice is also relevant to those of you looking to add to your team. See also Joel Spolsky’s Guerrilla Guide to Interviewing, there’s great stuff in there.

Read the rest of this entry »