Skip to content

Instantly share code, notes, and snippets.

View thehydroimpulse's full-sized avatar

Daniel Fagnan thehydroimpulse

View GitHub Profile
@thehydroimpulse
thehydroimpulse / SplClassLoader.php
Created February 16, 2012 05:10 — forked from wilmoore/SplClassLoader.php
PHP 5.3 Namespace Autoloader
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@thehydroimpulse
thehydroimpulse / C++0x_Maybe_Monad.cpp
Created July 7, 2012 08:53 — forked from pskupinski/C++0x_Maybe_Monad.cpp
My maybe monad implementation in C++0x.
// This code is in the public domain, feel free to use it in anyway you'd
// like to.
#include <iostream>
#include <functional>
using namespace std;
template<class A>
class Maybe {
protected:
A a;
@thehydroimpulse
thehydroimpulse / index.html.haml
Created August 20, 2012 11:57 — forked from timgremore/index.html.haml
Ember.js, document collection and polling...written in CoffeeScript
- title "#{@game.name}"
%h1= yield(:title)
#documents
= form_tag(assessment_game_documents_path(@game)) do
%ul
%script{ type: "text/x-handlebars" }
{{#collection Game.DocumentsCollectionView contentBinding="Game.documentsController"}}
%li {{content.name}}
{{/collection}}

Routing in Ember

In Ember, the application's state manager handles routing. Let's take a look at a simple example:

App.stateManager = Ember.StateManager.create({
  start: Ember.State.extend({
    index: Ember.State.extend({
      route: "/",
@thehydroimpulse
thehydroimpulse / console.js
Created October 27, 2012 11:18 — forked from elijahmanor/console.js
Custom JSBin Settings
jsbin.settings.editor.theme = "monokai";
jsbin.settings.editor.indentUnit = 4;
jsbin.settings.editor.smartIndent = true;
jsbin.settings.editor.tabSize = 4;
jsbin.settings.editor.indentWithTabs = true;
jsbin.settings.editor.autoClearEmptyLines = true;
jsbin.settings.editor.lineWrapping = true;
jsbin.settings.editor.lineNumbers = true;
jsbin.settings.editor.matchBrackets = true;
@thehydroimpulse
thehydroimpulse / ember-precompile.js
Created December 1, 2012 06:12 — forked from lancejpollard/ember-precompile.js
Precompile .handlebars templates with node js
var fs = require('fs');
var path = require('path');
var vm = require('vm');
var argv = require('optimist').argv;
function compileHandlebarsTemplate(file, onComplete) {
//dummy jQuery
var jQuery = function () { return jQuery }
jQuery.ready = function () { return jQuery }
jQuery.inArray = function () { return jQuery }

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".