8 simple rules for a robust, scalable CSS architecture

Related: This is the manifest of things I’ve learned about managing CSS in large, complex web projects during my many years of professional web development. I’ve been asked about these things enough times that having a document to point to sounded like a good idea. I’ve tried to keep the explanations short, but this is essentially the tl;dr: Always prefer classes Co-locate component code Use consistent class namespacing Maintain a strict mapping between namespaces and filenames Prevent leaking styles outside the component Prevent leaking styles inside the component Respect component boundaries Integrate external styles loosely » Jarno Rantanen | github.com | via css-tricks.com

November 1, 2016 · 1 min · 103 palabras · Nacho Cano

The design of CockroachDB

CockroachDB is a distributed SQL database. The primary design goals are scalability, strong consistency and survivability (hence the name). CockroachDB aims to tolerate disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention. CockroachDB nodes are symmetric; a design goal is homogeneous deployment (one binary) with minimal configuration and no required external dependencies. » Spencer Kimball | github.com

October 2, 2016 · 1 min · 63 palabras · Nacho Cano

Improve your photographic composition by following these guidelines

First of all we have to define what is meant by ‘composition’. Composition refers to the way the various elements in a scene are arranged within the frame. As I’ve already mentioned, these are not hard and fast rules but guidelines. That said, many of them have been used in art for thousands of years and they really do help achieve more attractive compositions. I find that I usually have one or more of these guidelines in the back of my mind as I’m setting up a shot. ...

September 29, 2016 · 1 min · 94 palabras · Nacho Cano

The basics of web application security

Somewhere, way down at the bottom of the list of requirements, behind, fast, cheap, and flexible is “secure”. That is, until something goes wrong, until the system you build is compromised, then suddenly security is, and always was, the most important thing. Security is a cross-functional concern a bit like Performance. And a bit unlike Performance. Like Performance, our business owners often know they need Security, but aren’t always sure how to quantify it. Unlike Performance, they often don’t know “secure enough” when they see it. ...

September 25, 2016 · 1 min · 169 palabras · Nacho Cano

Por qué no utilizo métricas

Al principio me molestaba en calcular métricas sobre el código fuente (utilizaba cosas como Source Monitor para ello), que me indicaran número de líneas de código, complejidad ciclomática, nivel máximo de anidamiento, profundidad de jerarquías…., en fin todo tipo de datos para disfrutar con un poco de porno de estadísticas. Además, analizaba la cobertura de código que alcanzaban mis tests (con NCover, si no recuerdo mal), y tenía configurados mis avisos si no llegaban a determinados niveles. ...

September 25, 2016 · 1 min · 170 palabras · Nacho Cano

A nerd’s guide to color on the web

There are a lot of ways to work with color on the web. I think it’s helpful to understand the mechanics behind what you’re using, and color is no exception. Let’s delve into some of the technical details of color on the web. » Sarah Drasner | css-tricks.com

September 25, 2016 · 1 min · 48 palabras · Nacho Cano

Music theory for nerds

I don’t know anything about music. I know there are letters but sometimes the letters have squiggles; I know an octave doubles in pitch; I know you can write a pop song with only four chords. That’s about it. The rest has always seemed completely, utterly arbitrary. Why do we have twelve notes, but represent them with only seven letters? Where did the key signatures come from? Why is every Wikipedia article on this impossible to read without first having read all the others? ...

September 25, 2016 · 1 min · 139 palabras · Nacho Cano

Fixing E.T. The Extra-Terrestrial for the Atari 2600

If you’re reading this page, chances are that you’re already well aware that E.T. for the Atari 2600 is one of the most reviled games ever made. I never understood why. As a child, it was one of my favorite games. I still think it’s a good game. Apparently, I’m not alone. On this page I’m going to briefly explore why people hate E.T., and how the game can be fixed. ...

September 24, 2016 · 1 min · 73 palabras · Nacho Cano

How Dropbox securely stores your passwords

It’s universally acknowledged that it’s a bad idea to store plain-text passwords. If a database containing plain-text passwords is compromised, user accounts are in immediate danger. For this reason, as early as 1976, the industry standardized on storing passwords using secure, one-way hashing mechanisms (starting with Unix Crypt). Unfortunately, while this prevents the direct reading of passwords in case of a compromise, all hashing mechanisms necessarily allow attackers to brute force the hash offline, by going through lists of possible passwords, hashing them, and comparing the result. In this context, secure hashing functions like SHA have a critical flaw for password hashing: they are designed to be fast. A modern commodity CPU can generate millions of SHA256 hashes per second. Specialized GPU clusters allow for calculating hashes at a rate of billions per second. ...

September 24, 2016 · 1 min · 139 palabras · Nacho Cano

The curious case of the switch statement

The earliest incarnation I can find is in ALGOL 58. The original description of ALGOL 58 is a fascinating read — it’s written like a math paper, with literal text in italics and heavy use of subscripts. Character classes are even named by Greek letters, with λ representing letters and so on. The example program at the end is completely incomprehensible, with almost every variable being a single letter and labels forming their own entire column on the left side. I guess that last bit came from FORTRAN. ...

September 22, 2016 · 1 min · 92 palabras · Nacho Cano