Java development through Excel

7. September, 2010

When developing software, one pain is always the same: Getting valuable input from the customer. One solution is to use a tool that your customer probably understands: Excel.

“Oh, great, CSV files,” you think. No. I mean Excel work sheets, with colors and formatting and formulas. Let me explain two approaches to save you a lot of time and effort, pain and tears.

Jakarta POI Logo

Image via Wikipedia

Apache POI

Apache POI is the Swiss Army Knife for Java developers who have to deal with Excel. It basically allows you to access the content of an Excel document in a humane way: By book, sheet and then indexed by row and column. It doesn’t matter if the file is in the old binary format (*.xls) or the new XML one (*.xlsx).

Especially the XML format is suited perfectly to allow your customers to send you master data. Just write a small tool that reads the Excel file directly and dumps it into your database. No CSV conversion! You can use colors to mark rows/columns to ignore. You can define styles to ignore (like “Section” or “Heading”). That allows your customer to keep the table readable.

Formula Compiler

But the data in the spreadsheets is only half of the value. The guys at Abacus Research AG created a new project: Abacus Formula Compiler (AFC). This gem gives you access to the formulas in the cells. POI does that, too, but you will just get a string. AFC will convert the formulas into Java Code. That means your customer can not only send you master data but also how to process it.

They can send you a spreadsheet with an example what they are talking about. They can use the Excel sheets they have been using to drive their business for the last five years. If something changes, they can send you an updated version, you run AFC on that and get a new set of classes which replace the old ones and which do exactly what your customer wants.


Simple passwords

6. September, 2010
Credit card

Image via Wikipedia

How secure can a simple password be?

Well, that depends. What do you want to protect and against whom?

Today, there are two main attacks. The first one is by people who are close. Coworkers and relatives. The coworkers need some information or access to some function while you’re not around or because there wasn’t enough money to buy a software license for everyone. The relatives want to spy on you (for various reasons). If your password is something personal, they will figure it out easily enough.

The other attack is by spammers who want to gain access to your computer (to send more spam or to get access to more computers or to your bank account, your credit card number, etc) or your accounts. Credibility (as in Google ranking) can be worth money, so control over a well-known blog or a reputable website is not something a cracker would shun.

These people run professional attacks against logins, so they try words from dictionaries with a few numbers added (like cat123). They have tables with passwords and how often people use them (hint: don’t use 123456 as password).

For big sites, the question isn’t really how “secure” the passwords are but how often they are used. If every password was different, it would be much more effort for attackers to crack enough accounts to make the attempt worthwhile.

That means passwords could be simple enough to remember. As they should be. Or people will have to write them down somewhere — we’re not computers. Which remember everything perfectly. Unless the last backup didn’t work. Or a virus comes along. Or someone makes a mistake.

Related Articles


Cheap is beautiful

4. September, 2010

We have a lot more money than our ancestors. For example, we spend only 12.4% of our income on food while in 1900, people had to spend about one third. Other things have become more expensive, true, but that doesn’t explain the recent trend for “cheap is beautiful” (or the German “Geiz ist geil”).

If you buy something from the odd lot, then you’re buying an item that lay in stock for a year, and no one bought it. Why? Because the item isn’t the best in the lot. Or rather, it didn’t have enough bang for the buck.

When you buy something, always remember that it’s only cheap after it has fulfilled your needs.

Related Books: Cheap: The High Cost of Discount Culture


Hot or not

1. September, 2010
no spam!

Image via Wikipedia

When I write a post, I’m always wondering if someone cares. Since I’m not one of the top 1’000 bloggers who rally millions of readers, I just get so many hits and it’s hard to find out what people like to read.

Today, I noticed something: Some articles get more spam than others. Since spammers want to get noticed, they are more likely to spam the hot stuff.

Problem solved 😉