Tag Archives: practice

Approaches to optimize a small program (C++)

Imagine we have to work on the following problem (because it is our new assignment, our boss is obsessed with this problem, etc.): We have a text file that’s a few hundred megabytes long. We knows that this text contains … Continue reading

Posted in C++ | Tagged , , , , , , ,

My five most common programming mistakes in C++

I’m a junior programmer. Junior means I don’t have industrial experience, sad, but coding at home and working at a company are entirely different things. Strict deadlines, teamwork with a lots of smart guys, really big source codes and the … Continue reading

Posted in C++ | Tagged , , , ,

A C++ programming exercise: Calculate the first 4000 digits of PI in one second! (C++)

In these days, to me the hardest part of C++ practice is finding good and interesting programming practice problems. I learn the theoretical background of C++ programming day by day from various books, but it is not enough, I have … Continue reading

Posted in C++ | Tagged , , , ,

Similarities between enumerations and classes (C++)

I read about the “enum hack” (here is a very complicated case of that) and I wanted to try it. So I coded the following simple C++ program: You are right, it isn’t valid. There is a typo after the … Continue reading

Posted in C++ | Tagged , ,

Snoopy calendar is forever (C++)

Do you remember what the famous Snoopy calendar is? A little help: “The typical Real Programmer lives in front of a computer terminal. Surrounding this terminal .. a line-printer Snoopy calendar (For the year 1969) is taped to the wall.” … Continue reading

Posted in C++ | Tagged , , , ,

Strange features in C++ (quick post)

C++ is not Java. The banal truth can be helpful by coding, especially for me, because I tend to think in Java even when I’m coding in C++. “Real Programmer can write Fortran programs in any language” and bad programmers … Continue reading

Posted in C++ | Tagged , ,

Don’t reinvent the wheel, don’t believe in magic (C++ programming language, Stroustrup)

I decided that I would read regularly classic programming books. I need to learn and if I need to learn, why do I not learn from the greatest programmers of all time? I want to know him better and I … Continue reading

Posted in C++ | Tagged , , ,