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

 ALL


  Do you have this kind of comments in your source code?

Writing runnable code is the essential skill of a programmer, writing understandable comment is also a skill a programmer should acquire. There is some famous saying that bad comment is worth than no comment. Usually your code will be maintained by other people, if you provide them some difficult to understand or misguided comments, this will be nightmare to them. While at some other time, programmers may put some funny comments in their codes which may make others laugh. Today we share some comments which are full of humor.1. Send some warning to maintainer// // Dear maintainer...

46,672 14       COMMENT HUMOR


  Maybe we need //Comment comment

Do we need comment in our programs? Depends, if we can write a program which can clearly tell s the reader what the program does, then we had better to avoid unnecessary comments. However, if the program we develop is complex enough and it involves some uncommon logic which needs more explanation, then we have to add comment and make sure the comment we add can correctly tell the readers what we do.The worst scenarios is not you forget or you don't want to add comment, it's that you add comment but the comment you add is wrong or may diverge the readers to think something else. We don't want t...

24,334 1       PROGRAMMING COMMENT


  Art of code comment

Note : This post is just for fun. Please be careful about these tricks.Code comment is to provide complementary comment to abstract codes. We will introduce two comment styles while we are debugging our codes. we should avoid these styles in production codes.1. if else styleOnly execute eatKfc()//* eatKfc();/*/ eatMcdonalds(); //*/Only execute eatMcdonalds()/*eatKfc();/*/eatMcdonalds();//*/Execute both//*eatKfc();//*/eatMcdonalds();//*/2. Block commentDon't comment/**/var foo = function() { ...};/**/Block comment 1/** /var foo = function() { ...

5,650 0       STYLE COMMENT


  6 necessary WordPress plugins for personal blogs

WordPress is now adopted by most bloggers, it has various themes and powerful plugins. There are lots of amazing plugins can be chosen such as spam comment filers and sitemap generators. For novice WordPress users, you may be confused about which plugin to choose, here we share with you 6 necessary WordPress plugins.AkismetAkismet is a built-in WordPress comment plugin. It checks your comments against the Akismet web service to see if they look like spam or not and lets you review the spam it catches under your blog's "Comments" admin screen.Comment spam is always an issue with a blog. For mor...

5,697 1       COMMENT WORDPRESS PLUGIN SITEMAP


  Short SASS tutorial

If you learned CSS before, you should know that CSS is not a programming language. You can use it to design webpage style, but you cannot use it for programming, i.e, CSS is what designer uses, not what programmer uses. Programmer may think that CSS is very troublesome, it has no variables, no conditional statements, it just allows line-by-line description of HTML elementsLuckily, CSS preprocessor appear which makes CSS programmable. The general idea of CSS preprocessor is using a programming language to design the website style, and then convert it to CSS files.Among different CSS preprocesso...

9,193 0       CONDITION CSS COMMENT VARIABLE SASS PROGRAMMABLE


  Interesting program comments

With Google Code Search, we can search some interesting code snippets comments. Some of them are interesting. Programming is not a boring task if you have a good attitude. Lets see some funny comments. Have fun.Not very confident :Dragon everywhere :One more angry comment :I told them earlier:F**K:Don't look following programs:Author :  陈皓 Source : http://coolshell.cn/articles/290.html...

4,124 0       PROGRAMMING COMMENT INTERESTING


  The most stupid C bug ever

I have been programming for a number of years already. I have seen others introduce bugs, and I have also introduced (and solved!) many bugs while coding. Off-by-one, buffer-overflow, treating pointers as pointees, different behaviors or the same function (this is specially true for cross-platform applications), race conditions, deadlocks, threading issues. I think I have seen quite a few of the typical issues.Yet recently I lost a lot of time to what I would call the most stupid C bug in my career so far, and probably ever.I am porting a Unix-only application which uses tmpfile() to create te...

2,506 0       C BUG COMMENT BACK SLASH


  Leaving comments in real life

As a programmer I like to write comments because I know that some future person (often me) is going to need to know something about my code that won't be immediately obvious from reading it. Here's a recent example from my homebrew display's code:// protocol_init: Set up a newly powered-on string of lights.  The lights are arranged// in an array wired diagonally starting from the bottom left.  For ease of programming// it's better if they are given numbers which correspond to coordinates.  Given that// each LED has a 6 bit address it's possible to address the entire array u...

1,582 0       COMMENT PROGRAMMING STYLE FORMAT CODING STANDARD