- Debugging Philosophy and Techniques
- Basic Errors and Reading an Exception
- Methods and the Stack, Reading a Backtrace
- Error Classes, Raising and Rescuing
- More Debugging Techniques, a Glimpse of Testing
checking build system type... x86_64-pc-linux-gnu | |
checking host system type... x86_64-pc-linux-gnu | |
checking for python3.7... no | |
checking for python3... python3 | |
checking for --enable-universalsdk... no | |
checking for --with-universal-archs... no | |
checking MACHDEP... checking for --without-gcc... no | |
checking for --with-icc... no | |
checking for gcc... gcc | |
checking whether the C compiler works... yes |
describe("NiceTrie", function() { | |
it("can be initialized", function() { | |
var t = new Trie(); | |
}); | |
describe("with a trie", function(){ | |
var t; | |
beforeEach(function() { | |
t = new Trie(); | |
}); |
<html> | |
<head> | |
<script> | |
var flip = function(ele){ | |
ele.classList.toggle('flipped'); | |
} | |
var move = 10; | |
var moveBoss = function(){ | |
ele = document.querySelector('#boss'); |
# Classes and Objects | |
## Code Along | |
require 'pry' | |
story_hash = { | |
"question" => "Welcome to the haunted hotel. What room would you like to go into?", | |
"room 1" => "you're dead", | |
"room 2" => { "question" => "You picked a good room. What would like to do?", | |
"sleep" => "You're rested for the morning", |
Web programmers have to live on the command line. It gives us fast, reliable, and automatable control over computers. Web servers usually don't have graphical interfaces, so we need to interact with them through command line and programmatic interfaces. Once you become comfortable using the command line, staying on the keyboard will also help you keep an uninterrupted flow of work going without the disruption of shifting to the mouse.
For any command we discuss here, the command man
, short for manual, will give a (hopefully) detailed explanation of that command. Sometimes that explanation will be too detailed for you. When you get lost in a man page and you want to understand it, start again from the beginning of of the man page and keep repeating. Hopefully you will get further into the page each time you read it.
The command line is my home. I literally think of using the command line as walking around a building.
#WDI Installfest
We are going to install the tools necessarily to program with Ruby and Rails on your computer.
If you are on a Mac which is not running the latest version of OSX, please upgrade through the Mac App Store. Apple has made it easier to set up a computer for software development in OSX Mavericks, and keeping the differences between computers to a minimum will help us get everything installed quickly and correctly.
If you are unsure or run into problems during installation, stop and don't worry; We will finish up any of the loose ends on Installfest. Do not try to troubleshoot on your own, you might break your environment further.
class TreeNode | |
attr_accessor :val, :left, :right | |
def initialize(v) | |
@val = v | |
end | |
def leaf? | |
# A node is a leaf if it has no children. | |
end | |
end |
O(1) - Constant time | |
"Get the first value of a list" | |
"Random sample from a list" | |
O(logN) - Divide and Pick | |
Typical of algorithms that divide the input, then look at one of the sections | |
Searching sorted data | |
O(N) - For each .... | |
Sum an array |
require 'benchmark' | |
module RoflModule | |
def rofladd(ping, pong) | |
ping + pong | |
end | |
end | |
RoflBlock = <<BLOCK | |
def rofladd(ping, pong) |