Skip to content

www.rolfje.com

Category: Software

Technology does not sell

Posted on 2007-05-09 By rolfje No Comments on Technology does not sell

Seth Godin did a talk at Google campus in Februari last year. I recently stumbled upon this video of his talk, in which he explains to the Google people why Google sells.

He is very clear in explaining to technology people that technology does not sell. It’s technology that gives you a shot at marketing, nothing more. He makes some very good points which I’ll try to summarize, because the video takes 48 minutes to watch 🙂

Read More “Technology does not sell” »

Hardware, Software

The Digital Revolution

Posted on 2007-05-04 By rolfje 1 Comment on The Digital Revolution

Nice example of digital revolution and power to the people can be found at http://blog.outer-court.com/archive/2007-05-02-n67.html. Let’s hope manufacturers understand that people don’t want to pay for crippled content.

Digital copies where copyright is removed are actually better than their DRM protected originals, which makes good willing people move to pirated content, like I stated earlier. The important sentence here being “If I buy a DVD, I have to watch a few minutes of copyrights notices and commercials, without being able to skip them. If I rip it, and re-write it, these notices are gone…”.

Viva la Revolution!

Software

Disabling the Windows Clipboard

Posted on 2007-04-17 By rolfje No Comments on Disabling the Windows Clipboard

When copy-pasting in Windows, sometimes the clipboard bar appears, and if you’re really “lucky”, it also pops up a waring, distracting you from your work. The clipboard holds only 12 items, and I have never met anyone who used more than one. There is no way to turn this irritating feature off, unless you want to use the dreaded registry editor.

Feeling brave? Follow the instructions at http://support.microsoft.com/kb/207438.

Microsoft, Software

Parameter List Too Long

Posted on 2007-04-17 By rolfje 1 Comment on Parameter List Too Long

If your are “fortunate” enough to have to delete a lot of file from a directory on a Unix system, you are likely to encounter the “Parameter List Too Long” problem. This problem is caused by Unix trying to replace the “*” you just used by all names in the directory. This list is then passed to the rm command, which complains that it can not handle that much parameters.

To get around this limitation, you have a couple of options:

Delete all files in the current directory
By far the fastest and most compatible way to delete all files in the current directory without recursing into subdirectories is:
ls | xargs rm
This is the fastest command, because xargs makes sure the maximum allowed number of parameters is passed to rm, resulting in fewer calls/startups to rm.

Delete all files in the current directory and all subdirectories
To delete files not only from the current, but also from all subdirectories, use
find . -name "*" -exec rm -rf {} \;
This is somewhat slower, since rm is executed seperately for each file.

Above commands are tested on AIX and Linux.

Software

Thoughts on Widgets, Gadgets, Screenlets

Posted on 2007-04-11 By rolfje No Comments on Thoughts on Widgets, Gadgets, Screenlets

Just now, I was listening to the Java Posse podcast about the ab5k screenlet framework for Java, and I am finally convinced that software developers are a bunch of crazy, unrealistic, memory-hungry, cpu cycle stealers and by lack of normal people telling them otherwise are proud of it, too. The problem? Look at this list (no particular order):

  • Linux screenlets or applets
  • Windows Sidebar Gadgets
  • Apple Dashboard Widgets
  • Google Desktop Gadgets
  • Yahoo Widgets
  • and recently added: ab5k.org java screenlets

Read More “Thoughts on Widgets, Gadgets, Screenlets” »

Software

Apple and EMI follow up

Posted on 2007-04-03 By rolfje 1 Comment on Apple and EMI follow up

In a previous post I told you that Steve Jobs wants to provide DRM-free music through iTunes, but was held back by music companies. Steve must have had a few long and hard talks, because now EMI and Apple are teaming up to provide high quality DRM-free tracks through the iTunes music store, priced at $1.30. The same track, in a lower sound quality, with DRM costs $0.99. For 30 cents, you get a track you can actually use, with a higher bitrate.

At the same time this could be a trick by Apple to get around the legal issues currently being discussed about iTunes music not being available to other players than the iPod. Smart eh?

Apple, Software

Bummer, back to Photoshop

Posted on 2007-03-06 By rolfje No Comments on Bummer, back to Photoshop

I bought Photoshop Elements 4 a while ago, but didn’t use it much since I didn’t like the userinterface (dissapearing menus when you click on the desktop and such). Then came Lightroom public beta, the Photoshop killer. I haven’t touched Photoshop since I installed Lightroom. But now… the Lightroom beta testing period is over. Since I haven’t got 300 Euros to “splurge” on Lightroom, I guess I’m forced to learn to use Photoshop to process my photos now. Oh well… Let’s see how that goes.

Lightroom expired

Apple, Software

The truth about Switching To Mac

Posted on 2007-02-28 By rolfje No Comments on The truth about Switching To Mac

Thinking about switching to a Mac? I’d say go for it, but read this article first. It really sums it all up.

Apple, Microsoft, Software

Use iTunes with *ANY* mp3 player

Posted on 2007-02-01 By rolfje No Comments on Use iTunes with *ANY* mp3 player

Many years ago, I bought an iBead Jens of Sweden MP-100. At the time I was a Windows/Linux user and everything was fine. Now that I’m a Mac user, syncing tracks to my trusty USB mp3 player is a bit harder. I had to copy tracks by hand, and when two tracks had the same title the copy would fail. THis was all very irritating. I am saving for an iPod nano, but until I get one I’m stuck with the USB copy tricks.

But not anymore, 5 minutes ago I discovered SyncTunes, a free Mac OSX application which can sync iTunes playlists to any drive as long as it’s available on your desktop. This means that any drive that mounts as a removable drive (USB memory sticks, PDA’s, Sony PSP’s…) can be used to sync the playlist to. The only catch is that you have to make the playlist fit onto the drive (in size). This can be easily done by creating a smart playlist in iTunes which is limited in size.

I tested syncing some of my playlists (through a size-limiting playlist) and it works like a charm. Size limiting playlists are also the thing to use if you do have an iPod, and want some control on how many space is used by pop music, and how many space is used by rock. I’m a happy camper now, and in no hurry to buy an iPod (but that 8GB red nano sure looks tempting).

Apple, Software

Java 5 BigDecimal.toString() and Oracle 10g jdbc

Posted on 2007-01-31 By rolfje 2 Comments on Java 5 BigDecimal.toString() and Oracle 10g jdbc

Yesterday a collegue of mine discovered a very ugly problem when storing BigDecimals from a Java 1.5 program into an Oracle 10g database. Not by experience, but by reading the article at http://www.javalobby.org/java/forums/t88158.html. We had not encountered the problem ourselves, but when passing the dredded 12500000 value to the BigDecimal constructor and passing it to the database, we discovered that we too were affected by this bug. So off I went to search a solution.

The root of the problem lies not only in the fact that the BigDecimal.toString() method behaviour has changed in Java 1.5, but also the way BigDecimals are constructed. The Oracle driver relies on a specific formatting of the BigDecimal.toString() method, and can not handle the output of the “new and improved” BigDecimal in Java 1.5. All discussions about not using toString() for passing values and flaming Oracle and/or Sun aside, we have no option but to fix the problem right now. Oracle promised to fix this problem not sooner than in release 11g, so waiting is not an option.

Option 1: Overriding BigDecimal.toString()
In our project, we use Ibatis. This gives us a nice handle to implement our own BigDecimalTypeHandler, where we can choose to do anything to the BigDecimal before storing it into the database, and revert that when retrieving it from the databse. One of the options we thought of was to override the BigDecimal’s toString in an anonymous subclass inside our IbatisTypeHandler, like so:


public void setParameter(PreparedStatement ps, int i,
                        Object parameter, String jdbcType)
                        throws SQLException {
  BigDecimal colVal = new BigDecimal(
              ((BigDecimal)parameter).toPlainString()){
    public String toString(){
      return toPlainString();
    }
  };
  ps.setBigDecimal(i, colVal);
}

The anonymous subclass lets you add or change behaviour to an existing class without cluttering your codebase with a classfile which looks rather strange when places out of context. We tried various ways of locally changing the behaviour of BigDecimal to make it go into and out of the database in a way that our unittest would not know the difference, but at some point gave up. There is not really a good way to do this without compromising in scale or resolution in the conversion.

When using the setParameter described above, you will not get a situation where originalBigDecimal.equals(storedBigDecimal) returns true. In most cases this will not be a very big problem, since originalBigDecimal.subtract(storedBigDecimal) will always return 0.

If somebody thinks of a way to store BigDecimals into the database and retrieving them in a way it is totally transparent to the caller (compared to JDK 1.4 behaviour) please feel free to post it here.

Option 2: Loosing your BigDecimals

Perhaps this option had to be considered when thinking of using BigDecimals in the first place. BigDecimals are very awkward to calculate with, are relatively heavy both performance and memory wise. Very often they get converted to doubles before doing any calculations with them, which eliminates most of the reasons for using BigDecimals anyway.

The easy way to loose only those BigDecimals which get stored in the Database, rewrite the typeHandler you just created into the following:


public void setParameter(PreparedStatement ps, int i,
                        Object parameter, String jdbcType)
                        throws SQLException {
  throw new UnsupportedOperationException(
    "Oracle can not handle Java 5 BigDecimals properly");
}

Now, run all Unittest (you have unittests covering at least 80% of your software, don’t you?) and replace BigDecimals with other appropriate datatypes where you see the UnsupportedOperation popup.

Software

Posts navigation

Previous 1 … 10 11 12 … 14 Next
           

Recent Comments

  • rolfje on Methode Buijs uitgelegd
  • LinkedIn is at Peak Enshittifaction – Will Chatham's Blog on Linked-In not really Opt-in?
  • Hans j on 1N4148 diode as RF switch
  • Roaming Rhonda on DLNA on OSX, done right
  • Frans on How to fix a Krups XN2001 Nespresso machine

Tags

Apple backup design DIY DRM eclipse environment Fun Garmin GForge gmail google hacking hamradio Hardware helicopter iphone ipod iTunes Java Keynote linux maven modelling music news opinion oracle osx photo photography programming repair review security Software Steve Jobs technology Time Machine Ubuntu usability Utilities vacation windows Workshop

Categories

  • Apple (105)
  • Divorce (1)
  • Electronics (3)
  • Fun (57)
  • Games (7)
  • Hardware (72)
  • Microsoft (18)
  • Racing (14)
  • Software (134)
  • Uncategorized (66)
  • Workshop (20)

Archives

Copyright © 2025 www.rolfje.com.

Powered by PressBook WordPress theme