Paul Gauguin Couldn’t Paint, But He Still Became A Great Painter

You must read this if you have read Joel’s article on the same topic. We averages deserve a living too.

Monadically Speaking: Adventures in Programming Language Theory

Today, I discovered a blog post, “Soloists vs. The Choir,” by Andy Leonard on a blog entry by Joel Spolsky, founder of Fog Creek Software, on the correlation (or lack of, rather) between spent time and resulting quality of programming. Leonard wrote:

Is there really that great a difference between good and great programmers?

Joel cites some impressive statistics gleaned from Yale Professor Stanley Eisenstat, who teaches a software development class. The scatter plot says it all.

As Joel notes, “There’s just nothing to see here, and that’s the point. The quality of the work and the amount of time spent are simply uncorrelated.”

While that may be so, companies do not determine what people want to do; people do. This kind of reasoning leads to the conclusion that only star programmers should program. By that kind of reasoning, only great writers should write, only great translators should translate, and…

View original post 2,558 more words


Incomplete Programming History w/ Related Quotations

Awesome collection of quotes

Lewis' Random Maybe Computer Stuff

Well, I wrote this today (when I should’ve been writing a real paper)… Why not put it here! It has some great quotes from programming language developers, and my descriptions of languages in my own words. I mainly did it for the programming class I am teaching (and because I like reviewing programmer quotes). I don’t claim this to be exhaustive, but it should be accurate although I am sure some of my opinions of various language couldn’t help but come through…

“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.” — C. A. R. Hoare

FORTRAN, John Backus and IBM team (1957)

FORTRAN is the oldest language still in use today. It was designed for high performance computing for…

View original post 5,587 more words


Print lines between two patterns , the awk way …

Beautiful display of AWK craftsmanship. Dont miss the solutions in the comments section.


Example input file:

The standard way ..


Self-explained indented code:

The first optimization is to get rid of the print , in awk when a condition is true print is the default action , so when the flag is true the line is going to be echoed.

To delete de NEXT statement , in order o prevent printing the TAG line,  we need to activate the flag after the “OUTPUT” pattern discovery and after the flag evaluation.

A slight variation of the program flow and we’re done:

PD: What if we only want to print the lines enclosed between the OUTPUT && END tags ? check this

View original post


Some rules that an applications programmer shall follow for keeping his code clean


computer ip address checker

A clean code

  1. contains classes that
    • are named with noun
    • are minimal, expressive, simple
    • do one thing well i.e. should have one, and only one reason to change
      (SRP:Single Responsability Principle)
    • are simple and direct
    • can be read like well-written prose
    • are literate
    • always look like they were written by someone who cares
  2. contains names that
    • are meaninful, intension-revealing
    • avoid disinformation
    • make meaninful distinction
    • are pronounceable
    • are searchable
    • are not encoded
    • don’t mappe mental
  3. contains methods that
    • are named with verbs or verb phrases
    • are minimal
    • do one thing
    • have one level of abstraction
    • respect the stepdown rule
    • have descriptive names
    • have the minimal number of arguments (zero is ideal)
    • have no side effects i.e. do only one thing at a time
    • don’t repeat themselves i.e. avoid duplication
  4. contains comments that
    • are legal
    • are informative
    • explain intents
    • clarify
    • amplificate
    • are not redundant
    • are not mandated/delegated
    • are not like a journal

View original post 136 more words


Lambdas v Closures


Scott Meyers posted this explanation of the difference between a lambda and a closure.

The distinction between a lambda and the corresponding closure is precisely equivalent to the distinction between a class and an instance of the class. A class exists only in source code; it doesn’t exist at runtime. What exists at runtime are objects of the class type. Closures are to lambdas as objects are to classes. This should not be a surprise, because each lambda expression causes a unique class to be generated (during compilation) and also causes an object of that class type–a closure–to be created (at runtime).

He also managed to squeeze in mention of Universal References (in the context of the managing the lifetime of a closure).

View original post