Statically Typed

because Hindley-Milner rocks

Category Archives: C++

Swig, Python, Cross-Language Polymorphism and C++ Exception Handling


Back to cross-language interoperability I go!  And with me I’m bringing my dear old friend with me, SWIG. I love SWIG and I’m not afraid to admit it.  It makes … Continue reading

May 25, 2010 · Leave a comment

Interview Questions, Reversing a Linked List


I found out yesterday that during an interview process, the interviewer gave candidates 20 min. to solve the reversing a linked list problem.  Personally, I can’t believe that it would … Continue reading

May 20, 2010 · Leave a comment

Singletons, Aaargh!


To me, singleton is a four letter word.  I understand they have their places but I find them few and far between.  Thread pools, Socket pools, DB Connection pools and … Continue reading

May 18, 2010 · Leave a comment

Template Meta-Programming and Compiler Issues


Nothing beats working with a compiler that isn’t standards compliant or has some weird bug that you just hit.  I used to work with VC++ 6.0 but was updated to … Continue reading

May 17, 2010 · Leave a comment

Interview Questions


So I read a post on Hacker News that someone’s favorite C++ question was to explain the usage of the keyword “virtual.”  That’s pretty easy to answer and I’m fairly … Continue reading

March 30, 2010 · Leave a comment

The Real solution to the last question


Hat tip Roger Pate.  Taken from the poster spong, in answer to the question: size_t get_num_of_ints( const int* arr, size_t r, int N, size_t* first ){     std::pair<const int … Continue reading

March 19, 2010 · Leave a comment

Let Me Reprise That


Why did I use template meta-programming in the last solution?  That solution would only have made sense had I been able to assume a Boost::Array wherein the function would have … Continue reading

March 15, 2010 · Leave a comment

Interview Questions


There’s a post on StackOverflow dealing with a C++ interview question and the OP’s answer.  Unlike many candidates he’s actually trying to understand why his code was deemed sub-optimal.  Fantastic!  … Continue reading

March 14, 2010 · 2 Comments

Ideas for Coding Challenges


At work I’m splitting my time between two groups: my old group which develops software in the wild-west fashion and another group using a very process heavy waterfall model.  Most … Continue reading

March 9, 2010 · Leave a comment

On Bottlenecks and Performance


It strikes me as odd just how many people love to prematurely optimize or optimize without benchmarking.  Moreover, it’s unequivocally disastrous when the choice to optimize is made by non-programmers … Continue reading

February 27, 2010 · Leave a comment