January 2010
4 posts
3 tags
Import * Considered Harmful
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.*;
I’m guilty of it too. You don’t really know...
2 tags
Get the Method Caller in MooTools
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...
1 tag
3 Tips When Switching to Python
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.
Accessing a property in a dictionary with a variable
Setting properties on objects with a variable
Using While with a function call
Check in first
When looping through a list or dictionary, it’s not uncommon to compare the current indexed...
4 tags
Tablets Will Replace Everything
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 if they’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...