Barbarian Meets Coding Titlebarbarianmeetscoding

WebDev, UX & a Pinch of Fantasy

Use Data Structures and Algorithms Problems as TDD Katas!

I was doing some code katas last week and it suddenly dawned up on me how awesome data structures and algorithms problems are to practice TDD. They provide such a well defined problem space and expected API that you can fully concentrate in the red-green-refactor flow until it becomes second nature. One pass and you focus on the red-green-refactor, another pass and you can improve your knowledge of jasmine, another and you focus on sinon, another and you try to improve your abstractions, another and you concentrate on writing the most readable of tests, and so on until eternity :)

I have created a new repository to harbor my algorithms and data structures TDD katas in JavaScript that you are welcome to use if you like. There’s only some simple linked lists exercises right now with a basic ES6 setup but I expect it to grow over time.

Not interested in practicing TDD? Don’t panic! You can use any of these exercises to practice other stuff, becoming more proficient and productive using your favorite IDE or text editor, learn new ReSharper shortcuts, new vim commands, functional programming, other languages, etc. Just decide what you want to practice in each session and be awesome.

And here are some other places where you can find lots of different exercises and katas:

Lean UX, Atomic Design And Angular - A Flexible Front-End Architecture For Developing Web Applications: Part III

Lean UX, Atomic Design and Angular Logos

In the last two articles part of this series I discussed the need for a flexible front-end architecture that lets us adapt to changing UX requirements and how Lean UX techniques play well with modern agile software development practices and can drive this changing requirements through experiments and learning. The next step is to implement such an architecture in Angular.

Read on →

Lean UX, Atomic Design And Angular - A Flexible Front-End Architecture For Developing Web Applications: Part II

Lean UX, Atomic Design and Angular Logos

In the previous article of this series I introduced the necessity of building flexible front-end architectures that let us adapt to changing requirements and particularly changing UX requirements that are more often than not neglected. In this article I’ll continue explaining how Lean UX practices work as a driver for that type of architecture.

Read on →

Lean UX, Atomic Design and Angular - A Flexible Front-end Architecture for Developing Web Applications: Part I

Lean UX, Atomic Design and Angular Logos

Many of you may find the following situation familiar:

UX Designer: Could you improve this view so that when you make a selection here both of these charts are updated?

Software Developer: Hmm… No, I can’t.


UX Designer: Could you make change X (which looks like it would be pretty straightforward) that would improve the UX of this view enormously?

Software Developer: That’s completely impossible because we didn’t design our framework to acommodate that use case. I could do it but we would need to make a major re-architecture and re-design of our application that would affect all these other views. There are also these 300 things with higher priority right now.

Well, I know I do. Particularly on the developer side of things.

Read on →

Ultra Flexible JavaScript Object Oriented Programming with Stamps

Updated 16th October 2016 with Stamps v3! Yey!

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.

In the last two articles of the series you learned about two great alternatives to classical object oriented programming: mixins and traits. Both techniques embrace the dynamic nature of JavaScript. Both encourage creating small reusable components that you can either mix with your existing objects or compose together to create new objects from scratch.

Object and functional mixins are the simplest approach to object composition. Together with Object.assign they make super easy to create small units of reusable behavior and augment your domain objects with them.

Traits continue the tradition of composability of mixins adding an extra layer of expressiveness and safety on top. They let you define required properties, resolve naming conflicts and they warn you whenever you’ve failed to compose your traits properly.

In this chapter you’ll learn a new technique to achieve class-free inheritance through object composition. This particular technique embraces not only the dynamic nature of JavaScript but also its many ways to achieve code reuse: prototypes, mixins and closures. Behold! Stampsstamps!

Read on →