Last thing you'll ever read…again
Posts tagged python
A hundred papercuts
Apr 14th
Ubuntu launched the a hundred papercuts project a while a go encouraging developers to fix small annoyances in the OS. More companies/teams/groups should do this.
I’m currently working one day a week at Macquarie and I’m more or less working on papercuts, things that take 1 or 2 days to finish that aren’t critical but will save people a lot of time.
I quite enjoy it. The work is challenging, you get given different tasks each day. The work is fulfilling, you get well recognised by your efforts.
However, I’ve come to realise that unless it’s PERFECT, users will always complain about something. I had to implement a brand new screen today to enable a functionality that involved calling a stored procedure manually beforehand. This could take days and involve sending multiple emails around to get approval. So in a couple of hours I had drawn up a new screen, did some simple tests and polished it up with meaningful helper messages. I showed it to the client and he seemed pretty impressed about the turn-around. BUT. It was missing one particular functionality.
I guess it’s understandable, when you want to get something done it might as well be done perfect or you might as well not do it. Let’s just say due to the way pyodbc (the python library for connecting to DBs) works it does not support return codes from stored procedures. What. The. Fuck. Because of this the stored procedure returns the same value every single time. This means that when they’re running the stored proc manually the DB client throws the dummy, whereas pyodbc is all chillin’. But yes, there is a solution to the problem which is to return a result set by running another query. Argh!
Anyway, that’s my mini rant. I’ll have to fix that up next week.
Oh and my contract came in today. The remuneration is pretty handsome plus we get bonuses each year. Hurrah!
Start of corporate life
Dec 1st
I started working at Macquarie yesterday. Went through an induction where there were team activities, presentations and of course free food. Today, I got told what I would be doing.
It seems easy enough, but like everything, it’s all easy when you first hear it.
I have 3 tasks.
First task is to upgrade an existing permission system. Currently users are allocated various permissions given their role. However, if their role were to change, admins would have to manually remove and add permissions. This worked when user base was small, but in order for it to scale a new system would have to be implemented. I would have to create a profiling system, where each user would have 1 profile rather than several different permissions. The profile will then contain the permissions. This way you just have to change the profile rather than changing a dozen or so permissions. Seems easy huh?
Well, I guess the problem I have at the moment is understanding the system. It is quite monstrous (by my standards anyway, probably small compared to some of the other applications). The code is actually quite easy to navigate, it doesn’t contain any javadoc but is intrinsic enough to understand. Hopefully I can work out how the permission system work by this week. It uses hibernate which is an ORM for java, which is extremely funky. Basically turns DB table rows into objects which you can manipulate directly upon.
Two other tasks that I have to do is replace the webware python framework with another framework (possibly cherrypy) and also migrate the system to unix (as opposed to windows).
I stayed back till 6:45pm today, and it’s only been my second day. It was by choice though, nobody forced me to. I’m also sick so I feel like crap.
[Script] Chatlog to Email Converter Plus! RC
Jun 27th
Today I will be releasing the Release Candidate of my Chatlog to Email Converter Plus!
I added “Plus!” as it is designed for Messenger Plus! chatlogs.
It now supports every form of Messenger chatlogs text or html and also has emoticon support.
Requirements:
- Python 2.6 (preferable, 2.5 should also work but untested)
- Beautiful Soup
- Mozilla Thunderbird
Wishlist:
- Remove Thunderbird requirement and support direct upload to specified imap server
Download:
I’ve setup a google code project for my script. Yes it’s open source!!!
Instructions for use:
- Place all your chatlogs inside one folder
- Place my script within the same folder (make sure the folder does not contain any files apart from chatlogs or images)
- Open up a command window inside that folder
- Type “python chatlog2email.py -p -t” to convert all plain text and html chatlogs to mime format (type python chatlog2email.py –help for advanced usage)
- Once it’s done you shold see a file called “Chatlogs” move that file to <Path to thunderbird preferences>\Profiles\xxxxxxxx.default\Mail\Local Folders
- Open up Thunderbird and drag drop the chatlogs to an email account that supports imap
Easy!
If you have any problems either post here or file a bug report on google code.
If you found this useful, drop a comment or send me an email. It makes me happy
Chatlog to Email Converter RC
May 3rd
Please see this post for updated version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Today I’ll be releasing the RC of the Classic Chatlog to Email Converter
For you to use this you must satisfy the following conditions:
- That chatlogs you want converted must pre-date Messenger Plus 3.0 or whatever version that was released prior to June 2006
- You must have python installed (preferably the latest stable 2.x version)
- You must have chardet installed
- You must install Thunderbird
Todo:
- Threading for even faster performance!
Wishlist:
- Automatic uploading to your email account
I actually have a WORKING unicode supported script for HTML chatlogs, however, I’ve yet to get the emoticons/handwriting pics working but you’ll probably see a release some time soon in the future.
Instructions:
- Move all your pre-June 2006 messenger plus chatlogs to a folder
- Place the script inside the folder
- Double click to run the script
- A file called “Chatlog” will be created
- Move that file to <Path to thunderbird preferences>\Profiles\xxxxxxxx.default\Mail\Local Folders
- Open up Thunderbird and drag drop the chatlogs to an email account that supports imap