128 posts page 1 of 13 Older >>
  • Data Compression With Arithmetic Coding

    Arithmetic coding is a common algorithm used in both lossless and lossy data compression algorithms. It is an entropy encoding technique, in which the frequently seen symbols are encoded with fewer bits than rarely seen symbols. It has some advantages over well-known techniques like Huffman coding. This article will describe the CACM87 implementation of arithmetic coding in detail, giving you a good understanding of all the details needed to implement it.
  • Highlights of ISO C++14

    Voting on the C++14 standard was completed in August, and all that remains before we can say it is officially complete is publication by the ISO. In this article I will visit the high points of the new standard, demonstrating how the upcoming changes will affect the way you program, particularly when using the idioms and paradigms of Modern C++.
  • C++ Generic Programming Meest OOP - std::is_base_of

    Alexander Stepanov's Standard Template Library provided a huge push towards making template programming an important part of C++, and helped to insure that it was included as part of the first standard in 1998. But adoption of templates by most programmers has been more of an incremental process, as opposed to a revolutionary one - many of us have literally decades of Object Oriented == The One True Path to unlearn. And to top things off, templates needed some refinement over the years before they could do many of the things we expected of them. In this article, I'll show you how generic programming with templates makes a noticeable improvement in a pedestrian but important task I deal with constantly in my data compression work. Then I'll show you the annoying but understandable problems with this approach circa 1998, and finally, how to resolve them with features added in TR1 and C++11.
  • Debugging Windows Services Startup Problems

    In the days of XP, a Windows Service was more or less an ordinary executable running in the same session as all other executables. Debugging it was fairly simple, although you did have to deal with the complication that it was started by the Service Control Manager. Today Windows Services run in a mysterious Session 0, which is difficult to work with. If your Service is written in C++, you'll find that it can be problematic to deal with bugs, particularly crashes, that occur during Service startup. In this article I'll explain why that is, and show you a very simple set of techniques for dealing with this problem. I hope that the relative simplicity of all this will reduce your frustration level when debugging your Windows Services.
  • My Big Company Code Interview

    I get an interview call from a tech giant, and get to take an online coding test.
  • One Definition to Rule Them All

    A frequently cited rule in the C++ standard is the One Definition Rule. In this article, I'll show you how I inadvertently blundered into an ODR problem, found my way out, and uncovered a deeper truth about the language standard.
  • How I Spent My Last Few Weeks

    Rack Master is a free training program that gives you a fresh puzzle every day. Your goal is to make the best scores out of five racks of letters, using the scoring rules from games like Scrabble and Words for Friends.
  • The Random Compression Challege Turns Ten

    Ten years ago I issued a simple challenge to the compression community: reduce the size of roughly half a megabyte of random data - by as little as one byte - and be the first to actually have a legitimate claim to this accomplishment. Ten years later, my challenge is still unmet. After making a small cake and blowing out the candles, I thought this would be a good time to revisit this most venerable quest for coders who think outside the box.
  • C++11: unique_ptr<T>

    There are a lot of great features in C++11, but std::unique_ptr stands out in the area of code hygiene. Simply put, this is a magic bullet for dynamically created objects. It won't solve every problem, but it is really, really good at what it does: managing dynamically created objects with simple ownership semantics.
  • C++11 - Threading Made Easy

    C++11 brings rich support for threading to the language, and one of the features that really works for me is the function template async. This provides a great mechanism for spinning off worker threads and easily collecting their results. In this article, I'll show you how I used async to introduce threading to C++ beginners in a nice non-threatening fashion.
Older >>

subscribe via RSS