HN user

wizardofoz

103 karma
Posts4
Comments11
View on HN

Code that test the finite switch:

3. for (int i = 0; i < iteration; i++) {

4. testSwitchFinite(i);

5. }

Once i > 5, testSwitchFinite will always skip to default. This function doesn't even test the switch properly.

Something like testSwitchFinite(i%5+1) would have made more sense (for the finite switch and if-else.)

What about an online meeting? On an IRC channel? Can a hacker working on a project multitask and attend the IRC meeting while simultaneously coding (perhaps he has 2 monitors, he codes on the larger one and IRCs on the other one) ?

I'd like to hear some thoughts on this.

I believe work is the source of happiness. Happiness comes to you when you see the fruits of your work.

I remember feeling really happy after finishing up a program that I had been working on for a long time. Just seeing it work so perfectly gave me an incredible sense of satisfaction. It was far better from the satisfaction/pleasure I got from doing things like watching TV/movies, going on dates, eating at nice restaurants, etc.

Developing the program was definitely not play either. It involved things (like fixing bugs, coming up with algorithms) for which I had to expend a considerable amount of intellectual energy. It was work, but it was work worth working on.

Well I wrote (a command-line) program that was about 2000 lines long in C++ and during most of the development period I used g++ with the -ansi & -pedantic options.

Later I was able to get my program to compile on Visual C++ with absolutely no modification.

C++ has a high price in terms of binary incompatibility.

I find this statement to be rather untrue because I think most modern compilers when forced to be ISO/ANSI compliant (i do: g++ -ansi -pedantic) ensure your code is portable across systems.