Never Steal a Hacker Machine

Here's what happens when you steal a hackers computer:


./M6

Geek and Gamer Girls Song



./M6

GWT Tutorial

I'm starting to develop a SaaS application and I'm evaluating GWT.
Here's a simple tutorial for starters: GWT Tutorial – Introduction to GWT

./M6

Chris Anderson: How web video powers global innovation

Has Seth's Godin states:
"Online video radically changes the reach and speed of the improvement cycle. Things like dance, snowboarding and TED talks keep getting better, and faster, because artists see the best and improve on it. Even more than that, it requires you to top what's out there, or you'll be ignored."



./M6

Hug a Developer



./M6

Interpreting DB2 JDBC error messages

Every time I use DB2 on a data migration project I get awkward DB2/JDBC errors, no matter if I'm using DB2 on Windows, Unix or iSeries AS/400.
Part of the problem is that the error messages come in Portuguese, making the debug task a lot harder since it's almost impossible to find decent help by searching through the error messages. The other part of the problem is that this leaves me the SQL error codes, which sometimes are unclear and makes me waste time.
Here's an example of a common problem that I usually have:
com.ibm.db2.jcc.b.rg: [jcc][t4][102][10040][3.50.152] Non-atomic batch failure. The batch was submitted, but at least one exception occurred 
on an individual member of the batch.
Use getNextException() to retrieve the exceptions for specific batched elements.

com.ibm.db2.jcc.b.pm: Error for batch element #1: The current
transaction was rolled back because of error "-289".. SQLCODE=-1476,
SQLSTATE=40506, DRIVER=3.50.152

com.ibm.db2.jcc.b.SqlException: [jcc][103][10843][3.50.152]
[...] ERRORCODE=-4225, SQLSTATE=null
Following DB2 official documentation:
  • SQLCODE=-1476 means that the current transaction was rolled back because of error.
  • SQLSTATE=40506 means that the current transaction was rolled back because of an SQL error, which is basically the same as the SQLCODE above.
  • ERRORCODE=-4225 means an error occurred when data was sent to a server or received from a server, which is totally useless.
The real useful information is hidden in the second error message, in the 'transaction was rolled back because of error "-289"' message. The key here is the -289 error.
This error means "Unable to allocate new pages in table space", and this is the real cause for such a big fuss.

One of my DB2 table spaces run out of space and all I get is a lot of fuss about a rollback that happened because of an error but the error itself is kind of hidden in the middle of the stack trace, all that is shown is a loose error code...
IBM has done it again, the cause of the error should be highlighted and perfectly visible and understood in order to know what really happened and fix the problem, but making the life easier for its users seems not to be IBM way.

./M6

Isaac Asimov on Bill Moyers World of Ideas

1988 Interview with Isaac Asimov by Bill Moyers about learning, computers, religion, population growth, the universe.

It's fantastic how Asimov previewed the usage and impact of internet in 1988

Part One


Part Two


./M6

MySQL Partitioning

I was researching about MySQL performance for a new web project when I came across whit partitioning.

After reading Improving Database Performance with Partitioning and MySQL Partitioning, I thought "this is great, I'll use it", but after reading MySQL partitions tutorial, and since I'm using InnoDB, I though "maybe this is not such a good idea since storage may be a problem and the performance boost may not be that significant for this project".

In short, one has to perform some tests in order to decide.
./M6

List of Free and Open Source Software Packages

I was searching for a Linux application server when I came across with this useful
list of free and open source software packages.

It's a great starting point when one knows what one needs but doesn't really have a reference.

./M6

ATI Mobility Radeon X700 on openSUSE

As I've previously posted, I'm now using openSUSE and my ATI Mobility Radeon X700 was not fully functional.

After some investigation, I've found out that AMD no longer supports old ATI video cards for Linux.
I've even tried http://wiki.opensuse.org/SDB:ATI_drivers but with no luck.

Definitely this is one extra point for nVidia. When I replace my current laptop, it will have an nVidia card, that's for sure.

./M6

Drupal vs Joomla!

I've launched a new free item exchange service for the Portuguese speaking community: Trocaqui.
I've implemented it using Drupal, for the user front-end, and that raised a lot of questions. Many people asked me, "why Drupal and not Joomla!" and "you're using a CMS, what's the difference between Drupal and the others".
So, I've decided to write a bit about the Trocaqui project and why Drupal.

When I started the project, I've (obviously) evaluated some options, writing from scratch, using a framework, using a CMS, etc.. I did not wish to code it from scratch nor to use some framework that would left all the hard work to me. I already knew Mambo, Joomla! and Drupal. From those I've used Mambo, which I've dropped in favor of Joomla!, since it is like the natural evolution of Mambo.

After some analysis, I've came to the point where it was either Joomla! or Drupal. I grabbed them both and perform some tests to see which would respond best to my main requirements:
  • Translatable (i18n for Portuguese)
  • Easy to use for the end user
  • Extensible
  • Expandable
  • Forum support
  • Image management support
  • Flexible and easy user access configuration setup
  • Easily costumizable
I've begun the tests by setting up the systems which was an easy task for both of them.

Joomla! is ready to be used just out-of-the-box. It allows one to manage text and images, it comes with a WYSIWYG text editor and is quite easy to understand. Almost everything is where one expects it to be. So, finding an option and using it is straightforward.
On the other hand, Drupal is not so usable out-of-the-box. It just supports text and doesn't came with an WYSIWYG editor.

So, some additional modules were necessary in order to expand Drupal to support my needs.

When it comes to module/plugin installation, in Drupal it is totally manual, so are the upgrades.
One has to uncompressed the file contents into a specific directory, the go to the modules section in the administration menu to activate it. Then one has to configure it.
Sometimes this is not as easy as it seems and some technical background is required in order to setup things correctly.

Drupal does not come with a WYSIWYG text editor.
Since I needed a rich text editor, I had to test editors before selecting one that worked as I needed. It was a bit painful because I had to test some and that took more time than I was initially expecting.

Drupal does not come with an image module.
A content management that cannot manage much beside text is not very useful.
Thus, the quest of an image module began. I've found Drupal has many modules that support images. And I've also found out that the reason for this proliferation of image modules is that because they all suck. There's not one good image module for Drupal, so it seems that everyone that needs one, develops one.
After some digging and testing, I've finally found an image module that suited half my needs. After some more digging, I've found another module that was suited for the other half of my needs.
Everyone that needs images on their CMS should check if Drupal modules fit their needs before going for Drupal.

Drupal working philosophy is not straightforward.
In Drupal, things are not were one expects it to be. It works with a organization and, to me, it complicates things, making it far more complicated that it should and needed to be.
Even today sometimes I take 10 or 15 seconds looking around for a specific option. It is not administrator friendly, specially if you don't work with it often.

None came with a forum solution, so I had to install one on each of the systems.

Finally I've finished setting up the systems.
Drupal had been painful so far, and I was loosing some consideration about it. But people do refer to it as a great CMS, so I decide to continue according to my plan.

It was time to evaluate things regarding my functional needs.
An here's the turning point favoring Drupal.

Joomla! does not come with flexible user parameters. But Drupal does.
In Drupal, the core user module allows one to defined specific parameters and corresponding value types in a very easy way. Probably Joomla! allows it to, but I didn't invest much time searching for such a module/plugin.

Joomla! does not allow drag-and-drop.
In Drupal, it is easy to move things using the mouse, just drag that menu option and drop it where you want it, do this option as many times as needed and the push the save button. This seems a minor issue, even from me (I'm a less WIMP than the average), but the amount of work that I was performing with such easiness allowed me to be far more productive than doing the same similar task in Joomla!.

Everything was going fine until I found a show stopper bug. I had so many exchange categories that Drupal stop ignoring the exchange category order I was specifying.
Not even the weights were working. I even tried banging directly on the database, but even though the items were not showing up in the correct order.
This forced me to stop the project for some weeks while finding the solution.
I did found out that I was not the only one complaining about this bug, it is know for years but yet, Drupal seems to be ignoring it.
I had posted this problem in Drupal forum but was starting to think in abandon Drupal because it seemed that there was no solution .
But suddenly a specific module for my problem came from Ben. He was just fantastic in helping me with this problem, he developed a small module, with a few lines of code, that solved the problem. I was on the move again.

I needed to create a template for the user to use when posting a new exchange item.
This revealed the true power of Drupal and why technical people love it. In Joomla! I needed to bang the forum module source code and use that modified module and, when a new version came out, do the same.
In Drupal I only needed to create a hook. A hook is like a handler that overrides the original code. You just say, when this event happens, I wish to do such and such. It was not easy to find out the correct data in the data structure that I needed to modify, I was new to Drupal programming. But once I've found the data I needed to modify, it revealed simple, easy and clean. I was dazzled with such simplicity and by then I had no doubts whatsoever that Drupal was the way to go.

Translating things to Portuguese also revealed much easier in Drupal. Both systems do have translation files for their modules, but Drupal allows one to translate things on the fly. Drupal has a translation interface that does not require the user to edit the translation file and upload it into the server.

Permission configuration also revealed a bit simpler in Drupal. I've just configured the read, write and administer accesses of each module for registered and non-registered users.

Finally I wanted to create a specific home page to show to everyone that landed on the site.
I've never done such thing in Joomla! and frankly, by then, I did not bothered to see what solutions were out there for this.
In Drupal there's a specific front page module that is just fantastic. I've created a specific home page for non authenticated users and another to authenticated users. It was just simple.

After all this quest here's what I've learned:
I recommend Joomla! for non-technical people and for web sites that do not require awkward requirements. It's great out-of-the-box and much easier to work with. But when things get though, you'll need a technical guy and you'll want Drupal supporting your site, even if it costs you a lot of time to learn how to use it.

./M6

Common MySQL Queries

While looking for a MySQL Rank function, which does not currently exist, I've found this useful Common MySQL Queries.

./M6

Drupal contact limitation

I've just set up a Portuguese speaking item exchange free service, named Trocaqui, based on Drupal. And I'm, obliviously, the website administrator.

I was contacting some of the earliest registered users when Drupal showed the following message:
Não pode contactar mais do que 3 utilizadores por hora. Por favor, tente novamente mais tarde.

It means "You cannot contact more than 3 users per hour. Please try again later.".
What kind of stupid limitation is this? I do understand this limitation when applied to common users, but the administrator?
Seriously, why can't the administrator use his own system without artificial limitations?

I've searched the subject and found out that, obviously, I was not the only one complaining about this for years, and there is no real workaround for it. So, I've just increased the number of messages per hour and will have to reconfigure it back when I finish the user contact task.

./M6

Database Models Library

I've just found this library of database models. It is a big collection of database models useful for faster kick-offs.
It is hosted by Database Answers and there are far more useful information there. It's a great resource.

./M6

SWT File Dialog

During the development of an Rich Client Platform (RCP) I needed to perform a file browse, here's how to show a file dialog in SWT:

import org.eclipse.swt.widgets.FileDialog;

FileDialog dialog = new FileDialog(this.getShell(), SWT.NULL);
dialog.setFilterExtensions(new String[] { "*.txt", "*.*" });
dialog.setFilterNames(new String[] { "Text files", "All files" });
String path = dialog.open();
if (path != null) {
File file = new File(path);
if (file.isFile()) {
System.out.println(file.toString());
}
}

The snippet above filters by text files (*.txt) and all files (*.*) only, and it can be easily applied to any button or file menu option click event.

./M6

Java Virtual Machine Process Status Tool

Do your know jps?
It's the Java Virtual Machine Process Status Tool, which means it will show the status of your java processes.
Ever had the need to kill a Java process from an endless list of Java processes running on a server?
Just type jps -m to discover the PID of the process you wish to kill...

./M6

Panjiva

Panjiva is an interesting search engine dedicated to company business.
It has interesting business and marketing features for markets and companies.
The search/index algorithm seems to need some tuning, some searches result non-relevant results in top places.

./M6

SaaS Metrics – A Guide to Measuring and Improving What Matters

I've came across with this great post about Software as a Service metrics aimed to improve what matters, essentially cash, profitability and growth.

Here it is: SaaS Metrics – A Guide to Measuring and Improving What Matters

./M6

Execute Commands Inside DB2 Procedures

I was looking for a way to call DB2 runstats, a non-SQL command, from inside a store procedure.
It turns out that it is actually quite easy. All one has to do is to use the ADMIN_CMD procedure from the SYSPROC schema.

ADMIN_CMD is used by applications to run DB2 command line processor administrative commands using the SQL CALL statement.

Here's how to do it: ADMIN_CMD

./M6

How Technology Can Screw Business

I'm searching for an automatic SMS send service, something sending a SMS via a web service.
Somehow two of the biggest Portuguese mobile operators, TMN and Optimus, don't provide this information on their web site, contrary to Vodafone that explains all their solutions and provides the corresponding prices and conditions.

This has forced me to contact the operators personally, so that their sales team can engage in a conversation with me and try their sales techniques that I'm already immune to.
For TMN I've requested that they call me back "immediately" as their form option said, but no phone call came from them. Maybe its because I'm competitor customer and they don't wish to make business with me. Or maybe it's just the form submission that didn't work. Whatever has happened, TMN did not called me back.
For Optimus, I've sent them an email to a specific email address that they provide in their web site. Here's the response:

Delivery has failed to these recipients or distribution lists:

16939@optimusnegocios.pt
The recipient's mailbox is full and can't accept messages now.
Microsoft Exchange will not try to redeliver this message for you.
Please try resending this message later, or contact the recipient direct

Isn't it great when technology screws your business big time?

I don't know what happened with TMN, but clearly something went totally wrong. It may have not been a technical problem, but in that case my contacts were loaded in their call center database and they've should have called me by now.

When it comes to Optimus, well, the answer is clear. Someone forgot to delete some old mails, haven't they? Or someone goofed big time with Microsoft Exchange Server, why is it configured to ignore customers? (Side Note: I love the last sentence where I should "contact the recipient direct", what am I doing by sending the recipient a direct email? I'm not contacting it through a middle man...)

Whatever the problem was, I'm almost positive that it was technical and that is how technology can screw business: by pushing them to competitors. What would their shareholders react if they knew this?
Good work Vodafone, it seems you're the one and only Portuguese mobile company that truly cares about your customers, at least you don't ignore them.

./M6

Data Visualization

Data visualization changes the way people capture, understand, and even recall information.

Here's a five minutes presentation on the subject:


./M6

Open XML: The Markup Explained

I've just found an ebook that technically explains the Open XML format in a simple way with some examples. It's great for all that wish to start using this format.

Here it is: Open XML - The markup explained.

And for more information, check out the OpenXML Developer.

./M6