Skip to content

Instantly share code, notes, and snippets.

@lsmith
lsmith / gist:9868174
Last active August 29, 2015 13:57 — forked from jshirley/gist:9863326

Leveraging Technology to Increase Pain of Paying, and Improve Personal Savings

As technology advances, p_P_eople are getting further from the hard concept of money. Without seeing immediate feedback, people repeat undesiredby whom? behaviors without having any painbetter word?. The tendency to repeat previous behaviors without thinking of the original motivation has been observed (Ariely, D. & Norton, M. I., 2008)footnote?. This behavior may cause repeatedmay increase purchases without adequatewith inadequate? deliberate decision-makingdeliberation?.

This problem is exacerbated by the reduction of the pain of paying as the distance from physical currency increases (Ariely and Silva, 2002). We are increasingly moving towards electronic payments and this trend will not reverse (Borzekowski, Kiser, Ahmed, 2006).Isn't this correlating physical proximity with conceptual proximity?

@lsmith
lsmith / gist:2480921
Created April 24, 2012 15:51 — forked from stlsmiths/gist:2480907
POC DataTable.Selection class extension
// Class extension to DataTable ...
Y.DataTable.Selection = function () {}
Y.DataTable.Selection.ATTRS = {
// selectionMode: for supporting multiple selection could be its own extension
selectionType: {
value: null, // Feature should not change base behavior by default
validator: '_validateSelectionType'
@lsmith
lsmith / gist:965619
Created May 10, 2011 23:39
widget event
YUI().use('dial', 'event', function (Y) {
var dial = new Y.Dial({
min:-220,
max:220,
stepsPerRev:100,
value: 30
});
dial.after('render', function(e) {
/**
* Adds a method to the Y.Base prototype to handle events so that when a widget
* or plugin becomes destroyed all events attached are detached.
*
* Requires Y.Lang & Y.Array
*/
YUI.add('event-handler', function(Y) {
Y.Plugin.EventManager = Y.Base.create('eventManager', Y.Base, [], {
initializer: function () {
//An Array of dataTables to to them from other controls
var dataTables = new Array ( );
function CreateDateTable ( controlID, headers, initialDataSource )
{
//Retrieve Table Properties to pass
//from the Parent Control to the rendered Table (DIV)
var renderedControl = document.getElementById ( controlID );
var tableCaption = renderedControl.getAttribute ( "_Caption" );
YUI.add('gallery-plugin-node-io',function(Y){
var YL = Y.Lang,
SUCCESS = 'success',
FAILURE = 'failure',
TIMEOUT = 'timeout';
Y.Plugin.NodeIo = Y.Base.create('node-io', Y.Base, [], {
_inProgress: null, // verb choice over noun for attribute ?
// A: inProgress is a boolean-esque name and more descriptive
YUI_config = {
// standard YUI_config configuration
combine: true,
filter: 'min',
// event binder configuration starts here
eventbinder: {
// listener callback function
fn: function(e) {
var binder = YUI_config.eventbinder,
/**
* Dispatches clicks to the appropriate handler(s)
*
* (etc)
*/
dispatchClick: function (e) {
var classes = this.get('className').split(/\w+/),
i;
for (i = classes.length - 1; i >= 0; --i) {
/*
* An example of
* 1. Using the YUI 3 module system to encapsulate a custom class for reuse
* 2. Creating a Plugin class
* 3. Using Y.Base.create to generate the class
*/
// YUI.add(
// "dash-separated-module-name",
// function (Y) { Y.MyModule = ...; },
YUI.add('example',function(Y){
var Example= function(){
Example.superclass.constructor.apply(this,arguments);
};
Y.extend(Example, Y.Overlay,{
/* proto */
},{