Tuesday, December 13, 2011

Tuesday, November 29, 2011

Get inspired By Steve Jobs!


  • Stay Hungry! Stay Foolish!
  • Simplicity is the ultimate sophistication
  • "A" players like to work with "A" players, they just didn't like working with "C" players.
  • If you need slides, it shows you don't know what you are talking about.

Sunday, November 27, 2011

Tuesday, November 8, 2011

Thursday, October 27, 2011

Nice Photo Gallery

Vladimir Gramagin's Gallery

One of my colleague's photo gallery. Good attempts.

Thursday, October 6, 2011

Steve Jobs [February 24, 1955 - October 5, 2011]


"The world rarely sees someone who has had the profound impact Steve has had, the effects of which will be felt for many generations to come. For those of us lucky enough to get to work with him, it's been an insanely great honor. I will miss Steve immensely."

— Bill Gates, Founder Microsoft

"From the earliest days of Google, whenever Larry and I sought inspiration for vision and leadership, we needed to look no farther than Cupertino. Steve, your passion for excellence is felt by anyone who has ever touched an Apple product (including the macbook I am writing this on right now). And I have witnessed it in person the few times we have met. On behalf of all of us at Google and more broadly in technology, you will be missed very much. My condolences to family, friends, and colleagues at Apple."

— Sergey Brin, Co-Founder Google

"I am very, very sad to hear the news about Steve. He was a great man with incredible achievements and amazing brilliance. He always seemed to be able to say in very few words what you actually should have been thinking before you thought it. His focus on the user experience above all else has always been an inspiration to me. He was very kind to reach out to me as I became CEO of Google and spend time offering his advice and knowledge even though he was not at all well. My thoughts are with his family and the whole Apple family."

— Larry Page, Co-Founder Google

"Steve, thank you for being a mentor and a friend. Thanks for showing that what you build can change the world. I will miss you."

— Mark Zuckerberg, Founder FaceBook

"He was dubbed a megalomaniac, but Steve Jobs often gambled on young, largely inexperienced talent to take Apple forward; Jony Ive and his team prove that such faith was spot on."

— Sir James Dyson, innovator and entrepreneur

"I got one of the first Macs, and my relationship with computers fundamentally changed. In both of his incarnations at Apple, he was a visionary. He provided tools. His victories were based on imagination and courage."

— Roger Ebert, Pulitzer-prize winning film critic

"No words can adequately express our sadness at Steve's death or our gratitude for the opportunity to work with him. We will honor his memory by dedicating ourselves to continuing the work he loved so much."

— Tim Cook, CEO of Apple

"Tonight our City -- a city that has always had such respect and admiration for creative genius -- joins with people around the planet in remembering a great man and keeping Laurene and the rest of the Jobs family in our thoughts and prayers."

— Michael Bloomberg, Mayor of New York City

"Steve Jobs was an extraordinary visionary, our very dear friend and the guiding light of the Pixar family. He saw the potential of what Pixar could be before the rest of us, and beyond what anyone ever imagined. Steve took a chance on us and believed in our crazy dream of making computer animated films; the one thing he always said was to simply 'make it great.' He is why Pixar turned out the way we did and his strength, integrity and love of life has made us all better people. He will forever be a part of Pixar's DNA. Our hearts go out to his wife Laurene and their children during this incredibly difficult time."

— John Lasseter, Chief Creative Officer, and Ed Catmull, President, Walt Disney and Pixar Animation Studios

"The world has lost a visionary. And there may be no greater tribute to Steve's success than the fact that much of the world learned of his passing on a device he invented. Michelle and I send our thoughts and prayers to Steve's wife Laurene, his family, and all those who loved him."

— Barack Obama, President US

"Steve Jobs was an iconic entrepreneur and businessman whose impact on technology was felt beyond Silicon Valley. He will be remembered for the innovation he brought to market and the inspiration he brought to the world."

— Meg Whitman, President and CEO, HP

"Steve was my hero growing up. He not only gave me a lot of personal advice and encouragement, he showed all of us how innovation can change lives.I will miss him dearly, as will the world."

— Jerry Yang, Founder Yahoo

"Steve was such an 'original,' with a thoroughly creative, imaginative mind that defined an era. Despite all he accomplished, it feels like he was just getting started. With his passing the world has lost a rare original, Disney has lost a member of our family, and I have lost a great friend."

— Bob Iger, CEO of Disney

"I want to express my deepest condolences at the passing of Steve Jobs, one of the founders of our industry and a true visionary. My heart goes out to his family, everyone at Apple and everyone who has been touched by his work."

— Steve Ballmer, CEO Microsoft.

Friday, September 30, 2011

What was documented on books over years!

Google Books - Data Visualization

Julian Day Calendar

Leap years:
(1988, 1992, 1996, 2000, 2004, 2008, 2012, ...)

JanFebMarAprMayJunJulAugSepOctNovDec
1 1 32 61 92122153183214245275306336
2 2 33 62 93123154184215246276307337
3 3 34 63 94124155185216247277308338
4 4 35 64 95125156186217248278309339
5 5 36 65 96126157187218249279310340
6 6 37 66 97127158188219250280311341
7 7 38 67 98128159189220251281312342
8 8 39 68 99129160190221252282313343
9 9 40 69100130161191222253283314344
10 10 41 70101131162192223254284315345
11 11 42 71102132163193224255285316346
12 12 43 72103133164194225256286317347
13 13 44 73104134165195226257287318348
14 14 45 74105135166196227258288319349
15 15 46 75106136167197228259289320350
16 16 47 76107137168198229260290321351
17 17 48 77108138169199230261291322352
18 18 49 78109139170200231262292323353
19 19 50 79110140171201232263293324354
20 20 51 80111141172202233264294325355
21 21 52 81112142173203234265295326356
22 22 53 82113143174204235266296327357
23 23 54 83114144175205236267297328358
24 24 55 84115145176206237268298329359
25 25 56 85116146177207238269299330360
26 26 57 86117147178208239270300331361
27 27 58 87118148179209240271301332362
28 28 59 88119149180210241272302333363
29 29 60 89120150181211242273303334364
30 30 90121151182212243274304335365
31 31 91 152 213244 305 366
Regular years:
(2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010, ...)

JanFebMarAprMayJunJulAugSepOctNovDec
1 1 32 60 91121152182213244274305335
2 2 33 61 92122153183214245275306336
3 3 34 62 93123154184215246276307337
4 4 35 63 94124155185216247277308338
5 5 36 64 95125156186217248278309339
6 6 37 65 96126157187218249279310340
7 7 38 66 97127158188219250280311341
8 8 39 67 98128159189220251281312342
9 9 40 68 99129160190221252282313343
10 10 41 69100130161191222253283314344
11 11 42 70101131162192223254284315345
12 12 43 71102132163193224255285316346
13 13 44 72103133164194225256286317347
14 14 45 73104134165195226257287318348
15 15 46 74105135166196227258288319349
16 16 47 75106136167197228259289320350
17 17 48 76107137168198229260290321351
18 18 49 77108138169199230261291322352
19 19 50 78109139170200231262292323353
20 20 51 79110140171201232263293324354
21 21 52 80111141172202233264294325355
22 22 53 81112142173203234265295326356
23 23 54 82113143174204235266296327357
24 24 55 83114144175205236267297328358
25 25 56 84115145176206237268298329359
26 26 57 85116146177207238269299330360
27 27 58 86117147178208239270300331361
28 28 59 87118148179209240271301332362
29 29 88119149180210241272302333363
30 30 89120150181211242273303334364
31 31 90 151 212243 304 365

Thursday, September 29, 2011

How to defect Oracle locked objects?

SELECT a.sid, a.serial#, a.username, c.os_user_name, a.terminal, b.object_id, SUBSTR(b.object_name,1,40) object_name FROM v$session a, dba_objects b, v$locked_object c WHERE a.sid = c.session_id AND b.object_id = c.object_id

Wednesday, September 14, 2011

Wanna open Delaware Inc?

startuplawyer can help out even outside US. Bit pricey though.

Interesting philosophy for Software Engineers!

Tuesday, September 13, 2011

Google Flights Search

Recently Google started its trial flights search engine. Currently it allows searches only in US, but in near future its going to be international.
Google Flights Search

Eager to see how well its going to compete with other well known search engine are kayak.com, priceline.com

Thursday, September 8, 2011

NASA - 3D Web App

Explore space beauties through NASA web application.

http://solarsystem.nasa.gov/eyes/

More details can be found at http://mashable.com/2011/09/03/nasa-web-app-3d/


Tuesday, August 30, 2011

Faster Internet Through OpenDNS/Google Public DNS

Another way to make your internet faster, secure and more manageable. Point your domain naming server to either Open DNS or Google Public DNS.

Open DNS
Google Public DNS

Please take a note of current settings so in case is these changes do not work, you can revert back to original ISP settings.

Note : Only try these changes if you are much familiar with computer systems and networks.

ORM - Anti Pattern

An interesting discussion about why ORM may be an overhead for large projects. ORM Anti Pattern Some of the issues are very evident when you integrate with extensive RDBMS or ERP database system with OO applications.

Thursday, August 25, 2011

Best of Steve Jobs's Quotes


“It’s more fun to be a pirate than to join the navy.”

“When you’re young, you look at television and think, There’s a conspiracy. The networks have conspired to dumb us down. But when you get a little older, you realize that’s not true. The networks are in business to give people exactly what they want. That’s a far more depressing thought. Conspiracy is optimistic! You can shoot the bastards! We can have a revolution! But the networks are really in business to give people what they want. It’s the truth.”

“I’m an optimist in the sense that I believe humans are noble and honorable, and some of them are really smart. I have a very optimistic view of individuals. As individuals, people are inherently good. I have a somewhat more pessimistic view of people in groups. And I remain extremely concerned when I see what’s happening in our country, which is in many ways the luckiest place in the world. We don’t seem to be excited about making our country a better place for our kids.”

“You can’t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.”

“Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven’t found it yet, keep looking. Don’t settle. As with all matters of the heart, you’ll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don’t settle.”

“Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure — these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.”

“I think if you do something and it turns out pretty good, then you should go do something else wonderful, not dwell on it for too long. Just figure out what’s next.”

“No one wants to die. Even people who want to go to heaven don’t want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life’s change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.

“Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.”
Courtesy: [Stanford commencement speech, June 2005]

Wednesday, August 17, 2011

50 Best websites by Time!

Time magazine recently published best 50 websites for year 2011. 50 Best Websites 2011 Out of these 50 sites, I find below ones are most interesting for day-2-day life.


My Top 10 Favorites of Best Websites
Web Site What For?
8Tracks Good Mucic collection for streaming. All high quality legal tracks
HowCast Videos of how to of many things
MyDamnChannel Lots of interesting short films
BigThink Experts view on science, future, arts, business and much more
GetHuman Way to get a real person not a voice menu from Customer Service
Instapaper A simple tool to save web pages for reading later.
ScienceDaily Daily Science news
Join Me share your Windows PC or Mac's desktop with others
ZenHabits Eye opening life lessons
KhanAcademy Lots of study materials on all subjects

Tuesday, August 16, 2011

Tuesday, August 9, 2011

Code Katas

David Thomas of Pragmatic Programmer [pragprog] says, "Most of other professional do practice before perform.. Artists, musicians and even physicians.. But programmers do all practice on the job. No wonder how many defects we leave at work"

Practice to become a better programmer.

A set of interesting experiments every programmer should complete to move ahead towards that goal.

Code Kata



Monday, August 1, 2011

First touch of Java 7

Java 7 is here... and there are many improvements. But as a developer, what we can use on day to day use.. 

1. Strings in Switch 
  - Long waited feature. Makes life much simpler in many ways. Till Java 5, the handling was terrible by defining constants integers or characters and we tend to improve with enums on Java 5 and now finally to match with real world identities 

2. Multi catch exceptions
 Another graceful feature. Reduces lot of code duplication.

3. Try with resources.
   Whenever we access resources we do with try catch finally block, where we release the resources [closing the connections etc] at finally block. With this feature, there will be no need of such finally blocks. The resources on try will automatically released after the try block resulting in much cleaner code.

There are much more with collections, file API, and concurrency features. Will update soon. 

package org.nava.java7;


import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.FileInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import static java.lang.System.out;


/**
 *
 * @author nadhimoolam
 */
public class ProjectCoinTest {


    public static void main(String args[]) {
        String condition = "BLue";
        testSwitch(condition);
        tryWithMulti();
        tryWithResources(new File("source"), new File("target"));
    }


    private static void testSwitch(String condition) {
        switch (condition.toLowerCase()) {
            case "blue":
            case "red":
                out.println("The choice is " + condition);
                break;
            default:
                out.println("Default ");
        }


    }


    private static void tryWithMulti() {
        try {
            File f = new File("Is this file exists ");
            throw new FileNotFoundException();
        } catch (NullPointerException | FileNotFoundException e) {
            out.println("It should be either null pointer or file not found " + e);
        } catch (Throwable t) {
            out.println("Its throwable now  " + t);
        } finally {
            out.println("Finally.");
        }
    }


    private static void tryWithResources(File source, File target) {
        try (InputStream fis = new FileInputStream(source);
                OutputStream fos = new FileOutputStream(target)) {


            byte[] buf = new byte[8192];


            int i;
            while ((i = fis.read(buf)) != -1) {
                fos.write(buf, 0, i);
            }
        } catch (Exception e) {
            out.println("Exception on trying the resources..." + e);
        }
    }
}

Friday, July 29, 2011

Body Browser By Google

Google has developed educational demo of human body. Interesting.

bodybrowser

Thursday, July 28, 2011

Harry Potter Vs Lord Krishna

Despite so many of my friends insisting on reading/watching Harry Potter movies, I never got any interest for that.

Finally, today I got a chance to hear the overall story of Harry Potter series and quite surprised to see lot of similarities with the story of Lord Krishna's childhood.

I could draw parallel lines on
 - Born in someplace and raised by others
 - One who is chosen to destroy the evil
 - Childhood glories

What else?  Almost for all major turns and twists, there is a similarity.

Did anyone feel the same?

PS: After some hard googling, I found following blog to strengthen my thoughts.

Harry and Krishna

Usability - What every product owner must know!

When it comes to usability of your product, its usually be carried out by subjective opinions of developers, designers and product managers. How highly skilled they are, some of fundamental facts are often missed during those product design discussions.

I recently got a chance to read a book "Don’t Make Me Think!: A Common Sense Approach to Web Usability By Steve Krug". The author reveals lot of so obvious common sense lessons. Few points to ponder yourself. 
  • Don’t Make Me Think!
    • When it comes to software, people often do not want think too much to accomplish something. For anyone its quite embarrassing to admit as dumb, they wont be interested visit your product next time. The page should be as much self-explanatory as possible [like traffic signs]   
  • Your goal should be for each page to be self-evident, so that just by looking at it the average user will know what it is and how to use it.
  • We don’t read pages. We scan them.
    • Reduce as much words as possible. 
  • We don’t make optimal choices. We satisfy.
    • The is no single BEST way to accomplish a thing on web. We try to find how to get things done and stick with that even though that's not a best approach. 
  • We don’t figure out how things work. We muddle through.
    • We take lot of guess work. click here and if it does not work, click somewhere else. 
  • Users Like mindless choices 
  • Create clear visual hierarchy 
    • Easy as organized as library. 
  • Use Conventions and commonly used vocabulary wherever applicable 
    • Use Job instead of employment etc. 
  • Breakup pages to clearly defined areas 
    • As per the domain. For example, how a cook would arrange the kitchen selves. 
  • Make it obvious what is clickable 
    • Link or button
  • Keep the noise down to dull roar.
    • No mess around. Simple
  • Omit Needless words 
    • Example, Google search button. By looking at it, everyone knows what to do. 
  • Happy Talk must die 
    • No need for introductions, mission, goal statement, welcome message etc 
  • Instructions must die 
    • Gone are the days to have help menu, mouse overs etc 
  • Page Navigation should be modelled like navigating a mall
  • Easy to reach home [Home page] in a click from wherever you are. 
  • Design breadcrumbs to explicitly tell user how far he is gone from home page 
  • What Home page should consist?
    • Site Identity and mission - what is it and why i should be here.
    • Site Hierarchy - what i can do here. 
    • Search - Single most important thing in home page 
    • Teases - promos, upcoming events etc 
    • Timely content - any special news NOW 
    • Deals  - if any 
    • Short-cuts 
    • Registration - 
    • Show me what I am looking for?
    • Show me where to start ?
    • Establish credibility and trust 
  • Most web design team arguments about usability are waste of time. Instead conduct usability test with targeted audience and get the objective results 


Friday, July 15, 2011

BrowserID - Single Sign On

Yet another initiative to simplify, centralize, regulate single sign on multiple web sites

This time, its from Mozilla. Lets hope one day we dont need to remember so many user ids and passwords without compromising identity.

 BrowseID

Thursday, July 14, 2011

Internet Business Model

If history has taught us anything, it’s that Internet
business models are like buses: If you miss one, all you have to do is wait a little
while and another one will come along. I’m no expert when it comes to making
money on the Web, and even if I were, whatever I had to say would probably be
passé by the time you read 
                                                                        Excerpts from Don't Make Me Think.

Tuesday, July 12, 2011

ConcurrentTesting - Advanced Testing for Multi-Threaded Applications

IBM has created a tool for testing, debugging, and coverage-measuring of concurrent programs.

Concurrent Testing

Sunday, July 10, 2011

Dec 31, 1969 Glitch!

Smart phone users might have noticed with variety of applications defaulting the date to Dec 31,1969 with current time quite often. I even noticed this on Facebook update date time.

This might not happen quite often on well tested applications but lot on sparsely tested mobile applications.

If you ever wonder why this may happen, we all know on computer, the system time counted from Jan 1, 1970.

Most of the programming languages have a interface to setup the time with number of milliseconds away from this start date [Jan 1, 1970]. if its a positive number it will be greater than the Jan 1,1970 if its a negative number it will be before that date. If its 0 [or more appropriately, less than 1 day = 24*60*60*1000] it falls to Dec 31,1969.

The number datatype mostly defaults to 0 on most of these programming languages. [Example, Java requires number of milliseconds to be setup with long data type which defaults to 0L].

So when anyone uses this mechanism to update the date and any conditions fails to set the date time, it turns out to be default value 0L and thus the underlying system sets as Dec 31,1969.

How to avoid it?

  • More Testing
  • Understand the default values of data types on your programming languages and its impact. 
  • Efficient Error handling 
  • Finally, if you are using this way to set the current time, handle it properly. To set the current time, you cannot set 0L, you should either calculate the time or use other sophisticated API to set the current date time

Friday, July 8, 2011

Start your little business today!

Interesting..

Memcached with Java in Windows

Recently I got a chance to review design of using memcached in our J2EE application. To start with I tried the cache my windows 7 development environment.

Albeit, the cache mechanism has its own limitations, certainly its one of the simplest key-value in memory cache that can scale for large applications. Facebook uses this cache on around 900 dedicated servers to scale up its needs.

The memcached comes with application exe for windows and its very easy to install, start and stop the services.

One can also use telnet to access the server and its cache content.

Java

More info on installation: Memcached for Windows
Integration with Java : Java Integration
Memcached Java Client : spymemcached


I will try to post my sample code soon.

Thursday, July 7, 2011

Tuesday, July 5, 2011

Monday, July 4, 2011

தமிழ் இணைய புத்தகங்கள்

தமிழ் இணைய புத்தகங்கள்

Why Google search does not handle empty spaces in search input?

I just noticed after decade of using Google, that its general search input does not care about empty space input

Google Search for Empty spaces

In a enterprise world lot of emphasis was given for input data sanitation and I guess so many Web developers would have fixed these kinda of issues.

I just wonder about so called "standards" in web development.

Is Google missed QA or doing intentionally?

Other Quality Engineers are fuming about these kinda of issues should think about it?

Thursday, June 30, 2011

10 must to do for Software Engineers!

Courtesy : Interesting blog

Recapturing main items

  • Have your own domain, run your own web site, host blogs and contribute regularly.
  • Install an Apache web server and configure it in a non-trivial way, e.g. to serve multiple domains.
  • Install WordPress and have your own blog. Write blog posts regularly. Write well. Good writing is a critical skill to master in this profession.
  • Write at least one complete LAMP web app, preferably two — one where P=PHP, the other where P=Python.
  • Have your own [physical or virtual] server on the cloud.
  • Install VMWare or equivalent in order to boot up your laptop with more than one OS.
  • Configure your home DSL router so that you serve a web site or other kind of server from your home machine / laptop to your friends.
  • Use a packet sniffer to learn about the network requests your computer does to your favorite game server.
  • Make contributions to an open source project.
  • Write an app that uses at least one of the popular Web APIs, like Facebook Connect or one of Google’s.
  • Use Google AdSense on your web site, and make money just by virtue of attracting traffic.
  • Compile a complicated open source project from scratch, like OpenSim or Matterhorn. (Thanks, Sean!)
  • Read works of literature and, besides enjoying the ride, pay close attention to how the author tells the story and makes use of words. Your programs should be as carefully written as those works of art! 
  • Get yourself involved in a software project where requirements are bound to change halfway through — that’s about 0.01% of homework projects and about 99.99% of real world projects, so find one of the latter kind. Finish the project with patience and the ability to take criticism in a constructive way. 
  • Write an application using map-reduce. Run it on Google app-engine or amazon EC2.

Improve programming skills!

SPOJ – Sphere Online Judge – is a problemset archive, online judge and contest hosting service accepting solutions in many languages.

To help and solve other pet projects

DreamCode

Monday, June 27, 2011

Affordable software products and services!

Lots of free and affordable products and services which you might not come across through google.

Site Point Market

Thursday, June 23, 2011

Groovy Integration with Ant

Recently I come across a requirement to execute few SQL statements during the build process. Initially we thought of executing a shell/perl script to perform the job. Then we explored the power of dynamic JVM based scripting languages.. and here comes Groovy.

It jells with Ant very well and very good support for SQL operations, including executing a stored procedures. Adding groovy to your project is very simple and straight forward. Also, since groovy is much similar to java, literally there is no learning curve.

Check out the simplified and start grooving for your petty project needs....


<project name="GroovyBuild" basedir="." default="testGroovy">
<property name="jdbc.url" value="jdbc:oracle:thin:@yourdb"/>
<property name="jdbc.username" value="username"/>
<property name="jdbc.password" value="pass"/>
<path id="groovypath">
<pathelement location="C:\lib\groovy-all-1.8.0.jar"/>
<pathelement location="C:\lib\ojdbc14.jar"/>
</path>
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="groovypath"/>
<target name="setupDB">
<echo message="Test Groovy Started.."/>
<groovy>
import groovy.sql.Sql
def jdbcUrl = "${properties['jdbc.url']}"
def user = "${properties['jdbc.username']}"
def password = "${properties['jdbc.password']}"

def sql = Sql.newInstance("${jdbcUrl}","${user}","${password}","oracle.jdbc.driver.OracleDriver")

project.addReference("groovy.sqlinstance", sql)
</groovy>
</target>
<macrodef name="read">
<sequential>
<groovy>
def sql = project.getReference("groovy.sqlinstance")
println "TestName - Updatetime"
sql.eachRow("select testname,to_char(updatetime) as updatetime from groovy_test order by updatetime") {
println "${it.testname} - ${it.updatetime}"
}
</groovy>
</sequential>
</macrodef>
<macrodef name="add">
<sequential>
<groovy>
def name = 'test3'
def sql = project.getReference("groovy.sqlinstance")
try {
sql.execute("insert into groovy_test(testname,updatetime) values(${name},sysdate)")
} catch(Exception e){}
</groovy>
</sequential>
</macrodef>
<macrodef name="update">
<sequential>
<groovy>
def sql = project.getReference("groovy.sqlinstance")
try {
sql.execute("update groovy_test set updatetime = sysdate+1 where testname='test1'")
} catch(Exception e){}
</groovy>
</sequential>
</macrodef>
<target name="testGroovy" depends="setupDB">
<add/>
<update/>
<read/>
<echo message="Test Groovy Completed successfully.."/>
</target>
</project>



Wednesday, June 22, 2011

Limitations of Javascript in large scale applications

Set of problems are very commonly encounterd while developing a large scale JS applications.

We really need to rely on custom framework until these are incorporated into standard specifications.

A Developer Gripes with Javascript

List of Programming Languages

Ever wonder how many programming languages are in the world? I just come across the wiki and wow...

List of Programming Languages

Wednesday, June 8, 2011

Joomla : Building new website in a minute!

Joomla is an open source content management system (CMS), which enables you to build Web sites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made Joomla the most popular Web site software available.

They also offer 30-day free hosting of your website in one of the cloud servers. After the trial period you can download and port the content to your desired site.

Joomla

Tuesday, May 24, 2011

CatchFree - Free Online Apps Reviews

CatchFree is a community driven website that makes it easy to discover and share the best free web apps and avoid those with hidden catches.

CatchFree

Sunday, May 15, 2011

பாரதியின் கவிதை தொகுப்பு தமிழில்

Bharathi

HotScripts

Hot Scripts is the net's largest PHP, CGI, Perl, JavaScript and ASP script collection and resource web portal. Its an Internet directory that compiles and distributes Web programming-related resources, geared toward webmasters, developers and programmers looking for enhancing their Web sites and intranets with dynamic development tools.

Hotscripts

Cross browser compatibility - Thoughts

Recently I accomplished a challenging opportunity to make IE6 legacy web application compatible for all modern browsers - Firefox, IE, Safari and Chrome.

Albeit, there were comprehensive rework on CSS, JavaScript, HTML, I wondered about quite a few facts.


  • DOM Reserved key words: The variable  location is owned by window in all browsers except IE. You can use that as a local variable :( . Same as the case of few DOM functions such as add, remove etc. Better you should have proper namespaces for all the Java Script functions you write anywhere. That way all we don't accidentally override any of WINDOW variables or DOM functions. 
  • FireFox >3.x does not allow controlling resize behavior of child windows. Noway to disable the resize of child window. 
  • String prototype method String.trim is not yet available in IE. Use of regular expression s.replace(/^\s+|\s+$/g,"") to trim the string is recommended. 
  • To provide hand over behavior with style, cursor:hand is IE specific. Use cursor:pointer
  • The select box value can be set to empty only by setSelectedIndex = -1; directly settings the values as element.value="" does not work on FireFox 
  • Setting the value for check box through DOM API does not trigger the onclick event registered with the checkbox; the event should be manually triggered 
  • Accessing the parentElement is IE specific. Use parentNode instead. 
  • To set a class to a element through DOM API, use element.className = "className" instead of element.setAttribute("class", "className");
  • While using IFRAMEs in a page, you can not use cascading style with respect to the parent level. You need to create a new Style hierarchy with the IFRAME onload event. 
  • To reset the window height and widths, following functions can be used to get the height and width of window. This is optimized across all browsers. 

getDocumentHeight = function(){
var D = document;
return Math.max(D.body.scrollHeight,D.documentElement.scrollHeight,
D.body.offsetHeight,D.documentElement.offsetHeight,
D.body.clientHeight,D.documentElement.clientHeight);
}

Similarly you can get the width by replacing all Height with Width in above function.
        


Project Lombok

  • Do you have lot of POJO in your project and need to write getters/setters?
  • Do you want clean POJOs with default hashCode and Equals implementations?
  • Do you expect a cleaner way to express your POJO? 

Here is an attempt for all these expectations.

Project Lombok

Wednesday, May 4, 2011

Protect your email address with reCAPTCHA and Google mailhide

Many spammers crawl the web looking for email addresses. When they see an email address on a web page, they send spam to the address. Mailhide allows you to safely post your email address on the web. Mailhide takes an address such as jsmith@example.com and turns it into jsm...@example.com. In order to reveal the address, a user must click on the "..." and solve a reCAPTCHA. If you use the Mailhide version of your email address, spammers won't be able to find your real email address and you'll get less spam.

reCaptcha

More about mailhide

Tuesday, May 3, 2011

Thursday, April 28, 2011

Dynamic Implementation for Interface

Legacy class implements my interface and everytime I change my interface, i had to change the legacy class as well to provide a default implementation and to get rid of my compilation issues

I want a default implementation to be applied to this legacy class whenever I add new methods to my interface.

And, I still want the legacy class to be a child of my interface

How do I get around this problem.?

Tuesday, March 22, 2011

File sharing made easy

There are many file sharing utilities available free of cost, however most of them rely on uploading the content to server and dowloading from the server.

But a new online tool Sendoid solves the problem without any need for intermediate servers. Ya, its Peer to Peer communication.

Its just works in simple way.

1. Sender select a file to share in sendoid.com
2. Sendoid creates a link to your local file
3. You send the link to receiver
4. Receiver access the link to initiate the file download
5. Sender and Receiver remain online until the sharing completes

You can also achieve unlimited file size by downloading their desktop app.

Explore at

Sendoid

Sunday, March 6, 2011

ThinkVitamin

It offers wide variety of online classes and tutorials for web designers and developers.


ThinkVitamin

Powerful alternative to Java Date API

Java Date API is inherently so buggy. If you are looking at the source code, you will really regret how you can rely on that.

If you really want to work with Dates extensively, consider using Joda Time API. Its free and wonderful.

Joda Time

Serializing Java MimeMessage

Why doesn't the MimeMessage class implement Serializable so that I can serialize a message to disk and read it back later?

The JavaMail API was designed to layer on top of existing email systems, using existing message formats. The ability to use Java serialization was neither essential nor useful for such implementations, and thus was not considered a goal of the JavaMail API.

The hard part about serializing a Message is retaining the pointers to the Folder, Store and Session. If you only want to save the content of the message, and not the object itself, the writeTo method of a message gives your everything you need. If you want to create an entire email system based on serialized messages, you should be able to subclass Message et. al and implement Serializable in your subclass.

If you want to serialize other objects of your own that reference MimeMessages, the writeObject method of your object can use the writeTo method of MimeMessage, and the readObject method of your object can use the MimeMessage constructore that takes an InputStream. Your class will need to provide a Session when constructing the MimeMessage.

Tuesday, January 25, 2011

Steve Jobs Stanford Commencement Speech 2005

Google Code Playground

Google has come up with a wonderful web platform to play around all google services.

Play around when you got time.

Google Code Playground

Saturday, January 22, 2011

Dell Laptop : Ubuntu 10.x Wireless Disabled : Quick Fix

I face this quite often in my ubuntu 10.x on Dell laptop, though I am not really sure why it happens. After troubleshooting so many steps, I figured out a quick fix.

First verify whether your connection is hard blocked or soft blocked.


$ rfkill list
0: dell-wifi: Wireless LAN
Soft blocked: no
Hard blocked: yes
1: dell-bluetooth: Bluetooth
Soft blocked: no
Hard blocked: yes
2: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Soft blocks, you can enable the wireless through right-click on top panel task bar.

If its hard blocked as its shown above , following command did trick for me 

$ sudo rmmod -f dell-laptop

Anyone knows why it happens? 

Saturday, January 1, 2011

Happy New Year 2011

Wish you all happy new year 2011.

I wish I can learn and share many more things this year.

Let this year be another creative adventure for all of us!