Archive for April, 2006

Programming Tip #6 - Using multiple JDK versions

As JDK versions keep coming one in every year, it is difficult to keep track of what runs in which version and you might want to switch between version to execute applications, to learn the newer features of the current version and so on. It is possible to install different versions of JDK in the same box. But every time you go to your command prompt, whatever java path settings you might have set in your environment variable will what be reflected. And if you want to switch to another version you have to change the value of the PATH environment variable to point to the version you want.

Here is a neat way to have a shortcut to get into the command prompt for every jdk version you have in your system.

  • Open Notepad
  • Key in the following

@echo off
set JAVA_HOME=c:\jdk1.5;
set PATH=c:\jdk1.5\bin;
set CLASSPATH=c:\java-jars\junit.jar;c:\java-jars\j2ee.jar;

  • Save the file as say tiger.bat under the folder say c:\
  • Now right click on your desktop and select New->Shortcut
  • In the program location, enter the following

cmd /k c:\tiger.bat

  • Click Next and give the shortcut name, say Tiger (JDK1.5)
  • Click Finish
  • Now double click on the shortcut and in the command prompt type the following command

java -version

Got it? You can create a batch file and a shortcut for every JDK you want just by altering the path of the JDK location in the batch file above. So lets go through whats happening here. DOS provides a way of executing commands in batch which means it can parse through a text file and can execute if that line contains a command it understands. Usually this file is saved with an extension “bat”. So in the above batch file, tiger.bat we use the set command to set the environment variables for that session. The first line @echo off says that the cmd program should suppress displaying the command it is executing. Ofcourse it doesnt stop cmd from displaying any command errors or user messages that can be displayed using the echo command.

OK once we have this file ready, we are creating a shortcut to cmd with an argument of this batch file to be executed when the shell is opened. That’s fine but what is the /k doing there? Well whenever you call cmd passing an argument it interprets and takes appropriate action and then quits. The flag /k tells cmd that it should not quit and wait for more inputs at the prompt. Try removing the /k and see the result for yourself.

Blink this Programming Tip #6 - Using multiple JDK versions at blinklist.com    Bookmark Programming Tip #6 - Using multiple JDK versions at blogmarks    Bookmark Programming Tip #6 - Using multiple JDK versions at del.icio.us    Digg Programming Tip #6 - Using multiple JDK versions at Digg.com    Fark Programming Tip #6 - Using multiple JDK versions at Fark.com    Bookmark Programming Tip #6 - Using multiple JDK versions at Furl.net    Bookmark Programming Tip #6 - Using multiple JDK versions at NewsVine    Bookmark Programming Tip #6 - Using multiple JDK versions at reddit.com    Bookmark Programming Tip #6 - Using multiple JDK versions at Simpy.com    Bookmark Programming Tip #6 - Using multiple JDK versions at Spurl.net    Bookmark Programming Tip #6 - Using multiple JDK versions with wists    Bookmark Programming Tip #6 - Using multiple JDK versions at YahooMyWeb

Comments      Cosmos

RFID

Radio Frequency Identification (RFID) is gaining momentum and if I am thinking right it is going to become hot soon.  I am sure there would be numerous projects running around this technology.  RFID in a nutshell comprises of a sensor based reader that can capture information from a bar-coded product/component and can transmit the information over a radio frequency.  There is a reciever that listens to a specific frequency and gets the information transmitted in that frequency.  The package also includes networking protocols and suite of low level softwares that can help in making it like an ordinary web request routed to the business services.  RFID implemented systems belong to Service Oriented Architecture.  The developers need not be bothered about the low level implementations and can focus on the business tier of the system.  Look at this article “Get started with RFID Development in Java” in devX for an implementation level detail of this concept.

Blink this RFID at blinklist.com    Bookmark RFID at blogmarks    Bookmark RFID at del.icio.us    Digg RFID at Digg.com    Fark RFID at Fark.com    Bookmark RFID at Furl.net    Bookmark RFID at NewsVine    Bookmark RFID at reddit.com    Bookmark RFID at Simpy.com    Bookmark RFID at Spurl.net    Bookmark RFID with wists    Bookmark RFID at YahooMyWeb

Comments      Cosmos

Foundation stone #6 - Keeping yourself updated

As open source software is becoming mainstream area of technology choices, there has been so many new technologies, frameworks, designs, standards that keep coming up. Seriously it is impossible for anyone to know everything and be well versed in it. If you are trying to do so then you will never be better in any of them. On the other hand keeping yourself updated is the only way to have a upper hand and be valuable to your organization and the industry. So how to handle it? The answer to this is you just need to know clearly what are the areas that you have to be up to date and to what extent you have to be up to date. The second part to the solution is important. When someone says that he/she knows a particularly technology what really matters is whether he/she knows the concept behind that technology. If one is good in the concept then it is matter of spending some time to really work on that technology. So keep yourself updated on whats happening in the industry and at the same time keep a cut-off of how much you want to learn about each and every new stuff that pops up. Be thorough in your specialization and only in that area go to a deeper extent.

The following are few sites you could look at or subscribe to, so that you get the updates by mail.

Sun - Java/J2EE
Artima - Weblog/Articles on Java/J2EE, C/C++, Ruby on Rails
Javalobby - Updates on whats happening in the Java/J2EE world
The ServerSide - Updates on whats happening in the Java/J2EE world
Ajaxian - Ajax and related technology updates
Technorati - Technical blog updates

The above were few sites that I could conjure up as I am writing this blog, but I will keep posting new or links that I might have missed at this time.

Blink this Foundation stone #6 - Keeping yourself updated at blinklist.com    Bookmark Foundation stone #6 - Keeping yourself updated at blogmarks    Bookmark Foundation stone #6 - Keeping yourself updated at del.icio.us    Digg Foundation stone #6 - Keeping yourself updated at Digg.com    Fark Foundation stone #6 - Keeping yourself updated at Fark.com    Bookmark Foundation stone #6 - Keeping yourself updated at Furl.net    Bookmark Foundation stone #6 - Keeping yourself updated at NewsVine    Bookmark Foundation stone #6 - Keeping yourself updated at reddit.com    Bookmark Foundation stone #6 - Keeping yourself updated at Simpy.com    Bookmark Foundation stone #6 - Keeping yourself updated at Spurl.net    Bookmark Foundation stone #6 - Keeping yourself updated with wists    Bookmark Foundation stone #6 - Keeping yourself updated at YahooMyWeb

Comments      Cosmos

Lessons learnt from Ruby on Rails

Continuting on my yesterday’s post on Harvested Frameworks, I read an interesting article in IBM developerWorks titled “Crossing borders: Exploring Active Record“. This is a good article by Bruce Tate comparing ROR’s active record vs J2EE based ORM Hibernate. In addition to it, also read Bill Venner’s blog post on “Code Generation: The Real Lesson of Rails” that refers to the same article but Bill posts his thoughts on it. Very interesting and I think there is definitely something to learn from ROR’s convention over configuration principle and the concept of dynamic code generation that Bill talks about. At Compassites we have few projects going on in ROR and we have realized how productive we were with those projects.

Blink this Lessons learnt from Ruby on Rails at blinklist.com    Bookmark Lessons learnt from Ruby on Rails at blogmarks    Bookmark Lessons learnt from Ruby on Rails at del.icio.us    Digg Lessons learnt from Ruby on Rails at Digg.com    Fark Lessons learnt from Ruby on Rails at Fark.com    Bookmark Lessons learnt from Ruby on Rails at Furl.net    Bookmark Lessons learnt from Ruby on Rails at NewsVine    Bookmark Lessons learnt from Ruby on Rails at reddit.com    Bookmark Lessons learnt from Ruby on Rails at Simpy.com    Bookmark Lessons learnt from Ruby on Rails at Spurl.net    Bookmark Lessons learnt from Ruby on Rails with wists    Bookmark Lessons learnt from Ruby on Rails at YahooMyWeb

Comments      Cosmos

Harvested Frameworks

Saturday last week I attended a conference on “Agile Development for Fun and Profit” conducted by ThoughtWorks. Martin Fowler, the chief scientist of ThoughtWorks, gave a talk for an hour on role of technology in Agile and the growing movement to change in technologies and towards lightweight frameworks. He fantastically walked the audience through the need from the SmallTalk days on changing the behavior of the program at run time.

He talked about lighweightt frameworks like Spring and Hibernate which has picked up lot of momentum over the last few years. But the trend seems to be more towards “Harvested Frameworks” like Ruby on Rails (ROR). Harvested Frameworks are essentially frameworks initially framed to solve a particular problem domain. Then you abstract and extract the essential elements that do not contain any code associated with the actual project and then generalize it. ROR framework follows convention over configuration technique. It assumes that you are going to follow certain style and structure in your project and the framework takes care of most of the configuration. This is quite contradictory to lot of J2EE related frameworks where you have to map elements, typically in an XML configuration file. There is more chance an harvested framework would become mainstream rather than frameworks which are built independent of projects from scratch.

A good example to explain convention over configuration in ROR is its in built Object-Relational Mapping (ORM) capabilities. For example if you have a table named Employee in your database it makes lot of sense to have an object Employee that is used for persistence. So you don’t need to do anything, the framework knows that you have a model named Employee and it should map it to the table Employee in the database.

And one more fantastic point that Martin brought was that harvested frameworks are opinionated which means it is built of certain standards and structure which you are accepting to adhere to, it does not try to address all areas/concerns. For example if you want to create a ROR application and you want to integrate with a legacy database such as Mainframe, then ROR is not for you.

Blink this Harvested Frameworks at blinklist.com    Bookmark Harvested Frameworks at blogmarks    Bookmark Harvested Frameworks at del.icio.us    Digg Harvested Frameworks at Digg.com    Fark Harvested Frameworks at Fark.com    Bookmark Harvested Frameworks at Furl.net    Bookmark Harvested Frameworks at NewsVine    Bookmark Harvested Frameworks at reddit.com    Bookmark Harvested Frameworks at Simpy.com    Bookmark Harvested Frameworks at Spurl.net    Bookmark Harvested Frameworks with wists    Bookmark Harvested Frameworks at YahooMyWeb

Comments      Cosmos

Foundation stone #5 - Create a Mind Map repository

The whole idea of me writing a week long series of posts on Mind Maps was all about writing this post :) . Mind Map is a fantastic tool and technique that you should try to practice and make use of it effectively. If you are already doing it, great! If you are not, it is not late. Particularly beginners who are entering into this industry can start doing it and benefit a lot. Create a mind map repository for yourself and start collecting mind maps on the following and anything more that you could think of.

  1. Foundations
  2. Concepts
  3. Technology
  4. Specifications
  5. Design patterns
  6. Architectures
  7. Planning
  8. Project Management
  9. Team building
  10. Mentoring
  11. Leadership
  12. ToDo’s
  13. Milestones
  14. Goals and Objectives
  15. Performance Appraisal
  16. ……….. (your turn)
  17. ……….. (your turn)

Good luck. If you have the will you have the way!

Blink this Foundation stone #5 - Create a Mind Map repository at blinklist.com    Bookmark Foundation stone #5 - Create a Mind Map repository at blogmarks    Bookmark Foundation stone #5 - Create a Mind Map repository at del.icio.us    Digg Foundation stone #5 - Create a Mind Map repository at Digg.com    Fark Foundation stone #5 - Create a Mind Map repository at Fark.com    Bookmark Foundation stone #5 - Create a Mind Map repository at Furl.net    Bookmark Foundation stone #5 - Create a Mind Map repository at NewsVine    Bookmark Foundation stone #5 - Create a Mind Map repository at reddit.com    Bookmark Foundation stone #5 - Create a Mind Map repository at Simpy.com    Bookmark Foundation stone #5 - Create a Mind Map repository at Spurl.net    Bookmark Foundation stone #5 - Create a Mind Map repository with wists    Bookmark Foundation stone #5 - Create a Mind Map repository at YahooMyWeb

Comments      Cosmos

Mind Maps #7

Mind maps are more about using your visual cortical skill. You have to give importance to visuals that attract your eye brain as much as possible.

So where can we apply mind maps? As such there is no limitation on where a mind map can be used, its limited only by your imagination to where you can apply. The following are some of the areas where you can apply mind maps.

  1. Brainstorming - Also called as brain blooming, using mind maps for brainstorming helps you dump your thoughts (can be used in a team) on a particular context. Once you have a mind map of what you have brainstormed, you can look at it as a whole and pick out what is relevant and prioritize.
  2. Notes Talking/Meetings - Next time you are in a meeting or a presentation or seminar, try mind mapping instead of trying to write down. You should be able to capture a lot rather than writing down the notes. Mark important key words and also associate them with what your brain brings back on those key words. This is a fantastic exercise that will help you improve on mind mapping and also improve your creative skills.
  3. Remembering - The whole concept of mind map is about remembering and bringing it back in your mind whenever you want. The mind map your produce itself is something that your mind maps it to the overall context. So if you practice it regularly you can bring the map whenever the context comes into picture.
  4. Preparation for exams - Fantastic use. I have reaped the benefits of it. All you have to do is create mind maps of every chapter or every important topic. Then you revise only the mind map and not the book and you can keep refining your mind map to include images, colors and shades to make it more interesting and thereby helping you to remember it. All you have to do is bring back the mind map in your mind when you are writing the examination and put down in text.
  5. Project Activities/Planning - Use a mind map to plan, schedule and fix milestones for any sort of projects. It is a one piece paper that can help you put the entire plan and also mark then and there milestones and the progress.
  6. Decision making - Another fantastic area of use. You can draw a mind map when you are confused to decide on a situation. Start listening to your mind and draw a mind map. 99.99% of the time your brain will bring out lot of associations on the decision that you have to take and you will be convinced with what decision you have to take just by looking at it. Try it out, you will be delighted.
  7. Training - Are you going to take a training? Prepare a mind map of your presentation and then convert it into presentation slides. You will present everything you have prepared without forgetting anything.

I gave a training on Iterative development couple of years back. Here is the mind map I prepared on it. Dont worry if you do not know anything about iterative development, but just look at the way it is represented and the images associated to the context. Click on the image for a larger view.

Iterative Development

Finally a small piece of history, the mind map technique was invented in the late 60’s by Tony Buzan. Here is a good interview article with Tony in management consulting news.

Blink this Mind Maps #7 at blinklist.com    Bookmark Mind Maps #7 at blogmarks    Bookmark Mind Maps #7 at del.icio.us    Digg Mind Maps #7 at Digg.com    Fark Mind Maps #7 at Fark.com    Bookmark Mind Maps #7 at Furl.net    Bookmark Mind Maps #7 at NewsVine    Bookmark Mind Maps #7 at reddit.com    Bookmark Mind Maps #7 at Simpy.com    Bookmark Mind Maps #7 at Spurl.net    Bookmark Mind Maps #7 with wists    Bookmark Mind Maps #7 at YahooMyWeb

Comments      Cosmos

Mind Maps #6

After reading my previous post (Mind maps #5), my friend and ex-colleague from eFunds, Vishnu wrote me a mail on how he and his friends used to learn by association. Here is a snippet of his email that talks about it.

“I am reminded of my one other friend during college, …….. He was a bit different he never followed the way of remembering things as images or mapping them to it. he used to remeber by sound and its sequence…. he was a bit different from me and my room mate. We used to frame some terms and coin some words to remember points to be written in essay but that guy would simply understand those with sound of the words he read…”

I am sure during our school/college days most of us would have tried one way or the other to remember what we learn. The idea is whether you use images or sound or any other technique, everything is a form of context association. Think about it this way, whatever technique it be, it is ultimately your brain trying to associate one conext to another using one of the cortical skills. This also reminds me of mnemonics. Do you remember the mnemonic “How I wish I could calculate pi easily today”? Count the number of letters in each word in that statement and put a decimal after the first word, and you get the value of pi (3.14159265). Read through the section on mnemonic in the wikipedia, you will find interesting statements that students use to remember lists in various subjects.

PS: You can read my blog series on Mind Maps by clicking here and reading bottom up.

Blink this Mind Maps #6 at blinklist.com    Bookmark Mind Maps #6 at blogmarks    Bookmark Mind Maps #6 at del.icio.us    Digg Mind Maps #6 at Digg.com    Fark Mind Maps #6 at Fark.com    Bookmark Mind Maps #6 at Furl.net    Bookmark Mind Maps #6 at NewsVine    Bookmark Mind Maps #6 at reddit.com    Bookmark Mind Maps #6 at Simpy.com    Bookmark Mind Maps #6 at Spurl.net    Bookmark Mind Maps #6 with wists    Bookmark Mind Maps #6 at YahooMyWeb

Comments      Cosmos

Next entries » · « Previous entries

Creative Commons License  This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.