Barbarian Meets Coding Titlebarbarianmeetscoding

WebDev, UX & a Pinch of Fantasy

1 minute readcertification

Finally Got the MCSD Web Applications Title Wiii! Also a Study Guide for the 70-487 Azure and Web Services Certification

Last week, which strangely feels like a looong time ago maybe ‘cause of the time-distorsion-field of my vacations who knows, I passed the 70-487 certification exam on Azure and Web Services and got the MCSD Web Applications title! Wiiii! Awesome!

That was one of my job/career goals for the year so I’m beyond happy, and I also got to learn A TON along the way, so I’m double-beyond-happy xD.

I wrote another exam study guide with notes and links that may help you if you are considering taking the exam yourself. Here you have all study guides I’ve written thus far:

Up next. Write a friggin’ book! Wish me luck.

19 minutes readjavascriptmancy

Mastering the Arcane Art of JavaScript-Mancy for C# Developers - Chapter 7: Using LINQ in JavaScript

The Mastering the Arcane Art of JavaScript-mancy series are my humble attempt at bringing my love for JavaScript to all other C# developers that haven’t yet discovered how awesome this language and its whole ecosystem are. These articles are excerpts of the super duper awesome JavaScript-Mancy book a compendium of all things JavaScript for C# developers.

What if I told you that JavaScript has LINQ??

What if I told you that JavaScript has LINQ

In the past few articles we’ve looked into functions in JavaScript, we’ve seen how to work with functions and used different patterns and practices. Today we are going to take that knowledge and apply it into the realm of functional programming.

We’ll start dipping our toes into functional programming by taking a look at how we can use LINQ in JavaScript.

LINQ (Language-Integrated Query) is a .NET query language that lets you work seamlessly with collections of objects (and other data sources). It revolutioned .NET by bringing functional programming concepts to the masses and providing an alternative to the prevalent imperative style programming in C#.

JavaScript offers different ways in which we can achieve that same LINQ-style queries: array prototype functions, ES2015 generators, third-party libraries and ES2016 comprehensions.

Let’s take a look at them!

Read on →
4 minutes readbarbaric-tip-of-the-week

Barbaric Tip of the Week: Ultra-Fast HTML and CSS Editing With Web Essentials and Emmet (ZenCoding)

Barbaric Tip of the Week is a weekly series whose main purpose is to share tiny bits of knowledge that I find specially useful and interesting.

Web Essentials is an awesome Visual Studio Plugin that comes with a ton of goodies to help web developers build great websites. One of these goodies is a port of ZenCoding(now known as Emmet), a plugin in itself that helps you to write HTML and CSS in a super intuitive and fast way.

With Zen Coding you can use CSS selectors to generate a whole tree of html elements from a single line of code. For instance, let’s say that you want to create a list of items. You can type this snippet within Visual Studio:

ol>li*5

Press TAB and see how it expands into a complete HTML list:

<ol>
    <li></li>    
    <li></li>    
    <li></li>    
    <li></li>    
    <li></li>    
</ol>

And in that same spirit you can use any CSS selector and get the results that you would expect based on CSS selector semantics. For instance:

section.spell-book>article.spell*5>header>h1>a[name="spell-name-$"]{spell-name-$}

Would become:

<section class="spell-book">
    <article class="spell">
        <header>
            <h1><a href="" name="spell-name-1">spell-name-1</a></h1>
        </header>
    </article>
    <article class="spell">
        <header>
            <h1><a href="" name="spell-name-2">spell-name-2</a></h1>
        </header>
    </article>
    <article class="spell">
        <header>
            <h1><a href="" name="spell-name-3">spell-name-3</a></h1>
        </header>
    </article>
    <article class="spell">
        <header>
            <h1><a href="" name="spell-name-4">spell-name-4</a></h1>
        </header>
    </article>
    <article class="spell">
        <header>
            <h1><a href="" name="spell-name-5">spell-name-5</a></h1>
        </header>
    </article>
</section>

And you can even use custom elements if you are working with Web components, Angular, Aurelia or any other modern web framework:

magic-spell-book>magic-spell>header>h1>a[name="spell-name-$"]{spell-name-$}

Would become:

<magic-spell-book>
    <magic-spell>
        <header>
            <h1><a href="" name="spell-name-1">spell-name-1</a></h1>
        </header>
    </magic-spell>
</magic-spell-book>

Using ZenCoding (Emmet) With CSS

ZenCoding gives you a lot of help even when you are writing CSS in the form of style abbreviations. If you want to add some margins to a given class, you can use the following abbreviation:

m20-10

click on TAB and voilà:

margin: 20px 10px;

And there’s a ton more of CSS stuff ZenCoding can help you with:

// specify units
m50p
margin: 50%;
fz2e
font-size: 2em
// or colors
c#4
color: #444;
// and you have abbreviations for 
// pretty much every CSS property

And It Comes With a LoremIpsum Generator

How many times have you gone off to the web to find a lorem ipsum generator to add some fake content to your website as you go prototyping? Well, do that no more! ZenCoding also gives you a Lorem Ipsum generator that integrates perfectly with its HTML generation workflow. Just type:

article>p*2>lorem

And you’ll get all the lorem you need:

<article>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat laboriosam laudantium repellendus nihil quos ipsum vero eligendi dignissimos consequuntur praesentium quasi ullam aut omnis assumenda provident ratione repudiandae debitis soluta.</p>
    <p>Dolore eveniet tenetur eius consequatur reiciendis nisi et magnam praesentium in voluptatum. Incidunt vitae ipsam veniam tenetur corrupti itaque officiis temporibus perspiciatis aperiam ex et alias blanditiis minus harum fugiat.</p>
</article>

Start Learning ZenCoding (Emmet) With The CheatSheet

A very nice way to get started learning the different features available and CSS abbreviations that come with Emmet is to take a look at its Cheatsheet.

And it is Also Available For Other Editors!

Emmet is available, not only in Visual Studio with Web Essentials, but also in other editors that you know and love like Sublime, Atom, Brackets, TextMate, WebStorm, etc and even in online quick prototyping tools like jsFiddle, jsBin or codePen.

So go take a look at it if you haven’t already! Have a nice day!

P.S. Note that although I have used ZenCoding and Emmet almost interchangeably during the article, some features in Emmet are not available in ZenCoding. Particularly CSS abbreviations are not yet implemented in Web Essentials’ port of ZenCoding.

17 minutes readjavascriptmancy

Mastering the Arcane Art of JavaScript-mancy for C# Developers - Chapter 6: Functions in ES2015

The Mastering the Arcane Art of JavaScript-mancy series are my humble attempt at bringing my love for JavaScript to all other C# developers that haven’t yet discovered how awesome this language and its whole ecosystem are. These articles are excerpts of the super duper awesome JavaScript-Mancy book a compendium of all things JavaScript for C# developers.

Welcome back! Today we will make a summary of the different ES2015 features related to functions that we’ve seen and worked with so far in the series: destructuring, default arguments and rest parameters. This will help you to consolidate these new features in your mind and also dive into them a little bit deeper.

We will also take a look at the new arrow function and how it solves the this conumdrum that we discussed in chapter 1 and will end up discussing smaller features like let, const and the spread operator.

{% img center comic—rotated-right /images/javascriptmancy-es2015-functions.png “ES2015 and functions” “ES2015 and functions” %}

Read on →
29 minutes readpersonal

Want to Get Stuff Done? Behold!! The Ultimate System to Git-Things-Done!

Do you ever feel like you can’t get enough stuff done? That days and weeks pass and you never get around doing that thing that you really want to focus on? Then this article may help you!

Today a great colleague from Active Solution, Evgeny Lukashevich, encouraged me to share my productivity system with you. After pondering about it a little bit on the commute home I thought: Why not? Perhaps it will help someone to get more stuff done and live a more fulfilling and happy life. Who knows? I have never ever written about this before… it is definitely going to be interesting…

Read on →