Desi Founder @ Work

Archive for the ‘Programming’ Category

20 Aug, 2009

Filter crappy posted videos from Facebook feed

Posted by: sharjeel In: Programming

Once Facebook’s feed used to be very useful informing you about the updates of friends by their status, . I feel my Facebook feed has been hijacked by redundant and time wasting posted videos. So I wrote a small GreaseMonkey script to filter out posted videos. Here it is:
 
 
// ==UserScript==
// @name [...]

22 Jul, 2009

Attempt Retries decorator in Python

Posted by: sharjeel In: Programming

In certain situations particularly when dealing with networks and distributed systems you’d want your program to retry certain a particular operation certain number of times in case it fails before giving up. For instance your program is trying to connect to a mail server which is due to network connectivity temporarily giving socket error.
The simple [...]

Tags:

23 Apr, 2009

OpenLaszlo: First Impression

Posted by: sharjeel In: Programming

OpenLaszlo is a framework which, officially, is for creating Rich Internet Applications. It takes a higher level markup language Laszlo and converts it into SWF Flash or DHTML. Like many other tools, you are not bound to create only Internet Apps using OpenLaszlo; go ahead if you wanna create your restaurants digital menu card, interface [...]

Sometimes you want your File Transfer tool to map certain folders on your dev machine to remote folders on your different remote machines. Wouldn’t it be great if you could choose a particular file in your project, click it and it automatically uploads in appropriate folder on desired server?
For instance I have an XP dev [...]

Tags: ,

16 Feb, 2009

Python: Copy to clipboard

Posted by: sharjeel In: Programming

I use this small utility function for debugging certain Python scripts, especially those for processing data, e.g. moving some bits of information to Excel.
The idea is pretty simple. Just pass it some information and it’ll be available in your clipboard.
 
import sys
import win32clipboard as wc
import win32con
 
def copy_to_clipboard(msg):
if sys.platform == ‘win32′:
[...]

25 Oct, 2008

Recursion, Misunderstood

Posted by: sharjeel In: Programming

My experience with the Electrical Engineers in academics is that they usually view Computer Science in terms of circuits and details of how things work at the most tangible level. One hazard of using this approach in teaching is that many times you end up with some wrong core concepts of Computer Science. They enable [...]

02 Oct, 2008

django standalone scripts

Posted by: sharjeel In: Programming

Standalone scripts and cron jobs are integral part of any significantly complex web based application. We use them in our applications for health monitoring, mails sending, computing scores and ratings, deferred tasks and job queues such as video processing etc.
To make a python script work which uses django’s functionality, you need to have the required [...]

24 Jul, 2008

Django Subdomains

Posted by: sharjeel In: Programming

We have added a new feature at See’n'Report. It now provides each user with a personal sub-domain URL. The URL maintains user’s profile which lists all the photo reports submitted by the user. For example my See’n'Report profile URL is http://sharjeel.seenreport.com/.
Adding support for sub-domains in Django is simple but has a few catches. It took [...]

19 Apr, 2008

What Lisp & Assembly instill

Posted by: sharjeel In: Programming

My Assembly Programming Language teacher, Belal Hashmi Sahib said in the first lecture of the course, “Assembly is extremely simple. It is so simple that students don’t expect such simplicity and hence it starts appearing complex to them”. Then he wrote MOV AX, BX on the board, explained it and asked if everyone understood it. [...]

Tags: ,

03 Apr, 2008

Secret Weapons for Java Programmers

Posted by: sharjeel In: Programming

Many great hackers and programmers do not consider Java programming language a good choice. The safety features of Java such as pure OO, strong typing etc. force its users to laboriously write lots of classes, declare and typecast variables, call extraneous methods to fetch simple data and puts under a lot of restrictions. Such techniques [...]