Quantcast
Channel: Hasen Judy
Browsing all 50 articles
Browse latest View live

Knockout.js vs Backbone.js

What the hell am I talking about? Backbone? Knockout?These are 2 popular javascript frameworks, supposedly designed to help/facilitate the building of rich client application on the web.To me, this...

View Article


Adding web sockets to Flask apps

This is a walkthrough for integrating push sockets with a Flask app using gevent-socketioI will try my best to make this tutorial short and sweet and to the point. No fluff. Only the bare minimum. I...

View Article


Back to SQL

For the past year or two I was trying to jump around from one nosql system to another. I was unsatisfied with traditional relational database systems, and looking for something more flexible. My main...

View Article

setTimeout for python

In Javascript, there’s a function you can call to execute some function in the future:setTimeout(fn, delayMillis) This will call fn() after delayMillis milliseconds.To get a similar functionality in...

View Article

Experimental "ajax" library

Lately I’ve been feeling like jQuery is becoming rather obsolete for me.It used be a great library for dom manipulation, but for doing a real interactive UI, knockout.js is much better.It also used to...

View Article


Interesting hack to create html templates in javascript

Edit: various people pointed out that this trick is non-standard and not guaranteed to work across browsers, for instance, Firefox. So take this only as an interesting hack .. don’t use it in...

View Article

Python/gevent equivalent for `go func()` in go

In short, it’s gevent.spawnIn go, where you would write:go func(arg1, arg2, arg3) In python/gevent, you would write:gevent.spawn(func, arg1, arg2, arg3) This will spawn a greenlet and schedule it to be...

View Article

Competing asynchronous processes

Suppose you have an SPA (single page application) where all link clicks are handled in Javascript, and where the handling of link clicks might potentially involve an asynchronous request.Now imagine...

View Article


Tools for Front End development

Front end development on the web can seem like a big mess. So many different libraries and frameworks.This is my preferred toolset:RequireJS: module systemLoDash: functional programming helpersRSVP.JS:...

View Article


Quick notes on generating sine waves

A few notes based on my experiments the past couple of days.First, when you manage to generate a sine wave, you’ll notice there’s a “clicking” sound at the end. Where does it come from and how to deal...

View Article

Very simple implementation of Karplus-Strong algorithm in coffeescript

I’m a bit over excited as I just managed to successfully implement Karplus-Strong’s guitar string algorithm.http://en.wikipedia.org/wiki/Karplus-Strong_string_synthesisThe Wikipedia description was too...

View Article

Synthesizing music

Please be warned again that this is not my area of expertise. Don’t take anything I say too seriously. At best anything I say it just a reasonable approximation that happens to work for me.I’m assuming...

View Article

bash: mkdir + cd with one command

codedump:function mkcd() { [ -n "$1" ] && mkdir -p "$@" && cd "$1"; }Example:user@host:~$ cd work user@host:~/work$ mkcd website.com/{html,src,stuff} user@host:~/work/website.com/html$

View Article


PySide + QtQuick Tutorial

PySide + QtQuick Tutorial: I’m just looking around for tutorials, and just found this (haven’t even read it yet, but seeing as its in the official wiki, it’s gotta be good).

View Article

Webpage titles

I just had this idea. The title of a wepage should try to be as short as possible. Perhaps a 5-letter word.Titles (along with icons) are used to recognize tabs in a multi-tabbed browser. Keep that in...

View Article


A different kind of writing platform

I’ve been thinking for a long time about building a “writing” platform. But when I try to put it into simple words, it sounds like “oh, yet another blog”. In fact I’ve even written a post before titled...

View Article

SuperAgent: ajax library without the suck (by visionmedia)

SuperAgent: ajax library without the suck (by visionmedia)

View Article


Sketching helped me avoid getting stuck

For the past couple months, I’ve been feeling stuck. Every time I sit down and try to get something done, I can’t. I find myself “dreading” the thought of going through all the troubles involved...

View Article

Gevent? Coroutines for Flask?

Yesterday I was reading random stuff on the internet, one thing led to another, and I discovered there’s something called “greenlets” in python, which seem to be essentially coroutines of some sort.The...

View Article

Coroutines vs explicitly async APIs

I’ve expressed before (rather distastefully) an opinion that Node.js is not a good choice for developing web applications, because its async APIs will usually turn your code to a callback hell.Many...

View Article
Browsing all 50 articles
Browse latest View live