November 23, 2007

SHA hashes and OS X

From my other website, though I would share here too.



A Steve Special this one. Tiger came with sha* digests binaries, but not Leopard. So here is how you can get them back. Insert into your .bashrc:




alias 'sha'='openssl dgst -sha'

alias 'sha1'='openssl dgst -sha1'



# the following lines only applies if you have openssl installed via darwin ports

alias 'sha2'='openssl dgst -sha256'

alias 'sha5'='openssl dgst -sha512'



Usage is simple, for example:



sha1 $file




Cheers,

Steve

November 22, 2007

Personification of Programming languages

The following personifications of programming languages came about while I was discussing various languages with my friends. Basically we started off with a description or sentence about a language, and I personified. In spirit it is the OS-tans but for programming languages



C


"Very fast, good at a few things, sucks at everything else". An autistic girl who is very good at maths. You will also need to keep sharp objects away from her because she is happy to run with scissors, so to speak. Does exactly as you tell her, even if it means grievous harm to herself or others. Needs to be kept in a padded room to avoid hurting herself and others.



C++


"I don't want code in it, but I can't help but like it". A girl who is so pretty you can't help but like her. Unfortunately she is also bat-shit insane, and will scratch your eyes out.



Python


"Very flexible, does everything easily and without complaint, but slow as hell". A girl who is flexible and easy going. Can do complicated contortions easily, an absolute joy to be with. Only thing is she is a bit thick.



Java


"Overtly verbose, unnecessarily strict, but pretty fast". She is one of those girls who you need to constantly buy gifts for in order to keep her satisfied. She will also continually talk non-stop about a variety of things, most of them inane. However she is of average intelligence and comes with a lot of accessories by default.



ASM


"Its like C, only dumber". Well thats it really. ASM is C-like, but even more autistic and a bit more dangerous.



Perl


"Well, its perl". Ah, perl. Perl is a girl like python, except she doesn't speak your language, and you don't speak her language. Over time the two of you have worked out a pidgin language which is a mismush of sign language, latin, french, foot stomping, hip gyrations, eye rolling, tongue poking, and so forth. No one else knows what you and perl are saying, and sometimes you don't even know what each other is saying and can only make wild guesses.



Thats all I have for now, will update when I have more to write :-)





Cheers,

Steve

November 14, 2007

What Checks and Balances?

So the anti-riot laws introduced after a serious riot and subsequent revenge attacks are here to stay, after the Ombudsman's recommendations. But here is the rub though - the government accepted the recommendation to keep the new powers, but rejected the recommendations which would have provided checks and balances. These checks and balances include:




  • the "reasonable suspicion" test for searches of persons performed under these powers.

  • accountability of the police by requiring the police commissioner to report on use of these powers anually



It seems there is a serious flaw in the review process. When the government can chose which recommendations to accept independently of, checks and balances are the first to go out the window. These new laws means one can be searched without reasonable suspicion, and with no senior level accountability.



While we would like to think that the police will use these powers responsibly, the fact is it will be abused, most likely in the name of good. With each passing legislations, our civili liberties, our privacy, and the government's accountability is slowly being whittled away. What is the point of a safe life behind bars?






Cheers,

Steve

November 13, 2007

A Rant about Cherries and Science.

There is a problem with science today. Actually, no. There is a problem with the people of today which makes them easily exploited by  detractors of science.



Science generates a lot of data. Most of that data is easily accessible. It is also  easily searchable. The consequence is that regardless of what you are trying to prove, you are  bound to find some data supporting you. This problem is compounded by the fact data is being continuously collect by ever more accurate instruments. As new data is integrated the context within which data is interpreted broadens. This sometimes renders previous interpretations. As a result, if you look back far enough, you are  likely to find data which supports you.



Similarly there are now more scientists than before, which is wonderful (or is it?  has the % of scientist risen?), but it also means you are bound to find a scientist in a field who lends you support. Often your supporting scientist isn't an expert in that field in which you are making your claims.



All of this means one can easily mislead a lazy and uncritical public (majority of the population) all you have to do is find studies which support your claims, and some sound byte from  a scientist who supports you, and viola! You now have a seemingly credible foundation for your claims! It is easy to pick rotten cherries when there are so many cherries to pick from.



Richard Feynman was once told America Army had great generals. When pressed for what is a  definition of a great general, he was told one who has won five battles consequatively. When asked how many great generals are in the American Army, he was told "a few". When he pressed, he was told a small percentage. He then asked what is the chance of a general winning a battle five times in a roll, if he had 50% chance of winning it. It came out to a few percent. He then asked if there were any generals who won ten battles in roll...





Cheers,

Steve

November 04, 2007

Now you can all look and see how much I suck

Mactorii is now open sourced! GPLv2 for the curious. I haven't cleaned it up at all, which means be prepared to stab your eyes out with rusty fork after viewing the source. James told me not to bother, "cause then you will never release it". So blame James, its his fault/.






Cheers,

Steve