Skip to content

Instantly share code, notes, and snippets.

View jasim's full-sized avatar

Jasim A Basheer jasim

View GitHub Profile

Outcome-Oriented Programming

Mike McNeil, Aug 2014

Humans are not very good at planning. We have no problem running scenarios, thinking through possibilities, and pondering "what if?" questions. I might plan to not eat my cousin's birthday cake before she gets home, for instance. If I'm very serious, I might write down my commitment; or if I'm unsure about the pros and cons, use some organizational tool like a T-chart.

But when it comes to making a decision in the moment, all bets are off. The cake is a goner.

Predictive Analysis vs. Process Design

Below, I've included a figure containing a decision tree diagram.

<!DOCTYPE html>
<script type='text/javascript' src=""></script>
<script type='text/javascript' src=""></script>
<style type="text/css">
.CardsList-Card {
background-color: #ddeeaa;
a.each_index {|i| if a[i] > 20
return i
# Main sinatra app
require 'sinatra'
require 'activerecord'
require 'activesupport'
include ActionView::Helpers::DateHelper # add the required helpers here.
require 'controllers.rb'
# controllers.rb
jasim /
Created March 29, 2012 10:50
Shortcuts for VimGet

#Basic Stuff#


  • Goto next word w
  • Goto previous word b
  • Select inner word viw
  • Select the inner block - vi{
  • Go to closing or opening tag - %
jasim / method_missing_v1.rb
Created September 30, 2012 07:20
a simple example of method_missing and why you should use it with care
class Item
attr_reader :id
def initialize(id, properties)
@id = id
@properties = properties
def method_missing(m, *args, &block)
jasim / webrick genericserver demo.rb
Created May 14, 2013 17:41
Using WEBrick's GenericServer to talk over TCP without worrying about socket mechanics
# to test, run this file and `nc localhost 34242`, type a line and press enter
require 'webrick'
s = => 34242)
trap("INT") { s.shutdown }
s.start do |sock|
rescue EOFError => err

manycopies init manycopies add volume /Volumes/My500GBPassport Rainmaker manycopies add volume /Volumes/OldSeagate80 Coconut manycopies add temporary volume / "MBP-Retina-temp"

manycopies ln "/Users/jasim/Pictures/Downloaded Albums/106517555286564995482" /Photos manycopies ln /Volumes/My500GBPassport/ManyCopies /

manycopies set sync /Photos /Documents Rainmaker manycopies set sync /Photos /Documents Coconut

class PhysicalStorageVolume
OS_VERSION = RbConfig::CONFIG['host_os']
def initialize(path)
@path = path
@path_exists = File.exists?(path)
def raise_error_if_file_doesnt_exist!
raise unless @path_exists
jasim / bungee.prg
Created October 25, 2013 20:03
Sweet pulldown menu DSL in SuperLib, a CA-Clipper library from 1996.
bungoption("Open" ,{} ,{||!lFileIsOpen} )
bungoption("Close",{||nil},{||lFileIsOpen } )
bungoption("DBF" ,{||nil},nil )
bungoption("Ascii",{||nil},nil )