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

SEARCH KEYWORD -- programming



  Do NOT use boolean variable as function parameters

We follow lots of coding styles and coding standards when we do programming, but we may frequently forget one. The forgotten one is that do not use boolean parameter as the function parameters. The reason is it would greatly reduce the readability of the code. Don't believe it? When you read the following code, what does this code mean? widget->repaint(false); Do not repaint? Or what does this mean? After looking at the document, we know that this parameter is whether ...

   CODING STYLE,BOOLEAN,FUNCTION PARAMETER,CODING STANDARD,METHOD PARAMETER     2012-04-22 02:38:45

  High performance web apps with C++

It is Christmas over here, and it is time of giving. So I decided to give something back to the community. I guess this is as old as web programming itself. Trying to create C++ web framework. If you search on the web, you can find dozen of guys that had exactly the same idea. I am not different. For one of the previous projects(discontinued now) I created simple web framework in C++. If you like to hack in C++, here it is. Code is provided as-is, as part of larger application. You can ex...

   C++,Web apps,Web framework     2012-01-08 10:06:48

  Lessons Learned About Documentation

Here at Kendo UI, we have always encouraged you to give us feedback.  Whether it’s through our forums, or the Kendo UI User Voice site, what you think is important to us.  We take your thoughts very seriously.  We receive a lot of feature requests, enhancement requests and other various pieces of product feedback. One of the things that we heard loud and clear from our users was that our documentation could be better.  We took a good look at what we had, and we ag...

   Documentation,Lessons,Programming     2012-02-15 05:53:28

  Prototypes and Inheritance in JavaScript

Forget everything you know about object-oriented programming. Instead, I want you to think about race cars. Yes – race cars. Recently I was watching the 24 Hours of Le Mans –a popular racing event in France. The fastest cars in the race are the Le Mans Prototypes. Although these cars are built by car manufacturers like Audi and Peugeot, they are not cars you’ll see on the streets and highways of your home town. They are built exclusively for high-speed endurance ra...

   JavaScript,Prototype,Inheritance     2012-02-27 04:55:22

  Why Every Professional Should Consider Blogging

I often argue that professionals should share their knowledge online via blogging. The catch is that virtually anything worthwhile in life takes time and effort, and blogging is not an exception to this statement. So before committing your energy to such an endeavor, you may rightfully stop and wonder what’s in it for you. Is blogging really worth it? In this article, I briefly illustrate some of the main benefits that directly derive from running a technical blog. 1. Blogging can impr...

   Developer,Blogging,Share knowledge     2012-01-29 04:30:07

  Everything You Thought You Knew About Learning Is Wrong

Taking notes during class? Topic-focused study? A consistent learning environment? All are exactly opposite the best strategies for learning. Really, I recently had the good fortune to interview Robert Bjork, director of the UCLA Learning and Forgetting Lab, distinguished professor of psychology, and massively renowned expert on packing things in your brain in a way that keeps them from leaking out. And it turns out that everything I thought I knew about learning is wrong. Here’s wh...

   Learning,Thought,Before,Wrong     2012-01-30 05:45:36

  PHP to Objective C, where the f**k are parameters?

Javascript, PHP, Ruby functionsI assume you are very familiar with declaring functions in any of the languages above, if not, you should not be reading this. Let’s begin with a simple function to send email in these languages:// PHP or Javascript do_send_email (recipient, cc, subject, body); // Ruby do_send_email (recipient, cc, subject, body)So it’s clear by looking at the function’s signature that it takes 4 parameters and they could be optional, depends on your imple...

   Objective-C,PHP,JavaScript,Parameter,Function name     2012-01-16 09:46:09

  Static Code Analysis

The most important thing I have done as a programmer in recent years is to aggressively pursue static code analysis.  Even more valuable than the hundreds of serious bugs I have prevented with it is the change in mindset about the way I view software reliability and code quality.It is important to say right up front that quality isn’t everything, and acknowledging it isn’t some sort of moral failing.  Value is what you are trying to produce, and quality is only one a...

   Static code,Analysis,Quality,Microsoft 360,Value     2011-12-24 06:50:18

  Efficiency of code execution

If you want to optimize your program codes, you need to find their Hotspot, i.e, the codes which are executed most frequently. If you can optimize this portion of codes a bit, you may gain much improvement of your code efficiency. Here I give you three examples about efficiency of code execution.1. PHP's Getter and Setter (From Reddit)This example a quite simple, you can skip it if you want.Consider the code below, we can find it's slower when we use Getter/Setter method to read a member variabl...

   Code, Efficiency,Analysis,Trick     2012-07-13 10:59:21

  C vs Java Complete Comparison

Similarities: Java and C have same syntax operators. Difference—thinking Two paradigms: Java: Object oriented language C: Structured language Differences: --Syntax No preprocessor Java does not include a preprocessor and does not define any analogs of the #define, #include, and #ifdef directives. Constant definitions are replaced with static final fields in Java. (See the java.lang.Math.PI field for an example.) Macro definitions are not available in...

   C,Java,Comparison,Difference,Similaritie     2011-10-06 12:46:39