Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Program



  Use of log in programming

Usually, The purposes of log are for troubleshooting and displaying program running status. Good log will help us locate the error easier. Many programmers think log in programs is very simple, but it's not an easy task to write log codes to efficiently locate the error. Here we discuss about program log in three aspects: Where to log What to log Log styles to be avoided Where to log 1. When calling external functions When your program is calling some external functions which are not written b...

   Log, Programming,Debug     2012-11-28 11:42:23

  C++ 11 Memory Management

Enterprise development and networking specialist Stephen B. Morris illustrates how to handle a classic C/C++ problem by using the new features in C++ 11 in conjunction with more established techniques.Memory management has always been one of the most error-prone areas of C++. The same is true of C. One of the strengths of managed languages, such as Java and C#, is their support for automatic garbage collection. Garbage collection still isn't a feature of C++ 11, so we must still be caref...

   C++ 11,Memory management,GC,Memory leak     2012-01-10 01:14:59

  Inspiring facts about JavaScript

JavaScript has been advocated as the first language to be learned by people who want to program. We have discussed the reasons why we should do so. Recently with the popularity of Node.js, JavaScript has become a full-stack language,  it can be used as both frontend and backend programming language. Today we will give some hard facts which will convince you about the popularity of JavaScript. Just like William Ting said ""JavaScript will stay relevant as long as people use the internet". Ye...

   JavaScript,popularity     2014-06-07 08:52:36

  Before Python

This morning I had a chat with the students at Google's CAPE program. Since I wrote up what I wanted to say I figured I might as well blog it here. Warning: this is pretty unedited (or else it would never be published :-). I'm posting it in my "personal" blog instead of the "Python history" blog because it mostly touches on my career before Python. Here goes.Have you ever written a computer program? Using which language?HTMLJavascriptJavaPythonC++COther - which?[It turned out the students ha...

   Python,History,Programming language,B     2012-01-18 08:08:53

  Traditional recursion vs Tail recursion

Recursion is a frequently adopted pattern for solving some sort of algorithm problems which need to divide and conquer a big issue and solve the smaller but the same issue first. For example, calculating fibonacci  accumulating sum and calculating factorials. In these kinds of issues, recursion is more straightforward than their loop counterpart. Furthermore, recursion may need less code and looks more concise. For example, let's calculate sum of a set of numbers starting with 0 and st...

   ALGORITHM,RECURSION,TAIL RECURSION,TRADITIONAL RECURSION     2016-09-23 23:54:09

  A C++ program puzzle

Recently I came across a question asked by wang2191195 on a Chinese IT forum CSDN which asks about a C++ program puzzle. He has a code snippet which cannot be compiled. The code is:#include <cstdlib> #include <iostream> using namespace std; class Base{ public: virtual void func(){ cout << "Base::func()" << endl; } virtual int func( int num ){ cout << "Base::func( int " << num << " )" << endl; return 0; ...

   C++,Puzzle,Hide,Overload     2012-05-13 02:31:26

  Java vs F#

Dr Cliff Click of Azul Systems, specialists in manycore JVM systems, recently published a blog post about the performance of Java compared primarily to C and C++ but also discussing C# and .NET. Three of Cliff's comments are of particular interest:Under the heading "Places where C/C++ beats Java for obvious reasons":"Value Types, such as a 'Complex' type require a full object in Java." - Dr Cliff ClickWhat Cliff forgot to mention is that .NET also provides value types and a far more compell...

   Java,F#,Performance,JVM     2012-03-07 05:07:31

  Custom C++ exception class creation

In standard C++, we can use try catch to catch and exception when something goes wrong. These are some built in exception support in C++. By including the #include , we can now catch exceptions in C++ programs. This actually helps us on debugging our code and reduce the maintenance work.However sometimes if we want to create our own custom exception class. What should we do?We should include the #include line and then extend the exception class and implement some methods as you like. The genera...

   C++,std,exception,custom exception,implementation     2012-03-04 09:58:18

  Pair Programming Stereotypes

Over the last couple of years, I’ve done a lot of pair programming. Pair programming inside my team, at customer sites, in coding dojos and in my open source projects. Pair programming is really a great and effective experience when performed by an pair of developers knowing how to pair program. Unfortunately, you cannot just put two developers in front of a single computer and expect them to perform perfectly from the start. Pair programming has to be learned. Both developers need to...

   Code programming,Pair gramming,Sterotype     2012-02-29 05:09:14

  Is working experience really so important?

When I browse the recruiting information in the website, I always see the following requirements:"The candidate must have more than 3 years experience in C++ programming" or "The candidate must have more than 3 years experience in iOS development". I would like to ask the recruiter:"Is working experience really so important?" In my opinion, the working experience is not a good measurement to decide whether a candidate is fit or not, and use this rule just like using the lines of code to judge th...

       2014-09-20 07:14:58