C++

Better C++ enums

Submitted by slavikt on Tue, 04/15/2008 - 11:45.

I was going to write about it myself for a long time, but Noel did it first.

Must-have technique when using enums in C++: Stupid C++ Tricks #2: Better Enums external

|

Programming for web with C++

Submitted by slavikt on Tue, 02/19/2008 - 21:43.

I got a new portion of inspiration today. My RSS reader bring me this link: Wt: A Web Toolkit external. The article descibes great library external for developing web applications with C++ and happiness.

I don't know, how it will be in the practice, but I'm going to give it a try. It looks very promising.

|

The absolutelly necessary STLport configuration tweak

Submitted by slavikt on Mon, 11/12/2007 - 02:02.

There are lots of configuration options in the STLport, and their default values are ok in the most cases. With only one exception: the debug mode, configured with the _STLP_DEBUG macro definition.  read more »

|

Should I switch from C++?

Submitted by slavikt on Sun, 10/28/2007 - 22:34.

The whole today morning I was thinking about switching from C++ to something like Java or C#. The reasons for these thoughts were very simple.  read more »

|

Logging news

Submitted by slavikt on Thu, 10/25/2007 - 22:54.

My previous article about logging in C++ was quite pessimistic. Things become better.

The log4cxx library I have blamed in that text looks alive again. It leaves the incubation stage and now first Apache release 0.10 is preparing.

What is more, it has large improvements inside. For example, the operator<< support in logging macros has been broken for at least two last years. I had to use the logstream class for complex logging operations. Now it has been returned and fixed.

I'm going to stick with log4cxx.

|

Ah, by the way!

Submitted by slavikt on Fri, 09/07/2007 - 23:32.

I have succesfully built curlpp with msvc8 sp1. Stay in touch!

|

How to convert string to int (or int to string)

Submitted by slavikt on Tue, 07/10/2007 - 16:08.

Have I already told that Boost is incredibly useful thing? For example, to easily convert number into the string, you can use lexical_cast like:  read more »

|

Logging thoughts

Submitted by slavikt on Mon, 05/14/2007 - 19:26.

The situation around the logging frameworks is not very good in the world of C++. There is no much similarity with .NET or Java world, where the great log4smthng solves all logging issues. Many people uses the self-written libraries.

In fact, the official Apache's log4cxx exists. But it is not very cheerful. It have a strong dependencies on the ACE library, the binaries under Windows are too big (for logging framework). And it is almost dead.  read more »

|

What is wchar_t?

Submitted by slavikt on Sat, 01/13/2007 - 21:31.

In our days we have to provide internationalization support in the programs. Among other issues, we should be ready to accept textual information in the extended character sets. The wchar_t data type was provided in the C++ to achieve this goal. I'd like to sum up what should be taken in account when using the wide characters standard strings.  read more »

|

Trying pure TDD with Modern C++

Submitted by slavikt on Sun, 11/26/2006 - 22:30.

I really like Test Driving Development. In theory. But I have some problems applying it in the real life. I believe that the problems are because of lack of understanding, not because of holes in TDD.

Of course, some parts of the code I write are a good fit for unit-testing. Often there are subsystems used internally in the software, without interoperating with the environment... These are easy to test because of obvious interfaces and because they do not require mocking. But testing first the physical or GUI related code is still a kind of question for me. That's why I have started a little experimental project and I'm going to develop it using pure TDD only.  read more »

|