I am sorry for kind of calling you a moron. But I would like to point out that saying that Linux is for developers is not only inaccurate, but also it is a way of saying without provocation or basis on fact that Linux is useless and suck. Saying that for someone that believes in the cause of free (as in freedom) software, you are saying they are stupid, like someone looking down on you with disgust and despise because you are “just a programmer” or because you refuse to eat meat, when everyone else is, i.e, because you are not like them.
I18n of CSS Generated Content
In the documentation of Twitter Boostrap 2, there is a pretty example box, with a caption on the top-left corner. If you inspect the HTML code, you won’t find the caption, it is generated with CSS. It might seem absurd, a violation of the traditional separation of style and content, but there is a way around it.
Damn High German Ich!
I wasn’t particularly longing for the time I would have to utter this sound again (pretty much any voiceless fricative), even though I still intend to resume my German studies. In Esperanto this sound is used for the letter ĥ (name ĥo). It is relatively rare, but it finally came up in one of my Esperanto reading practice sessions.
Twitter Bootstrap and JRuby on Rails
Twitter Bootstrap is published in LESS and that is how I like to use it. The twitter-bootstrap-rails gem is the most popular and most complete for that purpose. It has several handy generators and helpers. But I can’t for my life install it on JRuby. Since I don’t like forking, I found a somewhat simple workaround.
Functional JavaScript
In functional languages, code consists mainly of processing lists in a recursive manner. A limited list of patterns in processing lists emerge so often that all functional languages provide at least some high-order functions, that are very well written and optimized. The most common and useful high-order functions, the primitives, are (may vary) each (only for imperative programming), filter, map and reduce.
Iterating Collections in JavaScript
When I iterate in any language, I like to have a list of somethings to iterate because I can use more idiomatic code and have more explicit initial state, state changes and exit conditions. Most languages have a slightly different for/foreach that iterates over things that are considered enumerable by the language. In JavaScript we have two types of enumerable objects: array-like objects, also known as collections or simply arrays; and objects, also known as object hashes or associative arrays, even though they are just any JavaScript object that is used for that purpose.
Javascript Not Minus One Operator
In most languages if you want to check if something is in a array or string, you use functions named indexOf or any variant thereof. The signature and contract don’t usually deviate much, specially in languages with zero-based indexes.
In Javascript, both Array’s and String’s indexOf return minus one (-1) for not found. Minus one isn’t particularly semantic, and checking for it tends to produce the most verbose and technical bits of otherwise cleanly written code.
Formatting Strings in .NET
You may want to format some scalar value as a string, since default ToString functionality is possibly not what you want the user to see. You may want to do some occasional tool or toy console app. Not only these but perhaps any other reason may inspire you to code some string art. With C# there is no string interpolation, but there is a string formatting framework with a reasonable power. Let’s see about that.
F# Coding Dojo
I am an active member of a .NET user group in the city I live. We have monthly meetings that usually combine a lecture followed by an one hour coding dojo. August this year we had our monthly meeting and I spoke for an hour or so about F# and then challenged the other participants to translate to F# a small problem already codified with C#.
I Spun Off Linux From My Dev Machine
Some weeks ago I started to learn Rails and I decided to make my dev machine the right way. By that I mean I had to make myself proficient with Git, Vim, Shell, TDD and every other skill I thought a smart programmer would master. At first I didn’t want to get rid of my state of art Windows 7 installation with awesome Microsoft Word 2010, Microsoft Visual Studio 2010 full of useful plugins and all that browsers installed to test web pages. I think I had everything a .NET developer would hope for, even had msysgit to play once in a while and pretend my OS was POSIX compliant.