- Beginner: still struggles with algorithmic thinking.
- Elementary: knows how to write an algorithm, but is still learning how to properly structure his code (just want to make things work). Also doesn't fully understand how the technology stack he's using is integrated. In a web application context, he'd struggle with integrating an AJAX request. Follows religiously the framework's guidelines, even when he shouldn't.
- Intermediate: knows how to build full applications, and is excited about best practices and design patterns. Hates repetition, and is easily convinced of any new "best practice" to the point where he'll over-design an application and make it even more difficult to maintain than if there wasn't any abstraction. Knows how to use the available tools to perform almost any given task, and is starting to escape the framework's guidelines when appropriate.
- Advanced (I'd be framed at this level, I think): understands when
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Hello world!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Hello world!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http.get('/first_resource') | |
.map(response => response.json()) | |
.flatMap(firstResource => { | |
if (firstResource.someProperty) { | |
return http.get(`/first_resource/${firstResource.id}/second_resource`); | |
} else { | |
return Observable.never(); | |
} | |
}).subscribe(handleSecondaryResource); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
words_path = [ | |
'/usr/share/dict/words' | |
'/usr/dict/words' | |
].find { |path| File.exists?(path) } | |
fail "Couldn't find words file in the system" unless words_path | |
# I’m using each_line so we don’t load everything | |
# into memory at once, since the file is huge. | |
awesome_adjectives = File.open(words_path, 'r') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given a user containing a `first_name` and a `last_name` methods, write a `handle` | |
# method that returns a generated handle that follow the following rules: | |
# - It must be preceded by an @ | |
# - It must be all lowercase | |
# - It contains the first letter of the first name, and all the letters of the last | |
# name (for "John" "Doe", it'd be @jdoe) | |
# - If the first name contains more than one name, get the first letter of each name | |
# ("John Fitzgerald Wood" "Doe" becomes @jfwdoe) | |
# - If the last name contains more than one name, get all the letters of the last one, | |
# and the first letter of each other ("John" "Fitzgerald Wood Doe" becomes @jfwdoe) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Stack = function(){ | |
this.storage = ""; | |
this.frameSize = 20; | |
this.emptySpaceChar = '$'; | |
}; | |
Stack.prototype.paddingRight = function(val) { | |
for(var i = val.length; i <= this.frameSize; i++) { | |
val += this.emptySpaceChar; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Passing a String to the layout: | |
class TestsController < ApplicationController | |
layout "test_layout" # maps to app/views/layout/test_layout.html.[erb/haml/slim/whatever template engine you're using] | |
# The test_layout is going to be applied here... | |
def index | |
end | |
# ...and here as well | |
def new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<load-image> | |
<img #loadImage src="http://orig12.deviantart.net/210f/f/2014/146/9/e/snowy_winter_background_by_archangelical_stock-d7jtb1d.jpg"/> | |
</load-image> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$timeout(function() { | |
if (!$scope.promiseComplete && $scope.submitted) { | |
$scope.message = { | |
content: [{ | |
title: '', | |
msg: 'Service down - created' | |
}], | |
type: 'error' | |
}; | |