Wednesday, September 5, 2012

Design Patterns

Strategy Pattern




















Decorator Pattern



 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Factory Pattern





Monday, September 3, 2012

Eclipse Configurations

Eclipse startup is controlled by the options in $ECLIPSE_HOME/eclipse.ini. If $ECLIPSE_HOME is not defined, the default eclipse.ini in your Eclipse installation directory is used.

eclipse.ini is a text file containing command-line options that are added to the command line used when Eclipse is started up

All lines after -vmargs are passed as arguments to the JVM, so all arguments and options for eclipse must be specified before -vmargs (just like when you use arguments on the command-line)

 
-vm (Executable, Main) locate the Java VM to use to run Eclipse. It should be the full file system path to an appropriate: Java jre/bin directory, Java Executable, Java shared library (jvm.dll or libjvm.so), or a Java VM Execution Environment description file.
-startup (Executable) The location of jar used to startup eclipse. The jar referred to should have the Main-Class attribute set to org.eclipse.equinox.launcher.Main.
--launcher.library (Executable) the location of the eclipse executable's companion shared library.
-showSplash (Executable, Main) specifies the bitmap to use in the splash screen.
--launcher.XXMaxPermSize (Executable) If specified, and the executable detects that the VM being used is a Sun VM, then the launcher will automatically add the -XX:MaxPermSize= vm argument. The executable is not capable of detecting Sun VMs on all platforms.
--launcher.defaultAction specifies the default action to take when the launcher is started without any "-" arguments on the command line.
-vmargs [vmargs*] (Executable, Main) Used to customize the operation of the Java VM to use to run Eclipse.



For more infor: http://wiki.eclipse.org/Eclipse.ini

More Options: http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html

Optimal Settings: http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse


My current settings (Eclipse Helios running in CentOS)

-vm
/opt/jdk1.5.0_15/bin/java
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms1024m
-Xmx2096m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.browser.UseWebKitGTK=true

Eclipse Plugins : ObjectAid UML Explorer


If you are a Eclipse user and you want to construct a class diagram from an existing codebase, you can use the following.

Simply go Help ==> Install New Software
Add http://www.objectaid.com/update as a site and it will find the tool.



You need a license to use the Sequence Diagram Editor, but the class diagrams are free. It's extremely easy to use and a must-have in your eclipse toolbox.



Visit http://www.objectaid.com/  for more infor.

Eclipse Crashing Issue

My eclipse kept on crashing in my CentOS PC. Issue seemed to be related to having firefox as the default browser. But changing the default browser was not possible since it was crashing every time I tried to change it.   Tried out several versions of eclipse with no luck.

Following solution was found from a blog and it worked!

Add the following to eclipse.ini.

-Dorg.eclipse.swt.browser.UseWebKitGTK=true

Wednesday, August 22, 2012

Are you ready yet?


We had the privilege of participating in Are You Ready? 2012 organized by the Rotaract Club of University of Moratuwa. (http://www.areyouready.uom.lk/) It was a huge success because we were able to find some great people who fit in to our requirements.

I thought I should write a few points here that might be useful to the fresh graduates

Being from UOM myself, and associated with many mora graduates at different levels in the cooperate world, I have no doubt about the capabilities and competencies of UOM products. Yet it's sad to see some candidates perform poorly at interviews merely because they haven't paid any attention to some simple facts.

Interviews need practice. Make sure that your first interview is not with the actual place you want to join. The opportunities to participate in interviews are so many and they are FREE! Career days are wonderful for you to get this learning experience.

Specially in a career day like this, we don't get to read your CV word by word. Even at office this is usually the case. People have better things to do than reading hundreds of boring Cvs. We'd usually scan through. We'd pay attention to some areas, like projects and internship. Be mindful of that when you prepare the CV. Highlight only the important points and keep the CV short and sweet.

If there's one good advice that can be given to a fresh candidates, it's to think like an interviewer. See yourself in the other chair and imagine you're listening to the answers. It can make a world of difference to the way you present yourself.

The first thing you get to speak about in at least 95% of the interviews is describing yourself. This is not your grade 3 English class period where you get to speak 2 minutes about “Myself” No! But it's hard to believe how many people actually go on “I'm Sunil Gamage, I'm from Panadura. My father is a government officer, my mother is a housewife, I have 2 brothers and 1 sister .... bluh bluh bluh” and sometimes if we don't intertwine and stop they'd go on describing pets, hobbies and what their neighbors look like!
Remember, we're interested in hiring YOU! Not your parents or your siblings and it doesn't matter if your father is a farmer, a government or the president. It doesn't matter from where in the island you're coming from.

Here is your opportunity to paint the image about yourself as you want it in the mind of the interviewer, your opportunity to show what a great hire you can be, how confident you are and how passionate you are about work.
These few golden minutes are just too important to waste.

Next, since you don't have work experience yet, there are few things any interviewer will ask about.
  1. The final year project
  2. Other projects
  3. Internship period
All interviewers, specially those who represent IT companies, love to see a lot of projects in your CV. Specially the ones that you did outside the mandatory requirements of your degree. One candidate who had a poor GPA etc, made it to the next level simply because of the Google Summer of Code projects he did out of his own interest.

You may make a few grammar mistakes, a few pronunciation mistakes and that's ok. We do not, i repeat, do not hire you for your English language proficiency, but we DO hire you for your communication skills. What is the difference? When you work in a company you do not work alone, you have to deal with people at different levels. It's important that you're able to convey an idea, a message, clearly and effectively. When you talk about your projects, if we understand, that means you have communicated well. But if you have left us scratching our heads and wondering what you have done, that means you haven't communicated well. Can you communicate well in broken English? Sure you do!

No company has employees only from UOM and only those who have got 3As for their A/L. That means we get Cvs of people with different levels of qualifications. Among them, your CV is sure to shine. You already have a lot at your side. So why be nervous? Be confident, take a deep breath and feel good about yourself. Don't let some questions, to which you don't know the answer, make you feel stupid. Nobody in the world knows everything about even a single subject. If you don't know, fine, admit it and may be try to make an intelligent guess and tell that it's guess. Do not expect interviewers to feel confident about you, if you are not showing any confidence yourself.

Chances are that you are smarter than your interviewers, just like back in school you were smarter than most of your teachers. You were smarter but your teachers taught you. Why? For the simple reason that they knew better about the subject than you did. So is the case with interviews, they know better about the industry, the company and the requirements they have. Be smart and confident but don't be arrogant and give airs to your interviewers. Nobody wants to work with people who believe they are know-alls.

Finally, Google and find some articles and books on facing interviews. At least spend the time you'd spend on an assignment to prepare for your interviews. Think about it. You may get a few extra marks for the assignment and forget about it, but an interview will determine what you do and how much you get in terms of experience and of-course money for at least a few years.
Isn't it much more critical?