Thursday, September 26, 2013

MongoDB for Node.js Developers

mongoDB.org, the makers of MongoDB, run an great online course called M101JS: MongoDB for Node.js Developers.



The course is 7 weeks long. Each week will take you about 5 to 12 hours to complete and they deal with:
  1. Introduction
  2. CRUD
  3. Schema Design
  4. Performance
  5. Aggregation
  6. Application Engineering
  7. Mongoose/Final Exam
Overall I scored 90% for the course. Each concept is well presented in bite sized chunks with a good video clip of 2 to 10 minutes long and usually followed by a quiz to help solidify the concept. They build on each other from easy to difficult.

If you want to get credit for the course you have to keep up and do it as each week becomes available as the homework credits only stay active for one week. This, in my opinion is a good thing as it focuses you to dedicate time every week to getting this done.

The course has great explanations on replication and sharding, makes it seem obvious and simple.

The final exam covers everything you've done in 10 moderate to difficult questions. You'll get a great sense of accomplishment once it's complete.

MongoDB Education provide you with a database of 120,000+ emails from the Enron Corpus which makes for an entertaining set of questions (about 3 of them) that use this database to test your query and update skills.

Of the 7,599 students enrolled, 1,482 students completed the course successfully, a completion rate of 20%.

Friday, July 26, 2013

OSCON Clientside MVC

The Clientside MVC page on the OSCON site

Tom Cully (BigCommerce Ltd Pty)
11:50am Friday, 07/26/2013

http://mozart.io/

Clientside MVC provides:
- scalability
- clientside apps exist mostly as static assets allowing greater use of CDN tech

SEO Problem
- webcrawlers and other automated clients that don't run JS
- implementing graceful degradation is possible...
- only early solutions exist e.g. Mozart Concerto

BigCommerce created Mozart to address their deficiencies in the other MVC frameworks. Mozart is written in CoffeeScript.

BigCommerce currently have their Operation Slick running in A/B testing with a 60% probability that a customer will get it at this point.

Mozart Demos
todomvc.com

github.com/tomcully/mozart

HTML5 Unreal Engine

OSCON The Google Open Source Update

The Google Open Source Update page on the OSCON site.

Chris DiBona (Google, Inc.), Shawn Pearce (Google), Carol Smith (Google, Inc.)
11:00am Friday, 07/26/2013

A bunch of updates around Google's summer of code. I attended this because of the Git Update in the schedule.

Git Dev over last year
- 3,037 commits
- release about every 6 weeks
- 248 contributors

Hosting Linux Kernel
- time taken is 2m30s to clone Linux Kernel from google's hosted servers
- GitHub takes 5m37s
- Kernel.org takes around 6m

Google has improved speed by changing the algorithm.

JGit 3.0 ("jgit debug-gc")
Gerrit Code Review 2.6 ("gerrit gc")

Android OS project
android.googlesource.com
548 repos

Gerrit Code Review appears to be a competitor to GitHub but perhaps only for an intranet. Not sure if it's hosted.

OSCON Town Hall

The OSCON Town Hall page on OSCON.

 Edd Dumbill (Silicon Valley Data Science), Sarah Novotny (Meteor Entertainment), Matthew McCullough (GitHub, Inc.), Gina Blaber (O'Reilly Media, Inc.), Simon St. Laurent (O'Reilly Media, Inc.)
10:00am Friday, 07/26/2013

Feedback session for OSCON organizers. I attended this because I'm interested in speaking at next year's OSCON so wanted to hear what the pain points were and what works and what they are looking for.

BOFs (birds of a feather) sessions appeared to be problematic.

I suggested that they take advantage of the Improv Troupe and have an evening performance from them and other participants.

This session was just to provide feedback to the organizers. I was hoping to hear something from them as well but we ran out of time.

Thursday, July 25, 2013

OSCON Developing full stack Javascript applications

The Developing full stack Javascript applications page on OSCON

Grant Shipley (Red Hat)
5:00pm Thursday, 07/25/2013

IaaS, PaaS, SaaS

PaaS example: OpenShift

OpenShift is free (will pay for EC2 time)

SampleApp will have:
strongloop
mongodb
twilio
openshit
appcelerator (titanium)
- eclipse based ide
- integrated with OpenShift
- build, test and deploy mobile apps from a single ide
- debugger

https://github.com/gshipley/OSCON2013

created a templated app in titanium studio
standardized on commonJS
















OSCON New Rules For JavaScript

The New Rules For JavaScript page on OSCON site.

Kyle Simpson (Getify Solutions)
4:10pm Thursday, 07/25/2013

54y.geti.fi/slides/js-rules/oscon

Kyle is writing youdontknowjs.com

html5hub.com

linters - jslint, jshint, eslint
- use for checking and agreeing on style

stop thinking JS (as a dynamic language) doesn't have types

!! same as Boolean(a)

7 types:
null, undefined, boolean, string, number, object, function
can get type by using typeof  except for null which will return object

stop thinking JS variables have types

values have types, and those types can't change but vriables can hold any value at any time

== allows coercion
=== disallows coercion

null == undefined // true

stop using anonymous functions
- improves readability of stack when debugging
- also name IIFE
- named functions are always better

don't assume the JS engine optimizes away mistakes

stop abusing function scope

block scoping is better than manually hoisting variables

 let() {}
- does not exist yet
- can use blockscope.js on GitHub

 stop using this until you really understand how it gets assinged
is the call-site new-invoked? use that
is the call-site binding overriden with call/apply?
... add more from slides

stop using new Something() "constructors" to "instantiate" ...

OO vs OLOO (Objects Linked to Other Objects)
class vs delegation oriented code

delegation oriented programming

OSCON Adventures in Node.js

The Adventures in Node.js page on OSCON.

Faisal Abid (Dynamatik, Inc.)
2:30pm Thursday, 07/25/2013

node.js is built around "events"
event loop is always running checking for new events
fires callbacks when new events are received

http.createServer(function(request, response) {
    // request has all information about request
    // response allows packaging of what will be returned to client.

}

use EventEmitter class to write custom events
 - can help with callback hell

require is used to import modules to your application.
- modules are like classes
- http module is stored in the node_modules folder
- require returns a JSON object

in examples using nodemon

npm is used to get modules
npm.org -
run from cmd line:
npm install socket.io
npm install nodemon
npm install -g coffee-script

package.json is a manifest for node
"npm install" will read package and work out and download required packages
use * in package to get latest version otherwise specify version number
npm install --save hbs - adds to package.json?

Express.js
- framework like sinatra
- REST API for node
- great support for templates
- templates: Jade, EJS, Dust (LinkedIn now owns Dust)

restangular - simplify rest on angular

node has 32k modules out there, huge community support