Done, and gets things smart.
I used to joke that, sometimes, when someone in my family comes down and sees a mess of code up in Emacs on my screen that “No, really, I’m playing a video game. It just looks like work.” Because I find coding fun. But the fact is that I also play games, and Portal 2 [...]
I was having a discussion the other day with a PHP developer, helping him architect a gamification layer for a website he owned. He had this ridiculously broad table of everything the user could earn, and I winced and said, “What if you want to add a new badge?” He hemmed and hawed and allowed [...]
08Aug
Posted by Elf Sternberg as javascript, programming
Introduction To Version 2.0 When I wrote the original Backbone Store, I didn’t have a clear understanding of how Backbone worked. I wrote it to teach myself Backbone, after all. Since then, I’ve come to understand that there is some Javascript about which I didn’t have the world’s clearest understanding. This version of the store clears [...]
Frequently, when dealing with remote APIs, there’s a progression of states with a definitive order and an endpoint. Often, when comparing the existing state to the proposed state, I want to make sure state is progressing in the correct direction. The stupid simple version of this is something like: ORDER_STATES = ( (‘PROCESSING’, _(“Processing”)), (‘APPROVED’, [...]
23Jun
Posted by Elf Sternberg as database, programming
One of the things I dislike most about some web frameworks is how they try to hide the machinery from your prying eyes. In some cases, this can be downright necessary– the mind that invented Django’s ORM is clearly a twisted evil genius from Mars who knows more about metaprogramming than I do, although I [...]
18Jun
Posted by Elf Sternberg as javascript, programming
So, this afternoon, I spent about four hours and played around with Raphael, the SVG library for HTML 5, and the native Canvas renderer. Originally, I was only going to go with Raphael, until someone pointed out to me that Raphael doesn’t work on Android phones. Since my apps have to work on Android [...]
27Mar
Posted by Elf Sternberg as Linux, programming
If you’re one of those early adopters of LessCss, then you probably know by now that development of the original Ruby version has been abandoned in favor of a version that runs under Node.js. I’m a big fan of LessCss; both the nested definitions and parametric definitions make my life a whole lot easier. I [...]
The last version of the Backbone Store was pretty sloppy. I’ve cleaned it up, with some serious revisions to both the code and the commentary, and you’re welcome to look it over. As always, it’s available from my Github.
The last update I have to django_uni_form, a rather amazing form layout handler for Django, does not understand what to do with the CSRF token. So in case you’re wondering, after you’ve created your form, you do the following in your view: form = FilmForm(initial = {‘title’: ‘History is …’}) form.helper.add_input(Hidden(name = ‘csrfmiddlewaretoken’, value = [...]
08Dec
Posted by Elf Sternberg as javascript, programming
Introduction I’ve been playing with Backbone.js, a small but nifty Javascript library that provides a small Model-View-Controller framework where Models can generate events that trigger View changes, and vice versa, along with a Collections models so groups of models can cause view-level events, and a Sync library that provides a basic REST architecture for propagating [...]