Archive for the ‘Google methods & tools’ Category

Javadoc implications

Tuesday, August 28th, 2007

hanks to everyone who sent in their own examples of pain and horror of bad code. As the saying goes, when you laugh, the world laughs with you. When you cry, inflict your pain on the world so it cries with you. Inspired by all that bad code, I feel that not enough attention is being paid to that other evil-that-can-barely-be-named, bad javadocs.

Every time I see javadocs unmodified from their generated-by-an-IDE form, I feel like grabbing a blunt object and repeatedly stabbing the author in the face until there is nothing left but a bloody pulp. There are few things as offensive as 5-6 lines of absolutely NO new information.

For example, people who like to have such gems as @param myvar. What on earth does that tell us? That the method takes in a parameter named ‘myvar’? Isn’t that blatantly obvious from the method signature? How does this merit all this extra wasted space? Alongside this horror, there is the despicable @return aString taunting us with its unhelpfulness. The same applies to throws docs listing just the name of the exception.

If you want to provide javadocs, great. Anyone using your API will be thrilled and will think good happy thoughts about you. However, I cannot stress enough how satanic it is to provide the illusion of javadocs by having nothing there but skeleton javadocs that suck up valuable precious vertical space. Vertical space in this world, a world horribly skewed in favour of rectangular monitors, is a rare commodity. Lets not squander it so casually.

Another sin regularly committed (although admittedly, one that isn’t as horrific) is ignorance of line breaks and how the standard javadoc doclet handles them. Where you put your full stop (or period, if you’re American) is relevant and important. It isn’t something subject to whimsy or time of the month, there’s a logical approach to it that isn’t horribly complicated. The first sentence gives a brief idea of what you’re talking about. If you have more to say, it goes in the next line and starts off with a new sentence. Think carefully about the first sentence, you don’t want to be like POI, which has the description for the org.apache.poi.hssf.dev package saying a succinct (and wonderfully unhelpful) ‘DEV package serves two purposes’ in the top level index, now do you?

NullPointerException

Tuesday, August 28th, 2007

Using any application of size, it’s almost inevitable that you’ll be slapped in the face time and time again with a bevy of NullPointerExceptions.

It’s hard to come up with a reasonable explanation of why these exceptions are so prevalent and commonplace. In fact, I have yet to come across a single application server that has never barfed out an NPE at some point or another.

Granted, in most cases it is the fault of the user; providing less than stellar input. J2EE descriptors are rather easy to get wrong, for example. You’d think though that a company that is able to muster up the resources to build a J2EE stack would be able to expend the fairly minimal amount of extra effort it takes to assume that users will pass in bad info, and handle it in a civilised and sociable manner.

JBoss (sorry, couldn’t resist) is a good example of that incredibly half-assed piss-poor lackadaisical approach. Very often, you get an NPE deep inside of JBoss code. The NPE is often repeated 3-4 times, wrapped inside of 2 or 3 other NPE’s. Sometimes you’re lucky and you actually get a helpful message that subtly hints of a vague area to begin sniffing around. Sometimes it’s particularly cruel and reports the wrong component entirely as the culprit, thus leading you on a wild goose chase familiar to those poor bastards trying to find decent documentation for any open source stuff.

Sadly, this particular ailment isn’t restricted to JBoss. JRun will also barf out endless reams of NPE’s if you so much as sneeze in its general direction. They also are of the ‘lets nest exceptions, it’s very helpful to end users’ school of thought that Weblogic now belongs to as well. Luckily, both of these servers will tend to hide that one crucial line of information describing the error you need in that behemoth of a trace. So if you do read it carefully, you might actually see it.

It really isn’t a very hard concept. Always expect bad input. If it can be entered into your code, then someone somewhere will enter it. Null checks are trivial and buy you a lot of love if they report clearly and coherently what is null, and why that’s bad. Don’t nest it, don’t obscure it, fail fast and helpfully.

JGraph

Tuesday, August 28th, 2007

JGraph, for those of you who don’t know, is an opensource swing component to handle all things graphy. It’s a component you can slap in as you would any old regular swing widget. It will draw pretty pictures, let you drag them around, and generally indulges you as you make a nuisance of yourself.

JGraph though has a number of fairly horrific flaws. First of all, it’s impossible to build. Now, I’ve seen my fair share of badly written ant build files. I’ve seen build files that force you to define environment variables. I’ve seen build files that require defecating all over your ANT_HOME/lib dir, I’ve even seen build files that don’t check for directories before they try to output stuff into them. What I have not seen is a build file that plain refuses to do anything useful. First, the build.xml is not in the top level dir, it’s in a directory called….script. This directory also has a motley crew of bat and sh files. (one each for ant, compile, doc, make, and port!). The documentation, needless to say, goes out of its way to avoid giving any hints as to how this lovely component can be built. Just to spice things up a bit, there’s a TransferHandler.java file sitting there in the script dir. No matter how I run ant, no matter what directory I run it from, and no matter what env vars I specify, I cannot achieve build nirvana. The best I can do is get the build file to feebly create some directories then fail to populate them with anything meaningful.

Thankfully, it’s possible to download a reasonably recent release. Sadly though, the build hurdle was a sign of things to come, rather than a freak accident.

JGraph allows you to pretty much do anything with graphs, and a lot of things you shouldn’t do with them. Unfortunately it suffers from trying to be far too clever. For example, by default it has a hugely annoying set of key bindings that I’d bet most graphs do not require or even support. Things like cloning, grouping and suchlike. The approach in general seems to be ‘enable everything and force to the user to disable it’, with the cutesy opensource approach of never actually specifying how to disable stuff. Another oddity is that the documentation goes to some length to explain the distinction between graphs and trees (and how the latter is a subset of the former), yet JGraph itself often tries to uncomfortably shoehorn itself into some of the craziness that goes on in javax.swing.tree.

Then there’s the design issue. JGraph brags of being very much in the Swing mold. Amazing, it’s managed to outswing Swing. Not only do you have fullblown MVC (which swing does NOT have), but there’s also an extra layer of ‘views’. For anyone who has done a lot of swing work and tried to be strictly MVC, you’re probably twitching in discomfort now at the thought of having to deal with such a horrible design. It just doesn’t work. There’s no way of enforcing the contracts, and you end up with a big mess of classes where things are kinda-controller-kinda-model-kinda-view-kinda-somethingelse (varying degrees of each). Graph insertion can be done in so many ways that invariably, the model is modified by the view, the model modifies the controller, and there’s you crying like a little girl being drowned in a tub of congealing spaghetti.

Setting all that aside, there are also some foolish implementation choices. For example, there is an Edge.Routing interface (yes, it’s an inner interface, joyjoy). This interface gives you a list of points, and you’re free to define your own router and modify these points. The advantage of allowing this is that you can handle vertices that join onto themselves, or defining 90 degree angle lines between vertices. The problem with this though is that edges are often NOT just a list of points, and can well be curves of some sort or another. The current implementation, from what I can tell, makes it impossible to have a custom routing algorithm that does loops for self-references.

While it provides for huge flexibility, there are many points where the design was simply not thought out very carefully, and you end up having to contort yourself into all sorts of unseemly positions just to get it to look vaguely like what you had in mind.

Having said all that, JGraph really isn’t all that bad. I just wish it focused more on its core competencies and followed the ‘less is more’ principle, while having a rich set of class/libraries/sample code that handle all that extra gunk.

Hidden Web and E-mail Devices part 5

Friday, July 13th, 2007

Eudora is a classy e-mail client, which offers a whole set of fine features including incoming mail filters, HTML messages, spelling checking, Gmail-like labels. As I’ve come to find out, the software will go open source. Earlier versions will automatically revert to light mode (which omits certain features such as spelling checking, multiple identities, stationery, and signatures) after that date.

Next in line is the free open source version of SpamBayes, the spam filter that works with Outlook or any other sort of client software that uses the POP3 or IMAP protocols. SpamBayes uses Bayesian statistics. The only thing that seems to slip by SpamBayes with any consistency is the new generation of image-based spam. The program’s volunteer authors may address that in a forthcoming 1.1 version.

You can use SpamBayes as a proxy with any mail program (including Thunderbird and Eudora), but it also includes an Outlook plug-in that adds a couple of buttons to Outlook’s toolbar. If SpamBayes misses a spam, just select it and click on Delete as Spam.

A stand-alone e-mail client which permits users to configure and customize their inbox is: The Bat!, which provides a very professional interface for viewing and sorting messages.

Spelling dictionaries and antispam and antivirus plug-ins are all available as free downloads from the company’s Web site. The Bat! will spell-check your outgoing messages for you automatically, and digitally sign and encrypt them with the included OpenPGP security module.

Reaching the end of your fable, I must admit that no program reaches Microsoft Outlook’s professionalism, with a combination of various features, contacts and calendaring. Evolution however, is used mostly by Linux fanatics.

So what does Evolution has to offer?

Evolution’s features include must-haves like rule-based filtering and spam detection, HTML-format messages, and PGP signing and encryption.

Evolution replicates my Outlook experience, and it lets you use the same free PIM program under both Linux and Windows.

Google Desktop: Simply the best?

Sunday, July 1st, 2007

It comes as no surprise as to what Google had achieved throughout the decade.What can Google Desktop do for you?

Google Desktop enhances the possibility to instantly find your e-mails, files, internet history, chats and files. Basically, Google Desktop Search displays your information quite easily. You don’t have to organize files, e-mails or bookmarks. With Google Desktop, by making your PC available for search, users benefit from high class professionalism.

The version 5 of Google Desktop enables certain new gadgets, by adding a new dialog for adding gadgets. Also beneficial are the search results & security alerts for curios Internet links. The newest version of Google Desktop sparks some improvements and bug fixes regarding Microsoft Outlook and other features.

Sit back and enjoy advanced hard drive indexing. Your search results throughout the product are returned in a website format similar to Google’s. If you have a great deal of e-mails, chat history, large documents or contacts, the whole indexing process may take a little while. You’ll preview the same gadget content: a file shredder, sports and stock tickers, a music player and other interactive features. Besides weather updates, chats, the software integrates an appealing to-do list and notepad.

The last version of the product is compatible with Windows Vista. There’s available cross indexing for multiple machines and sharing panel items directly with friends.

A drawback might be that it doesn’t have an auto update sequence. Though some people might prefer a standalone interface, a little light on resources would have made it better. If you have sufficient RAM to compensate, then you’re on the right track.

Nevertheless, the range of supported formats is quite impressive. As soon as you’ve installed Google Desktop, Google web searches will display matches from your hard disk.

Love it already?

Google Analytics V2 part 2

Sunday, June 24th, 2007

As I’ve stated in part1, V2 of Google Analytics has taken a giant leap to stardom in terms of high standard web analytics. In Part 1 I’ve mentioned interactive composed features designed for intelligible data communication, as well as highlighting context related issues. In Part 2 I’ll mention data segmentation access confronted with other segmentation options. Email reporting, scheduling, better dashboards & website overlay are just one of many features that I’d like to point out.

Data segmentation accessibility is throughout present in various options.
Users benefit from convenient analysis sharing within a wider range of individuals, they can write a custom message, select a convenient format and more.

The site overlay incorporates a “navigational bar” option, allowing you to switch your desires in many goals.

Page level analysis enables you to preview detailed summary/ navigation summary to the page that referred traffic to different pages from various search engines. Help & definitions are welcome throughout the application.

Cross segmentation used makes the speed of the tool more efficient.

The improved data accessibility, customizable dashboards, the trend used & the ability to import cost data from other giants is a huge help.

Considering V2’s high potential throughout the market, I’m assuming that competitors have to put great struggle to survive. They’ll just have to update their UI if they’re going to come even close.

Having experienced V2, I’m really looking forward to V3.

Google Analytics V2 part 1

Sunday, June 24th, 2007

Google’s Re-launched version of “Google Analytics” is becoming more and more appealing for all GA users.

    Most of the GA users already have access to Google Analytics Version 2, which is so profoundly different in conceptual knowledge, providing excellent background of web analytics. Whatever piece of web analytics software used (HBX, Visual Sciences, ClickTracks etc) you’ll be amazed how insightful and intelligible web analysis really is.

    The first thing I’d like to point out is the new immersive data interaction model, which sets a new benchmark for how users really interact with data. From customizable dashboards, overview reports to data presentation on key metrics manipulation. Effective communication of data via a very well thought out UI, which is perhaps the best one today amongst all web analytics tools.

    Enhanced data accessibility is by far one of the best features present in V2, both a blessing and a curse, to the amount of data we have access to. Professional key metrics offered, segmentation options being suggested, with cumulative traffic control displays an overall interesting perspective on how data is stored and discovered. Users can easily switch metrics, from standard to bottom-line to master metric trend to one of the other metrics. Drill down/ up/ around the new UI is a real pleasure.

    Rapid context searching is briefly highlighted for helping users to make the right decisions regarding plugged in context. Google Analytics Version 2 helps users get in touch with relevant context to the performance of their webpage metrics.

One of the fresh attributes that V2 has to offer is that you don’t lose valuable context as you drill down in Conversion rates (for example) for the top keyword from search engines. Comparable data & time periods at high-levels help users see valuable context throughout the console.

The Google Blog Search Experience

Saturday, June 23rd, 2007

Google did it again! Its innovatory system of spare design sensibility and open standard trademark defines a new page in quality software history.

    Google Blog Search excludes blogs without feeds, distinguishing a blog feed from mainstream news in a personal perspective. Published blogs partial-entry feeds suffer a damaged profile in results because most of them remain uncrawled. So what is Google plotting you might ask?

Running several parallel searches in different search blog engines, I’ve noticed that Google Blog Search automatically prefixes a URL search with the link: operator, defaulting the search to incoming link sources.  This can be a drawback at times, in terms that it doesn’t always locate incoming links as well as other engines do.

Even if Google eliminates incoming links from the same domain, a “Best of…” post, posted on most blogs, do not appear in Google Search results when the URL of a spotlighted entry is placed in the search box.

Users can subscribe to feeds of search results; the advanced search page offering date-constrained searches, URL & title searches in addition to form-based Boolean operators.

Though Google is still faster in returning search results, I am still waiting for more improvements and more detailed features throughout its system.

Google’s Reviews focus

Saturday, June 23rd, 2007

Google’s future revenues include a professional expertise & multi-million dollar search startup plans to compete with other market giants.

     Google’s network application “Reviews” is a definite winner in terms of movie reviews, the only thing that it covers momentarily. They have been striding for a while now, to configure custom parsers to read the custom markup schemes. It definitely got on the right development track of future review aggregation.

Nevertheless, writing a custom parser for each site that does reviews does not scale to thousands of worldwide bloggers, which are writing reviews in a different perspective.

 So if you want to aggregate all those reviews, what do you do?

One of the advantages of using hReviews comes from the large quantity of services and tools which publish reviews, artists, key events, which wait to be discovered, indexed, linked and served.

By collaborations with high representatives of media giants, Google strive to leave their personalized mark on a design of a simple format that leverage currently published reviews markup inline, without the need of duplication of all that content in the invisible metadata.

Another point to make is that it is an open advanced standard, welcome to outside recommendations by professional developers.

Unlike most micro formats orgasmic chills, Google plans to evolve rapidly throughout hReview to its highest potential.

So if you ever feel like providing a critical non-sarcastic feedback on improving their aggregation standards, publishing, indexing, and review linking, feel free to add your insightful comments.

Google’s web semantics & techniques

Friday, June 22nd, 2007

By far, Google owns the biggest database on the web today, with over 1.5 billion pages.

Google presents relevant results by using mathematical formulas to rank web pages based on the significance & importance of the pages that link to it.

  The philosophy is that high-quality websites point to other high-quality websites.

   Basically when a search is being made, Google determines web pages that meet the search criteria and then lists the most popular sites among high-quality resources at the top of the list.

Google does not seem to support full Boolean AND NOT. However, it does allow the implied Boolean minus sign (-). When multiple keywords are entered, all keywords are treated as “AND” queries. Because Google automatically returns pages that include all keywords, the plus sign (+) and the operator AND are not necessary. Also, quotation marks for phrase searching are not required as Google returns pages with keywords in close proximity.

So far, throughout its Advanced Search Page, Google supports link searching and title, domain and host searching. Using the Image, News Articles, Discussion Groups Databases, and users can search for a whole range of diverse things.

Unlike other search engines, Google offers a cached copy of each result, which can be extremely helpful if the site’s currently not available.

Beware other search engines! Google’s is going to stick around for a long time. Better fasten your seatbelts, or just start creating a professional unique development plan to dethrone Google of its highest peaks!