25 Tips for Intermediate Mercurial Users

| No Comments

I recently read an interesting article by Andy Jeffries entitled 25 Tips for Intermediate Git Users (linked to via proggit) . It had lots of useful information condensed into bite-sized task-oriented chunks.

I've been using Mercurial for a while now, so I thought I would write a similar set of tips by translating from git to the equivalent hg commands. Thanks to Andy for blessing this translation work. There may well be some mistakes herein - please leave a comment if you have any improvements or fixes to suggest.

Threading with Boost - Part II: Threading Challenges

| 2 Comments

In Part I of this series on Boost, we looked at the basics of how to create and run threads using the Boost libraries. But once you have more than one thread running in a process, you have to deal with the problems and challenges that threads can introduce. So, before delving into the mechanics of how to use mutexes and other threading constructs, we look at what can go wrong - and how to avoid it.

STL: filtering

The STL makes it easy to create lists, iterate over lists, and apply a function to each member of a list. So how do you filter a vector according to some criteria? It's not hard, but the obvious solution isn't quite enough. Here's how.

Threading with Boost - Part I: Creating Threads

| 13 Comments

Boost is an incredibly powerful collection of portable class libraries for C++. There are classes for such tasks as date/time manipulation, filesystem interfaces, networking, numerical programming, interprocess communication and much more.

The Boost documentation is substantial, but can still be daunting to new users. So this article is the first of a series on using Boost, starting with basic threading. It aims to provide an accessible introduction, with complete working examples.

Paying twice?

When you buy a car, you get a warranty, these days typically for 3 years on a decent model. Provided you keep up the fluid levels and do a bit of scheduled preventative maintenance, you're covered. So if the car fails, something breaks, or generally doesn't work the way it should, the supplier will fix it - for free. After all, you've paid for the car, you have a reasonable expectation of performance, safety and reliability. And ensuring that happens is good customer service and good business. So why isn't the same applied to computers and software? (This is an old rant I never quite finished, and decided to publish now just for fun - and see if it sparks any reaction.)

Use your brain!

| No Comments

When I was in high school, I got a new calculator - my first scientific calculator. It wasn't one of those fancy graphing calculators, nor was it programmable. But it did have lots of buttons and functions, and it was shiny. Excited by my new toy, I would use it for all sorts of things. I could evaluate complex equations in a flash! It was great! So, I started using it for everything, even for simple calculations that I used to "waste time" doing in my head. No more would I leave an answer in its boring 3π/2 form - I would evaluate it to 9 decimal places!

The first user

| 1 Comment

When you are developing a new piece of software, you typically first spend quite some time setting up your development environment. As you progress, your application becomes a very cozy inhabitant of this environment, a safe happy cocoon that has evolved as you make lots of small changes to the application or your system. What could possibly go wrong?

Improve your C++: const-correctness

| 1 Comment

Writing “const-correct” code will improve the quality and maintainability of your code. It is especially important and useful when writing Object-Oriented code, as objects are often passed around as constant references. Properly declaring non-mutating methods as const allows you to safely call any const method on such a reference. It is part of good type-safe practice and good code hygiene. So how do we do it?

New blog setup

| No Comments

This blog is now powered by the wonderful MovableType, Open Source Edition, running on SliceHost.

Installation was painless, following the instructions on the main website. I used PostgreSQL, my favourite RDBMS, on the back-end. I got a basic site up very quickly, and chose one of the supplied templates to get started.

Taking it for granted

| No Comments
I fell into the trap of thinking that every blog entry had to be fascinating, amazing, new, whiter, brighter and generally earth-shattering. But curiously I often read very popular blogs where people write about topics or techniques that I would consider obvious. And then one day it struck me - I was taking a great deal for granted.

So I decided I will start writing more articles (short ones that make it to publishable stage!) about some of these things. It will almost certainly be about software development, but not strictly so. Who knows what tangent I might strike out on...?

It will also give me a chance to exercise this new blog. Hopefully Google will actually start indexing it properly now.

Find recent content on the main index or look in the archives to find all content.

Recent Comments

  • Cuong Bui: Very excellent article. From this, I get more knowlegde into read more
  • lacau: Nice one, keep up teaching mate ;) Thumbs up! read more
  • Peter Sivak: Great article! I have just started learning Boost-Threads and this read more
  • Alan Orcharton: Thanks - a great summary!! to help me with everythng read more
  • murli Dhar: Wow! That was a GR8 piece of article. Extremely read more
  • sk: Quite good article. Hope you can have a time for read more
  • Raby Whyte: Very helpful indeed. Thanks :) Keep 'em coming read more
  • Yuriy: Easy to understand. Very helpful! Thanks a lot! read more
  • Marian: Superb! I'm only beginer in c++ and this way of read more
  • Leandro: Very nice article!!! It's hard to find good articles like read more

Recent Assets

  • MercurialBranchingExample.png
  • MercurialTaggingExample.png
  • MercurialRevisionTreeExample.png
  • STL Filtering Example
  • BoostThreadExample.png
  • results_ppc_g4.png

Categories

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.01