Posted in General

QuitePlease source code

It has been an year that I decided to write an app. Got it to near completion and left it there at end. It is a working app. Just had plans to get a cop voice to tell people to behave and stuff. But never got to it.


If anyone want to take the source code for iPhone App ‘Quite Please’ and use it, please do. The source code is available at QuitePlease and Sounds. I don’t mind if you use my name or not. Just take it, use or change it.

Posted in General, Questions, Strategy/Vision

What makes a person Smart?

You often see people call some wow she/he is smart and he/she is dumb. But what is it that makes a person smart.

A smart person can solve their problems and even solve problems for others?
I think so.

So how does he do it?
Many might say “a person is smart or not, you cannot make a dumb person smart”. Well I want to challenge the word CANNOT.

So how exactly does a smart person solve problems?
Well see these key things:
@ intention to be smart, so it has long term benifits.
@ studying the problem and identifying the options that could change the outcome. This process need a lot of patience when you know nothing about it. I don’t believe time is a problem it’s paticence. Upon practice time taken will come down.
@ trying out some options. Failure of an option means it’s a new lesson. It’s better to learn from other peoples lessons
@ identifying some patterns and remembering them helps speed this process

Want to do this quicker?
@ Try to solve same problem differently
@ optimize continously
@ discuss with other about your approaches and understand their think process, solution is not the important aspect it’s the method to get to solution

Suddenly you realise how simple things get. You will be laughing at silly ways of your past thinking.

Posted in General

Java Class Not Found

Getting class not found? But the Class is available in classpath? Well it usually should work, but I have seen a senario where it does not. Its because the ClassLoad is null, we had this issue when using Cold Fusion 4.5. One could argue that its bug in Cold Fusion’s class loading mechanisum. Regardless it was not a time to play the blame game, we needed to resolve the issue and we cannot upgrade the Cold Fusion due to Corporate policies & tight deadlines. The hack which worked is:

ClassLoader cl = Thread.currentThread().getContextClassLoader();

Posted in General

Java Land

Its been a long time (a good few years), i had to get in touch with Java. Its pretty basic stuff we had to do. We needed to call a web service over JMS for some data (SOAP/JMS). In .net typically adding a web reference will get the method, object hierarchy, use a JMS provider. In java it seems to be a bit longer way. I am really suprised, if this is really the best way. Suprisingly Java has few libraries to use for web service calls:

  1. JAXB to convert XSD to Object hierarchy using command line.
  2. Next use SAAJ to wrap SOAP headers.
  3. Tibco’s JMS API to communicate.

My question is, do we really need to run command lines & hand code the SOAP calls in Java land? Doesn’t Eclipse have add refence like .net does? So we can quickly generate all the basic stuff we need. I understand if we needed to customise anything we can in Java, same applies with .net. It has command lines and stuff if required. Is there a better way? If not, why the long way?

Posted in General

Older technologies

We had a strange issue. For some reason an existing application uses Cold Fusion 4.5, which was released in 1998. Cold Fusion 4.5 has Java Interop, but its JVM was 1.2.1. We had to call a web service over JMS (SOAP/JMS). As back in 1998, we didn’t have Web Services, we decided to use Java Interop to do our web service communication for us. Some how Cold Fusion allowed to execute JVM 1.5.x but not 1.6.x, we were happy as it was more than 1.4.x.

Posted in General, Ideas

Conditional Rendering in ASP.NET AJAX 4.0

There are times when using a Prototype template or jQuery templates, we feel like “wish it had conditions & collection loops”. Conditional rendering in ASP.NET Ajax 4.0 seems to address this to some extent. Its pretty much using attributes like below in tags

  • sys:if="false" - this as the name sounds is a Javascript condition
  • sys:before="false" - is PreRender equvalent script for this XHTML Element
  • sys:after="false" - is PostRender equvalent script for this XHTML Element

Pretty basic stuff, but we can’t use loops and more JavaScript. But may be helpful.  What i would like to see is, browsers support javascript eval statements already. I think we need to write something, which just will keep the existing jQuery/prototypejs template structure. But embed <%%> like structures, which is real JS. This has to work with relatively less code, compared to the total freedom. Lets say we define our template as:

    <# if(dataItem.States && dataItem.States.length>0) #>
            <# foreach s in dataItem.States #>

For easy of development sake, we could mandate that the JS blocks must be enclosed in tags, and all tags must be closed properly. We are currently assuming its </##>, we could pick something else. not <$ $><!– –> or <%%>, as they are used already by .net, jsp, html and other languages) template. The js class, which we implement, say JsTemplate should just create grab all the JS template tags, evaluate them and create a larger template. Which will end up being jQuery Template (temptest) or prototype template. We could have some predefined variables like dataItem and stuff, similar to variables in We should be good. We just use JavaScript’s eval() to evaluate the JS.

Feel free to suggest improvements or ask for clarifications on this. After reading the article on MSDN, i thought we could use native JS eval() to extract more from templates, without creating much of a new laguage.