PROGRAMMING


  template function in class in C++

We can define template function in a class, but one thing we should pay attention to is that the member function template definition (in addition to the declaration) should be in the header file, not the cpp, though it does not have to be in the body of the class declaration itself.Example //Sorter.h#pragma onceclass Sorter{public:    Sorter(void);    ~Sorter(void);    template <class type> static void qsort(type arr[],int start,int end);};template <class type> static void Sorter::qsort(type arr[],int start,int end){    in...

2,716 0       C++ TEMPLATE FUNCTION CLASS DEFINITION D


  10 Tips To Make Your C Program Effective

The beauty of any code lies not only in finding the solution to a given problem but is in its simplicity, effectiveness, compactness and efficiency( memory ). Designing the code is harder than actually implementing it. Hence every programmer should keep a couple of basic things in mind while programming in C. Here we introduce you to such 10 ways of standardizing your C code.1. Avoid unwarranted function callsConsider the following two functions:view source print?1void str_print( char *str ) 2  3{ 4  5    int i; 6  7    for ...

2,814 0       TIPS C EFFICIENT SPEED INCREMENT RECURSI


  Simplicity Oriented Programming

After few years on Warsztat (a Polish gamedev site) I’ve noticed an interesting phenomenon. Every now and then there are Compos (programming competitions) organized in two different flavours. Some compos are single-run events that last only few hours, others are long-term (several days/weeks). And as an extra catch, the former are usually restricted to basic APIs (SDL, OpenGL etc) while the latter are free-for-all (all sorts of engines, UDK/Unity allowed).Now, results are somewhat shocking. Much more people participate in short compos than the long ones. But the best part is that qualit...

2,640 0       PROGRAMMING RESEARCH ADVICE TIME EFFICIE


  Programming: the benefits of taking a break

This post lists several benefits of taking a break during programming.You work smarter, not harder. Once, I worked really hard on a feature. For two weeks, 12 hours a day, I put in a lot of effort. After those two weeks, I took a break and came up with several ideas that made much of the work unnecessary.You think more clearly. Being tired has a similar effect as being drunk. At the end of a day, I often kid myself that I’ll just get this one thing finished quickly to have a fresh start the next day. In reality, I usually need to clean up yesterday’s messes then. If instead I fin...

3,316 0       PROGRAMMING TIPS BREAK TIRED


  Are older people better programmers?

Peter Knego states something interesting: “It's official: developers get better with age. And scarcer.”. He uses reputation and other metrics from StackOverflow to corroborate his point.His summary is:Number of coders drops significantly with age. Top developer numbers, at age 27, drop by half every 6-7 years.Developers in their 40s answer roughly twice as much and ask half the questions compared to colleagues in their 20s. It seems younger generation learns and older generation teaches.Quality of posts, i.e. upvotes earned by post, only slightly increases with age.Seniors earn the...

2,633 0       PROGRAMMING SKILL AGE EXPERIENCE ADVANTA


  The History of Programming Languages

This post is part of our ReadWriteHack channel, which is a resource and guide for developers. The channel is sponsored by the Intel AppUp Developer Program. As you're exploring these resources, check out this helpful resource from our sponsors: AIR for AppUp: What You Need To Know Rackspace recently published a nice infographic on the evolution of programming languages. It starts with FORTRAN and COBOL and runs through Ruby on Rails (which, yes, is a framework and not a language). Unfortunately, it omits such influential languages as  Lisp,  ALGOL 60 and  Smalltalk. But inclu...

3,875 0       JAVA C PROGRAMMING LANGUAGE HISTORY


  Seven Java projects that changed the world

O\'Reilly is celebrating the release of Java 7, and our inaugural OSCON Java conference: July 25-27 in Portland, Ore. Java\'s open source ecosystem is strong and healthy, one of the primary reasons for our creation of OSCON Java. Over the last decade, several projects have traveled beyond mere adoption and had effects dominating the Java world, into software development in general, and some even further into the daily lives of users. JUnitPorted to Java by Kent Beck and Erich Gamma from Beck\'s work in unit testing in Smalltalk, JUnit has been largely responsible for popularizing test-driven d...

11,787 0       JAVA PROJECTS PROMINENT ECLIPSE SUE


  Why every programmer should learn Python or Ruby

If you are a student, you probably know C, C++ and Java. A few know VB, or C# / .NET. At some point you’ve probably built some web pages, so you know HTML, CSS and maybe JavaScript. By and large, it is difficult to find students who have any exposure to languages beyond this. And this is a shame because there are a number of programming languages out there which will make you a better programmer.In this article, we give some reasons why you must learn Python or Ruby2.Compared to C/C++/Java – Python/Ruby allow you to write the same program with much, much fewer lines of code. It i...

11,400 0       RUBY ADVANTAGE PYTHON JAVAMCMDUSADVANTAG