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

 PROGRAMMING


  5 comment styles should be avoided

Have you ever found some superfluous comments while checking others codes? The purpose of using comments in the code is to enhance the readability of the code, so that non-original code developers can understand them better and easier.I summarized 5 kinds of comment styles and the developers who write them. Hope you don't do the same thing as below in your application development process.1. Arrogant commentspublic class Program{ static void Main(string[] args) { string message = "Hello World!"; // 07/24/2010 Bob Console.WriteLine(message); // 07/24/2010 Bob message ...

8,099 3       CODE COMMENT COMMENT STYLE


  TIOBE : No news today

TIOBE released the programming index for September 2012. There is no big change for this month compared to last month, the top 3 are still C, Java and Objective-C. In top 20, only Transact-SQL exchanged the position with VB.NET. Java shows trend of drop, will it be worse because of the ignorance of Java's vulnerabilities by Oracle.This index shows that the programing lnaguage market is quite normal, no big events. Except Objective-C, in recent years there are no other new languages which have big rank leap. If we expect that Scala, Dart or Clojure have big breakthrough, then how long should we...

5,763 0       TIOBE OBJECTIVE-C INDEX


  TIOBE : What's the future of C#?

TIOBE released the programming language index for August 2012, the top 3 programming languages are still C, Java and Objective-C. Objective-C still performs well after it ranked 3rd place last month, it's still rising. Is there any possibilty Object-C will overtake Java in the near future?However, Microsoft's C# doesn't look so good. C# is generally recognized as the enterprise language with most modern and expressive features available today and C# has shown more downward trends in the past and always recovered from this. But, Microsoft announced recently the revival of C++ (in favor of C#) w...

13,297 0       TIOBE C# AUGUST


  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 variable rather than read/write member variables directly.<?php    //dog_naive.php &...

4,337 0       CODE ANALYSIS TRICK EFFICIENCY


  Macro to change text color conditionally in Excel

Macros are small but very powerful VBA programs in Microsoft Office software. They can help us complete some repeated tasks automatically. Today, I will show you one macro example which is to change the text color conditionally. The excel file has a work sheet which contains some records of request. I want to check the status of each request, if the status of a request is approved, the text color of the status should be green; if the status of a request is rejected, the text color of the status should be red; otherwise the text color of the status should be black. Here is the code for the mac...

39,009 2       EXCEL MACRO TEXT COLOR CONDITIONALLY


  C++, Ruby and CoffeeScript complexity comparison

There are many programming languages around the world, they all designed to help programmer solve some problems, finish some tasks. These languages are often divided into different types, there are structural, object-oriented, functional, scripting languages etc. Some are easy to pick up such as Java, while some are thought to be difficult to learn such as C++. So how do we understand complexities of different programming languages?Many people agree that C++ is very complex languages, it has pointers, templates, multiple inheritance etc. But how complex is it? C++ Rocks made some comparisons o...

7,900 0       RUBY COMPLEXITY COFFEESCRIPT LANGUAGES C++


  Cripple Pachebel's Canon on Matlab

What can Matlab do? What the following Matlab code does is playing the piano music of Cripple Pachebel's Canon. You can have a try if you have Matlab installed on your computer.% Cripple Pachebel's Canon on Matlab % Have fun fs = 44100; % sample rate dt = 1/fs; T16 = 0.125; t16 = [0:dt:T16]; [temp k] = size(t16); t4 = linspace(0,4*T16,4*k); t8 = linspace(0,2*T16,2*k); [temp i] = size(t4); [temp j] = size(t8); % Modification functions mod4 = sin(pi*t4/t4(end)); mod8 = sin(pi*t8/t8(end)); mod16 = sin(pi*t16/t16(end)); f0 = 2*146.8; %...

6,928 0       PROGRAMMING MUSIC MATLAB CANON


  10 controversial programming opinions?

Every programmer has his/her own understanding about programming. His/her opinion may or may not be agreed by others since they may face different programming environment. Let's see ten controversial programming opinions. You may agree with these opinions or you may not agree with them or you have your own opinion. You can freely share with others by commenting below.1) The only “best practice” you should be using all the time is “Use Your Brain”.2) Programmers who don’t code in their spare time for fun will never become as good as those that do.3ï...

18,757 8       PROGRAMMING OPINION CONTROVERSIAL