Latest

  • Import * Considered Harmful

    Jan 27, 2010

    Something a Java programmer learns first is that there is this big, amazing library already built-in to Java, and you can easily use plenty of useful classes by using an import statement. Possibly the first thing you want to do is pop open a box to prompt your name, or say hello, and thus starts this terrible habit:

    import javax.swing.*;

    Read more »

  • Get the Method Caller in MooTools

    Jan 19, 2010

    As I continue to work on my MVC implementation in MooTools, I continue to find new hidden features in MooTools. This weekend, I was adding a view method to the controller, as a shortcut to creating a new View and rendering it. One of the arguments is the view file name, but I also wanted some automagic like CakePHP. It'd be great if the view function could determine the file name based on the function that called it.

    Here's what I mean:

    var ItemsController = new Class({
    	view: function(view_name) {
    		if(!view_name) {
    			//viewname should default to 'controller/method'
    		}
    	},
    	list: function() {
    		$(this).grab(this.view()); // 'items/list'
    	}
    });

    Read more »

  • 3 Tips When Switching to Python

    Jan 14, 2010

    If you write a lot of Javascript or PHP, there are a couple of habits you might be used to that need to change a bit when you switch over to Python.

    1. Accessing a property in a dictionary with a variable
    2. Setting properties on objects with a variable
    3. Using While with a function call

    Read more »

  • Tablets Will Replace Everything

    Jan 07, 2010

    Recently, there has been a bit of talk about upcoming tablets like the CrunchPad and the iSlate, and whether we need them, how useful they'll be, or ifthey're only use is browsing the web on the toilet. Many people are of the opinion that we don't need one. Or that only gadget enthusiasts would buy it for couch web browsing. Well, I'll go out and say it: Tablets will replace everything.

    Crunchpad prototype

    Read more »

  • 2009 in Review

    Dec 29, 2009

    It's amazing that this decade is finishing off already. Time really does get faster the longer I feel it. Anyways, here's a summary of the activity on this blog for the year.

    1. I started the year off with sharing a Privates Mutator for MooTools prior to v1.2.3. 
    2. Next, I shared a Drag.Dock class to ...

    Read more »

» Visit articles