Skip to content

Instantly share code, notes, and snippets.

View deadprogram's full-sized avatar
💭
Currently available for work. Let's talk!

Ron Evans deadprogram

💭
Currently available for work. Let's talk!
View GitHub Profile
@deadprogram
deadprogram / editor process
Created December 6, 2011 21:10
KidsRuby Windows performance with Ruby 1.9.2
Thread ID: 11807412
Total: 35.046000
%self total self wait child calls name
93.71 32.84 32.84 0.00 0.04 305 Qt::Base#method_missing
4.49 1.62 1.57 0.00 1.55 39 Kernel#gem_original_require
1.43 0.50 0.50 0.00 0.00 36 Qt::Base#initialize
0.09 0.03 0.03 0.00 0.00 65 <Class::File>#expand_path
0.06 0.04 0.02 0.00 0.02 2 <Module::Gem>#searcher
0.06 0.02 0.02 0.00 0.00 10126 Hash#default
/usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/config_file.rb:205:in `exists?': Insecure operation - exists? (SecurityError)
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/config_file.rb:205:in `load_file'
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/config_file.rb:154:in `initialize'
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/gem_runner.rb:71:in `new'
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/gem_runner.rb:71:in `do_configuration'
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/gem_runner.rb:44:in `run'
from /usr/local/kidsruby/ruby/bin/gem:21:in `<main>'
@deadprogram
deadprogram / gist:910116
Created April 8, 2011 15:34
KidsRuby Lightning Talk
KidsRuby
- There are not enough programmers in the world
- The best programmers all started when young
- Computer programming education budgets are getting slashed in the US/UK and elsewhere!
- _why the lucky stiff cared a lot about teaching kids, created Hackety-Hack
<internal:lib/rubygems/custom_require>:29:in `require': 126: The specified module could not be found. - C:/Ruby192/lib/ruby/gems/1.9.1/gems/qtbindings-0.0.0.0-x86-mingw32/lib/1.9/qtruby4.so (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/qtbindings-0.0.0.0-x86-mingw32/
lib/Qt4.rb:19:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/qtbindings-0.0.0.0-x86-mingw32/
lib/Qt.rb:1:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
class Dang
end
%w{ dang parser }.each do |f|
require File.expand_path(File.dirname(__FILE__) + "/dang/#{f}.rb")
end
task :default => :spec
task :spec do
Dir[File.dirname(__FILE__) + "/spec/**/*_spec.rb"].each do |path|
require path
end
MiniTest::Unit.autorun
end
"First Name","Last Name","Email"
"Joe","Schmo","joe@example.com"
"John","Doe","john@example.com"
"Jane","Roe","jane@example.com"
# rake tasks go here
task :default => :spec
task :spec do
Dir[File.dirname(__FILE__) + "/spec/**/*_spec.rb"].each do |path|
require_relative path
end
MiniTest::Unit.autorun
end
<article class="lesson"><h1>Let's talk about programming</h1>
<section class="page"><h1>It's all about instructions</h1>
<p>When you get down to it, programming is all about <strong>algorithms</strong>. That's a big fancy word for 'a list of instructions.' Every program is simply a big to-do list of instructions for the computer to follow.</p>
<p>You can turn almost anything into a list of instructions if you really think about it. Most of the time, you've got so much practice at doing things that you don't even think about these individual steps. You just do them. It's very natural.</p>
</section>
<section class="page"><h1>The computer is simple</h1>
<p>Unfortunately, computers are actually quite simple. This may be contrary to everything you've ever heard, but it's the truth. Even though we compare computers to things like our brains, it's a really poor analogy. What computers are actually really good at is performing simple, boring things over and over again very accurate
<article class="lesson"><h1>Hello there!</h1>
<section class="page"><h1>Round One</h1>
<p>So, you'd like to learn how to hack code with the best of 'em, eh? Well, you've come to the right place. This is the very first lesson I have to share with you. It all starts here.</p>
<p>I want to get you started off on the best possible foot with making programs, so we'll start off by talking a little bit about what programming is, and then we'll write some basic programs to draw fun things on the screen. Sound good? Off we go!</p>
<!-- flow do
<p> "(click the little "
icon_button :arrow_right, nil do
alert "Not this one! The one below!"
end
<p> " on the bottom of the screen to get started)"