omissis's blog

Subscribe to RSS - omissis's blog

it was a qt weekend

Well not really in the end, since I spent most of the time getting mad trying to integrate libircclient(and some of its flavours) in mah very first qt app, what a hell. But not everything was a pain, since finally I had the opportunity to play a bit with the qt sdk and to refresh a bit mah c++. If you wanna try something new, cool, plain and easy, point yo browser to http://qt.nokia.com/ and download the sdk, I totally recommend it.
Beware of libircclient though, it bites :P

Tags: 

Omifk released

There are some occasions in which I had to write some PHP scripts for different purposes(sitemaps, snmp and/or database data fetch, etcetera) and I' m pretty sure I' ll have to do that again in the future. For all these reasons, today I came up with the conclusion that I don't want to reinvent the wheel every time, so I had tidied up some ideas, gathered a small bunch of files into a tiny framework and voila', I put the result on google code.
Even if it' s an early version I think it could already be extended to support some command line tasks quite easily.
As many of my scripts, it takes some inspiration(as well as some code :D) from Drupal, but this time I also followed PEAR PHP coding convention(although not all of them, brackets on new line after function declaration won' t have my scalp).
If you' re curious to take a look at it, as well as use it or suggest improvements, here you are the coordinates:

http://code.google.com/p/omifk/

Don't forget about Coding Standards

In order to keep life easy, humans established some agreements called 'conventions', which could be seen as a way for simplying some common tasks.
Think about it: we live in a world made of conventions; some of them make sense, some don't, but still. In order not to get killed when we cross the street we all know it's better to wait the green light, as well as in order not to get a cold it's better to wear clothes when we go outside, etcetera etcetera.
Of course almost none of the conventions I can think about can guarantee 100% success, but in the most cases they can save us from some amount of pain and/or time.
So why not using convention when coding as well? I know it' s a topic on which a lot of documents have already been written, but every time you' ll find yourself in the situation where you have to maintain somebody else' spaghetti code, you're gonna think something like "Damm! Why going so dirty? Why didn't you follow those damn easy rules? Do you believe you're a big boy because you put 45 statements in just one line uh?".
As you can imagine this is not the best scenario, so my suggestion for keeping things a bit easier and spread friendship among developers is to read(or review once in a while) the basic coding standars.
You can finde the ones about PHP here: http://pear.php.net/manual/en/coding-standards.php

Some other interesting links:

46 Firefox' features you might not know about

Few minutes ago digging through Twitter I came across this nice article about a good bunch of new features introduced from (mainly)Firefox 3.6. It's worth reading it, so I suggest you to check it out: http://hacks.mozilla.org/2010/02/firefox-46-features/

The epic quest for Fluxbox on Minix 3

Phew, it' s been a looooong and hard sunday. After watching the great talk by Andrew S. Tanenbaum at FOSDEM about Minix 3 I' ve decided I __WANTED__ fluxbox on that OS. Eh, easy said. After a whole day of crazy compiling, fluxbox patching, library faking and tool porting... I didn' t succeed. YET. But I am very close to it. At the moment I solved all the main issues, so the project compiles, I just need to update makefiles to include an external library I included to support locales and I have to solve some pending issues with X11 libraries, after that, it should work. 'Course I also need to verify it compiles back in Linux, OS X and Windows as well as doing the package for packman.
Life' s hard sometimes : |

PHP array helper

Checking arrays all the time sucks. So here they are a couple of tiny functions that' ll help you getting data from an array without caring anymore if there's a value at the given key(which means no errors -and crashes- and the possibility to set a default value in case of miss) . Use 'em without moderation.

Tags: 

Sniffing HTTP

I found a very nice command line shortcut today that helped me sniffing http packet headers on a remote server with tshark, the command-line version of the well-known wireshark:

tshark -i eth1 -R 'http' -S -V -l | awk '/^[HL]/ {p=30} /^[^ HL]/ {p=0} /^ / {--p} {if (p>0) print}'

credits: http://andy.wordpress.com/2008/07/10/sniffing-http/

New site's up!

I' ll start putting new stuff here soon(if I don't have to spend all my time on upgrading D7 alpha every week of course :D) so stay tuned!

Pages