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
button.addEventListener('click', function()
{
var xhr = Titanium.Network.createHTTPClient();
xhr.onerror = function(e)
{
alert("ERROR " + e.error)
}
xhr.onload = function()
{
label.hide();
@deadprogram
deadprogram / gist:782074
Created January 16, 2011 19:39
Edward Tufte on Use of Color
Color
"The fundamental uses of color in information design (are): to label, to measure, to represent or imitate reality, to enliven or decorate." Dr. Tufte provides a few specific guidelines on the use of color:
"Color spots against a light gray or muted field highlight and italicize data." "Note the effectiveness and elegance of small spots of intense, saturated color for carrying information."
"use colors found in nature, especially those on the lighter side."
"For encoding information,... more than 20 or 30 colors frequently produce not diminishing but negative returns."
"The primary colors (yellow, red, blue) and black provides maximum differentiation (no four colors differ more)."
In color maps, use a single hue, Don't use up the entire color spectrum, or even all of a hue's levels. Particularly avoid Roy G. Biv (red, orange, yellow, green, blue, indigo, violet), the color spectrum of the rainbow. It's good physics, but poor human factors. Like all multi-hue color maps, the non-equidistant hue changes a
hoptoad_deploy_environments = %w(staging production)
if hoptoad_deploy_environments.include?(@configuration[:environment])
# Notify Hoptoad of deploy
run "cd #{current_path} && rake hoptoad:deploy TO=#{@configuration[:environment]} REVISION=#{@configuration[:revision]} REPO=#{@configuration[:repository]}"
end
# from the irb source code
module HH::InputCompletor
ReservedWords = [
"BEGIN", "END",
"alias", "and",
"begin", "break",
"case", "class",
"def", "defined", "do",
<div class="lesson"><span>Lists of Instructions</span>
<div><span>A to-do list, not a shopping list</span>
<p>When I say that computers follow lists of instructions, I mean a to-do list, not a shopping list. What I'm trying to say is that these lists have an <strong>order</strong> to them that the computer follows. It does each step in turn as quickly as it possibly can.</p>
<p>A shopping list is a different kind of list entirely. You can go to whichever aisle you choose, and as long as you get everything before you leave, you're A-OK. This isn't what the computer does at all.</p>
</div>
<div><span>How would you tell a person to do it?</span>
<p>Let's try an example: if you had to tell someone in words how to draw a square on a piece of paper, how would you do it?</p>
<p>You're not allowed to say "like this" or "this way," that's cheating! You have to spell out every detail.</p>
</div>
<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)"
<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
# 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
"First Name","Last Name","Email"
"Joe","Schmo","[email protected]"
"John","Doe","[email protected]"
"Jane","Roe","[email protected]"
task :default => :spec
task :spec do
Dir[File.dirname(__FILE__) + "/spec/**/*_spec.rb"].each do |path|
require path
end
MiniTest::Unit.autorun
end