Skip to content

Instantly share code, notes, and snippets.

@jenaiz
jenaiz / papers.html
Created September 16, 2011 09:10
Papers Every Programmer Should Read (At Least Twice)
<ol>
<li><a href="http://sunnyday.mit.edu/16.355/parnas-criteria.html">On the criteria to be used in decomposing systems into modules</a> – David Parnas</li>
<li><a href="http://research.sun.com/techrep/1994/abstract-29.html">A Note On Distributed Computing</a> – Jim Waldo, Geoff Wyant, Ann Wollrath, Sam Kendall</li>
<li><a href="http://portal.acm.org/citation.cfm?id=365257">The Next 700 Programming Languages</a> – P. J. Landin</li>
<li><a href="http://portal.acm.org/citation.cfm?id=359579">Can Programming Be Liberated from the von Neumann Style?</a> – John Backus</li>
<li><a href="http://cm.bell-labs.com/who/ken/trust.html">Reflections on Trusting Trust</a> – Ken Thompson</li>
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.50.6083">Lisp: Good News, Bad News, How to Win Big</a> – Richard Gabriel</li>
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.363">An experimental evaluation of the assumption of independence in multiversion programming</a> – John
@jenaiz
jenaiz / Randoms.java
Created September 12, 2011 11:16
Expand a random range from 1-5 to 1-7
import java.util.Random;
public class Randoms {
final static Random rand = new Random();
final static int TOTAL = 1000;
public static void main(String[] args) {
@jenaiz
jenaiz / gist:29725
Created November 27, 2008 11:12
personal implementation of tog public continium method
def public_continuum(size = 40)
puts '***************************************************************'
if current_user.profile.friends != nil
friends = current_user.profile.friends.collect{|a| a.user_id}
Activity.find(:all, :conditions => {:action => ['membership', 'group'], :user_id => friends}, :limit=> size,
:order => " created_at DESC").collect{|a|
content_tag :span, :class => "clearfix" + cycle(nil, " pair") do
profile = content_tag :div, :class => "image" do
link_to icon_for_profile(a.user.profile, 'tiny'), profile_path(a.user.profile)
class AdvisesController < ApplicationController
def show
@advise = Advise.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @advise }
end
end