Archive for the ‘Coding’ Category

Doom in Javascript (I’m jealous)

Yes, someone ported Doom to javascript.  I must say I’m pretty jealous of that since I still haven’t had time to get a real grasp of the original code yet (and I got busy with ioquake3).

Three cheers for this excellent hack.

 

Edit:  The code to this program is now long gone. My guess is it’s because the author embedded the graphics into the code which are not part of the GPL licence.

Random Japanese words for Ubuntu

So I spend a lot of time in front of a computer.  This makes it a little harder to find time for vocabulary practice.

I’m not so big on expensive devices that creates a list of Japanese words or kanji – I’m sure there’s an “app for that” – but this little trick I found is free, you can set all the parameters you want, and runs on Ubuntu (and probably some other Linux distro).

Open a console and type:

notify-send こんにちは

This nifty little program pops-up a notification bubble, just like the ones were are used to see for other purposes on Ubuntu. I then create a script that randomly selects a word or expression from a database then set a cron job that runs the script every minute or so.

However, you need to tweak it if you send your message from cron. From a console, notify-send just uses your default X environment variables to display on your desktop but cron doesn’t know that and it won’t display anything. So you need to add your current X display before your script call.

DISPLAY=:0.0 notify-send こんにちは

Feel free to customize your script to your liking and make sure you read the man page to notify-send for more parameters (length of display, box title, etc.).

Happy hacking.

Arduino: a board and a philosophy

I’ve been working at my new job for over a year and what’s really different from all my previous jobs is the close relation that I have now with hardware.  Of course, programmers use computers, which is primarily “hardware” but most of the hardware I use now is built on the spot.  And meeting all the tech guys that actually handle the hardware (both on the building and programming sides) is really interesting: I can peek into one’s microscope to see the boards up close, ask them questions about things that I never learned in programming classes, about compilers, peripherals and all sorts of hacks …  This got me a little more interested in building my own small electonic projects but I didn’t know where to start.

So one of my colleagues directed me to a fine website called Hack a Day, which, according to him, is a good start for an amateur like me.  They have all sorts of posts for beginners to look into, especially a great article on various development boards to choose from.  I heard a lot about the Arduino board, which claims to be “open-source”.  I got curious and read a little about it.  The site also featured this wonderful documentary on the Arduino: Yes!  Open-source hardware exists and it’s something that falls right into the kind of things I’m interested in. This documentary didn’t just give me some bits of information, it explained to me a philosophy; something, I believe, should always be a part of the art of programming.

Now I haven’t really used one yet, mind you. But this got me really interested on getting one very soon.

You can check out the documentary below (and use full screen) or check out http://arduinothedocumentary.org for other viewing / downloading options.

Happy hacking.

Return top