Archive for the 'programming' Category
This happens to me all the time, especially when running programs that takes hours to complete.
Start the code
Go out for some tea or movie.
When you come back, you find that the program had decided to piss you off by crashing 2 seconds after you went away from the keyboard.
The amount of cuss words thrown at [...]
Filed under: FOSS and Linux, Python, Tips, linux, programming | 8 Comments
Tags: airtel, kde, konsole, notification, Python, scripts, Tips, twitter
Recently I had to make use of Google’s translation engine to translate phrases at work. Given the lazy big bum I am, I found using the Google’s web UI a bit tiresome to use. I thought “heck, why not write a little jabber bot to make things a bit easier..”. (Agreed, writing a bot is [...]
Filed under: Events, FOSS and Linux, Python, Rants, Tips, programming | 12 Comments
Oh yeah!. With the power of DBus and libpurple APIs it is possible to give your boss the illusion of managing you. Just run the following script (under WTFPL). Tested with jabber accounts in a live office environment .
#!/usr/bin/env python
# By Sudharshan S, released under WTFPL
import dbus
import gobject
import time
class PointyHairedBoss:
def __init__(self, boss_id, source, [...]
Filed under: FOSS and Linux, Python, Rants, Tips, programming | 29 Comments
Tags: comicstrip, dbus, dilbert, im, moronity, pidgin, pointyhairedboss, purple, Python, snippet, wally, wtfpl
Brainfuck is one of those turing complete languages that has no apparent use in the real world. But hey, being very very simple with a limited grammar, writing an interpreter should be easy. So here it is, under WTFPL. The code works (I hope so) with the examples from the Wikipedia article.
#include <stdio.h>
#include <error.h>
#include <config.h>
static [...]
Filed under: FOSS and Linux, programming | 7 Comments
Tags: brainfuck, c, compilers, esoteric, interepreter, programming, snippet, wtfpl
Thinking inside the “box”
About 10 minutes ago, my brain switched from neutral to first gear and started pondering about ways to teach someone how to program (Not that I am particularly good at programming in the first place ).
For example, how would you explain the concept of variables, references, names. etc, which seemingly form the corner stone [...]
Filed under: Rants, programming | 5 Comments