Barbarian Meets Coding Titlebarbarianmeetscoding

WebDev, UX & a Pinch of Fantasy

1 minute readbarbaric-tip-of-the-week

Barbaric Tip of the Week: Listen to JavaScript Jabber

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.

Dozens of studies have demonstrated that multitasking is detrimental to your productivity, can be a source of stress and has adverse effects in your life expectancy [1][2]. I have found, however, with arduous experimentation that I can do multitasking with negligible effects in one of these two cases: I can juggle two oranges at the same time with two hands, and, less impressive yet worthy of notice, I can listen to podcasts or audio books while commuting to work, training at the gym or performing boring, repetitive tasks such as clothe laundering, dish washing and the like.

I tell you this because, just two week ago I started listening to an awesome podcast that I think you should start listening too, if you like JavaScript that is. This week’s Barbaric Tip is JavaScript Jabber a surprisingly awesome podcast about everything JavaScript, with great topics and greater guests.

JavaScript Jabber logo

Browsing a little bit over the episode list is enough to water your mouth. Don’t hesitate! Go and start multitasking! Add more value to your laundry! Yey!

Read on →
3 minutes readdev

Six Months Into Vim And Yet a Padawan

Taking advantage of a presentation I did at work last week , I thought it was the perfect time to write a catch-up or lessons-learned blog post on my experience with vim.

I cannot believe it has already been 6 months since my first experience with vim. Today, vim has become an integral part of my development tools and I could not image working without it*. It marries perfectly with ReSharper in Visual Studio, it works quite well in vintage mode in sublime, and it rocks both in Windows and Mac when using vanilla vim.

So, here are the highlights of what I have learned over this period:

  • Touch typing is important (thank you for stating the obvious Jaime). Practice touch typing deliberately and intentionally. Don’t look at the keyboard, don’t move the hands away from the home row. Touch typing is the biggest barrier to start learning vim, once you get over that, you are hooked.
  • If you are a .NET developer, you can get great productivity improvements by using the most basic commands and motions. Also, the vsvim-ReSharper combo is awesome, you can use vim for micro editing and still enjoy of all ReSharper solution-aware macro refactorings.
  • Learn how to read the documentation (and read it - use :h in vim). The Getting Started, Editing Effectively and Tuning Vim sections make for great starting points.
  • If you are going the path of vanilla vim, I strongly advise against using a ready-packaged distribution like maximum awesome. Vim is huge, to learn how to use vim effectively, you need to take things slow and go step by step, patiently growing and cultivating your vimrc and plugins to suit your needs. If you use a ready packaged distribution you kind of miss the point - the journey -, and end up with a bloated vim with a bunch of plugins and customizations you have no use for.
  • Don’t panic. Pick one new thing to add to your vim toolbelt every week and practice.
  • Find other vim users. It is awesome to share tips, tricks and the love for vim with other like-minded individuals :).

Here is the presentation in all its glory: The Path To Jedi Text Editing With VIM

That’s all for now. I have been thinking about starting a series of vim from-zero-to-hero blog posts for .NET developers. I think it would be great for me and you both. :)

*Actually I do, when I work on my iOS game side project I do it on XCode and it is a pain in the buttocks

Read on →
1 minute readbarbaric-tip-of-the-week

Barbaric Tip of the Week: REST happily with Postman

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.

Hi hi! This week’s Barbaric Tip is about a great HTTP client I just found out about (thanks good folk of Experion). Postman will let you easily test any HTTP based API directly from you Chrome browser and:

  • Build HTTP request to your heart’s content
  • Save and categorize requests for later use
  • Setup different environments
  • Setup different types of authentication
A screenshot testing postman with the NASA APIs

My very favorite tool for working with HTTP requests is fiddler, but I really miss it when I am working on my mac, so I will definitely add this to my arsenal going forward.

Read on →
3 minutes readarticles

What is New in Knockout.js 3.0 Lightning Round

I have been writing so much about Knockout.js lately that I thought it would be a disservice not to write about the release of its latest version, Knockout.js 3.0. I will write a lightning version, a fast and brief summary if you will, as better in-depth blog posts have already been written (see links below :) ). Without further ado, this is what is new in Knockout.js 3.0:

  1. Multiple bindings that affect the same element are evaluated independently, that is, changes in an observable no longer trigger updates in bindings that do not directly depend on it.
  2. Ordered bindings. The execution of some bindings is now done in a particular order to avoid WTF bugs. For instance, the binding value: selectedValue, options: choices would not work in Knockout 2.3, and debugging it would be a pain. This feature works for all built-in bindings and can be defined for custom bindings.
  3. You can now add an arbitrary pre-processing function to built-in and custom bindings. This function will be given the unadultered binding value before it is evaluated.
  4. Likewise, you can now add a node pre-processing function to the binding provider that will be executed for each node within the document before it is processed for bindings. (This is used in knockout punches to add support for handlerbars syntax).
  5. Knockout now supports dynamic binding handlers. You can override the new ko.getBindingHandler function that determines which binding handler to use and add bindings on the fly.
  6. New checkedValue binding that extends the functionality in the checked binding to support objects (the latter did only support the input’s value property, that is a primitive)
  7. An experimental version of observable view models, that is, switch the entire view model and update each individual binding separatel.
  8. The options binding now generates a change event, if changed (as when we remove the selected item), it will trigger updates in other bindings such as value or selectedOption.
  9. New arrayChange event that makes it super easy to figure out has an observable array has changed.
  10. Support for binding to detached nodes
  11. Support for arrays of observables in addition to observable arrays.
  12. The optionsCaption binding is now HTML encoded.
  13. Is fully (very) backward compatible

In summary, new and awesome extensibility points, performance improvements and minor yet nice bug fixes and usability improvements.

Note that much better blog posts by most experienced people have been written about this new version, so, if you have some more time to spare, please check Steven Sanderson’s Knockout.js 3.0 RC and Knockout.js 3.0 Beta blog posts and Ryan P. Niemeyer’s blog for more in-depth information and a very good screencast.

Read on →
12 minutes readarticles

Barbarian Meets Knockout: Knockout.js Computed Observables

The “barbarian meets” series are a collection of articles that intend to introduce and explain useful libraries, frameworks, tools and technologies in simple and straightforward terms. These new series will focus on Knockout.js, the popular JavaScript MVVM library

Hi everyone! Time to continue learning knockout.js! This time I will write about computed observables, a special kind of Knockout.js Observables that allow you to calculate values in the client from other properties of your view model with one nifty special feature: A computed observable will listen for changes in the observables it depends of and recalculate its value when these observables change.

Read on →