January 3rd, 2012
I am reading The Elements of Computing Systems. I’ve been wanting to read a few computer science classics but I thought I would start by reading this instead (it’s not a classic… yet) as I feel like there are holes in my knowledge. Just as an example, I have never implemented a virtual machine nor have written an emulator. Those are the kind of basic challenges that every computer hacker should beat at least once.
This is a rather uncommon kind of textbook. First of all, it openly presents itself as a light accessible book that can easily be picked up by anybody with little knowledge of computing systems, but at the same time it sets a very ambitious goal to the reader: to build a computing system completely ‘from NAND to Tetris’. Secondly, there are no exercises for the reader to practice, there are project specifications that should be implemented by the reader. The projects are self contained, I could implement them in whichever order I wanted. That said, they communicative with each other through well defined interfaces so that in the end, the group of all the projects form a complete computing system.
I’ve red the first three chapters and it has been a joy to read and to implement the projects.
For more information about the book check out its official website.
Tags: books
Posted in Books, computer stuff | No Comments »
December 11th, 2011
For reasons beyond my understanding, and despite their relative ubuiquity, state machines are still largely disregarded by a huge slice of programmers.
Many problems can be modeled using a state machine, the most common one is the maintenance of a database table column which holds some kind of state. Many programmers don’t realize that they are in presence of a state machine and end up throwing bits of code accross the codebase to flip state whenever necessary. They are basically resourcing to a messy ad-hoc implementation of a state machine without realizing it. Personally I’ve been tearing my hair off because of this countless times.
Simply put, if you’re going to use ad-hoc code to flip states among three or more possible values, you are going to make mistakes and ultimately render you codebase unmanageable.
Read the rest of this entry »
Tags: finite state automaton, javascript, state machine
Posted in computer stuff, programming | No Comments »
December 9th, 2011
I have mixed feelings about this camera, while it packed a great set of features for its price, the image quality was notoriously inferior to older A-series cameras such as the A60, A80,A80, etc.
But the big deal breaker was the battery issue. Most cameras would run out of battery (well, not quite, read bellow) after very few shots. This defect affected nearly every unit of this and similar models. So badly that canon pulled these cameras out of the market as quickly as possible. Read the rest of this entry »
Tags: battery, canon, canon a690is, fix, how to, photography
Posted in hardware hacks, photography | No Comments »
October 28th, 2011
Below is a simple (x,y,z) isometric selection I made with the sole purpose of trying out processing.
Read the rest of this entry »
Tags: isometric, processing
Posted in Uncategorized | No Comments »
September 12th, 2011
Every other week I find myself solving some kind of problem that involves matrix operations or other linear algebra concepts. I still have my old TI-89 from when I was a student. It’s a handy calculator, no doubt about that, older people will even call it a luxury. But quite frankly, I don’t know why we should use calculators considering the speed of an average personal computer. Or even a cellphone in case you’re thinking about throwing the portability argument.
Anyway, rants aside, I was bored so I put together a tiny javascript library with basic linear algebra functions.
Read the rest of this entry »
Tags: algebra, javascript, mathematics, ualgebra.js
Posted in computer stuff, Mathematics, programming | No Comments »
September 6th, 2011
Galleria is an awesome slideshow gallery built on top of jquery.
After trying out about 10 different picture slideshow plugins for wordpress I couldn’t find one that would do what exactly what I want. For some reason, none of the plugins I tried was able to display more than one gallery in the same page. I wonder what use scenarios fall into that stupid restriction. Personally I don’t see any point on installing a picture slideshow plugin and use it once, but that’s just me.
So I ended up rolling my own. I googled around and picked galleria out of many javascript slideshow scripts, and wrapped it in a wordpress plugin.
Grab it from github.
Demo slideshow:
Tags: galleria, jquery, plugin, slidesho, wordpress
Posted in computer stuff, programming | 4 Comments »
March 16th, 2011
So… After a great deal of procrastination, I’m releasing a deb package of azulejo with some new window tilling actions.
This is still very unstable/experimental. To take advantage of the new features, you must delete your ~/.azulejorc.js in case you’re already using azulejo.
Here goes the current list of keyboard shortcuts:
Super+2 Place two windows side by side
Super+3 Place a window on the left half of the screen and two on the right half
Super+4 Arrange four windows two by two
Super+R Rotate windows' positions i.e. cycle windows
Super+H Resize and move current window to the left
Super+K Resize and move current window to the right
Super+Y Resize and move current window to left upper corner
Super+U Resize and move current window to right upper corner
Super+B Resize and move current window to left lower corner
Super+N Resize and move current window to right lower corner
Download deb package.
Tags: azulejo, gnome, openbox, python, tilling, wnck, xfce
Posted in computer stuff, Gnome, programming | 1 Comment »
February 17th, 2011
PHP maps filenames into urls, this is a very handy feature and many applications simply use that for all their request handling needs. Practical as it can be, it’s quite limited.
Mapping url patterns into functions or Object methods is simple and easy. I’ll comment as I go…
Read the rest of this entry »
Tags: dispatcher, php, url
Posted in computer stuff, programming | No Comments »
February 6th, 2011
I implemented window rotation on azulejo. This is something that doesn’t come with Winsplit Revoltion, but anyone who used a tilling window manager will be familiar with it.
Azulejo does not maintain a layout (sometimes called algorithm or tilling mode mode) so I had to resource to a bit of improvisation.
Read the rest of this entry »
Tags: azulejo, gnome, linux, openbox, python, tilling, winsplit revolution, wnck
Posted in computer stuff, Gnome, programming | No Comments »
December 19th, 2010
Since my first contact with WNCK library, I’ve been willing to put together a proper solution for all my window tiling needs. After a bit of research I put together bunch of cool pieces of software and glue them together with python.
The result: a tinny application – less than 200 LoC so far – that runs on the background and listens to some defined keyboard shortcuts. Once such a keybind is pressed, it performs some user defined tilling operations.
This is still extremely experimental, yet usable. I tested it on gnome and fluxbox, appears to be working on both without any major problem. The project is hosted at bitbucket, you can download the latest usable release here.
Usage
Run azulejo.py, it will bind the following keyboard shortcuts globally:
Super+2 – Tile last two windows side by side
Super+3 – Tile last three windows
Super+4 - two by two window tile
Super+h – move current window to the left half of the screen
Super+k - move current window to the right half of the screen
Please note, due to a bug, you might need to run azulejo.py twice the first time you use it.
Tags: azulejo, fluxbox, gnome, keybind, tilling, wnck
Posted in computer stuff, Gnome, programming | 2 Comments »