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
https://rubymonk.com/ | |
http://rubykoans.com/ | |
https://www.codeschool.com/ | |
http://www.codewars.com/ | |
http://ruby.learncodethehardway.org/book/ | |
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book | |
The-Well-Grounded-Rubyist-David-Black 2014 => amazon | |
Eloquent Ruby => amazon |
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
This is a curated list of materials related to 'distributed computing' theory and practice. | |
Some of them are directly related to what Base does and some are just inspiration and demo of what is possible. | |
Articles: | |
Microservices by Martin Fowler http://martinfowler.com/articles/microservices.html | |
Microservices and the Failure of Encapsulation https://michaelfeathers.silvrback.com/microservices-and-the-failure-of-encapsulaton | |
Distributed Computing https://en.wikipedia.org/wiki/Distributed_computing | |
Fallacies of Distributed Computing Explained http://www.rgoarchitects.com/Files/fallacies.pdf | |
SOA anti-pattern Transactional Integration http://arnon.me/2010/09/soa-antipattern-transactional-integration/ | |
Nanoservices http://arnon.me/2014/03/services-microservices-nanoservices/ |
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
#include <iostream> | |
size_t S(size_t n, size_t k) | |
{ | |
if(k > n) | |
{ | |
return 0; | |
} | |
else if(k == 1) | |
{ |
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
#!/usr/bin/ruby | |
module ToFile | |
def filename | |
"object_#{self.object_id}.txt" | |
end | |
def to_f | |
File.open(filename, 'w') {|f| f.write(to_s)} | |
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
#!/usr/bin/ruby | |
class Tree | |
attr_accessor :children, :node_name | |
def initialize(name, children) | |
@children = children | |
@node_name = name | |
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
class Roman | |
def self.method_missing name, *args | |
roman = name.to_s | |
roman.gsub!("IV" , "IIII" ) | |
roman.gsub!("IX" , "VIIII" ) | |
roman.gsub!("XL" , "XXXX" ) | |
roman.gsub!("XC" , "LXXXX" ) | |
(roman.count("I" ) + | |
roman.count("V" ) * 5 + | |
roman.count("X" ) * 10 + |
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
TEST_F(SExpTest, SExpWithOperator) | |
{ | |
// (2 3) | |
SExp* valuePair = new SExp(a, b); | |
// (+, (2 3)) = 5 | |
SExp* addOpWithValue = new SExp(new AddOperator(), valuePair); | |
EXPECT_EQ(5, addOpWithValue->Evaluate(context)); | |
delete addOpWithValue; |
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 'rake/clean' | |
PROG = "foo" | |
LIBNAME = PROG | |
LIBFILE = "lib#{LIBNAME}.a" | |
SRC = FileList['**/*.cpp'] | |
OBJDIR = 'obj' | |
OBJ = SRC.collect { |fn| File.join(OBJDIR, File.basename(fn).ext('o')) } |
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
#include <iostream> | |
class Bird | |
{ | |
public: | |
virtual void Fly() const = 0; | |
virtual void Speak() const = 0; | |
}; | |
class Eagle : public Bird |
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
#include <iostream> | |
#include <cassert> | |
class FlyStyle | |
{ | |
public: | |
virtual void Fly() const = 0; | |
}; | |
class FlyHigh : public FlyStyle |
OlderNewer