Skip to content

Handicapped Software

25-Jul-09

[ This post is about software's disability to meet users' expectations. I know you have developed lots of software/applications over your career! Have you ever evaluated them on disability index? No, then read on. "You" = refers to our typical "software engineer" ]

Ever heard someone saying “this software sucks”… I love such moments. It makes me laugh, not for the user, but for the poor developer! Users are innocent, they are not concerned about technical details. A software is there to make life simpler and hide complications of a task. It’s your responsibility to make it intuitive and meet users expectation on first impression, rather showing unnecessary (modal) alert boxes or irrelevant (technical) details. You don’t need to be a Usability Engineer. Just,

  • stand on users’ shoe and think what is annoying
  • don’t take negative feedback as an attack on you and your beliefs.
    Rather it’s a feedback on your understanding about how much you understand your users. In short never reject/resist on feedback.

Nobody hates software more than software developers and nobody distrust software more than software developers. Scott Berkun has written a good post about why software sucks. ( I have heard software engineers saying that they don’t trust online money transactions. Heck !! Do you need President to meet you and ensure? )

Here is what I think you should target as first step:

  • Any tasks that you think user should perform by reading Help/Documentation, MUST be automated.
  • Even an single unnecessary alert box annoys. Features should be available with less no of clicks. Still this is very subjective matter to discuss. A simple guidelines is – only system errors or exceptions should raise alert-box, tiny information should be modal-less dialogs (or like balloon pop-up).
  • users never read entire screen. Default values chosen or default selection of check-boxes makes big difference in a long run.
    E.g. while filling an online form a default selection of check-box “subscribe me for spam mails”. Who does read entire form before clicking submit? None. But it affects your reputation in long run.
  • Never hesitate in picking a useful (cool, awesome, sexy, astonishing, amazing! ) feature from competitive software. Ask a simple question – Does it add value to your product? You won’t like this argument, but this is truth. The success of Web is a tiny ‘view source’ feature. Well, this is a fast moving industry where we learn from other, we improve over time. You never blame the world for borrowing tabbed browsing from Opera (originally by NetCaptor). It’s a matter of accessibility, and understanding what your users like and what they dislike is a key to success.
  • Don’t recruit incompetent programmers, because a incompetent programmer creates two new jobs a year. If you have a few already, either trains them or fire them. (Sorry pals)

- ankit
( and finally, this is a 100th post on this blog. Happy Blogging! )

Buzzword: Cloud Computing

23-Jul-09


Youtube link for video: Larry Ellison – What The Hell Is Cloud Computing


Larry Ellison, CEO of Oracle Corporation, describes all the fuzz around cloud computing in a short introduction. He touches very reasonable concern –

computing industry is the only industry more fashion driven than woman’s fashion

Of course, this is true. Think about the last 10 years, how many new languages introduced, how many new versions of existing languages, new frameworks are released everyday, etc; But what about the compatibility with old? Isn’t today we (as a system owner, who actually pays for software development) want to have a stable, low cost, maintenance free software. I want to install it once and be assured for rest of 5-10 years. New versions/frameworks comes with new bugs. Do you have a stable CRM/ERP that can help me in 5-10 years run?

Unreachable code Error or Warning?

08-Jul-09

In Java, unreachable code is treated as compilation error. What do you think? Isn’t making it warning would have made developers’ life simpler?

Of course you can write –

if( true )
   return;

What if you could simply write return. This helps in testing a function quickly. As a good programming practice we always remove all warnings from code, and such unconditional return statements can be rectified later.

Best Geek Quotations

26-Jun-09

feeling geeky? here are a few t-shirt quotes for you

talk is cheap
SHOW
me ur
CODE

browse me..
||
free the WEB

copy and paste doesn’t create bad code.
Bad programmers create bad code.

I would love to change the world, but they won’t give me the source code

If it’s not on the net, it’s not on Earth.

Who is General Failure and why is he reading my disk?

I don’t write comments.
If it’s hard to write, it must be hard to understand !

Passwords are like underwear. You shouldn’t leave them out where people can see them. You should change them regularly. And you shouldn’t loan them out to strangers.

On the keyboard of life, always keep one finger on the escape button.

There is no place like 127.0.0.1

You know it’s love when you memorize her IP number to skip DNS overhead

Girls are like Internet Domain names, the ones I like are already taken

It’s not bogus, it’s an IBM standard.

- Esther Filderman

“computing industry is the only industry more fashion driven than woman’s fashion”
- Larry Ellison

you are looking at
GEEK GOD

My quotes:

गूगल मेहरबान तो गधा पहलवान

when god left bugs in me, how can my software be perfect

hardware is cheap, and programmers are expensive

I am a typists first, Programmer second

my previous BOSS fired me.
he found me using GOTO in code.

don’t fall in love with your code, because then you start ignoring mistakes!


Few others:

you gotta risk it to get the biscuit

I love deadlines.
I like the whooshing sound they make as they fly by
- Douglas Adams

Notation:
<front> || <back>

Google अनुवाद

25-Jun-09

Read this:
जेना एक अर्थ वेब रूपरेखा जावा में लागू है. यह आप की दुकान करने के लिए / क्वेरी / अनुमान RDF / RDSF / उल्लू triples की अनुमति देता है. जेना एक triples RDF () में से सेट में मॉडल कहा जाता है या मॉडल वस्तु के भीतर जमा. डिफ़ॉल्ट द्वारा जेना में पैदा-स्मृति मॉडल है, लेकिन इस पर कार्रवाई करने के लिए उपयुक्त triples की अगर आपके पास बहुत बड़ी सेट नहीं है. यहाँ sdb आप को बचाने के लिए आता है. यह जेना की है कि आप MySQL, MSSQL, PostgreSQL, Oracle, आदि जैसे संबंधपरक डेटाबेस में इन मॉडलों को स्टोर करने की अनुमति देता है एक घटक है, जबकि Ubuntu पर sdb स्थापित इस पोस्ट में मेरे अनुभव का वर्णन करता है.

Now read original one:
Jena is a semantic web framework implemented in Java. It allows you to store/query/inference RDF/RDSF/OWL triples. In Jena a set of triples (in RDF) are called Model or stored within Model object. By default Jena creates in-memory models, but this is not suitable if you have pretty large set of triples to process. Here comes SDB to rescue you. It’s a component of Jena that allows you to store these models in relational databases like MySQL, MSSQL, PostgreSQL, Oracle, etc; This post describes my experience while setting up SDB on Ubuntu.

and what’s the title of my blog?
तु मेरी जिंदगी है!

lol…

Where did this come from?
Google अनुवाद

Well, it’s not that bad. For Hindi translation simply converting words and reordering subject/verb/object is not enough. Where does the semantic/context go?

Setting up SDB for MySQL

21-Jun-09

Jena is a semantic web framework implemented in Java. It allows you to store/query/inference RDF/RDSF/OWL triples. In Jena a set of triples (in RDF) are called Model or stored within Model object. By default Jena creates in-memory models, but this is not suitable if you have pretty large set of triples to process. Here comes SDB to rescue you. It’s a component of Jena that allows you to store these models in relational databases like MySQL, MSSQL, PostgreSQL, Oracle, etc; This post describes my experience while setting up SDB on Ubuntu.

  1. Download SDB. Extract it into some folder.
  2. SDB works with SUN Java only. Ubuntu has GNU Java installed by default. You need to install SUN Java and set it as default.
    [Note: you know why this point is important? I wasted 1 hr when I did same setup second time. Later I realized I was using GNU libgcj (gij/gcj). For god's sake, someone please kill gcj...
  3. Create a database for SDB in MySQL. I did using phpMyAdmin. Let’s call this database SDB2.
  4. Prepare a store description file. It serves as config for SDB and contains information like where to connect. You will find one such example file in the SDB directory. Here is an example for the description file I have used:
    @prefix sdb: <http://jena.hpl.hp.com/2007/sdb#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
    # MySQL - InnoDB
    <#store> rdf:type sdb:Store ;
    sdb:layout "layout2" ;
    sdb:connection <#conn> ;
    sdb:engine "InnoDB" ; # MySQL specific
    .
    <#conn> rdf:type sdb:SDBConnection ;
    sdb:sdbType "MySQL" ; # Needed for JDBC URL
    sdb:sdbHost "localhost" ; # or the IP address of the database server
    sdb:sdbName "SDB2" ; # MySQL database name
    sdb:sdbUser "username";
    sdb:sdbPassword "password";
    sdb:driver "com.mysql.jdbc.Driver" ;
    .
  5. Set environment variables:

    SDB installation directory –
    export SDBROOT="/home/ankit/tmp/SDB"

    Path to MySQL JDBC commector jar which contains com.mysql.jdbc.Driver class.
    export SDB_JDBC="/home/ankit/tmp/SDB/mysql-connector-java-5.1.7-bin.jar"

  6. Required tables must be created in database before we can use it. Run following to initialize SDB2 database. This creates 4 tables inside SDB2.
    bin/sdbconfig --sdb=sdb.ttl --create
    If this fails, somthing went wrong with settings. Check them again.
  7. Next you can run test suit to ensure everything is working fine.
    bin/sdbtest --sdb=sdb.ttl testing/manifest-sdb.ttl

    In my case one testcase failed stating -

    Failure: Unicode-5(com.hp.hpl.jena.sdb.test.junit.QueryTestSDB): Results sets not the same

I decided to write this as the SDB wiki does now contains clear steps to follow. Hope your semantic (web) application ROCKS !

- ankit

Setting Default JVM on Ubuntu

21-Jun-09

Heard of ‘update-alternatives’ on Linux? It’s a smart utility to find various versions of one software and set default.

For example, you may have GNU Java as well as Sun Java. (frankly saying, I hate GNU Java, aka gcj)

sudo update-alternatives --config java

[ Where can I see all installed JVM?
On Ubuntu, Java Virtual Machines are installed in /usr/lib/jvm. You can see java-gcj here which comes by default with Ubuntu.
]
- ankit

Ankit on Google Maps

28-May-09

a search for Ahmedabad in Google Mapsailla I’m in the top-contributors list !

ankit-google-map

[ What is Google Maps?
Google Maps is a web mapping service application and technology provided by Google. It offers street maps, a route planner for traveling by foot, bicycle, car, or public transport and an urban business locator for numerous countries around the world. It also can help find the location of businesses.

I want to be there, but how?
All you need is to contribute via Google Mapmaker. Start tagging places/buildings for the areas you know or lived. And one day you will be listed on Google Maps :) . It took me a week for ~100 edits.
]

[ Update 2009-07-13: My edits are now visible on Google Maps.. Hurray !!

Update 2009-08-03: Now in search results too. Check D-cabin, Ahmedabad
]

- ankit

Lucene StopWords

27-May-09

Lucene is a open-source high performance full-text search engine and has libraries for almost all well known languages (Java, C#, PHP, Python, C). This post is about describing StopWords for a full-text search engine (Lucene).

( Lucene can also be used to index database table rows. The advantage for having Lucene search instead of (database software’s) in-build full-text search engine is Lucene ranks search results based on their relevancy. For example assume you have a product table with <title , description> fields and you want to give higher rank to ‘title’ over ‘description’. )

A stopword is a language-word that has no significance meaning in a keyword based search system (e.g. Google). Lucene also has a set of such words for English language and these are simply ignored while analyzing/tokenizing text. You can find them inside org/apache/lucene/analysis/StopAnalyzer.java file declared as StopAnalyzer.ENGLISH_STOP_WORDS constant.

public static final String[] ENGLISH_STOP_WORDS = {
"a", "an", "and", "are", "as", "at", "be", "but", "by",
"for", "if", "in", "into", "is", "it",
"no", "not", "of", "on", "or", "such",
"that", "the", "their", "then", "there", "these",
"they", "this", "to", "was", "will", "with"
};

You can also specify your own stopwords while indexing text. Use StandardAnalyzer’s constructor and pass a set of words as agrument. These will be ignored while indexing.

- ankit

Gmail Bug with attachent !

14-May-09

Seems like following is a bug in Gmail system. I was investigating over PHP.Backdrop.Trojan and wanted to show malicious installed.php file to my friend. Here is what I did -

1. Created a reply mail (in Gmail).
2. Attached two files. One of them was malicious ‘installed.php’. The attachment was successful.
3. Saved draft.
4. Clicked ‘Send‘ button, and got confirmation about successful send.
5. Now when I clicked ‘Your message have been sent. View message.‘, voila! nothing happen and it didn’t even showed me my mail.
6. Later after few hour I realized that mail has not been sent and still there as draft!

That’s why they call it beta!

[ Note: Ideally a message with viruses should not circulated. My concern in this post is the invalid message/alert displayed to user! ]

- ankit