Wednesday, October 30, 2013

Humbling post to read: 'Did these guys just reinvent the Web?'

I read this post the other day: http://www.infoworld.com/t/application-development/did-these-guys-just-reinvent-the-web and it talks about http://famo.us/ . Seriously: check out that site. You know what, check it out on your phone!

Super fast JS animations. Done by some guy called Mark Lu, who came up with a prototype within a couple of days.

If you're not going to read the article, at least read this part:

Lu thought for a little while. "I think we may already have a solution to both of those concerns. To fix the rendering problem, the primary part we need to rewrite is the part of the renderer that creates and multiplies the matrices. And luckily for us, JavaScript is about 80 percent of the speed of compiled C for those specific types of operations." 

"That should give us a big advantage. How big?" 

Lu did some quick calculations. "Possibly an order of magnitude." 

Newcomb's jaw dropped. "That's ... really good. But how do we circumvent the browser's renderer without a plug-in?" 

"We use the CSS3 primitive -webkit-transform: matrix3d, which lets us compute the composite matrix and skip the browser's renderer. No plug-in, no download, no hack. By appending this to each DIV, we can render the composite matrix and go straight to the GPU." 

"Um, that sounds like really hard stuff." 

"Not really. I'll have it done by tomorrow."

WHAT?! By tomorrow? You're kidding me! I'm going to need until tomorrow to understand what he said in the first place. Guess I still have a long way to go.

Monday, October 28, 2013

CloudFlare - cool

On one of the Herding code shows I heard about cloud flare. This service routes all the traffic to your site through them which allows you to do stuff like caching and security protection. According to the podcast, they saved a bunch of bandwidth just by filtering out crappy IP addresses and doing a bit of caching.

There's a free plan too, which they're using and which was sufficient for them.


Wednesday, October 23, 2013

Another great .NET Rocks! Episode

On my daily commute I often listen to the .NET Rocks! show and this particular one was awesome. Show 915 with guest Dan North was a great one. They're all good, but some are great. This one I particularly liked because I recognize the things he mentions ( inefficiencies and bad practices ) in the larger organisations I've been working for lately. Furthermore, I find it awesome to hear how the guys at Bank of America ( where he's doing a project now ) are going about trying to improve stuff. Anyway - have a listen.


Monday, October 21, 2013

Geting code coverage with QUnit: Blanket.js

Yet another *.js -charm  this time blanket. It's a code coverage tool for your QUnit tests. It works like a charm and requires next-to-no effort.

BlanketJS

I've added the library to my QUnit tests that I'm running and it does at it says on the tin. Works like a charm. Go check it out at http://blanketjs.org/.


Below are some of the tests I'm running. By the way - I'm using the Ninja theme for QUnit: http://qunitjs.com/plugins/ - at the bottom.


Friday, October 18, 2013

Getting started with Yeoman - revisited

In my last post - I installed Yeoman onto my machine and scaffolded a new website. But's let's have a better look at what I actually had been doing.



So - what's Yeoman? I was looking for a one-liner on the website, but couldn't find one. My understanding of it thusfar, is that it's a scaffolding tool. Yeoman uses two other Node packages: Bower and Grunt.

Grunt

Grunt is a task runner written in JavaScript (so for node). It's like ANT : you can make it do stuff for you related to your website's deployment, like js minification, PNG optimization, version numbering etc. Here's a list of plugins that you can do work for you: http://gruntjs.com/plugins.

And here's a Google guy showing how it makes your life a whole lot easier:



Bower

Bower is a package manager, like NuGet:, created by Twitter. The parallel makes sense, if you're into .NET - like me. You use it to get packages and manager your dependencies. Here's a quick video by that NetTuts guy.



Man - I don't know how that guy types SO fast, without errors and knows all this stuff by heart. You want to know what packages are available? Here's the list: http://sindresorhus.com/bower-components/

Yeoman

So yeoman makes use of both Grunt and Bower to scaffold your website. It uses so called 'generators' for that. You can find a list of generators on the website here: http://yeoman.io/community-generators.html.

I installed a generator when I ran:

sudo npm install -g generator webapp

Then I had yeoman scaffold this generator for me in my /www/yeoman folder using the yo webapp command. Et voila - your first site with yeoman up and running.

Wednesday, October 2, 2013

Getting started with Yeoman

In my previous post I installed NodeJS on my ubuntu machine. Now let's see what I can do with this ..

How about playing around with Yeoman ? I've heard it on several podcasts so it's about time I tried it out. Now that I installed Node - there's a whole bunch of coole new stuff I can discover.

So let's get it first:

sudo npm install -g yo

That get's me Yeoman! so that's cool. Now let's get a generator:

sudo npm install -g generator-webapp

The -g option makes installs the package as a global package.
That's it! My ubuntu has the LAMP stack installed, so I just created a folder in /www and ran

yo webapp

Yeoman pulls everything down and sets up a complete web application with test suite and everything.



Let's head over to localhost/www/yeoman/app:




and /test: