Archive for June, 2004

Opera Wiki and Web Developer Toolbar

Opera is such a wonderful Web browser and its most important feature is customization. The Opera7Wiki shows tricks you wouldn’t dare to dream about.

My favorite is the customization collection Web Developer Toolbar which enhances toolbars, menus with most useful entries, and adds a toolbar with quick access to dozens of Web development-related bookmarklets. A must-have!

Leave a Comment

Don’t forget DOCTYPE in your Blogger Templates

It took me 4 hours to figure out why there was a difference in rendered layout between Mozilla/Firefox and Internet Explorer. I chose a template for my blog from the gallery (and did some minor changes, nothing special). Then I tested it and the width of the left part (where the blog items are displayed) was always a lot smaller in IE than in Mozilla. I changed the CSS definitions (“width” property) for the div tag, but again no success.

Next, I viewed the sample of my template from the gallery. Voila, the rendered layout in IE and Mozilla was the same. Why on earth did mine break?

After some minutes of copy and paste I found the problem: the template had no DOCTYPE statement, e.g.

I didn’t know that this statement makes such a big difference in IE!

Leave a Comment

Articles I read today (eBay, JBoss, C++)

  • Nuggets of Wisdom from eBay’s Architecture
    This blog posting recaps the statements of a former JavaOne session about eBay’s J2EE architecture, the motivations and experiences.

    The impressive part is that eBay had 380M page views a day with a site availability of 99.92%. In addition to that, nearly 30K lines of code changes per week. […] The key nuggets of wisdom are a stateless design, the use of a flexible and highly tuned OR-mapping layer and the partitioning of servers based on use cases.

  • The Unofficial JBoss Performance Tuning Guide
    The articles show how to strip down JBoss, i.e. remove all services which are not neccessary for your application’s needs (Okay, I don’t use JBoss, but still good to know.)

    There isn’t a lot of consolidated information in this area, and the information presented here is through trial and errors and bits and pieces of information found on the JBoss forums and weblogs of JBoss developers. Comments and corrections are very much welcome.

  • Announcing The C++ Source
    Good to know that C++ still has an active development and community. Reading the article “C++ Reloaded” I really appreciate the “world dominance” of Java:

    As we speak, the C++ standards committee […] and its members are adding powerful abstractions that at once increase the power and the ease of use of your favorite language. Hash tables, tuples, regular expressions, numerous useful smart pointers, more mathematical functions, and fewer syntax ambiguities are coming our way, and that’s only the beginning.

    I really liked C++ ten or so years ago and used it a lot. Today, I wonder how the C++ world and myself could live years without an API and general framework backing the core language. (Can someone please count the numerous String class implementations available in C++?)

Leave a Comment

A look at Web Browsers and File Managers

A good Web Browser and File Manager can save you a lot of time. Today, I evaluated new programs for Windows in order to get a little bit more efficient.

Web Browsers

I have dumped Internet Explorer (IE) the moment I installed Windows XP. Its user interface is really out-dated, so no more comments on this. The rendering engine, however, seems really fast, although from the view of a Web developer I nightmare to support.

My all-time favorite is the commercial NetCaptor (v7.5.1). It has the IE engine under the hood but provides very useful features, such as tabbed browsing, bookmark groups (called CaptorGroups), mouse gestures, URL aliases (e.g. “g” for google search; the search terms are inserted into the URL through the “%s” parameter in the alias definition). OK, this is now also all available in some other browsers (Opera, but not Mozilla and Firefox). But still, NetCaptor has it all simply done right – just the way I like it. And it has a lot of small, useful features everywhere you look. For example, you can

  • move tabs to other positions
  • have tabs in multiple lines
  • close them by double clicking
  • have them opened next to the current tab
  • activate/deactive JavaScript and ActiveX with one mouse click etc.

Next comes Mozilla 1.7. I actually used only the mail client for IMAP. (I have dumped my beloved TheBat! a year ago since it didn’t support IMAP nicely then; now it does, but too late for me.) Compared with NetCaptor, Mozilla felt heavy-weight and missed a lot of my beloved features out-of-the-box. Thus in daily use I only start the web browser to verify sites I developed.

Two weeks ago I also dumped the Mozilla mail client and switched to Mozilla Thunderbird. It’s actually nearly the same, but differs in some details. (Tip: You can also copy your Mozilla profile, see the Mozilla FAQ.) But most importantly, it does not have the annoying bug I found in Mozilla mail: nested IMAP folders (2+ levels) are not displayed. Thunderbird loads quickly and is really nice and slick. One feature I miss, though, (and what TheBat! always had) is to minimize it into the desktop tray. Another missing one is support for multiple signatures (e.g. depending on recipient properties), or even better, parameterized mail templates.

Mozilla Firefox 0.9 was released lately, so I gave it a try. Is it better than NetCaptor? Well, feature-wise they both are nearly equal, but I had to install and configure a lot of Extensions:

Additionally, the “Web Developer” extension is a must-have for all, well, Web developers. I also installed a new theme “Noia 2.0 (eXtreme)” and dumped the boring standard theme. But still, Firefox takes a little more time to start, and the Web search is simply not as good, since you have to select the engine manually. Compare this to NetCaptor (and Opera etc): here you simply type e.g. “g mozilla” in the location bar and voila. Another thing I don’t like is the slow speed of mouse wheel motion (press middle button and move up- or downwards). It takes seconds to get to the top or bottom. (I have searched but it seems there is no possibility to jump there by mouse gesture.)

I also installed Opera 7.5.1. It’s really good looking, has a great user interface and is very slick. I think it is actually equal to NetCaptor, out-of-the-box (ignoring additional tools like the download manager). Being equal I think I’ll stick to NetCaptor for a while and gradually move over to Opera. (One sidenote: the IMAP client in Opera is bad and misses a lot of features that Thunderbird/Mozilla etc had for years, so again, I would use only part of the software.)

File Managers

Windows Explorer is what I used before. It’s OK, sometimes I wished for a better navigation, mouse gestures etc. So, yesterday I installed and tried a lot of the alternatives (free and commercial) including all *Commander (* = EF, AB, Speed, Total), ExplorerPlus etc.

The result: I’ll stick to Windows Explorer. The reason? All of the alternatives are either simply bloated, offer a stupid and fixed two-window layout, have no “undo” for file operations (whow, how can this be ignored?), are high-priced or crash here and then. Two explorer alternatives were really nice and I’ll watch their future development:

  • FileAnt is a minimalistic explorer. What is really nice is that you can have two folder views side by side with each side having as many tabs as you like (as in in tabbed browsing, but folders instead of pages). The third column is the desktop hierarchy. FileAnt has a minimal editor and multimedia preview. And also offers fast navigations through several means (right click, click in blank area etc.) But… it’s shareware, has no “undo” for file operations and a very annoying bug: playing a movie with the buildin player can only be stopped by quitting FileAnt!
     
  • xplorer2 is also very slick, and very powerful w.r.t. to file operations, selections and searching. The downside is the price of $19 for the pro edition. I would buy it if it would offer an “undo” for file operations.

I really don’t understand why “undo” is missing in nearly every explorer product. This is a lot more useful than a preview or a rename tool!!!!!

Leave a Comment

Two great Frameworks I never heard before

Some friends (Klaus Krüger from MGM and Berthold Maier from Oracle) today mentioned two frameworks they have very successfully used in recent J2EE projects. I haven’t had the chance to check them out in detail yet…

Open Generator FrameWork

The Open Generator FrameWork is a full featured MDA/D tool kit written in Java. It comes with an XMI based import interface supporting several popular design tools, powerful meta model framework, and a simple and elegant template language. Due to its modular design, each component can easily be extended or replaced.

It is the successor of the core of the b+m Generator FrameWork distributed by b+m Informatik AG and is currently being rereleased under the LGPL as part of the architecturware.sourceforge.net project (note the missing ‘e’ before ‘ware’; sf has a 15 character limit on project names).

Carbon Component Framework

Carbon is a lightweight component model for the Java programming language built to support enterprise applications and compliment J2EE and other traditional technologies. The technology provides a basic abstraction for the development and deployment of modular services. Included with the framework are caching, a JDBC accelerator, metadata driven deployment and management, XML and JNDI-based configuration, user and group management supporting JAAS and other technical utilities and services.

Carbon provides improved flexibility by providing robust multi- deployment, type-safe configuration support and remote management capabilities through little to no additional code. It also provides a simple name-based lookup mechanism to deployed services. The component model employs basic lifecycle support and the architecture can be configured with additional interceptor plug-ins that add functionality across the architecture.

Leave a Comment

Articles I read today

  • The Mythical Man-Month Revisited
    This is a developer’s view on the classic book (“Adding manpower to a late project makes it later”).
  • The unofficial A to Z of J2EE Stuff
    The A to Z of (roughly) J2EE relevent tools, technologies and ideas… Nice list, comes in handy for a quick survey.
  • How Microsoft Lost the API War
    From “Joel on Software”. Basically, the article says M$ wants rich clients (desktop applications) since they depend on their big cash cows Windows and Office. The Web as an application platform is the rival. That’s the reason they stopped IE development and they FUD again for Windows Longhorn (in 2006+) and its new desktop technologies like XAML and Avalon, WinFS etc. They lost the war to Web standards like HTML, CSS and Web Services, which gives developers and vendors a freedom of choice for their server platform. Not only this, but worse, they encouraged developers to switch to the Web platform by abandoning their Win32 API for the novel, but completely incompatible .NET framework. Not a safe place to develop either, since the upcoming Longhorn will again be all brand new and incompatible:

    And if you’re developing a Windows GUI app today using Microsoft’s “official” latest-and-greatest Windows programming environment, WinForms, you’re going to have to start over again in two years to support Longhorn and Avalon. Which explains why WinForms is completely stillborn. Hope you haven’t invested too much in it. Jon Udell found a slide from Microsoft labelled “How Do I Pick Between Windows Forms and Avalon?” and asks, “Why do I have to pick between Windows Forms and Avalon?” A good question, and one to which he finds no great answer.

Leave a Comment

The Office, a great british TV Series

Don’t know where I got the tip from, but anyway, I spent all evening watching the first season (6 parts) of the BBC series “The Office“. It’s simply brillant – some kind of Dilbert of the paper industry, filmed in a documentary style. You have an incompetent manager (regional officer) doing management by walking around, his odd-behaving assistent regional officer (no sorry, assistent to the regional officer) and the other lovely employees trying to do their job. The series has great humor, although not as obvious as in sitcoms and certainly there is no background laughter. I will try to get the second seasons, can’t wait until then.

The Office posing for a photograph

Oh yeah, I just figured out The Office is available on edonkey; just do a search for “the office avi” and look for AVI files with a size of about 220-240 MB. There are also english subtitles (.srt files), just look for “the office subtitles”.  You can play the AVI movie with subtitles by making the .avi and .srt filenames equal. ZoomPlayer, for example, then recognizes the .srt file when you play the .avi movie.

Comments (1)

PDF Bookmark Hacks

Update note: Here’s a more recent blog posting on PDF hacks. All scripts, including the ones mentioned above, are contained in the ZIP archive with perl scripts

I found out that you can do – quite simply – two very useful hacks on PDF documents with bookmarks:

Apply “Inherit Zoom” to all Bookmarks

I like to see, by default, the whole page, and set this accordingly in my Acrobat preferences. Some bookmark links, when clicked, modify the current zoom settings, e.g. put you in 100% or worse, in 200%. To modify this annoyance you can directly modify the PDF document in your Text editor.

With UltraEdit, for example, I load the PDF document and open the “Search and Replace” box, enable “Regular Expressions” and replace all occurrences of “R/XYZ*]” with “R/XYZ]”, and then also all occurrences of “R/Fit*]” with “R/XYZ]”. Now safe the document.

With the Perl scripting language, this hack is applied with

perl -pe 's#R/(XYZ.*?|Fit.*?)\]#R/XYZ\]#g#' in.pdf >out.pdf

The next time you open the modified document with Acrobat you will get a message that the document is being repaired. Just safe it again with Acrobat and everything is fine.

Close all Bookmark Folders (recursively, nested)

Unfortunately, PDF documents with a huge folder hierarchy of bookmarks have all folders opened. This creates a large list and I cannot find anything at glance. How can I close all folders, also the nested ones? To modify this annoyance you can directly modify the PDF document in your Text editor.

With Search and Replace, for example, I specify the PDF document, enable “Regular Expressions” and replace all occurrences of “\/Count +[0-9]\/Parent” with “/Count -%1/Parent”.

With Perl, this hack is applied with

perl -pe 's#/Count ([0-9]+)/Parent#/Count -$1/Parent#g#' in.pdf >out.pdf

The next time you open the modified document with Acrobat you will get a message that the document is being repaired. Just safe it again with Acrobat and everything is fine.

Note: Always make a backup of your PDF document before modifying it, since sometimes the hacks just don’t work and you end up with a document that Acrobat cannot repair.

Comments (7)

Newz Crawler and BlogJet

Today I have installed the Newz Crawler client, which was mentioned in Eriks’s Linkblog. NewzCrawler is a web news aggregator, RSS reader, browser and blog client which provides access to news content from various sources. Great Software!

Actually, when trying to post to my blog I found out that its built-in BlogThis! client doesn’t support specifying or modifying the title of a posting. (I have enabled titles by “Show Titles” in the preference tab of my blogger.com account.) Additionally, the “My Blogs” accounts in Newz Crawler don’t show existing titles, either. I have posted a suggestion in the NC forums… In the meantime I use the BlogJet client, which supports everything I need including titles!

Leave a Comment

IoC Containers and Dependency Injection

Today I investigated the state of application configuration management (J2EE and Java in general) and quickly was tied to the not-so-new but very promising approach called “Inversion of Control” (IoC) and its specific implemention via “Dependency Injection” (DI). There are a huge amount of talks, blogs etc. on this subject. The paper “Inversion of Control Containers and the Dependency Injection pattern” from Martin Fowler helped me to get familar with the principles, the acronyms and key frameworks for IoC and DI – a must-read for Java developers. Another fine paper is Rod Johnson’s “Introduction to the Sping Framework“, posted at TheServerSide.com.

As it turns out, the Java Open Source community offers a lot of IoC/DI containers/frameworks:

  • Apache Avalon is fairly heavyweight and complex, and seems more invasive than newer IoC solutions
  • PicoContainer is lightweight and emphasizes the expression of dependencies through constructors rather than JavaBean properties
  • Jakarta HiveMind
  • Spring is general purpose application framework with a IoC/DI container as its core.

Some time ago, Howard Lewis (related with the HiveMind project) wrote a Blog posting “Comparing HiveMind to Spring“. On this blog page there are also other postings on HiveMind and Spring.

Leave a Comment