Tuesday, December 25, 2007

What else?




Thanks mom!!

Friday, December 21, 2007

Krav Maga

At the last Prt.sc dinner I was talking about how cool Krav Maga was and how I thought everyone should learn it when I realized that only Andreia knew what the hell I was talking about.


Well, Krav Maga is a personal defense system which originated from Israeli self defense technics and was developed by Imi Lichtenfeld during World War II. The name in hebrew means Combat (Krav) Contact (Maga) which pretty much sums up what's it's objective is... Close, or contact, combat.

Despite it's origin, or maybe because of it, this method now serves as combat training for major armed forces (the SEALS are a notable example) as well as police forces around the world.

If you're in Portugal, you can go to the Portuguese Krav Maga Federation site, or follow this blog to know more about this self defense technique and were you can learn it (by the way, I highly recommend you trying to catch a Paulo Pereira's class). If you're not, and most *my* visitors tend not to be, well try googling for your local Federation or start here.

Here is a little demo Richard Douieb gave at Bercy's International Martial Arts Festival in 2003. Enjoy.


P.S : kudos go out to eduardo, who at 8, is the best student I ever had.

Wednesday, December 19, 2007

Yet another Mail.app bug

I don't like to repeat myself too much, but it seems that Leopards Mail.app fails at math.




Unless of course 4294967294 is the new zero.

Tuesday, December 18, 2007

Wanna buy Microsoft for 1 Million Dollars?

Yes you can! And you know you want to!

But be sure to read this first.

Friday, December 07, 2007

News of the world

What an exciting week this has been!

We started of with a native Mono release for OS X, which you can read more about at Miguel's blog.

Then it was Netbeans 6, which is IMHO the best IDE for Ruby and Rails development and it's yours for free. Here.

And today we can rejoice at the launch of Rails 2.0.

Hurray for us!

On a side-note, I just wanted to share with you a conversation I had with a mono hacker regarding the look of Mono on Mac OS X, even if in a somewhat twisted way for better reading :

Me > People are complaining it doesn't look "native".
She > Well, there are two answers for that:
Novell is currently concentrating on making Mono on the Mac a stable development platform. The System.Windows.Forms layer has support for theming and we could accept contributions for a Quartz theme that uses the HIToolbox APIs. Or, in a shorter version, we accept patches.

And then she said goodbye with the funniest tagline I've heard this week :"nothing like a linux forum to complain about how a windows technology looks on a mac"

Wednesday, December 05, 2007

Leopard Tech Talks

Last monday we've had the first Leopard Tech Talk in Lisbon, but much to my regret I didn't made it.

That's not at all unexpected since I'm having so many "shitty work days (tm)" but what's surprising me the most is that even with such a loyal and committed Mac fan base here, I haven't read a single post or e-mail about it.

Did anyone go? What was it like?

Friday, November 30, 2007

f*ck it!

NIN's remix site is up.

Downloading 15+ years of remixes a registration away!

Thursday, November 29, 2007

5 Favorite Movies? Hum... You bet!

I've been seeing a couple of bloggers posting about their favourite movies of all time, and I felt like doing my own "best of" list. The principle is easy: name your 5 favorite films of all time, say something about them and if possible link to their official site or something.
I've also added a couple more rules: Wait until every other blogger in the world have done their own list; Try not to judge their intellect on how bad their choices generally where.

So, having said this, here it goes but in no special order:

* Animatrix
The whole series. All 9 episodes. Loved them and I honestly think it was the best thing coming out from the matrix.


* Fight Club
Pure genious. The book is great, but Edward Norton and Brad Pitt together are better. Let anarchy rule!


* Ghost In The Shell
This one actually changed my life. Very seminal. And the artwork is so inspiring.


*American History X
Again Edward Norton with a great role as a repenting skinhead. Both entertaining and touching. The scene that shows Edward's character grinning as he gets arrested after murdering a man is so scary it definitely makes up for the predictable finale.


* Natural Born Killers
This is how a legend is born. Although Tarantino didn't direct this film, it was is big success as he was the writer. Best Soundtrack ever, courtesy of Mr. Reznor.


* Trainspotting
Here I must concede that the movie lacks in comparison to the book. Still a great movie with a message that changed my mind about what I wanted out of life.
"Choose life. Choose a job. Choose a career. Choose a family. Choose a fucking big television". Check, check, check and... check.


* Deconstructing Harry
Definitely one of Master Allen's masterworks. If you don't laugh trough it, you may be brain-dead and not realize it.


*Brother
Takeshi Kitano, or Beat Kitano as he referes to himself writes, plays and is the meanest yakuza in the world. Ever.

Wednesday, November 28, 2007

A movie with substance

Every so often I get to see a film that touches me.

It happened recently with shortbus which made me laugh hysterically and this weekend again with Control, a film by the photographer Anton Corbijn.

Corbijn's previous experience with a camera was best known as a music video clip director, with some great bands like Depeche Mode and Red Hot Chili Peppers (Give it away know!) unless that is, you happened to catch his short film "Some YoYo Stuff", about one of Reznor's favorite artists, Captain Beefheart.

I could go on and on about how much Joy Division meant for me or how I and Glen Matlock both got expelled from would-be great bands for dancing to a different beat, but that ain't too much to the point.

The film in it self is heart touching as it tries to properly tell the story of Ian Curtis' Division rise and early demise, and as it would be expected from Corbijn's previous body of work, how the photography is amazing. That isn't my point either.

My point is this: If you have a heart go see this movie and feel it being touched from a distance by a genius.

Thursday, November 22, 2007

out on safari and back again

And some people still ask me why I like Firefox better... You know, 75% of my visitors use Firefox. So should the rest of you.


Thursday, November 15, 2007

prémios codebits (edit III)


Prémio mais votado pelo publico
sapo frogger - Pedro Cardoso
(com as minhas desculpas pelo erro.)

Prémio Ideias
bookworms - Pedro Sousa

Prémio Remix
sapo boavida - Luis Rei e Samuel Martins

Prémio Geek
Bruno Pedro


ei esta malta é (quase) toda do Prt.Sc !!!!!

Parabéns a todos!

...e o resto já não ouvi. Já só tinha ouvidos para os Wraygunn !

Half backed apple

Ok, so the portuguese version of Apple Store is up, some might say not a minute too soon, but not me.

I mean, either Apple entered the Web 2.0 bandwagon of "release soon, release often" or someone should get their ass kicked. What the hell is up with this 3 language web page?

Do you speek Spanporglish? I didn't bother looking any further. That was quite enough for me.

Tuesday, November 13, 2007

An ice cream that creamed a car

This is a somewhat old story that I've read some time ago. It came up today in a conversation I was having with some co-screenies.

I had to do some googling, but was able to find a good enough recount of the story. Read it here.

toad codebits day 1 - random thoughts

Well, in and out of the first day of Sapo Codebits, or Toad, and a few thoughts sprung to mind.

I'm gonna do this the old school way of dividing in a The Good, The Bad, The Ugly sort of way, so..

The Good :
- Getting to know fellas like Diogo, Luis, the segway dude, Samuel and the lovely Mono Hacker, and meeting up with "the" PHP Man , the Python Evangelist Extraordinaire, Franc and the hacker behind some of the funniest storys I've heard and of course, the geekiest guy I know Cafonso
- Mike Culver's Presentation. That was what I was there for.

The Bad :
- The Wireless bandwidth available.
- The food.
- Did I mention the low bandwidth (well, the codebits page is kind of remeniscent of a heyday of 16k modems, but come on!!)

The Ugly :
- PT's Pulso app.
I mean, the app/system in itself looks great and seems to be a wonderful piece of enterprisey software, but PT taking advantage of Open Source Software to build a great product and then selling it? What are they giving back to the community? Bug-fixes? Is that enough for such a big company? Shouldn't we expect a little more? Ok, this is just one more reason why I don't like PT, Sapo or any of the PTM companies.

Final verdict:
- If you were there, probably you had fun. If you weren't ,don't feel too bad. It's a well over hyped event.

I'll be back tomorrow, and hopefully I'll be able to catch up again with some of the folks I've met today and be able to see some more presentations.

toad codebits day 1

Well, it seems that I made the cut after all, but I only managed to get here some 30 minutes ago.

Not all is lost, I still managed to catch Mike Culver talk about Amazon WebServices, namely S3 and the amazing EC2. As soon as I'm able I'll post an update about the talk itself and my first impressions.

Stay tuned.

Saturday, November 03, 2007

Toad CodeBits

We're just 10 days away from Toad CodeBits.



This promises to be the biggest gathering of 'tuga* code monkeys this year and I'm looking forward to being there. Although, come to think of it, I don't know if I'll actually make it. The thing is, it seems that you have to both register for the event and then make some sort of announcement and hope that you make the final cut.

That last bit seems to be a problem for me, 'cause I really don't like Sapo (the company, the search engine, the portal, the....) at all. But since I have to admit that I would really like to be there, here it goes....

If I manage to get in, I'm looking forward to hearing Mike Culver from Amazon, Marco Gonçalves (on the BSDs) and hu... wraygunn


* 'tuga is slang for Portuguese.

Wednesday, October 24, 2007

Abertura Facil

Afinal não sou o unico a ter um problema com embalagens de "abertura facil".

Tuesday, October 09, 2007

Freedom (I still think this is the end of the record industry)


08 october 2007: big news
hello everyone. i've waited a long time to be able to make the
following announcement: as of right now nine inch nails is a totally
free agent, free of any recording contract with any label. i have
been under recording contracts for 18 years and have watched the
business radically mutate from one thing to something inherently very
different and it gives me great pleasure to be able to finally have a
direct relationship with the audience as i see fit and appropriate.
look for some announcements in the near future regarding 2008.
exciting times, indeed.
posted by trent reznor at 10:45 am.


More information on the usual place

Wednesday, October 03, 2007

FASTA, betta, more

My girlfriend's sister asked for help. But all she got was a 16.

The purpose of this script is to get a file(name) as a first argument, a regexp as a second argument and then search trough the file and print out the whole sequence where any of the possible regexp values are found, being that the searched sequence itself must be identified with "<>" symbols and then do a little basic math with the elements we've found.

To try this out, save the following as (for instance) sequences.txt:

>50c's and 50t's
cccccccccccccccccccccccccccccccccccccccccccccccccctttttttttt
tttttttttttttttttttttttttttttttttttttttt
>10G's and 90A's
GGGGGGGGGGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>A random sequence
ccagtcctgtctaaggactttggttcatgcgttaatttcggttagccagtggcgcccacg
taacaaagtgcgaccgacctgcttccatagcattgaaatgtccttgattggagattttac
gcaggaggactgataagttcgggtctgaattgatgcagcgaacgttcatccaatactcag
acttgcactcagtcg
>A second random sequence
cgcatgacggccctcctcgacggttcattaaccttgcacaccaactgttcctcaaccgat
ctggtgtctttctcacttacatagcagttgctgtaccatttgatgggaacccgagatcac
cgggttatcgcgggagtttattccgaattgttctcggaaatgtggcgtcggcttgaattg
ggaataatacggatcttgacaagcacgatttcatccacaatgcggcacgagtaatcccct
tctggaaggatgcagaaaggacatatacaatgagctagccacgtggcgcataacgcagct
tggttagaaactaaatctatacaggaagatacagaatgggaacagtgtcgctcagtctag
ccagctagatccgcctttagtcgaccttaggggtaaggca

And the below code as scripty.pl:

print "\n\n *girfriends_sister_school_id* \*girfriends_sisters_friend_school_id*\n\n";
print "filename:\n";
$filename = ;
open(TEMPFILE, $filename) or die("Cannot open the file $filename");
print "Insert the regular expression to find:\n";
chomp($regexp=);
while () {

if ( /^>/xms) {
$paragraph = "";
$paragraph_head = $_
}
if ( /^$/xms) {
push @paragraphs, $paragraph;
} else {
$paragraph .= $_;
}
}
push @paragraphs, $paragraph;
foreach (@paragraphs) {
while ( $_ =~ /($regexp)/gi) {
$expressions{$1} += 1;
}
}
foreach $key (keys %expressions) {
print "\n\nPattern = $key\n";
foreach (@paragraphs) {
if ($_ =~ /$key/) {
$paragraph_with_patterns = $_;
$total = length$paragraph_with_patterns;
$counterA = 0;
$counterC = 0;
$counterT = 0;
$counterG = 0;
if ($key =~ /a/){
while ( $paragraph_with_patterns =~ /a/gi) {
$counterA += 1;
$sum1 = ($counterA/$total);
}
}
if ($key =~ /c/){
while ( $paragraph_with_patterns =~ /c/gi) {
$counterC += 1;
$sum2 = ($counterC/$total);
}
}
if ($key =~ /t/){
while ( $paragraph_with_patterns =~ /t/gi) {
$counterT += 1;
$sum3 = ($counterT/$total);
}
}
if ($key =~ /g/){
while ( $paragraph_with_patterns =~ /g/gi) {
$counterG += 1;
$sum4 = ($counterG/$total);
}
}
$paragraph_with_patterns =~ s/($key)/\<$1\>/gi;
print "$paragraph_with_patterns\n\n";
%sum = ();
%sum1 = ();
%sum2 = ();
%sum3 = ();
%sum4 = ();
if ($counterA >0){
%sum1 = ("A", $counterA);
}
if ($counterC >0){
%sum2 = ("C", $counterC);
}
if ($counterT >0){
%sum3 = ("T", $counterT);
}
if ($counterG >0){
%sum4 = ("G", $counterG);
}
%sum = (%sum1,%sum2,%sum3,%sum4);
foreach $key_id (sort hashValueDescendingNum (keys(%sum))) {
$div = ($sum{$key_id}/$total);
print "$key_id = $sum{$key_id} \/ $total = $div\n";
}
}
}
}
sub hashValueDescendingNum{
$sum{$b} <=> $sum{$a};
}
exit;

Then run perl scripty.pl . Put sequences.txt as the file and a[c|t]g as the regexp when prompted.

I had alot of fun doing this wich is a good thing since I didn't get paid.

And no, neither bio::perl, nor any other module for that matter, were options.

Finally, a major thank you must go out to sab for the priceless (as in: he didn't get paid either) help.

Tuesday, October 02, 2007

::1

This is my new home. I won it in a City contest.





As another geek has said before, the only hard thing to do when moving to a new 127.0.0.1 (or ::1 in IPv6) is dealing with the gas company. What a bunch of pricks!

Well, anyways you're always ...

Tuesday, August 14, 2007

that's cool

Quicky:

Are you using OS X to develop the next big Rails app and need ImageMagick, RMagick and friends?

Well, just point your browser to rubyforge and download the rmagick-osx-installer package, unzip it and read the fine manual. If you have all the pre-requisites, "sudo run" the installer script and then... go out for a coffee.

When you're back you'll have the following log in your terminal windows:

libpng was installed successfully
libjpeg was installed successfully
ghostscript was installed successfully
ghostscript-fonts-std was installed successfully
FreeType was installed successfully
libwmf was installed successfully
ImageMagick was installed successfully
RMagick was installed successfully
Removing rm_install_tmp directory...Done

That simple.

Thursday, August 02, 2007

Rediscovering the desktop

As you might have noticed, I've been on a rather long break from my blogging activity, and again this was due to my Mac being broken. Again.

It's not like I didn't have a replacement (my old trusty Asus M6N), but as I've said before, i get depressed when my Mac brakes. And it just happens oh so many times.

Anyway, the downside, apart from the depression bit, was that I missed the opportunity of ego-blogging about the brand new Ruby-Lang Portuguese site .I'm very proud of being a part of the amazing team behind it, and sincere kudos must go out to Emanuel and Franc.

On the upside I had the chance of rediscovering Linux on the laptop!
I'm lucky that my Asus is a pretty linux-compatible, but with the new Ubuntu 7.04, everything just works. That includes wireless, the extra (media) buttons, the compiz powered desktop effects, the works.

Now, I've been known to prefer Suse/Novel over any Debian based system for users and user-grade hardware, but Ubuntu has been making such an extraordinary evolution that it has (for all that I care) become the de facto distro for desktop use. It just gives you roughly 70% you'll need from the first boot, and the rest you'll get with Automatix. For a little more specific usage needs, the excellent Aptitude app will do the trick. You'll never get so much for so little!

Anyway, here's a little list of apps I've been (re)discovering:
Aptana + RadRails (Netbeans, eat your heart out!. Thankfully its cross-platform);
F-Spot (will give iPhone a run for its money any day);
Songbird (think iTunes minus clutter);
Gnome-Launch-Box (it's a Quicksilver clone, gets the job done);

And a list of what I miss:
Integrated Dictionary just a shortcut away;
Textmate (it was growing on me...);
Dashboard (what? I love eye candy...);

That's not so bad is it?

Tuesday, July 03, 2007

Making the enterprise see red - part I

Ruby trough Rails has been a poster-child for the so called web 2.0, but in the enterprise level the adoption rate hasn't been all that remarkable.

Rather than go trough an extensive diatribe about how adoption rates in the enterprise for just about any open source technology is always necessarily slow, because no self respecting OSS programmer plays golf, I'll just list some of the perceived weaknesses and shortcoming usually attributed to Ruby.
- Contrary to Perl, it doesn't come installed by default on just about every Unix-like OS;
- The treathing model used is week;
- Rails doesn't scale;
- It's just a fad, and it will go away before it matures;
- Poor Unicode support;
- No single good IDE and Text Editors are soo 80's;
- Nobody wants to learn yet another language especially when there is close to 0 employability for it;

While most of these are (at least to some extent) true, there are many projects that aim at overcoming them. And Ruby itself is still just version 1.8.6 at this point.

One such project seems to be catching enough wind behind it so that it could drive Ruby into mass (wishful thinking here...) adoption. JRuby.

Now, one might expect that the "J" would stand for Japanese, but remarkably it stands for Java. Isn't that ironic? Ruby is sometimes hailed as "What programmers should be using to still have time for a personal life" contrary to Java's "Write once. Then again, Just one more time... Ok, call your mom and cancel dinner" motto.

Jruby (which just recently reached the 1.0 mark) is a pure Java implementation of Ruby, and it's developed by Thomas Enebo and Charles Nutter with Ola Bini also being credited here and there, and, to some extent, sponsored by SUN. It aims at being more that just another implementation of Ruby (not that there are many...) which means that while still programming in pure Ruby, a coder can now enjoy the following added benefits:
- Java's scaling capabilities since Ruby code now runs inside a JVM which means parallelization in multi-processor setups ;
- An optimized Database connectivity with JDBC;
- Same level of Java's Unicode support;
- Garbage Collection handled by Java. (don't we all appreciate that?);
- A great IDE (Netbeans 6. Packed with all typical goodies plus code completion and a Swing Form Builder, it just might be the VB6 of the XXI century), plus a pretty good one (XCode + a hack);
- Access to those millions of lines of code in Java classes;

And last but not least : Integration. This is the one that's going bring it home.

With Jruby and a rails plugin called GoldSpike (previously rails-integration) we're a simple rake command away from turning any Rails app into a standard WAR file, which in turn can be deployed in either Tomcat or Glassfish or presumably just about any other applet container.

What this means is, in an enterprise environment where you have all these layers (think MVC in different LAN segments) set up and where any innovation is foreseen as potentially disruptive if not outright forbidden, we can easily introduce Ruby and Rails code, and from a manager's point of view its a win-win situation where the developers get things done faster, and the implemented structure is maintained without any hiccups. And they still get Sun's level of support.

In parts II and III I'll be showing some code and examples of rapid deployment with JRuby.

Monday, June 11, 2007

The Automator

I've always been one to dislike repetitive tasks. I think it's partially because I find it hard to concentrate for a long time on tedious chores and partially because I fear getting carpel tunnel syndrome.

Just this weekend my "disability" was put to the test. I found myself going trough 8 GB of assorted files (note to self: do _not_ label zipped backups "stuff"...) trying to find a couple of pictures I wanted my girlfriend to see. I didn't know the filenames (note to self: rename the pictures I like because PIC00731 or DSC00239 aren't real _names_) or the time stamps.

Know, if I was "doing" Windows, I would pull out one of my 50+ lines VBS's, but that wouldn't get me no lollypop. I might had tried a bash-slash-perl trick to move only a couple of selected filetypes onto a new folder, but that wouldn't get me too far either since I would still need at least one more action to open all of them. And my girlfriend would leave before waiting for me to get the script right....

The solution ended up being my new favorite Mac OSX app. Automator.

Automator comes bundled with OSX 10.4 and basically it's a tool that provides you with a way to visually set up a group of actions that get a specific job done. And they call it a workflow, which pretty much sums it up.

Although you would use it to build a program, the programming background needed to use is zero, and the learning curve is neglectable.

After analyzing my specific needs, I came up with this list of necessary steps:
1 - specify the main folder;
2 - get the folder contents, repeating for each of the subfolders;
3 - filter the specified finder items by file type;
4 - decide what to do with them, in this case, I wanted to open the images in Preview so i could see them and find the ones I really needed.

And this was what I got:

Not bad huh?

By selecting and dragging the specific actions from the action list on the left to the right side pane and then changing a couple of options I was done! I saved it as an Application, runned it and 2 minutes later I was seeing the images trough Preview's Slideshow feature.

Wednesday, June 06, 2007

tiananmen e o "massacre" de berlin. em perspectiva


Fez esta semana anos que estudantes e outros bebados se juntaram numa manifestação sem precedentes na praça de Tiananmen para gritar pelo benfica e lutar pela democracia na china. Também fez anos a Angelina Jolie, mais merecedora de manifestações e apelos, mas muito menos interessante enquanto fenomeno social.

Em Rostock esta semana houve (uma vez mais) confrontos numa manifestação organizada como protesto anti-globalização, o que prova que quase vinte anos depois e a quase meio mundo de distancia, um pais moderno e democratico também consegue atiçar a policia sobre jovens manifestantes e tudo em nome da defesa daquilo em que acreditam. Se não é a ordem e disciplina chinesa, então que seja a democracia capitalista ocidental.


Este semana morreu um blogger, um fotografo, um amigo, um professor, um ser humano de fazer corar de humildade qualquer palerma que se ache com alguma piada ou que julgue perceber alguma coisa sobre alguma coisa.

Não há ninguem que tenha frequentado o IADE (ou que conheça alguém que tenha frequentado o IADE) que não tenha ouvido falar do Prof. Roberto.

A sua perda é irreparavel, mais de 600 comentários no seu ultimo post e a multidão no seu velório ontem á noite dão-me razão. Muitos mais nunca o esquecerão.

morabeza roberto!

Saturday, May 26, 2007

On job offers and career management pt II - The end is the beginning is the end

Well, after much consideration and hearing lots of opinions (which I respectfully considered and discarded) I've decided to stay at my current job for now.

You know, sometimes it's not just about the money for me. I would miss the friends I've made (I can't believe I keep calling my coworkers "friends") and I would miss Solaris. And AIX, and Informix and Perl and... and to be completely honest, the offer wasn't all that you know? I mean, I actually heard the words "We only sell Microsoft technologies because if we didn't they would badmouth us to our potential costumers" and _that_ is something I want to stay away from.

And yeah, the title of this post is a reference to "batman and robin", because that's how I feel sometimes when I'm working with likes of "no-time-to-blog"er, penantes, "still offline" sab and "blogui? isso não é da SUN não" alex.

...And I _do_ mean the fellowship part, not the homosexual connoted male in tights thing, ok???

Thursday, May 24, 2007

+1

Tuesday Penantes switched.

I'm counting the number of "converts" I've brought into the light ... does anybody know how many I'll need so I get a free toy from Steve?

Tuesday, May 15, 2007

Some people are just... different!


"As the climate grows more and more desperate for record labels, their answer to their mostly self-inflicted wounds seems to be to screw the consumer over even more. A couple of examples that quickly come to mind:

* The ABSURD retail pricing of Year Zero in Australia. Shame on you, UMG. Year Zero is selling for $34.99 Australian dollars ($29.10 US). No wonder people steal music. Avril Lavigne's record in the same store was $21.99 ($18.21 US).
By the way, when I asked a label rep about this his response was: "It's because we know you have a real core audience that will pay whatever it costs when you put something out - you know, true fans. It's the pop stuff we have to discount to get people to buy."
So... I guess as a reward for being a "true fan" you get ripped off.

* The dreaded EURO Maxi-single. Nothing but a consumer rip-off that I've been talked into my whole career. No more.

The point is, I am trying my best to make sure the music and items NIN puts in the marketplace have value, substance and are worth you considering purchasing. I am not allowing Capital G to be repackaged into several configurations that result in you getting ripped off.

We are planning a full-length remix collection of substance that will be announced soon."


Posted by Trent Reznor, as seen on : http://www.nin.com/tr/default.aspx

Saturday, May 12, 2007

FARM project (*)

You might have heard me drool about having helped implement the first Rails app at work.

If you read this blog regularly, you might even know that this was a project done in collaboration with penantes.

Now, what has been missing is an overview of the technology used and a brief explanation thereof.

The project itself is little more that a web-based front-end to penantes's voodoo-like perl scripts and it's purpose is solely of giving interested parties a better view of the spell's script's results.

Well, we had an old Dell Poweredge laying around, so that was the machine used. It had an ancient implementation of Red Hat 8 (actually. I think it was vd who installed it) so that had to go. Not so much because it was old, but because it was Red Hat. And no noticeable services running around so a clean install it would be.

For OS we chose FreeBSD. We wasn't our first choice, but Ubuntu didn't correctly recognize the SCSI controllers and the openSolaris DVD was well...a DVD, and Debian 4 was late. The machine at this time didn't have a working network connection and only a CD drive for media. Since FreeBSD is a distant cousin from both Solaris and Mac (I just had to bring this up) it was the next best thing.

The install was easy enough and the software available was pretty much all we needed.
For web serving we have Apache, for database we used Mysql, and has i've said, we used Rails for development. And apart from configuring Apache with fcgid which is a hole new post subject, everything runs just fine for now.

Recommended reading Rails on FreeBSD wiki page.

(*) in case you didn't notice....
FreeBSD
Apache
Rails
Mysql

27th birthday

My favorite birthday presents:







Wednesday, May 02, 2007

i can't do what???

09F911029D74E35BD84156C5635688C0

or if you prefer...

0x09F911029D74E35BD84156C5635688C0

Sunday, April 29, 2007

On job offers and career management (edited)

Recently i've been reading a fellow *'s musings on job searching and expectations and focus on career management, and although I mostly agree with his opinions and objectives, I can't stop but wondering if I (or most people, for that matter) can afford to be as straightforward as he seems to be.

In my career, and up until some 6 months ago, I've been mostly involved with Microsoft products and technologies. I've developed, administrated and and maintained applications, databases, systems and networks. However, Linux and Open Source in general have been my hobby and, i dare say, passion for the last 8 years or so. Cutting a long story short, in a Windows world I'm (somewhat) highly valued, but in a Unix\Linux context, I'm bound to be considered a junior staff member for a couple of years more.

Now, if the job title doesn't really bother me, the difference in wage is staggering. Enough to make me consider a jump back.

All this is only important when I'm faced with a difficult decision like I am right now.

I've managed to get a good deal of respect and appreciation on my current job, I've been involved with some very interesting technologies and have been given the chance to use Open Source technologies and am currently in the process of finishing up my first professional (cof...cof...) Ruby on Rails application, but the wage is ridiculous.

On the other hand, I have an offer to get back to a development only a sysadmin only position, but using .Net and other mostly Microsoft technologies. The pay is good, the challenge is well, challenging and the work environment as far as I could gather so far is very good. On the downside there will be plenty of grey suits and ties in my future. And a senior colleague who thinks rails is amateurish. But the boss says I can use whatever technologies I see fit to get the job done. And they both actually read my resume. And want _me_ to work for them.

Well, as you might have guessed the wage is the only thing that's making me consider the change, and the love for open technologies the only thing thats keeping me back.

In a ideal scenario I would refuse the change hands down, but these are not ideal times, so I'll have to sleep on it and hope for the strength to make the best decision.

Well things change quickly when you let them. There was a sysadmin position available too, and although I refused the developer job, I'll most likely be accepting the later. Stay tuned....

If only we had known earlier...

As seen on The freedom blog...

"Linux hackers! They aren’t smart enough to scare Bill Gates… and they certainly aren’t smart enough to scare Jesus. Did you know that He protects this website too? I prayed it, and it happened! All attacks rebuffed! All sin kept far from these pages.
Thank you Lord!"

By the way, did you know that if you use Ubuntu Christian Edition you can stop daemons with the command "Exorcize!" ? And that you can use "bless" whenever a program fails to start? Just beware not to issue a "chmod 666" , or you'll go to hell!!

Oh @wathever, forgive them, for they are funny. Seriously, I thought that sarcasm was beyond americans.

Thursday, April 26, 2007

What caught my eye this week

Brand of the year:


Google, witch you know already so I wont link to their site, was recognized this week as the the world's top-ranked brand.

In only 10 years, Google's Sergey and Lary managed to top decades old brands such as General Electric, Coca-Cola or even IBM.

Entering a realm occupied by only a few other companies whose brand became a synonym with their product (think Gillette) Google is an example of entrepreneurship. If you doubt it, you can always google it up. :o)

Blog of the month:


Following a tip from a new friend I've been enthusiastically reading a blog from a fellow rubyist. It's called Ruby on Windows, and as you might guess it's about using Ruby as a scripting and automation tool on MS Windows OSs. It provides some great examples and code samples witch got me thinking about replacing my vb scripts at work.

This is a great example of how to integrate an open technology with a closed system.

Wednesday, April 18, 2007

Year Zero. A final surprise?

Year Zero, Nine Inch Nails new album was officially released today. And a few more surprises came with it.

After hearing it on repeat for about 3 hours, when i finally removed the cd from my macbook, the CD had turned from grayish into white revealing some binary code that (after some googling) "I" discovered could be translated to a link to another secret site!

And i though that it was just my macbook going _Extra_ hot this time!!

This is the beginning....

Tuesday, April 17, 2007

Thursday, April 12, 2007

Old School To-Do List

I figure that if I write down my tasks, I'll be forced (by punishment of public embarrassment) to _really_ do them. This will hopefully get me out of LMP(*) and into GTD mode.

To Do:
- Install Edubuntu on a old iMac G3 to offer as a birthday present to my 6 year old cousin;
- Finnish reading Everyday Scripting with Ruby;
- Create a script to automate data extraction and transformation and creation of Excel graphics at work;
- Replace a myriad of Judoscript, Groovy, bash and Perl scripts with well documented Ruby scripts at work (It will look good in my resumé.. "the guy who introduced #a banking institution# to ruby");
- (finally) Take the admission exams for College;
- Help in the translation of www.ruby-lang.org to Portuguese;



(*)LMP .: Last Minute Panic - the major driving force for lazy creative geeks :o)

Thursday, April 05, 2007

The begining of the end (of record labels)

Nine Inch Nails made their _entire_ album available on their website!
Even the almighty RIAA can't stop them now

Art is resistance!

Perl Tech Meeting

Yesterday I went to my first Perl Tech Meeting and I can't stress enough how geeky those guys are.

Having lots of easy going, funny intelligent people talking about something they like is always fun, but this was actually very informative, since there were some tech talks that covered areas such as better debugging, replacing bash with perl, using C to improve Perl scripts benchmarks (dam, this guy was awesome!).

I specially enjoyed meeting Francisco Cabrita hearing Miguel Duarte and José Castro and some others whose names elude me right now.

Anyway, thanks to SAB(offline for _way_ too long) and Penantes for the invite.

May the Camel be with you!

Wednesday, April 04, 2007

Free tech support

One of the nicest things about being involved with customer support is being able to hear in first hand _real_ users fears and doubts.

Today i received an e-mail (at work) from a customer contemplating "migrating to a Ubuntu / Firefox solution" (his words) from Windows / IE and he was wondering if it would be safe to use our on-line banking service.

Yes it is. The only side effect is that the web app will work better in Firefox.

And since I am in a good mood, I will send him my personal e-mail for any tech support questions he might have in his migration.

It feels good to help a customer. :o)

Long time no see

I was forced to observe the shutdown day for over a week (not really, but i'll get back to that) because my Macbook died on me.

It's never a good experience to be away from your mac, but to deal with the Apple support around here one must be prepared for the worst.

From telling me that the customer service guy wouldn't reply my e-mails because he had personal problems (hey that's funny,i have a personal problem too! MY MAC IS BROKEN! what a coincidence) to taking some 20 phone calls to finally get some answers (I have witnesses. And they're still laughing) i've seen it all with these guys.

If we consider that a large part of Apple sales come from mac owners showing off the “superior hardware and the user experience a mac gets you” to their friends and coworkers (I myself am responsible for at least 4 switchers over the past 6 months), one should expect a better level of emphasis on customer satisfaction right?

Thankfully I still have my trusty Asus laptop that managed to deliver the daily fix of web surfing, and getting most of my work done so I really didn't had to be offline for so long. I was just too negative to write anything useful.

Anyway the XVI Jornadas de Informática an event hosted at UBI went by, and this year at least I heard something about what happened there. In Ruby in Portuguese website there are even some of the presentations given there available for download.

My humble 2 cents however would be to manage to get some more publicity before it happens.

While on the subject of great events happening in this little
fascist square of dirt by the sea, the fifth national encounter on Open Technologies will be happening in Lisbon on the 19th, and although the organization is hosted by Sybase and seems to be very professional and extremely interesting, my favorite Solaris Admin - slash -Farmer boy already managed to find a bug on the event page.

Also, today I'm going to my first Perl Mongers tech meeting and I'm hopping that I'll be able to learn something from those guys, 'cos the Perl I know wouldn't move the proverbial mountain.

Thursday, March 22, 2007

North American Scum

Não. Não é o ultimo single dos LCD Soundsystem.

Sou declaradamente de esquerda, mas não sou anti-americano. No entanto não resisti a partilhar esta perola que me enviaram, mesmo quando eu achava que aquela especie de reality show da tvi mostrava que os portugueses eram do mais inculto que há...



P.S. se estão a ler este post no P* aqui fica o link para "O" video.

So many ideas and so little time (edited)

I've been having some good (i think) ideas for posts this past week, but haven't found the time to fully elaborate on any of them so I'll just leave the topics here for now and will try to get back to some of these subjects as time allows it.

Is Google evil? I mean, it can't really be a bastion of open source with so many closed source programs and patents. It's not all about free beer people...

Microsoft sponsored site profiling Linux adopters, but I guess they missed (at least) one.
The type that enough about MSFT that it avoids direct contact as much as possible.

Is there a conspiracy between apple keyboards and planeta asterisco?
I mean, have you looked at the "P" key on those things?

It's now 4 years since operation "Lasting Freedom" started. that must be the longest running act of terrorism in history (if you disregard the catholic church, that is). What? you still think a couple of Arabs planned 9/11???

A good friend pointed out a "default-is-stupid" moment on Firefox. And provides the fix. Got to love that.

Allgarve. Oldporto. Lisbonafied. Why didn't anyone think of it before?? oh yeah... it sucks.

Ian Murdock (that the "ian" in Debian) joined Sun. Is it me or is Debian slowly stepping into the void?

osx tips and tricks
compiling ports and don't have /usr/libexec/config.guess ?? (Or config.sub for that matter)
(from the command line)
cd /usr/libexec
cp /usr/share/automake-1.6/config.sub .
cp /usr/share/automake-1.6/config.guess .

Customizing OS X's behavior from the command line
defaults.write galore....

Friday, March 16, 2007

30 (+10) reasons to switch

This is a post i thought i'd never write. It's not that i don't find the discussion fascinating, but that in my experience people (read: non geeks) seldomly need (or want) to change their OS.

Better yet, most people don't use an OS, they use a set of applications. But if the same applications are either cross platform or platform agnostic, then it might make sense to discuss the possibility of switching.

I'm doing it now because i saw a post earlier this week about reasons to change to Linux, and the whole thing got me going. I really don't think my opinion will make you change your mind, but it _does_ come from a someone who is a Windows specialist, a Mac fan-boy and a Linux geek (all me, at different times).

Oh, and this is my first post from TextMate!

10 reasons to use Windows
- It comes pre-installed with ~80% of the PCs sold worldwide;
- You don't know what a driver is (except if its behind a wheel) and couldn't care less;
- Most software is written for Windows, all new technology (Blue Ray; HDVD; DRM) is made for Windows;
- You can go to chat rooms, use file sharing software, visit google and read from Windows;
- You don't know how exciting it is for a script kiddie to see what files you have on your "My Documents" folder;
- You mostly play games, but don't have a games console;
- You don't know that there _are_ other OSs that you could use;
- You use your computer as an electric typewriter with a monitor. What is an OS anyway?;
- You can't afford a Mac, and Linux doesn't offer you the trust of a big corporation behind it;
- You are a VB, XBase, .Net and\ or a MSSQL pro;


10 reasons to use Linux or other *NIX OSs
- You are curious by nature;
- You know a little bit about computers, but want to know more;
- You are a programmer, a security or systems expert, or any other sort of Hacker (or want to be one);
- You can't afford a Mac, and Windows isn't configurable enough;
- You laugh at something like "rm -rf /usr/bin/laden" or you understand the sentence "thank @Divinity I had that shell script to change my MOTD with events from calendar.* or I would have missed LISP's birthday last wednesday";
- Somebody shown you what Beryl, XGL or E17 can do. And now everything else fades in comparison;
- You saw a video on youtube of a guy playing around on a touch screen and flipping windows with his thumbs;
- You believe in Open Source ideals;
- You are a security \ privacy junkie;
- You have DVDs from more that one region or you can't stand the idea behind DRM;


10 reasons to use Mac OSX
- You are a creative professional. (And i don't mean those of you who can write a 20 line telnet replacement);
- You are easily influenced by Apple's halo effect or Steve Jobs reality distortion field;
- You want a computer that just works. And looks good enough to turn heads;
- OSX is a UNIX on visual ecstasy (in-joke, i'll explain another day);
- You don't mind using a closed source OS that is based on Open Source and whose OSI model layer 7 (again, in-joke) can be replaced with FOSS variants;
- You would never replace a CPU, motherboard or graphics card on a laptop by yourself;
- It comes pre-installed with ~10% of the PCs sold worldwide, including your own;
- You are really good at Windows (an expert of sorts) but your antivirus spouts messages about Viruses and other threats that try to creep into your PC and you wonder how it's like on the other side;
- No matter how much you tweak Linux (or how much software you put on top of XP for that matter), it still doesn't feel as snappy or look like OSX;
- Your favorite band is putting out GarageBand files of their new album (I'm still excited about that, sorry);


10 reasons not to use a Computer
- you don't work with computers;
- you own a DVD player, a good Stereo, a Cell Phone and Cable TV;
- Your prefer to listen to CDs instead of ripping them;
- No one ever picked up a girl by formatting her hard drive;
- You don't know how people spend so much time writing and reading without touching a single sheet of paper;
- You where the one behind this. You will now pursue a new career;
- You where the one behind this. You will now pursue a new career;
- You like practicing sports that are incompatible with a flat ass;
- You don't own a portable media player apart from an old Walkman;
- Your fingers are too thick for such small keys;

Wednesday, March 14, 2007

Can you think of a geekier thing to do pt. 2

Nine Inch Nails, confirming their status as the Greatest Band in the World (for their fans at least) has just posted the multi-track files for survivalism in garageband format.

Just download listen and remix for fun! No strings attached. Just the ~100 mb download.

Better yet, according to their site, and i quote :
"We plan to release every track on the album this way over the next few months..."

The Wow (sic) is here.

Commodore is back!


This is one of the most exciting news I've had in recent times. Probably the second most exciting thing happening apart from Nine Inch Nails new album

My first computer was a Commodore 64 with a tape recorder for loading games and a monochromatic (green tones) monitor. I can still remember playing Ghost 'n Goblins and other top notch games when i was err... along time ago. Not to mention that my first baby steps into programming where with BASIC on this machine.

I also had a friend a few years later that had a Commodore Amiga 500 that I thought was amazing, and it was on this machine that i saw (and heard) the first ever computer generated music video (Money for Nothing from Dire Straits). It was _way_ ahead of anything my 386 DX 40 Mhz could ever do at the time. Oh and there was also Golden Axe and Technotronic kept playing on the stereo. Man I love classic gaming!



While on the subject of how old i am (actually I'm 26 in case you're wondering, but I've been using computers since i was 6) here's other things i remember:
Going to Iron Maiden concerts and wearing Judas Priest, WASP and Venom t-shirts;
Wanting to look like Charles Bronson;
Buying a Sega Saturn;
Barrotes, Jerusalem and Friday the 13th viruses;
Giving up on computers when the battery on my 386 melted all over the motherboard;
Playing bass guitar for a Black Metal Band (and being acclaimed as the most promising new metal band on national radio by António Freitas (link to portuguese language page);

Thursday, March 08, 2007

International Women's Day

Today was the International Women's Day, and all over the world there where men who didn't get their sandwich even if they tried to sudo it. :o)

Actually this is a very important day, since it universally marks the _one_ day where we are supposed to thank women for their efforts in making the world a better place and reflect upon the way we, the society, have been treating them.

In my humble opinion, one day isn't nearly enough. People (read: men) should remind themselves everyday that is wrong to abuse verbally, physically, by actions or by inactions all and every woman.

Hopefully, you'll be thinking that I'm beating a dead horse, since we're a civilized society and all that, and these kinds of discrimination don't happen anymore, so I'm going to share two little stories with you.

My friend Carla, was forced to leave the company she helped create because despite all her recognized (and praised) hard work, the business unit wasn't making much of a profit. And for all the long hours and even some lost nights that she poured into her former employer, all she got was a 0€ severance pay. Why? because her former boss didn't find it necessary to pay her a dime. After all, what was she going to do about it?

Another girl friend whom I cannot name as of yet, has been killing herself slowly trying to do all the graphic design for a company that represents 3 small monthly newspapers all by herself for the past months and she already has been subjected to harassment, lied to, overworked (16 hours work days...on saturdays) and they don't even pay her measly 600 € paycheck on time, but rather some 8 days overdue. Without an apology. Why? Because "nowadays everyone knows how to work with a computer" and "it's so hard to find a job" (these are actual quotes in case your wondering) and besides, what was she going to do about it?

Since this blog is mostly about geeky stuff, I'll say goodby with a lttle tech tip.
If you use Stoplight (a Pref Pane add-on that changes Carbon apps maximize and close buttons behaviour so that they do just that; Fill the screen and exit (Command-Q) an active window) on your Mac and are experiencing crashes on Safari after printing to PDF or if Finder restarts after viewing a slidshow in iPhoto, look no further. Just change Stoplight's setting so that these two apps run in "Mac OS Default". Pronto.

Wednesday, March 07, 2007

On the subject of goodwill

This is not good news for Microsoft. Their latest OS hasn't even begun to make its way into the corporate desktop and already the claims on unbreakable security are a thing of the past.

Or were they ever anything but marketing?

The question I most often hear regarding the transition for the new OS is "Why bother?" To answer this, I made a funny little mental exercise.

What would I do if I was in charge at Microsoft (or at least if they listened to me).

Well, to start with, I would take the number of available versions of Vista down from 7(5?) to only 3.

Vista Corporate Edition (VCE) - Drop the show off (Aero will be turned off by policies on most cases anyway);
Better security and networking. This would eliminate the need for mandatory hardware upgrades in the enterprise and would thus lead to wider embracing by CTOs and CFOs alike.

Vista Media Hub (VMH) - A version with some great visual apparatus, geared towards the home user with basic needs beyond media and internet access.

Aero would be a must, so maybe this could lead to a more reliable hardware certification \ standardization process (much needed IMHO) were Vista Ready meant "Ready to run full specs with full performance".

Vista Gamer (VG) - Recognizing that a vast majority of PC users mostly use their OSs (at home that is) to load and play games, Microsoft should make a version of their newest SO much to the liking of the one that powers their own Xbox 360.(Not necessarily compatible, though that would be a blast).

Networking and Security services striped to a minimum, very compact and hu.. lightweight. Take advantage of the relationships with Hardware Vendors and maximize performance.

Next if my list would be taking better advantage of what comes out of their own labs and projects (label it as beta, if you will) and deliver a companion DVD full of goodies like Photostory (does it still exist?) Expression (even a lite \ demo version) and Photosynth (for VMH).

Also a good option, would be throwing VirtualPC, SQL2005 and Visual Studio Express into a Companion DVD for VCE and finally XNA Game Studio for the Gamer version.

As for the Office suit, i wouldn't touch it (with a long stick).

Eliminate the fabricated need for upgrades (personally I’ll stick with Office XP for as long as I can, or must) and make it compatible with open-document standards for publicity if nothing else.

Finally on the server front. Well this is going to be a biggie... So I'll put it more as a wish list than anything else.

1- Native Support for "foreign" file systems.
2- Show us what WinFS can do. If it turns out not to be all that much adopt ZFS (ouch).
3- U-N-I-X C-O-M-P-A-T-I-B-I-L-I-T-Y L-A-Y-E-R (or SFU done right, or cygwin in a companion CD).
4- Gui-less version. With option for graphic administration from remote desktop or even trough a web browser. This would be a great selling point for Application, Web, DB and File servers. And for low-end servers too.

Ok, so most MSCEs would be left to dry without point and click. But the good ones would adapt, and the best ones won't tell the difference (if it can't be scripted, it can't be done, right?)

Friday, March 02, 2007

A week in song titles

Ramble On Led Zeppelin
BES Photo's winner this year was Daniel Blaufuks, a multimedia artist who also does some photos.

Not surprising at all. As someone way more "in the know" that I noted earlier, this was very likely the worst BES Photo ever.

If you take some time to go around a couple of blogs and Flickr pages, you'l find many talented photographers, but hey, their name isn't Blaufuks or Themlitz or Ideafix or any of the other weird names that seem to be a pre-requisite to enter the competition for Portuguese artists.

By the way, the photo on my blog's title is a self portrait by Kay whom i rank at nr. 2 on my favorite artists list, right after Dali and Trent Reznor (incidentally, if you didn't get this joke, you might be reading the wrong blog) and is here with her consent. The logo underneath it is from the "Art is Resistance" movement.

In Memoriam Rodrigo Leão & Vox Ensemble
I finally managed to give my Macbook a 1G memory upgrade, and it is worth every penny. If your stuck with the default 512 Mb, your missing out. Good does get better.

Simultaneously, a work colleague humped his (newer model) Macbook a full Ghz (to 2G) and notes that the performance improvements are even more noticeable. So todays Haiku is "Grab RAM if you can. OS X surfs graciously in deeper waters".

There There Radiohead
This week on Digg a story gained some momentum again (the original is kind of old) about how 199 out of 200 CS Majors can't program. This just proves that a degree can be a display of educational excellence, but doesn't hint at all on competence.

Dead cat on the line (Diamanda Galas cover)
I had almost forgotten about these...

Tuesday, February 27, 2007

Everybody loves a self explanatory error message....



...and this ain't a very good example of one, is it?

Monday, February 26, 2007

Search and Zip (revised and improved)

This is a little vbs script I wrote the other day. It's purpose is to find all log files in a given directory, create a zip archive (using 7-Zip command line interface) of each individual file (created before today, so I don't zip anything currently in use) and delete the original file.

I hope somebody else finds it useful... Although I know that someone can probably out best me with a Perl one-liner..

Here goes!

'Function: Compress and delete log files
'Description: Finds all files with the extension ".log"
'from inside the folder(s) passed as arguments, create a ".zip"
'archive with the same name and delete the original file
'Example: cscript compress.vbs d:\logs "d:\big app logs"

strComputer = "."
str7z = "C:\7-Zip\7z.exe"
i=0

If WScript.Arguments.Count = 0 then
WScript.Echo "Directory path missing. Usage: cscript zippit.vbs dir1 ""dir 2"" (etc)"
Else
'For each folder passed as an argument
For Each strArgument in WScript.Arguments
strDir = WScript.Arguments.Item(i)
Set oShell = WScript.CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
'fiel collection inside strDir folder
Set colFiles = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='"& strDir &"'} Where " _
& "ResultClass = CIM_DataFile")
'Process monitor; will report upon closed \ finished processes
Set colMonitoredProcesses = objWMIService. _
ExecNotificationQuery("select * from __instancedeletionevent " _
& "within 1 where TargetInstance isa 'Win32_Process'")

If colFiles.Count >0 Then

'for each file
For Each objFile In colFiles
'only logs mater.any other file is skiped

If WMIDateStringToDate(objFile.CreationDate) > now() And objFile.Extension = "txt" Then
'compression routine
oShell.Run ""& str7z &" a -tzip """& strDir &"""\"& objFile.FileName &".zip "_
& " """& strDir &"""\"& objFile.FileName &".txt"
WScript.Echo "Created the file "& strDir &"\"& objFile.FileName &".zip "

'log deletion routine
z = 0
'wainting Loop (sleep until zip is done)
Do While z = 0
Set objLatestProcess = colMonitoredProcesses.NextEvent
If objLatestProcess.TargetInstance.Name = "7z.exe" Then
'7z process ended; i can leave the waiting loop and delete the original file
objFile.Delete
WScript.Echo "Deleted the file "& strDir &"\"& objFile.FileName &"."& objFile.Extension &" "
z = 1
Exit Do
End If
Loop

End If
Next
End if

i = i+1
Next
End If

'change date format returned by wmi_script
Function WMIDateStringToDate(dtmDate)
WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _
& " " & Mid (dtmDate, 9, 2) & ":" & _
Mid(dtmDate, 11, 2) & ":" & Mid(dtmDate, _
13, 2))
End Function

WScript.Quit

'as with everything else on this blog.... Creative Commons apply to this code.

Friday, February 23, 2007

my version of this week in tech

Like most geeks I spend much of my off (work) time trying out software solutions just for the sake of knowing how it works and evaluating my options.

So this week I got interested in streaming again. Apple as a good offer. You should check it out. Not only is Darwin Streaming Server free, it is also open source (well not _exactly_ open source, but you can get the source), and they offer you pre-compiled binaries for Linux and Windows.

ESR, one of my personal heroes seems to have fallen out of love for Red Hat and is currently trying to land a job with Ubuntu. Mark Shuttleworth, it has been rumored, was seen buying a one way ticket to the next space shuttle for tourists (tm). Probably no relation what so ever between these events.

Steve Balmer said that Vista's poor sales are a consequence of pirating, giving linux lovers and CTOs all around the world another reason to suspect Microsoft’s stance on security. I mean, if they can't protect their own software...

Of course that since that they're being so generous with their licensing this time, I'm sure the adoption rate will not reflect the sales figures.

Mono is now supporting native Visual Basic code in their new release.

Sarcasm mode on:
Well, Mono belongs to Novell, Novell seems to be 0wn3d by Microsoft so I'm not surprised.
Sarcasm mode off:
Really, this is great news for me and, I'm sure, to some other ex-VB addicts.

Finally, it seems that Terrasoft (Yelow Dog Linux, anyone?) is giving me another reason to buy a PS3.

Wednesday, February 21, 2007

carla, you still owe me for this one!

A friend of mine called me recently at 1 a.m. and asked me for some coding help. I had insomnia so, i agreed to help.

Two hours of phone coding later this was the best i could do. Not bad, if you consider that all i had was a pen, some paper and her telling me if the code compiled successfully and if the result was what she expected.

By the way, if you know what kind of code this is and are looking for a job, send me your CV. I might know of a job opening for you.

local desconta, cod_subsrefeicao, N

desconta = .f.
cod_subsrefeicao = 107
N = 0

if txnlevel() = 0
select prre
scan
if prre.cr = 399 or (prre.cr <350 or >364)
desconta = .t.
N = N + prre.rqtt
end if
end scan
if N >0
goto top
scan
if prre.cr = cod_subsrefeicao
scatter name myPRRE
select prre
gather name myPRRE
replace prre.rqtt with rqtt
replace prre.ere with prre.ere * 1-(n/30)
replace prre.re with ((prre.re * N) /30)
replace prre.ervu with ((prre.ervu * N) /30)
REPLACE PRRE.RVU WITH ((PRRE.RVU * N) /30)
replace prre.Lordem with prre.Lordem * 100

scatter name myPRRE
select prre
append blank
gather name myPRRE
replace prre.rqtt with rqtt
replace prre.ere with ((prre.ere * N) /30) * -1
replace prre.re with ((prre.re * N) /30) * -1
replace prre.ervu with ((prre.ervu * N) /30) * -1
REPLACE PRRE.RVU WITH ((PRRE.RVU * N) /30) * -1
replcace prre.rem with "reembolso subsidio refeicÁ„o"
replace prre.Lordem with prre.Lordem * 100

m.mxsujirs = 0
m.mvirs = 0
declare a_diff (L),a_mesano(L),a_dtsuj(L)
a_diff = 0
a_mesano= 0
a_dtsuj= 0
do prantirs with pr.no, pr.data, m.eur_def
do prproc
do prprocf
exit
end if
end scan
else
goto top
scan
if prre.cr = cod_subsrefeicao
scatter name myPRRE
select prre
append blank
gather name myPRRE
replace prre.rqtt with rqtt
replace prre.ere with prre.ere * -1
replace prre.re with prre.re * -1
replace prre.ervu with prre.ervu * -1
REPLACE PRRE.RVU WITH PRRE.RVU * -1
replcace prre.rem with "reembolso subsidio refeicÁ„o"
replace prre.Lordem with prre.Lordem * 100

m.mxsujirs = 0
m.mvirs = 0
declare a_diff (L),a_mesano(L),a_dtsuj(L)
a_diff = 0
a_mesano= 0
a_dtsuj= 0
do prantirs with pr.no, pr.data, m.eur_def
do prproc
do prprocf
exit
end if
end scan
end if
end if
return prbairro

Sunday, February 18, 2007

Vista pitch

I'm still trying to digest a discussion I had last friday at work.

I was discussing with some friends the real cost of upgrading (if possible) to Vista, and a Microsoft employee who apparently had nothing better to do but listening in on our conversation decided to offer himself to get us a discount on a Vista purchase.

I just have to tell you is sales pitch and then you tell me if I should consider his offer.

"Well, I would never buy it myself if I didn't have such a discount..."

Ok, to be honest I already made my mind to not buy it anytime soon, so i'll just tell you my answer straight up.

"Wow, then i can save my money to get a new graphics card and buy more RAM! What a nice offer. If only I really needed a new OS to _do_ the same things i do now."

Ok, so now I'm labeled as anti-Microsoft at work, which just isn't true. I'm not _anti_ anything.

I take great pride on being a Microsoft technologies specialist, and I have been using all of Microsoft's OSs since 3.11. With some notable exceptions.

Thursday, February 15, 2007

can you think of a geekier thing to do?

My favortie band is doing the geekiest promo thing to promote their upcoming album!

The plot is somewhat reminiscent of Blair Witch Project's, wich if you remeber, included TV reportings of some missing students, an audio tape found in one of the boys car and even a book with all the case documents (including interrogation transcripts and all) just before the movie was revealed. And even them some people refused to accept that it was just good publicity and some acting talent.

It started with a hidden message in the new tour t-shirts..

(can you see it?? hint: look for what seems out of place)


...that lead people to a strange web site and from there on to a series of strange web sites that can be found if if follow the recursive leads found in each one of them.

Just yesterday a story popped up all over the net (well, the right places to look for a sory like this, that is) about a lost USB thumbdrive "lost" in a bathroom after the last concert in Portugal where an mp3 file (My Violent Heart - great song!!!) was found and made it to the net. Now it gets funny... if you play the file and use a spectrographic visualization plugin (i used this one (for itunes on mac) ) you will see something like this...


(the presence!!!!)


Follow the white rabbit down this link for the full story so far.

By the way, there are some hidden images in the new album mini site. Can you find those?


Photo credits: Found all over the net, really.

Wednesday, February 14, 2007

open mindness

Today i saw a post on P* from Ivo Gomes aimed directly at the quality of work of a friend and co-worker of mine.

So i passed the link down to my friend (who will remain anonimous, because i didn't ask for his permission to name him) who read the whole article and then phoned me to say "You know, he's (Ivo) right".

That took me by surprise really, i knew he was a very cool person, but his attitude towards criticism pleasently surprised me. Good for him.

He also explained that, although he agreed with all of the points Ivo makes, some were actually due to regulations over Banking Web Sites in Portugal and others were really great points about usability that just might land Ivo (or the company were he works) some contacts in the future.

Now if this isn't Web 2.0, than i really didn't get this video.

Tuesday, February 13, 2007

18 inches of nails



This was a _GREAT_ weekend!

Nine Inch Nails were here in Lisbon for 3 nights in a row, playing at the "Coliseu", one of the best concert halls in Portugal.

I was luky enough to go to both the first and the last of the three concerts and all i can say is UAUUUUU!!!!! (and this is me being reasonably distant so i can make a serious review....)

Day 1 (February 10, 2006)
The show started with The Popo heating up the room with a competent yet somewhat boring display of atari-teenage-riotesque furios beat and rage-against-the-machine-like lyrics. They might be giants in the future, but right now they just make a good enough proof of concept.

Being the first shows of the upcoming tour, and after 7 months off stage (more one this one another post) I expected NIN to be somewhat rusty and the first (shocking) image of how fat Trent was has he entered the stage led me to believe I was going to see a decadent display of vulgarity from a former star. Images of Axel Rose at Rock in Rio were going trough my mind and they were not pleasent as you might remeber if you saw that show.

But boy, was i wrong!!

The scenario was set with over 3.000 people (ok, its just a guess) dressed in the same black that taint their souls, as lost as Ian Curtis' , screaming Trent's name.

By the end of "Terrible Lie",the lights on stage went out and this was when i realised NIN where in town for business. What might have been the only moment where something was not planned, Trent took things into his hands and shouted "We're not here to fuck around. Turn the house light on and we'll keep playing". And they did. They played "March of the Pigs" on a pit black stage. Wow.

An hour and a half of angry dark feelings and emotions, soud waves coming from a place close to the hell where the lyrics to "Hurt" were first bled, the show remarkably orchestrated by Trent and his acolytes, ended leaving a (still) full room expecting and in extasy.

There was no encore. But there were two more shows to play.

My rating : 18 out of 20
Playlist:
Mr. Self Distruct
Last
Terrible Lies
March Of The Pigs
Something I Can Never Have
The Line Begins to Blur
Closer
Burn
Wish
Help Me I'm In Hell
Eraser
La Mer
Into The Void
No You Don't
Only
You Know What You Are
Hurt
Hand That Feeds
Head Like a Hole

Day 2 (February 12, 2006)

Well this was a very special show for me for several reasons, namely:
I had my girlfrind there with me
I wasn't so hesterical to see NIN, because after all I had seen them just 48 hours earlier
It was the first concert in a more civilized Portugal

The Popo were no surprise. They played the same songs (probably the only ones they know how to...) or at least they all sounded pretty much the same. No surprises here.

As for the NIN show... Well, i never tought they would give so much for Portugal. I mean, it was the third night in a row and they played louder, more intensely that in the first day!

On a side note, I had went to the oficial site earlier that day and there was a visual reference thare to their shows in Lisbon. That felt great!



(screen capture of the nin.com front page on monday)


Back to the show now. They played the whole set with the stage lights out, using instead a light show that included strobs and other parafernalia that I can't really name.

That light game provided an even better ambiance to the show, which by itself proved even more intense, more powerfull than the first.

To my great surprise they even played a cover from Adam Ant (get down, make love) wich is a hidden track on the Burn EP.
I just love that song, and their version gives it an extra something.

Again, in under two hours of screaming, crazy feedback ridden riffs Nine Inch Nails proved to be in great shape, no matter how fat or old Trent looks right now. I bet that at this rate by the end of March he'll be back to his old fantastic shape. I just hope he can hold it together and stay clean. At least I could have sworn he was sober for the entire show.

If you missed it, do your best to see them during this tour. You will never regret it


My Rating: 20 out of 20
Playlist:
Pinion
Love Is Not Enough
Sin
Terrible Lie
March Of The Pigs
The Line Begins To Blur
Closer
Reptile
Deep
No You Don't
Even Deeper
Help Me I'm In Hell
Eraser
Fragile
All That Could Have Been
Into The Void
Wish
Make Love (Adam Ant cover!!!)
Down In It
Hand That Feeds
Head Like a Hole


Image credits:
All the images in this post are from the NIN official site and are here because I think I can use them. If you know diferent, please let me know.

Wednesday, February 07, 2007

Post em continuaçao da "conversa" com mlopes

Olá de novo caro,

Espero não te estar a maçar com os meus comentários, não é esse o meu objectivo.

Pelo que vejo a tua decisão está tomada e não haverá nada a dizer que te possa fazer mudar de opinião. Pelo que deveria desistir, mas não consigo (signo Touro...).

Vamos então fazer um jogo. Eu avanço com pontos que deves seguir enquanto concordardares. Assim que encontres um ponto que não concordes podes parar.

Acreditas que Pavlov estava errado e que haverá pessoas que repetem o mesmo erro mesmo quando são duramente penalizadas (histerectomia é uma imagem que me vem á cabeça mas também a excisão) á primeira tentativa? Há os doentes. Mas também há os psiquiatras.

Achas preferivél ver noticias ou saber de casos de abandono pós-natal, ou saber (ou ver) noticias de uma interrupção voluntária de gravidez? Nem sequer dá direito a tempo de antena, não é?

Compreendes que "71% das estatisticas são inventadas em cima do joelho"? Mais concretamente, e por exemplo:
- O nr. de IVGs em Espanha aumenta de ano para ano. Ok, e quantas das intervenções são realizadas em portuguesas? E marroquinas? E venezuelanas? E....
- Na Holanda o nr. de IVG tem vindo a aumentar. Sim, especialmente na comunidade islamica que proibe as raparigas de assitir ás aulas de educação sexual.
- O 1% dos 71% foi esta mesma estatistica. Não sou estatistico, nem matemático. Nem a maioria das pessoas que cospe numeros em programas de televisão, radio e blogs. Agora os dois primeiros pontos foram-me transmitidos por um analista (estatistico) holandês.

Acreditas que há outras maneiras de combater o aborto ilegal que não passam pela legalização? Claro que há a educação sexual (que foi prometida á 8 anos e até hoje não arrancou), há a ilegalização... mas já é ilegal. Há o combate com a perseguição (mas são os defensores do não os primeiros a dizer que o aborto é um crime sem castigo em Portugal. Se uma mulher não é condenada por abortar, então não há caso possivel contra as pessoas que fizeram esse aborto)

Quando houves dizer que uma mulher que queira abortar precisa de ser aconcelhada, percebes a profunda hipocrisia nesta frase? Como é que pode haver conselhos se só a opção de levar a gravidez pela frente é legal? Sabendo isto, quantas mulheres pensas tu que recorrem á ajuda dos psicólogos ou das instituições que existem para este efeito?
Não te parece que se souberem que, caso realmente a IVG seja uma solução legal, não haverá mais pessoas a recorrer a esta ajuda? Assim talvez se salvem vidas. E familias.

E o tráfico de crianças? Achas que a maioria das vitimas são filhos de familias que tudo fizeram para os proteger ou filhos de pessoas que não os quiseram e pior ainda, lucram com a sua venda? Há noticias de raptos e desaparecimentos todos os anos, mas se morares num bairro pobre (ou conheceres alguém que more), pergunta por isso.

Concordas que uma mulher deva ter poder de decisão sobre o seu futuro ainda que essa decisão cá contra os teus pontos de vista e principios mais básicos?
Se não concordas, liga imediatamente á primeira namorada que acabou contigo ou á primeira rapariga que te deu tampa e diz-lhe que achas ilegal o que ela fez. Poderia ter havido todo um projecto...
Se achas que depende, há muitos niveis de concordância e que talvez o que para ti não tem razão de ser, para outros pode ser um factor decisivo de toda uma vida... Há um referendo no próximo domingo que sugiro que vás (logo que saias da confissão em que pedes perdão para o caso de estares errado) e vota SIM.