-
posts
-
Javascript Templating Languages
I have been looking at JavaScript templating libraries recently for a personal project and I’d like to write about my thoughts here. Up until now, I had only really needed to use JavaScript on the client side, in the browser. While most libraries will work on the server side as a matter of course, many aren’t particularly good at rendering entire documents. I wanted something that would be easy to render entire html documents without having to write the same base html in every template. As a secondary requirement, I wanted something that could be cached/pre-compiled to JavaScript for speed....
-
Pickling Objects with Cached Properties
Python descriptors allow you to create properties on python objects that are the result of executing some code. One of the simplest ways of doing that is using the @property decorator. Here, accessing the myprop will call the method and return the resulting "data". class MyClass(object): @property def myprop(self): return "data" One variant of this is the cached_property pattern. There are many implementations floating around. There is a package on pypi. Werkzeug, and by extension Flask, has one. Django has one. These implementations all rely on the fact that if you add a value to the __dict__ of an object,...
-
Some General Trends in Programming Languages
There are a number of next generation of languages that have come out and are becoming popular in recent years that are trying to use what has been learned from large development projects. Some of the more popular languages aimed at servers are Go, Rust and Haskell. Others like TypeScript, and Dart are targeting the client side as well as server side applications. There are some common threads in these new languages here that I don’t really see talked about much but I think are useful to talk about because they highlight the direction that technology is heading. An old...
-
New Year’s Python Meme 2014
Since everyone else was doing it I thought I’d write one up too. What’s the coolest Python application, framework or library you discovered this year? Luigi: A data processing pipeline framework written by some folks at Spotify. I gave a talk on it at last year’s PyCon APAC. Numba: A just-in-time compiler that compiles annotated Python (and numpy) code to LLVM bytecode. It’s interesting it that you could use it to speed up particularly slow parts of Python code. What new programming technique did you learn this year? Not much learning of new programming techniques per se, but I did...
-
App Engine Pull Queues and kombu
App Engine provides a pull queue API for accessing, leasing, and processing tasks outside of App Engine. You might do this to perform long running tasks that aren’t suited to App Engine’s infrastructure. Or you might want to use a library or system that isn’t available on App Engine. However, the way you would interact with pull queue is via a REST API. There isn’t much in the way of APIs for actually polling the API, processing the task, and acknowledging to the API that the task is finished. I am a fan of Python and so I often use...
-
PyCon APAC 2013
PyCon APAC 2013 is over! I want to thank everyone who helped make the conference a great success. Staff, speakers, attendees alike all contributed to making PyCon APAC 2013 the best PyCon in Japan ever. Sponsors We had many, many sponsors this year and I want to thank each and every one of them. They helped tremendously to make PyCon APAC a huge success. Our list of sponsors is really a list of very special companies doing amazing things. We literally could not do it without them, so I hope that our guests realize our sponsor’s commitment to them and...
-
Using jQuery deferreds with Backbone.js
Backbone.js is a neat little JavaScript model framework. It gives you nice way of making Models and allows you to fetch and save them to the server easily using a REST API. One of the nice things about Backbone is that for a while it has returned the the result of calling the ajax function back to the application, which if you are using jQuery is a jQuery deferred. This allows you to do cool things like doing work in parallel and then running a callback when all the work is done. Let’s look at an example. Say we have...
-
Learning a Language as Muscle Memory
Note: This post is cross-posted from my post on medium. I learned a lot from learning a second language. I started learning Japanese on my own and moved to Japan several years ago. I now work at a Japanese company where I spend most of my day speaking and writing Japanese. Most people think about learning a second language as a kind of rote learning. You memorize the vocabulary and grammar of a language and when the time comes to use it, you recall the vocabulary and grammar from your memory and use what you remembered to form a coherent...
-
Google App Engine 1.7.7 pre-release
Update: App Engine 1.7.7 final has been released and is available here: https://developers.google.com/appengine/downloads. The App Engine 1.7.7 pre-release SDKs were released about a week ago and I finally got around to taking a look at the source code. The only real addition in the release notes and what caught my eye was the socket API being released as an experimental feature for billed apps. Being an experimental feature, that means that the feature is included in the SDK and you can try it out at least locally. I looked around and there doesn’t seem to be any documentation for how...
-
Twitter Archive
Twitter now allows you to download an archive of your
tweets. I’ve gone
ahead and put up my Twitter Archive on this site so it can be perused online
easily. Please take a look at my latest
archive.
I’ll periodically update this archive so that is somewhat up to date. I’ll need
to do it manually so I might be able to update it about once a month or so.