Spack: a Truly Useful Package Manager

So you are developing software, and you need the software to build for multiple difference machines, with different version of a library, or with just different compile time options. You can probably manage this by hand, but it very quickly gets out of hand. Spack is a package manager designed for high performance computing, but I would argue is more broadly useful for five reasons: It is explicitly designed to run as an unprivileged user....

August 27, 2020 · 5 min · 856 words · Robert Underwood

Strong or Robust?

Should a software design be strong or robust? This is a debate that seems to have been developing in recent years with the recent proponents so-called “strong-typing” advocating new API designs. In this post, I go a little into the debate and discuss its consequences. What does it mean to be strong vs robust? Robustness in software engineering is not a new concept, and intuitively a attractive one. Who doesn’t want their software to be robust?...

November 17, 2019 · 6 min · 1183 words · Robert Underwood

Julia: Could There be One Language?

There is a constant problem with programming language design: fast, generic, easy to write; pick two. The principle is that programming languages cannot be all three at once. Code that is Fast and Generic like C++ isn’t exactly easy to write. Code that is Generic and easy to write like Python isn’t always fast in the sense that C/C++ programmers mean it. Code that is Fast and Easy to Write isn’t always Generic in the sense that Python is....

April 4, 2019 · 10 min · 1922 words · Robert Underwood

Configuration Management: Common Pitfalls

So you know you need a configuration management system and you have an idea of which one will work for you. So what should I think about about before deploying one of this systems? In this third and final post in this series, I present some suggestions about using these systems in a way that is flexible and scalable to larger numbers of systems. Even within an operating system like Linux, there is a lot of variation between Linux distributions....

July 31, 2018 · 4 min · 717 words · Robert Underwood

Configuration Management: the Battle Royal

So, you need a Configuration Management System, so which one do you choose? This post is the second in a three part series on configuration management. In this post, I’ll highlight the strengths of these systems and their respective weaknesses. Every evaluation needs to have criteria to be useful. Here are some of the criteria that I have had when I thought about this question. Ease of Use Time to Setup Difficulty of Adding More Machines Difficulty of Creating New Modules Difficulty of Supporting More Configurations Quality of Documentation Puppet Puppet is the oldest open source configuration management system, and perhaps the mostly widely deployed in enterprise environments....

July 31, 2018 · 8 min · 1616 words · Robert Underwood

Configuration Management: the Related Systems

Configuration Management Systems like Ansible, Chef, Puppet, and SaltStack are in my opinion are nearly essential if you find yourself managing more than 5 machines. But what exactly are they, which is better for my circumstances, do I still need them if I use a container based infrastructure, how do I get started? This post is the first in a series of posts that will attempt to answer these questions....

July 31, 2018 · 4 min · 688 words · Robert Underwood

Generic Cuda

GPU programming has the potential to make embarrassingly parallel tasks very quick. But what if you want to perform the same task on a variety of different types? In this post, I walk through a generic testing code that preforms a vector add on GPU and CPU to verify the correctness. The Test Harness Our main function is pretty simple: int main(int argc, char* argv[]) { check_type<int>(); check_type<long>(); check_type<double>(); check_type<float>(); return 0; } So how do we write check_type?...

May 12, 2018 · 7 min · 1378 words · Robert Underwood

Life with Libtooling

Over the last two months, I spent a significant amount of time using Clang’s libtooling. Libtooling is a great way to quickly develop tools to analyze and modify large quantizes of C++. In this article, I share some lessons learned working with libtooling. Beware the Stability Guarantees. The biggest problem with libtooling is that it has very few if any Stability guarantees. When I was learning libtooling, I watched Peter Goldsborough’s video excellent “clang-useful: Building useful tools with LLVM and clang for fun and profit”....

December 10, 2017 · 5 min · 873 words · Robert Underwood

Design of A Matrix loading Library

Ever notice that every matrix and graph library seems to have a different interface for constructing matrices? Also notice that each only only supports some subset of common matrix formats? With a little help from the Adapter and Builder design patterns we can actually solve this problem. Design Overview In this design, we have 2 main actors: Parser andBuilder as well as their implementations ParserImpl and BuilderImpl. It allows us to write code like this in c++:...

September 23, 2017 · 4 min · 796 words · Robert Underwood

Qt is for more than just GUIs

When most people think of Qt, I imagine that they think about the Graphical User Interface components. But Qt has a variety of other components beyond just being a GUI framework. In this post, I highlight some of what I find to be the more interesting features. Object Communication via Signals and Slots One of the coolest features of Qt is its very clean implementation of signals and slots. Signals and slots are a means of communicating information (called signals) between objects via special callbacks (called slots)....

May 23, 2017 · 3 min · 616 words · Robert Underwood