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

SEARCH KEYWORD -- Figure



  Reducing Code Nesting

"This guy’s code sucks!" It’s something we’ve all said or thought when we run into code we don’t like. Sometimes it’s because it’s buggy, sometimes it’s because it conforms to a style we don’t like, and sometimes it’s because it just feels wrong. Recently I found myself thinking this, and automatically jumping to the conclusion that the developer who wrote it was a novice. The code had a distinct property that I dislike: lots of ...

   Code nesting,Readability,Maintainability,Reduction     2012-01-02 08:13:46

  A Perl Regular Expression That Matches Prime Numbers

perl -lne '(1x$_) =~ /^1?$|^(11+?)\1+$/ || print "$_ is prime"' Can you figure out how it works? I give an explanation below, but try to figure it out yourself. Here is what happens when you run it: $ perl -lne '(1x$_) =~ /^1?$|^(11+?)\1+$/ || print "$_ is prime"' 1 2 2 is prime 3 3 is prime 4 5 5 is prime 6 7 7 is prime 8 9 10 11 11 is prime Here is how it works. First, the number is converted in its unary representation by (1x$_). For example, the number 5 gets converted into 1x5, which is ...

   Perl,Regex,Regular expression,Prime number,One line     2011-12-26 08:42:00

  If programming language is a knife, what would it be?

The following diagram shows that if is a programming language is a knife, what would it be.? This figure I personally feel very interesting.I try to give my  explanation for some languages  here:.C + +, C and Pascal are the Swiss Army knife. The knife of the C language has a USB, that can do hardware operation. C++, a knife with everything, C + + is a variety of languages​​. Swiss army knife (figure C+ + is very powerful, do not think that it is fictional, this knife is r...

   Programming language,Knife,Swiss army life     2012-04-21 00:52:22

  Web evolution history

I guess many of us want to know about web evolution history since it changes so fast. Web has changed our life style, there are many big events in web history. Following picture give us a general understanding of the history of web.Original author : 陈皓 Reference : http://coolshell.cn/articles/1178.html...

   Web,History,Figure     2012-04-25 07:40:52

  Loading images progressively using Gaussian blur

The popular online publishing platform Medium has adopted an impressive image loading mechanism -- pure color - blur image loading - real image loading. Since images on Medium usually have high definition, it takes much time to load an image and hence brings a bad user experience if rendering the image after it's completely downloaded. The solution Medium comes out is to preload an small image when the real image is being loaded.  On Medium, the HTML code will have below pattern ...

   JAVASCRIPT,ALGORITHM,GAUSSIAN BLUR,MEDIUM,BLUR IMAGE     2016-09-25 03:33:00

  Lisp: It's Not About Macros, It's About Read

Note: the examples here only work with outlet lisp. Refer to your version of lisp/scheme’s documentation for how read works (and possibly other forms) I know it’s an old post by now, but something about the article Why I love Common Lisp and hate Java, part II rubbed me the wrong way. The examples just aren’t that good. The usage of macros is plain baffling, when a function would have been fine. The author admits this, but still does it. There’s a follow-up post wh...

   Lisp,Macro,Read,Java     2012-02-19 06:12:19

  CSS Tools: Reset CSS

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. The general reasoning behind this was discussed in a May 2007 post, if you're interested. Reset styles quite often appear in CSS frameworks, and the original "meyerweb reset" found its way into Blueprint, among others. The reset styles given here are intentionally very generic. There isn't any default color or background set for the bod...

   CSS,Cross browser compatibility,Reset,Partial reset     2011-12-05 02:44:11

  SkipList in Go

Algorithmic thinking is the must-have in the coding world, so I have been keeping the routine of algorithm practice every week, consolidating my knowledge of data structures on one hand, and improving my coding skills as well. A difficult one happened to be stuck in my mind- Implement SkipList with Go, which took me quite a weekend. Below is the front-line report of how I finally got the hang of it. First, from its concept. Wiki has explained it well. a skip list is a probab...

   GOLANG,SKIPLIST     2022-04-05 02:21:59

  Web Consistency Testing

Introduction Web Consistency Testing is a new form of Web testing that aims to answer the simple question: does this page look right? It's an automated approach to making sure a page looks the way we expect, whether that be cross-browser, over time (regression), in multiple locales, or whatever else we can think of. Kevin Menard, founder of Mogotest, presented an in-depth talk about what Web Consistency Testi...

   Website,Consistency,Testing,Consistency testing,Advice     2011-12-01 02:52:30

  One of the Best Bits of Programming Advice I ever Got

Years ago (early 1992), I attached myself to this crazy skunkworks project that was using this weird language called Smalltalk. "Object Oriented" was in its infancy as a "hot" item. High paid consultants. Lots of people laying claim to what this new object religion was all about. This was 5 years before Alan Kay would make the statement "I invented the term 'Object Oriented Programming' and this {Java and C++} is not what I had in mind."Shortly after hooking up with this whacky group with t...

   Programming advice,OOP,Smalltalk,Better design     2011-11-28 03:14:25