Some general question

Started by
2 comments, last by RDragon1 14 years, 5 months ago
1) What do you guys think about case A versus case B :

bool state = false;
//after some code
if(state == false) // CASE A :
//after some code 
if(!state) //CASE B :
Which one is better for practice in your opinion and from your experience ? 2)What about template function pointers? What would be a case to use that ? Why are template function pointers useful; same reason an regular function pointers are useful, that is for callbacks? 3)Do you guys recommend any good books for data structure and algorithm in C++ or Java? 4) What seems to be more used tool as of today, C++ or java or something else? I noticed that most universities are teaching Java. 5) What language do you use most in your job. 6) Beside practicing,what makes a programmer better than other programmer? 7) Any tips to become a better designer/programmer? Any answer to the question is appreciated. It does not have to be factual, it could be opinionated.
Edge cases will show your design flaws in your code!
Visit my site
Visit my FaceBook
Visit my github
Advertisement
Quote:
Which one is better for practice in your opinion and from your experience ?

I'd always choose case B. Its more natural in english (though your variable's name is poor). Consider if the variable was called "isRaining". Which reads better:
if(isRaining == false){   drop(umbrella);}

Or:
if(!isRaining){   drop(umbrella);}

Quote:
What about template function pointers? What would be a case to use that ? Why are template function pointers useful; same reason an regular function pointers
are useful, that is for callbacks?

Template function pointers are useful for callbacks, where the exact types vary between functions. I imagine boost::function is a perfect example.
Quote:
Do you guys recommend any good books for data structure and algorithm in C++
or Java?

I can't think of any books at the moment. This is a pretty common question, try searching the site.
Quote:
What seems to be more used tool as of today, C++ or java or something else?
I noticed that most universities are teaching Java.

In what context? Java and C# seem to be the most popular in general. For AAA game programming C++ and scripting languages like Lua would be more popular.
Quote:
Beside practicing,what makes a programmer better than other programmer?

Experience, which is basically practice. One thing that can give you an edge is a broad knowledge base. Learn lots of languages and technologies.
Quote:
Any tips to become a better designer/programmer?

Designer? Design stuff. Programmer? Program stuff. [smile]
Thanks, anyone else's input are still welcome.
Edge cases will show your design flaws in your code!
Visit my site
Visit my FaceBook
Visit my github
Quote:Original post by Concentrate
6) Beside practicing,what makes a programmer better than other programmer?


Keeping your mind open and learning. Technology changes fast. If you dismiss new "wild" ideas because they aren't what you're used to, you risk getting lost behind.

Also, core skills like learning how to learn, knowing what you don't know, and being able to shamelessly admit errors are rare enough to still be very valuable.

This topic is closed to new replies.

Advertisement