my thought of week..

"The greatest pleasure in my life is doing what people say I cannot do."

Current Status

Working in a telco and perform many interesting tasks
on System developments.

Current Readings...

11 June, 2015

Interviewing Programmers

Hello my dear senior friends in SW engineering , how do  you interview new recruits for programming ?Do you start with phone interview and continue on written tests to face-to-face interview? Eventually it will come down to your experience and gut feeling? Most of times we do it in that way. But we have experienced some best practices of picking "better" programmers!

In an environment like work we need more “practical programmers” than just “good coders”. Because most of times our programmers will need to directly work with end user and understand the requirement from business perspective. So we have more responsibility to choose “right” people from interviews.


We take advantage of intern programs, we hunt down the smart CS/IT students and individually ask them to apply for an internship with us, because if you wait around to see who sends you a resume, you're already missing out.


In one incident tried asking applicant to develop a program, I have used a very general requirement, which doesn't need any domain expertise (telco), but require some programming experience. I normally ask to write mathematical method to calculate something, instead of expecting the programmer to do what I think should be done implicitly, what would be a better indicator in my opinion is to see how the s/he tries to ask questions on the scope of the program, purpose, usage and limitations explicitly. Unless the programmer is very familiar with the purpose of the program, he/she should not assume what is not stated, but should try to elicit them. Also I would like to try asking to write a function using basic formations related to String in Java. This is rather simpler one but ask them to write a production like code and then see if it takes care of obvious things like null string, empty string etc.
 

For them it's an opportunity to show their think deep ability and how good they are in understanding requirements and finding gaps. This tips are not hard and fast rules to find good programmers, in fact there are no rules to find them. You just have to work through some indicator and your gut feeling. Let me know what are the tips you guys are using to find good programmers on interviews. Please comment. 

21 November, 2014

How to convert an String into int value

There are many ways to convert an String into Integer object in Java e.g. Integer.valueOf(), new Integer(), Integer.parseInt() or writing your own algorithm to convert string to int etc, but which one is the best tool for the job.

here are different ways of converting String object into int or Integer in Java :

1) By using Intger.parseInt(String string-to-be-converted) method
This is my preferred way of converting an String to int in Java, Extremely easy and most flexible way of converting String to Integer. Let see an example of String to int conversion:

 //using Integer.parseInt
 int i = Integer.parseInt("123");
 System.out.println("i: " + i);

Integer.parseInt() method will throw NumberFormatException if String provided is not a proper number. Same technique can be used to convert other data type like float and Double to String in Java. Java API provides static methods like Float.parseFloat() and Double.parseDouble() to perform data type conversion.



2) Integer.valueOf() method
There is another way of converting String into Integer which was hidden to me for long time mostly because I was satisfied with Integer.parseInt() method. This is an example of Factory method design pattern in Java and known as Integer.valueOf(), this is also a static method like main and can be used as utility for string to int conversion. Let’s see an example of using Integer.valueOf() to convert String into int in java.

//How to convert numeric string = "000000081" into Integer value = 81
int i = Integer.parseInt("000000081");
System.out.println("i: " + i);

It will ignore the leading zeros and convert the string into int. This method also throws NumberFormatException if string provided does not represent actual number. Another interesting point about static valueOf() method is that it is used to create instance of wrapper class during Autoboxing in Java and can cause subtle issues while comparing primitive to Object e.g. int to Integer using equality operator (==),  because caches Integer instance in the range -128 to 127.

18 August, 2014

SOA


"What is this SOA?" Have you ever questioned this? many of my non-IT colleagues ask me this. So here I will word it in very simple style.

Actually, SOA is architecture style.. It is an approach you follow when you develop some systems or integrated software.


From my personal experience I would say, applying SOA in Big Bang is bad, think big, start small.

Our target should be to build SOBA(service oriented business applications)


SOA governance is the key to have service catalog.


We have to have Service bus to avoid point to point interaction.

15 August, 2014

Java Design Pattern training by Oracle

I attended a training conducted by Oracle University for "Java Design Pattern Ed 1 PRV"

10 July, 2014

Ingiriya to Gelanigama - The Ratnapura expressway

The proposed Ratnapura expressway is to be constructed between Pelmadulla to Ingiriya and it would be connected to the Southern expressway’s Gelanigama interchange through the existing highway at Ingiriya, said Ports and Highways Deputy Minister Nirmala Kothalawala. 

According to the official news portal of the government, the minister made this statement while attending the Ratnapura District development meeting held recently.

The expressway, which is to be named the “Ruwanpura Expressway,” will span across 71 kilometers.

Minister Senevirathne says that motorists traveling will be able to reach Pelmadulla within an hour via Moragahahena, Handapangoda, Horana, Ingiriya and Kiriella.


 Highway from Ratnapura to Pelmadulla, highway in Ratnapura, Minister W.D.J. Seneviratne, New highway, Ratnapura highway

24 May, 2014

Java Performance Tuning and Optimization

I just followed a course from Oracle University, Course Name:  “Java Performance Tuning and Optimization Ed 1”

Fine! It was a 3 full day course, learnt a lot. I thought to share some of with you guys. Learnt to blend tuning methodology, performance theory and practical tips on solving difficult performance problems for Java applications. Had an opportunity to hone on a series of labs derived from real performance tuning issues.. they all were well organized.  also learnt about various tools and mechanisms for monitoring, profiling and tuning Java applications.

In the first discussion on Application performance I started to believe that “Speed up” ( speeding app in same infrastructure) comes before “Scale up” (vertical scalability like add more memory..) or “Scale out”(horizontal scalability like adding new server..).

When it comes to performance tuning in an app server you should keep in mind known theory of that separate JVM is created for each Java application.

What you understand by “performance”? to me, it is basically “Responsiveness” and “Throughput” of an application. If it is an user interactive app(web or game) we need high responsiveness where we need high throughput from an server side batch processing app.


The approach for tuning(performance) a java application is Monitor> then Profile > and finally Tune!

04 March, 2014

TM Forum Training

I was lucky to get a training on Business Process Framework(eTOM) from the TMForum.
I just thought to share some knowledge with you guys.

So what is this “Frameworx”?

It is an enterprise wide set of disciplines to (telco)business processes.

What Business Process Framework includes?
  • 1)Standard process structure
  • 2)some terminology
  • 3)classification scheme

What we can do with Business Process Framework??

  • It can use as a common language for system implementation, integration and procurement
  • It can use as a standard structure, terminology and classification scheme for business processes
  • Use as a discipline to the business process development
  • design, develop and manage IT applications in terms of business process requirements
  •  make end-to-end process flows, eliminating   duplications


16 October, 2013

Che Guevara Remembered in Horana

Imagen activaColombo, Oct 11 (2013) Leaders of the Sri Lanka Government and the Parliament remembered Che Guevara at an activity held in the town of Horana, one of the sites toured by the legendary guerrilla fighter when he visited this country in 1959.

The activity was attended here by Cuban ambassador Indira Lopez, who highlighted that 46 years after Che's death, his figure and ideas continue to be an inspiration in lands as far away from Latin America as the Indian Ocean island.

At a rubber plantation in Horana, Guevara planted a mahogany seedling on August 7, 1959, which today is more than 20 meters high, and under whose shade Cuba solidarity activities are often held.

One of the most colorful initiatives was sponsored by the Socialist Youth Union, which organized a motorcycle tour from Colombo to Vavuniya district, about 200 kilometers to the north, to remember the trip Che carried out in 1952 with his friend Alberto Granado through South America.

13 August, 2013

jDeveloper IllegalStateException

jdeveloper IllegalStateException in o.i.explorer.IconOverlayTracker$NodeWatcher:802

My Jdeveloper on my Windows 7 was previously working fine.
 Build JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1


SVN caused JDeveloper to break, but after enough digging I found this forum post:

https://forums.oracle.com/forums/thread.jspa?threadID=2332837

Which, sure enough, mentions the error and SVN. Tried the solution that "Suganth" posted and sure enough it worked. To fix this issues so you can work on your projects again go to:

Tools -> Preferences -> Versioning -> General




And then uncheck "Use Navigator State Overly Icons" and "Use Navigator State Overly Labels". Life should be better!