Trick of the day: The time element
HTML5 introduced several new elements to address many common use cases that developers have faced over the years. As an example you can think to the new
video elements that allow you to avoid the use of third-party software like Flash and Silverlight to play audios and videos. While media streams play an important role on the web, the W3C and the WHATWG have also tried to enhance the semantic of web pages. One of these new elements is the
Trick of the day: Undoing mistakes in Git
Everyone can make a mistake and Git is probably one of the easiest technologies ever where mistakes happen. Sometimes you or other developers commit things that weren’t supposed to be committed or even push them on the remote repository. Usually, once something is pushed you don’t want to mess up with the commit history, but under some circumstances this is totally acceptable. When this happens, you might need a guide to know exactly what to do.
Trick of the day: User research
As developers we’re usually only concerned about code, but the truth is, as I assert in one of my talks, that all we do is useless if we don’t have users or our users are unhappy. So, it’s important for us to understand how design and UX work and how to make products and services that work for people as well, even if we aren’t going to go into too much details.
Trick of the day: CSS counters
Have you ever heard of CSS counters? It’s a feature of CSS for numbering non-consecutive items, wherever they might be in the DOM. It doesn’t have a lot of uses cases but it’s important to understand this kind of new features to understand how powerful is CSS today.
In computer science there is a concept called Immutability. If you create an immutable object, once it’s created you aren’t allowed to change it anymore. This includes adding, modifying, or deleting a properties. For very simple situations, this concept isn’t used a lot. However, if you start writing complex applications or even games, it comes in handy.
Trick of the day: Sass, Mixin or Placeholder?
Without any doubt, two of the best and most useful features of Sass are mixins and placeholders. A mixin is a directive similar to a function in programming languages in that you can pass arguments. However, a mixin outputs CSS code instead of returning a value as the result of its execution. A placeholder is similar to an abstract class of an object oriented language. When your Sass code is compiled, the body of a placeholder isn’t included in the CSS code unless there’s a CSS class extending the placeholder.