31 Oct 2006

struggle with comment spamming ended?

i've been eternally struggling with spam on this blog. and one thing that has worked in the last 3 months that has stopped spam comments (and possibly valid comments) is the fact i've added a ajax commenting system, that sends the comment to a different URL than what is in the <form> tag's "action" parameter.

maybe it is not worth a spammer's while to decode what my AJAX commenting system. i'd previously had an "elaborate system" to identify spam comments, which was to figure out the link to text ratio in a comment. people rarely just paste a URL in a comment, or even bother to post more than 2 URLs. so the spam detection would work out this ratio and determine whether it is spam or not.

the other thing i tried to add was the "flag this as spam" which i presumed if more than two people flagged the same comment as spam, it would be a good chance it was spam. however, i've not had many people click on those anyway, so that didn't work.

the system is "open source", in that it is part of my on again, off again project to build up a pre-fab blog, commenting, bookmarking app for django. but it has no documentation at all for the moment, but is working fine at least on this site, and two other blogs which will currently remain nameless :)

... Read More


31 Oct 2006

thoughts on freelancing and research

it is probably an open secret amongst friends that i am currently doing some freelancing.

i've done a couple of one-shot consulting jobs here and there for the last couple of years, some from way back during the dot-com boom doing, you guessed it, web design and web programming. recently i've been doing some very interesting programming work.

a lot of people see success as working in a big corporation, because of the illusion that you will progress or that there is stability. but if you think about it, big corporations are probably the worst places you want to work at if there is a recession. they only see head count as just numbers on a piece of paper.

i have got to say, i have been royally tempted by some huge corporations, just on the basis that it will provide stability and a way to meet some interesting and smart people. but the other option is freelancing, which in some ways is very similar to research.

freelancing and research is quite similar.

you are your own boss, except that you have to answer to your clients. for freelancing, that is the people who pay you, for research, that is the grant committee, the paper reviewers, your head of departments.

you choose your projects. for freelancing, you work on projects that take your fancy, of course unless you are going broke, then you'll take on any ASP or VB or PHP job you can get your hands on. if you're in research, you choose the projects that you want to do, but then if your publication list (or grant money) is getting a bit thin, then you apply for whatever is the hot topic of the day and attempt to get some grants (what is sustainable computing?)

you work independently. for freelancing, it means you can work at home, or if you're freelancing for a medium-largish corporation, you may have to work at their offices. it means you have to be quite flexible and solve a wide range of problems from technical work, to managing your finances, career management, etc. it ends up that you have to know a little bit about everything, and i think that is exactly what i like to do. for research, unless you're working at a particle collider at CERN, you'll probably rarely work with more than 10 people at one time, even if they all sit next to you in the same office.

you have to forge your own relationships. for freelancing, this means hopping from one job to another as opportunities come up. most opportunities come from word of mouth, which seems to be quite common in the UK, although i'm not sure whether it is the same elsewhere. for research, you're constantly seeking out people at conferences (by attending or publishing them) and making people notice you. then you have to do work for free and organise conferences, review papers and do all the this charitable leg work just to get your name out there.

so what are the differences between research and freelancing?

in research, you answer to a bunch of stakeholders that have diverse goals, some may want to get recognition, some want to get publications, some want to pad their CV, some just find the work interesting and want to contribute to the field. the fact that there is no common motivation means it gets very complex very quickly.

in freelancing, you answer to who ever is giving you money. there are good clients and bad clients. good clients give you the freedom to explore the best solution for them, bad clients will try to get you to do something their way without understanding from your stand point it is a bad idea. but the loyalties are very clear, and at the end of the day you do get (hopefully) some money for your work.

in research, if you work hard towards tenure, you won't have to worry about employment for the rest of your life, that is what i call real stability -- of course, unless the university closes down or ..

in freelancing, you're always worrying about the when the current job ends and whether you'll find some work in the next month. but i think that mixes it up quite a bit.

personally, i've been lucky to have tried all parts of the pie, working full time for a big corp, working for a small start up, working part-time, working at a university, doing research. i think i've tried a good spectrum of what the working modes there are, but the one i really haven't tried is working for myself.

what is the best (for me)?

i think everyone is different. some people prefer research because they get paid to answer their own interesting questions, like how can we save the world.

i don't claim to be as righteous and selfless as those people, i just want to seek out ways to have fun at work. whether it is getting paid with my favourite programming language, or working on things you'll probably never get a chance to work on again or be part of a project that you can see will actually see some tangible results.

when it comes down to the crunch, it is not about the money, at least not for now. i don't care that my friends are earning 10x more than me, have larger houses than me, have cars that cost 100x more than my bike, etc. the most important thing is that i am spending my time doing something that is interesting and working with people who i look up to.

maybe down the road, i'll follow in my parent's footsteps and become an entrepreneur, start my own company(ies). maybe when i have some more responsibility like a family to feed, or parents to take care of, then i will choose stability.

but the fact i am in my 20s and i still have the opportunity to take risks and find out what there is in the world. maybe doing a phd was a mistake, but the fact is that the lessons learnt there i will never have understood if i was anywhere else. never would i have learnt how many phd's it would take to clean a coffee machine!

ultimately, what is more important, a piece of paper that says you can call yourself doctor and 4 lines on your resume that account for 4 years of your life, or finding out for real what you're good at and what you're not, and recognising the fact that you are not invincible?

... Read More


30 Oct 2006

window smoke effects

i've told a couple of people in real life about disco, which is an app that emits smoke out of the window when it is burning a CD. well, jonathan wight found that they accidentally included the headers to the framework and quickly took the Smoke.framework to us on his own windows and called is SecondHandSmoke.

of course, the guys fixed this, but the knowledge it out there now. now even you can waste your user's cpu time by make superfluous effects when burning. (everyone remember underburning due to slow CPUs back in the 90s?)

... Read More


30 Oct 2006

album art widget 2.9.1 released

well, i relented. i fixed some album art fetching problems, which turned out to be pretty easy fixes and also spruced up the update notification which was a source of embarrassment for me, causing me hardly to update my "appcast" xml file just so people wouldn't not see the monstrosity of the update notification.

the new one is much easier on the eyes and also you can switch it off if you get sick of me telling you that your widget is too old.

Widget Update

as far as i can tell, this release works fine with itunes 7.x, as did the previous release, except the album art fetching was broken.

i've been playing with the new itunes album art fetching, i've got to say, some of the artwork it can get is better quality than the stuff from amazon. but it does store the artwork in a separate directory rather than in the mp3/aac file itself because it doesn't want to have that stutter that happens if you modify a mp3 file which it is playing. i can understand why they did it, but i reckon they should give an option to push it into the file itself.

any how, the artwork still comes through the same applescript interface, so the widget shouldn't have a problem.

... Read More


25 Oct 2006

album art widget and itunes 7

i know there is a problem with itunes 7 and my album art widget, but i really haven't had enough free time to commit to solving the problem.

i'm actually in the middle of rewriting the fetching engine and redesigning the interface to make it more reliable and easier to use, so the question is whether i just knock out a bug fix release and continue on my merry way, or hold off while my album art widget page gets filled up with complaining users.

oh what to do ..

... Read More


10 Oct 2006

itunes persistent ids and 64 bit integers

itunes 6.0.x introduced a concept called "persistent id". this is a reference you could use to identify playlists and tracks and is persistent across the life of your music library.

i had an initial attempt to get the support working for the EyeTunes.framework but my first attempt at doing this failed miserably. tonight, i took some time to look at this again and i've finally fixed it! EyeTunes.framework can now both get the persistent id and also use it to grab playlists and tracks.

the problem with my initial implementation was simply because i thought AppleEvent's double integer corresponded to their long() type. however, there is in 64 bit integer type some apple engineers decided, hey that double float over there is 64 bit, why not use that as storage for a 64 bit integer. and so, if you go into apple script editor and type this:


tell application "iTunes"
persistent id of selection
end tell


that will actually output a floating point number! because when apple script editor sees a 64 bit number, it thinks it is a float. the reverse is even worse, you cannot input a 64 bit number through apple script editor.

anyway, that was part of the problem because i had previously relied on script editor working and reverse engineering the gizmo strings via gdb. however, that didn't work so i guessed what it was, and it turned out wrong.

turns out, after poking at aeve, Bob Ippolito's python apple event implementation that long integers can be alternatively represented by typeSInt64, and thus, i've made the appropriate fixes to EyeTunes.framework and now you have persistent id fun. most importantly, they check out against the ID that is in the "iTunes Music Library.xml" file.

so why does this matter? apparently, the new album art that you can get from itunes is stored locally on your disk with some reference to the persistent id in your music database. and according to some people (i have not verified this), album art you download from itunes is not inserted into your MP3s but stored separately.

anyway, the new code is in the current EyeTunes SVN.

... Read More


08 Oct 2006

brain age!

Brainage
we kick ass. actually, today my brain age is 36 because i have a bad accent i it won't recognise when i say "black". for those who don't know chinese, i'm the one on top!

... Read More


05 Oct 2006

why i like python and objective c.

yesterday on the silc channel, there was some discussion flying around about the virtues of not needing to press the shift key (as i briliantly demonstrate on this blog by not capitalising anything unless it is absolutely necessary).

and i discovered why i love objective-c and python. in python, you don't need to use curly braces unless you're dealing with dictionaries. and in objective-c you use heaps of square brackets that on my US-keyboard doesn't require me to press shift! it's a shift-free zone for me.

let's join anti caps lock movement with the anti shift movement.

... Read More


05 Oct 2006

now i can really find who is using my code

google just released google code search, which is a search engine that just searches for things inside source code. practically zero used for non-geeks.

but now i can really find out what other projects use my code, starting from:

EyeTunes:

Menuet (i know about this one)
bezelTunes (i had no idea)
TotalDistance (what is this?)

ok, not that impressive, i actually privately know more by just otool'ing binaries when i'm bored. interesting that it knows my code is BSD licensed!

PlotKit:

well, not many here, but what the hell, the first entry clearly says "For use under the BSD license" but google labels it LGPL.

What if I do a vanity search, I wonder how many times I'm mentioned?

well, turns out my name is for some reason on evolution's source code. and discovering patches i made in 2002! and i can't even remember when i did this to efsd, but note to anil, see, i remember Christian from somewhere!

oh what fun.

... Read More


05 Oct 2006

now i can really find who is using my code

google just released google code search, which is a search engine that just searches for things inside source code. practically zero used for non-geeks.

but now i can really find out what other projects use my code, starting from:

EyeTunes:

Menuet (i know about this one)
bezelTunes (i had no idea)
TotalDistance (what is this?)

ok, not that impressive, i actually privately know more by just otool'ing binaries when i'm bored. interesting that it knows my code is BSD licensed!

PlotKit:

well, not many here, but what the hell, the first entry clearly says "For use under the BSD license" but google labels it LGPL.

What if I do a vanity search, I wonder how many times I'm mentioned?

well, turns out my name is for some reason on evolution's source code. and discovering patches i made in 2002! and i can't even remember when i did this to efsd, but note to anil, see, i remember Christian from somewhere!

oh what fun.

... Read More