- Implement your own Enumerable module! (this will give you some exposure to functional programming ideas and help you understand how modules work)
- Implement the entire Array class using a linked list and give it much of its functionality by including your Enumerable module! (this will give you experience with some not too complex algorithms, as well as more Ruby exposure, familiarity with the Array class, and a realization that almost everything in Ruby you can implement yourself if you want, Array isn't special other than its literals, also we'll implement it using a linked list, so some CS core ideas, and an opportunity for me to give you a code review and probably expose you to functional ideas by showing you how I implemented it)
- Implement curry (not too difficult and will give you more exposure to functional ideas)
- Maybe some of the string functions (or maybe not, the real benefit here is that you would get experience with problem solving and algorithms, we may decide that isn't relevant)
- Top-do
This file contains 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
require 'yaml' | |
require 'base64' | |
require 'erb' | |
class ActiveSupport | |
class Deprecation | |
def initialize() | |
@silenced = true | |
end | |
class DeprecatedInstanceVariableProxy |
This file contains 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
# backend app | |
require 'sinatra/base' | |
require 'json' | |
class UsersController < Sinatra::Base | |
get '/users/:id' do | |
JSON.dump id: params[:id].to_i, name: "Josh" | |
end | |
end | |
This file contains 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
require 'ripper' | |
Ripper::SexpBuilder.instance_methods.grep(/error/i) # => [:on_alias_error, :on_assign_error, :on_class_name_error, :on_param_error, :on_parse_error] | |
class DemoBuilder < Ripper::SexpBuilder | |
instance_methods.each do |meth_name| | |
next unless meth_name =~ /^on_/ | |
super_meth = instance_method meth_name | |
define_method meth_name do |*args| | |
super_meth.bind(self).call(*args).tap do |result| |
This file contains 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
/* The problem with phrases like "pass by value", "pass by object reference", and "pass by reference" | |
* is that they are utterly meaningless becaues there are three perspectives one can take when trying | |
* to classify these things. | |
*/ | |
typedef struct { int value; } Object; | |
/* PERSPECTIVE 1: The parameters of the function being called (this is the one that _should_ matter) */ | |
void function_by_value (Object o) { } |
http://tinyurl.com/josh-lightning-talks
- Present trip to RDRC
- How to contribute to F/OSS
- Ruby method overloading
Chem timer- Land of Lisp book review
- Metaprogramming Ruby book review
- Cucumber Watir example
This file contains 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
*PURPOSE: | |
This is a test to evaluate the underlying difference between references and pointers. | |
*PROCESS: | |
The session can be seen in this image http://grab.by/Jbi | |
First: | |
Create a file that uses references (references.cpp), then duplicate it using pointers(pointers.cpp) |