Posts

Fixing Conan Lock Issues

I've been implementing Conan as our C++ package manager, and I had the following issue cause me a fair amount of grief over the last couple days: [MyPackageName] is locked by another concurrent conan process, wait... If not the case, quit, and do 'conan remove --locks'  You would be forgiven for thinking conan remove --locks should do the trick, but alas, it does not.  After finding hints on several Conan Github issues, I finally figured out that manually removing the package folders in one or both of the following places will alleviate the issue: Windows : C:\Users\username\.conan\data\packagename WSL/Linux : /home/username/.conan/data/packagename

Writing C++ Shared Libraries for Linux

I've recently been getting an old Windows-only module cross compiling for Linux. One of the challenges has been figuring out how to make the consuming project find & properly open the .so file. Most posts suggest that you must put your libraries in a specific folder, but a developer friend with stronger Linux kung-fu than mine confirmed that you can simply drop the .so files in the same directory as your application, & consume them using dlopen. Here's a couple examples: first, a trivial hello world to show the basic consumption, and second, an example of what a reusable interface might look like. The latter shows how to use custom parameter & return types. I am new to designing C interfaces and deploying on Linux, so any comments are welcome. Hello World from a Linux shared library: Passing an interface from a Linux shared library:

With Great Power Comes Great Responsibility

We have failed society, and society has noticed.  Code now powers injustice around the world.... The New York Times recently published an interactive article titled " The Decade Tech Lost Its Way ".  The headline brought to mind a topic I've reflected on often over the past few years.  We have had a decade of headlines exposing aid of government oppression in China by Google, utter disregard for privacy from Facebook, profit-margins above human well-being at Amazon, and many more. The list is not limited to big tech either.  Praiseworthy investigative journalists brought us stories ranging from massive location data-sets collected by dozens of small, obscure companies , to human rights abuses using facial recognition & cell phone spyware by world powers - specifically China & India . (China has now moved people targeted by this technology into brainwashing camps .)  And, of course, abuses of power by my own government as well . These stories both sadden

Using Enums to Replace #define's with Strongly-typed Variables

C++ Map With Multiple Keys

I recently had need for a C++ collection which could be accessed with multiple keys.  Specifically, I had an object that I wanted to look up either by name or id (in O(1) time).  One way to do this is to create two unordered_maps – one keyed by id and another by name, but that is error-prone.  I ended up finding a boost class which will do this. It took me a while get it working, so I thought I would share the result.

Selecting Software Tools

Image
After a software tool is in place, it often extremely difficult to swap it out, so choosing a tool is something you should get right the first time.  However, I find that many companies/teams choose tools for all the wrong reasons.  For example: "This one is free." When comparing options, you will often find at least one open source offering which can be used free of charge.  To be clear, open source is awesome.  The best option for your needs might be open source, but "free" shouldn't be a criteria in most cases.  The Joel Test asks, "Do you use the best tools money can buy?".  Joel used hardware examples, but the concept applies to software tooling as well.  Developer time is typically the biggest expense in a dev shop, so selecting software tools that make devs more efficient is paramount.  Typically, the time cost of using the software will easily eclipse the licensing cost.  Heck, not just developers - sales people, testers, etc. are

Building the Perfect Ergo Workstation

Image
Over the last few years, I've been evaluating the ergonomics of my workspace and making improvements.  That is, I've been trying to be proactive about the health problems that come from sitting at a desk full time ( sitting is the new smoking , and all that.). Along the way, I've done way too much research and plenty of tinkering, so I decided to share what I've learned.  I will try not to recycle what has already been written on the topic, but instead point to other resources for additional reading.  The purpose of this post is to share the products I have found and modifications I have made to those products in my quest to improve my workspace ergonomics. First, a few tidbits... Exercise The single best thing you can do for your health is get regular exercise.  No fancy ergo chair or standing desk will make up for lack of exercise.  Find a way to get your 30 minutes/day (minimum). Also, take regular breaks during the workday.  I have personally start