Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
BlytheE
Alteryx Alumni (Retired)

C++.png

This post is dedicated to all things C++. Big thanks go out to Michael Chadwick (@MichaelCh), Steve Ahlgren (@SteveA), Hannah Keller (@HannahSinclair), and Rafael Hwang (@RafaelHfor contributing.

 

What is your favorite code editor? Do you use any keyboard shortcuts that make your job easier?

  • MC: I love Visual Studio as an IDE, particularly when paired with the Resharper plugin from JetBrains. It takes care of so many little things and even points out subtle issues in my code. But I also have to mention Visual Studio Code. It’s very lightweight and heavily customizable. My favorite plugin is VS Live Share. It brings Google Docs-style collaboration into an IDE, and optionally lets you share your terminal or expose a port from your machine for collaborators to debug against from their machines. It can radically change your experience when collaborating on code.
  • SA: I'm impartial to Visual Studio. My favorite function in Visual Studio is Ctrl-Shift-f aka "Find in Files". It's an essential tool when working in unfamiliar code, scoping changes for a big refactor, or just trying to find a random document from five years ago using just a phrase or key word. Puts the standard Windows search capabilities to shame.
  • HK: My favorite editor for writing C++ is Visual Studio, it just has the most features I have found to support the language. Some of my favorite keyboard shortcuts are the more simple ones like ctrl + -, which navigates you back to where you last were in the code, super handy. I was also recently told about ctrl + g which opens the Go To Line dialog. This is nice when working with another developer while looking at the same code base. It’s not quite a shortcut but a visual studio extension: Go To Definition, which adds the ability to Ctrl + click to go to the definition of that identifier.
  • RH: Like most people, I’ve used pretty much all of the popular ones under the sun, but on Windows I keep finding myself coming back to Notepad++.

 

keyboardshortcuts.jpg

 

 Preferred testing framework?

  • MC: Catch2. I’ve used Google Test a fair bit as well. There are one or two features it has that Catch2 doesn’t have (yet), but in all other respects Catch2 provides a vastly smoother experience for both writing, maintaining, and debugging tests.
  • SA: I don't have a strong preference. When I came to Alteryx I adopted Google's gtest/gmock over boost.test and I'm happy with that decision. There's an internal movement at Alteryx toward Catch over gtest/gmock but honestly I don't quite understand the hype.
  • HK: I don’t have a ton of experience with different testing frameworks, but know many developers prefer the Catch framework.
  • RH: Catch/Catch2 for C++. It’s ridiculously easy to get it going.

 

tests.png

 

 Helpful learning resources?

 

iknowc++.jpg

 

 Useful or fun libraries? Any open-source projects you'd like to give a shout out to?

  • MC: Boost has some really useful stuff. The Guideline Support Library as well. There are so many awesome C++ libraries out there, but I think my favorite in terms of excellent execution of a great idea has to be sqlpp11.
    I can't forget to mention one of my favorite open source projects, which is not a library at all: The Battle for Wesnoth. If you want to work on an open-source C++ game project, I recommend it. Also, this list is great.
  • SA: I've been using boost since 2001 and can't tell you how much time it's saved me over the years. I also can't tell you how much time it's cost me over the years because its ability to push the limits of compilers is well known. There's a reason they used to have a T-shirt with the logo "breaking compilers since 1999" on it :).
  • HK: Boost and STL are the big ones to be familiar with as a C++ developer.
  • RH: Should out to OpenCV!

 Anything else you think a developer needs to know?

  • MC: Never stop striving for excellence! There is always more to learn.
    Don't underestimate the importance of learning people skills as well as technical skills - if your only skills are technical, it will limit your career opportunities.
  • SA: If you haven't yet embraced Alteryx as a development tool it's time to do so. Anything I used to do in Perl such as parsing logs, searching/modifying code with complex regexes, modifying project files, etc. I now do in Alteryx. Ad-hoc queries are a breeze, and with the addition of the caching tool in 2018.3 complex queries across an entire code base are much faster to execute because the code can be loaded once (via a directory tool), cached and then explored as desired. Super powerful.
  • HK: Smart pointers are your friend!
  • RH: It has been estimated that the Megalodon shark could have weighted over 60 tons, or 120k pounds, easily capable of taking out a duck. So, let’s push for rubber Megalodon shark debugging, instead.

Stay tuned for next week's post about Python. Comment your favorite code editors or libraries for C++ below!

Blythe Early

Blythe is an Associate Product Manager that started her career at Alteryx as a Customer Support Engineer in January of 2015. She previously worked as a data analyst for a marketing company. She likes cats and video games and dislikes writing about herself in the third person.

Blythe is an Associate Product Manager that started her career at Alteryx as a Customer Support Engineer in January of 2015. She previously worked as a data analyst for a marketing company. She likes cats and video games and dislikes writing about herself in the third person.