A Mature Developer

Let’s call a developer reaching that 10x definition like achieving nirvana. He has experienced almost everything in SDLC, he is productive, quick to self-brainstorm, communicates what is needed, never let the shit spread, gels well with the team, creates examples for others to follow, etc. Apart from technical competency what are the other qualities that a 10x engineer should have? Let’s find some answers and define these as base for a mature developer!  Ownership Get involved with what you are building rather than thinking 9-6pm and go home. Once shipped, get excited about how your feature is doing. Are customers adopting? Are there any exceptions in production that went unnoticed when…

Read more

Inline jQuery misses CSS change event in IE10

The goal is to achieve slow rotation of an image infinitely. So, the trick i thought of using two CSS classes. First class is a base css. Another defines rotation and transform delay. Here are these two: .image_basic { overflow:hidden; } .image_rotate { -webkit-transform:rotate(3600deg); -moz-transform:rotate(3600deg); -ms-transform:rotate(3000deg); -o-transform:rotate(3600deg); transform:rotate(3600deg); -webkit-transition-duration: 400s; -moz-transition-duration: 400s; -ms-transition-duration: 400s; -o-transition-duration: 400s; transition-duration: 400s; transition-timing-function:ease-out ; transition-delay:0.2s; -webkit-transition-property: -webkit-transform; -moz-transition-property: -moz-transform; -ms-transition-property: -moz-transform; -o-transition-property: -o-transform; transition-property: transform; overflow:hidden; } It’s a transform for ten rotation over 400 seconds. This roughly gives you slow rotation indefinitely (assuming 400 seconds ~ 6 mins is enough time to stay…

Read more

Android Interview Questions

Hi Guys, Here are some Android test questions that I have compiled. Search for their answers by reading Android Docs. Post your answers in the comments. If you are too desperate for answers you can try . Which class is used to handle the Bluetooth on Android? Which package provide set of classes required to manage the Bluetooth on android sdk? What is a sticky intent? How to show a non-modal dialog/information on screen? OR What’s the purpose of Toasts. What is a 9-patch image and how to benefit from it? What is adb? Following are some more generous objective…

Read more

Singleton Toast

On Android you may have experienced delayed toasts or overlapping toasts. This causes the toasts being displayed with irrelevant context/activity (e.g. user may have pressed backed, or previous toast is still overriding new one, or when too many toasts are displayed on screen). Consider the code below. It defines a single function for toast, that makes use of context object of Application. The class MyApplication needs to be declared in manifest.xml. The main advantage of such design is reduced footprint for activity’s context object. at any moment only one toast remains on screen reusing single toast object, rather than creating…

Read more

ProxySwitcher – My First Firefox Extension

At IITK we have two Internet proxy-servers. Sometimes, one server goes down and we are required to switch to another by navigating to Tools > Options > Advanced > Network > Settings. With Firefox, I tried to simplify this effort with following extension – one click proxy switcher! Once installed, you will see IITK’s Proxy Switcher in Tools menu. This extension switches between direct connection, bsnlproxy and vsnlproxy. It only modifies server-address and leaves PORT number as it is.

Read more

Split Pascalcase String

Do you ever need to split a camel case or pascal case string to a set of words? This can be achieved simply by regular expressions in Java as well as C#. The following code is for Java: String camelCase = “StructuralDesignPattern”; StringBuffer label = new StringBuffer(camelCase + 10); java.util.regex.Pattern p = java.util.regex.Pattern.compile(“[A-Z][a-z]+”); java.util.regex.Matcher m = p.matcher(camelCase); while ( m.find() ) { label.append( m.group() + ” “); } System.out.println(camelCase + ” >> ” + label.toString()); [ Note: this does not work for all test cases. You may also want to try regexp as “[A-Z][a-z]+”, for matching any continues uppercase letters…

Read more

Handicapped Software

[ 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…

Read more

Unreachable code Error or Warning?

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.

Read more

Setting up SDB for MySQL

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. Download SDB. Extract it into some folder. SDB works…

Read more

Lucene StopWords

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…

Read more