Archive for the ‘java’ Category
Blogging after a long gap.. As this post is mainly for GIDS, talk about the rest of the stuff later 🙂
GIDS 2009 – Great Indian Developer Summit (Thank god, there exists other gids — Giri Institute of Development Studies in http://www.gids.org.in/) , a great technical conference from the people all over the world ranging from Java to .Net to Web 2.0 🙂
First thing to appreciate is the way the events are organized. Phew, got really amazed by the way delegates are notified of all the events and registrations and any such notices through an SMS.
Thanks to my colleague Vivek Juneja who had actually let us know and coordinated with the GIDS organizers to get the concession package for a team of 10 people from the same company! Feel like the money spent was not wasted 🙂
Moreover, happened to visit IISC, Bangalore for the first time which I had been waiting for 🙂 though it happens in JN Tata Auditorium.
Attended the Day 3 and 4 sessions on yesterday (Java) and today (workshops) .
Day 3 : JAVA
1. Struts 2.0 Deep Dive by Prabhu Subramanian of DuraSoft, India
It was a nice session to get to know about Struts 2.0 — the new features offerred by Struts 2.0 , the benefits and betterments from earlier versions, significant differences of Struts 1.x Vs 2.0 were neatly covered and the session ended with a hands on demo application of a traditional “NumberGuess” application.
But the session was not satisfying the title I believe. It was not a deep dive at all rather just a gentle intro! 😦
2. Know your Java by Venkat Subramaniam
This is one of the excellent and interesting sessions. Venkat is a very nice person and well experienced and I have already interacted with him in one of the Book Promo sessions in JavaRanch for his book “Programming Groovy” and was glad to see him in person and attend his session. 🙂 He is the directory of the company http://www.agiledevelopers.com .
The session was very good and inquisitive as he had prepared Q&A in basic Java on some categories like Strings, basics, Derived, Math etc., each with the points of 100,500,1000. Volunteers are asked to come to stage and pick up their choice of interest and give a try for answering the question. Venkat did NOT only validate the answer but also demonstrated then and there in his Apple MAC which was really satisfying and convincing :). I got one 500 points and at the end he called up the peopel whoever has got 1000 points and handed over his books :).
I would have picked up one for 1000 points but somehow dint want to go for “derived” topic and went for my favorite “Strings” area hence I missed the book! 😦 Had I not missed the initial few minutes of the session, I would have grabbed one?
Tea break 🙂
3. Unleashing the power of Java on Intel by Mukeh Gangadhar
It was an informative session by an Intel engineer and nice to rehearse the electronics terms (processor, cpu cyles, throughput etc., after a decade) as he was demonstrating the various ways to optimize the Java applications running on Intel and other tools available for monitoring the performance.
Lunch break 🙂
4. Building RESTful applications with JAX-RS by Criag McClanahan
Was very very excited to see him as he was the original founder of popular open source J2EE Web application framework called Struts 🙂 . He had been also the one of the main persons in JSF (Java server Faces). Though I could not attend his first session “What is RESTful?”, was somehow able to cope up with this session.
5. Programming Groovy by Venkat Subramaniam
This was again one of the interesting sessions and could not even believe that the session was over after the stipulated time. It was all about Groovy a new dynamic language which runs on top of JVM and the features it offers, few excellent benefits it offers, programming features of the language etc. Of course everything with the instant demo!
Kept all the audiences in sync 😉 Kudos..
Tea break 🙂
Day 4 – Workshops
1. Building external DSLs for Java by Venkat Subramaniam
Started with an introduction of DSL (Domain Specific Languages) and what it is all about and continued with the need for the DSL, the two different types of DSL (Internal and External) the present trends and activities being done on it.
The good part is the Q & A session wherein we get to know about the good collection of views and the way venkat takes them up and clarifies. He discussed about Xtext — an DSL tool comes as a plugin for Eclipse. He had demonstrated one application with XText and the source code it generates along with the parser 🙂
[will blog in detail about the DSL on a separate post]
2. JRuby in Action by Ola Bini
Ola Bini has been one of the 8 core developers of Ruby language and he has been promoting the same thought some of them have quit in the middle. It was nice to see the Ruby features and the pros and cons with the application being demonstrated.
One thing is Ruby was developed based out of Java (following and/or keeping Java in mind) but it just works like a C program but with the Garbage Collectable facility. Has drawbacks on performance compared to Java and few others. Still people go for it due to the features, ease of use .
3. Get Connected – A web based Tutorial by Jim Webber
He is a director, architect of Thought Works and an author of the book “Building Enterprise Web Services”.
Attending right now 🙂
He is talking about the evolution of Web and the various paradigms the history has been seeing. The needs and driving factors of information sharing, various parameters such as client, ISP, Cache, Router etc., wherein some of them drive the trends while few others facilitate.
Also discusses about Http Vs Https and the different parameters associated with it. its on going…
Today evening there is an award ceremony for which the chief guest is Cyrus Broacha. 🙂
Looks great altogether.
Few comments and suggestions to the Organizing committee
1. The way delegates are kept informed was well. Good lunch and snacks 🙂
2. The audio/video aids were neat and adding values to the talks.
3. Distributing prizes based on a lucky draw for almost all the events like the feedback form after each session, blogging entry with the url, completion of survey, handing over a EXPO Passport which has to be stamped from all the sponsors around. 🙂 The prizes are Sony 72 MP digital Camera, 3 days and 2 nights trip to Singapore, Technical books, Badge etc., — A way to keep the participants enthusiastic. Nice Guys!
4. Nice to see plenty of volunteers being around everywhere to assist the delegates for their queries.
4. Only one of the main halls were having an electric outlet for getting our laptops charged! Had to suffer in the sessions happening on other halls! Moroever the credentials (if any) and way to access the wireless network would have been mentioned well rather than letting the delegates suffer! Of course I did for the whole day yesterday! — Point to be noted Organizers! None of the volunteers whom I aksed had an answer for the query! 😦
5. Handing over the goodies (Tshirts) would have been done better — like giving to delegates at the time of registration itself than making all of them form a line and every individual has to spend around 20-30 minutes in the crowd just to get to know that they can get the Tshirt on the next day as that would be their last day! 😦 Absolutely no need for all these circus guys!
6. Looked like there was no option to choose/customize the technical books given away based on the individual’s interest. I still remember and could not control my laughter on seeing my ex-colleagues face after getting a book on “Software Testing on Visual Studio .NET” when she is a hard core Java/J2EE Developer and the only sentence she could utter was, “fayda kya hai?” [whats the use!]. could have been better!
7. Upon seeing most of the speakers using my dream product Apple Mac Notebook, my craze towards the same has got drastically increased and falling in love with it more and more :)) One excellent feature in Mac which lacks in any other OS is the zooming the desktop with no compromise on the resoultion. Wonderful. Is nt it?
Well, its time to move on.. will have to finish the entry and submit this URL to the organizing committee and also to test my so called LUCK 🙂 Let me see and definitely would keep you posted on the status 🙂 (if I get).
BOJUG – Bangalore Open Java User Group, a group formed and maintained by young Java aspirants who reside in Bangalore as the name indicates. I came to know about this group in BarCamp in the year 2007 (Barcamp meet at IIMB, Bangalore) and from then on there used to be a regular meeting every month.
As I was onsite (Bahrain) for a couple of months could not join till then. This time (Sep 08) had opted to give a talk on ‘Jakarta Digester‘ – an open source XML to Java Mapping tool from Jakarta Commons. Recently the venue has been changed to ThoughtWorks in Diamond District Building in the Airport Road. This time the meet was on 27th September 2008 Saturday and at 1130 AM IST.
The Thoughtworks building and the environment itself is worth mentioning. Awesome it was :).
The session was started exactly at 1130 AM and I happened to join a bit late :(. There were 3 topics discussed.
1. Web Application Sharing /Clustering in Tomcat – by Sriram Narayanan, a thoughtworks’ employee.
2. IBatis and ICG (Integrated Code Generator) by Sathishkumar Thiyagarajan, a Starmarks employee (Of course my good friend and BE classmate).
3. Jakarta Digester — none other than me :).
Sriram’s session was quite informative as he talked about various aspects of Clustering, load balancing and what it means to different people, how can we achieve the same using Apache Tomcat, Connector Architecture etc with some samples and Demo. It was awesome but a bit exhaustive. He could not complete as planned as others were in queue. In the middle he asked me to give a talk on ‘IPAnycasting’ as i spoke about it since the topic he covered (LoadBalancing) seemed to be related to or even a mimic of IPAnycasting. A point to mention here is, I have done my final year BE project based on that IPAnyCasting :). But I could not speak about because of lack of time. Perhaps, may give a talk in the future meets.
IBatis – basically an ORM tool was neatly handled by Sathish. But he concentrated more into his own project ICG (Integrated Code Generator) which is a platform that provides a single place to give your inputs irrespective of underlying persistence framework being used (be it Hibernate, Ibatis, Toplink etc to name a few). It is a very good initiative and he gave a small demo on the same.
Jakarta Digester – I started off with the intro of XML and its usage, the need to have a XML-Java converter, what Jakarta Digester is and how we can go ahead with converting the same, the pros and cons of using Jakarta Digester. Of course had done with a demo application and walked through it :).
The information about Jakarta Digester will be posted in my technical blog and linked here a little later.
Overall, It was a nice experience and a good day!
nowadays i have been ‘realizing’ many proverbs i would say. well, i may post those experiences in a separate blog!
this is an infamous proverb we might have been coming across since our childhood during several occasions and we happened to hear from many people around as well. ‘everything happens for good‘ – this might make us feel irritated and like adding fuel to fire when we are ‘in’ the circle! yes, i mean it.
when we say it to others, it may not matter but only when we ‘experience’, it will give a totally different shape.
Today i got a call from office saying that the filesystem reached its 100% in Production. Despite being a holiday, it does not matter when you are on a production support :). You have to be available on 24*7 basis as per norms. Well, i just told the network admin (aka system admin) to move the heapdumps, javacore files (they are the files which the Java process writes into the filesystem when the running java process reaches out of memory) to the external hard drive so that we can get some space. but even after that, there was no luck :(.
I came to office and i did the usual work around. I stopped the application server and cleaned up the temporary files as well by archiving the log files. And moved those archived files to the external hard drive. still no luck :(. It was stubborn and showing 99% :).
Had been thinking what would be the cause and somehow started into the tuning, troubleshooting documents. In the middle, thought of bringing the server up. But to my surprise, the server was not getting started and it was showing some errors in the linux console. After some attempts, thought of killing the process as usual and while doing so, by mistake i killed a different process named ‘EmailService‘ which was on top when i searched for the ‘java’ processes running at present in the system. Usually there won’t be any other services than our regular application server process and the corresponding node agent. Till now i have not seen this EmailService and it was not attracting me too. So i went ahead in killing the process and then i found out the mistake when verifying after deletion.
In the middle, i just checked for the memory usage, it went again upto 100%. Wondering what might be happening!
Thought i have done a mistake and have to get it corrected, searched for the process or its corresponding scheduler (cronjob in linux which is similar to the batch file in windows to automate tasks) for starting the EmailService. There we found so many core dumps generated in the EmailScheduler :). Lucky are we! After taking backup of those core dumps and deleting them, we got 24% free space and the disk usage was 76% !!
When asked the colleague about the issue during the startup of EmailService, he told one more infomation that this email service would be generating some pdfs as well. After some usual searches, we found out in a subdirectory there were some 7600+ pdfs silently sitting and occupying minimum of 1.1 MB each. Few of them had around 2MB size and very few had 20 MBs.. 🙂 So altogether we got some 700 MB+ space in disk.
Had the ‘EmailService’ not been deleted accidentally, we would have ended up somewhere else. Atleast we would have wasted some more time when dealing with the ‘Production issue’.
Overall, we should not panic about the issues rather we should welcome! 🙂 — is that what i feel now! wat say?
This is the second time i got a chance to know about the persistence of so called ‘luck’ 🙂 I was selected as lucky draw winner in JavaRanch forum’s Book Promotion offer on 14Dec2007 and the book was ‘Java Programming Cookbook‘ by Herbert Schildt. The previous one was blogged here 🙂
Moreover I felt very happy for getting a chance to interact with the author(s) directly in the forum. I believe people from Computer Science/ Information Technology background might have definitely come across Herbert Schild’s famous books like ‘The Complete Reference C’, C++, Java etc., That was like adding honey to the icecream 🙂
I have got the book dispatched today (13Jan2008) to the Bahrain address and happy to share the news with you all here 🙂 [as usual by the time i blog its 14Jan08 :(]
As usual the snapshot of the forum thread which declares the winners here below.
The thread is accessible here for the Java Programming Cookbook Winners!
The snapshot of my welcome message to Herbert Schildt is below..
Feel like penning down as some of my efforts are appreciated from an author of a great book. It is on 13Jan2008 but by the time i blog it somehow becomes the next day :(.
The contribution is of course subtle which was to explain the concepts of Garbage Collection in a pictorial manner for the program posted by an user asking his doubts.
The appreciation came from Bert Bates who is one of the authors of Sun Certified Java Programmer & Developer for Java 2 (and Java 5), Head First Java, Head First Servlets & JSP. The authors Kathy Seirra and Bert Bates are in short known as “K & B” in the ranch.
Just felt like sharing this 🙂 As usual, a screenshot is attached 😛
If any one is interested in looking for the images i have drawn, you may please go here for the thread that discusses about how many objects will be eligible for garbage collection?
Soon will update it in my technical blog with complete information 🙂
Way to go Raghs…!
Had done my first Java Program on Linux Platform.
The same old ‘Hello World!‘ application i have run on Linux (Red Hat Enterprise Linux Advanced Server 4 edition) today 14th October 2007 2 PM AST (Arabia Standard Time).
This had been pestering me for so long as we say that we working on a cross-platform or platform neutral technology but had not ever tried working on other platforms except the Grand Master ‘Windows’.
Today, the day had come to fullfill the dreams…
Just pasting the screenshots here 😉
HelloWorld Java Program in the Emacs Editor
HelloWorld Java Program Output in the console (Shell)
Way to go Raghs.. 🙂
here you go http://www.unix.org.ua/orelly/
this link contains the online (ebooks) of many oreilly books where in the subjects vary from networking to programming languages, scripting languages etc etc..
make the best use of it! 🙂
but dont expect the latest books 🙂
This post may help you to deal with Java Programs in the EditPlus – a famous editor for many different type of files (for example, .java, .css, .html, .sql, .txt etc).
One more similar editor is TextPad, which can directly deal with Java applications as its taking the Java Compiler by default from the installed location in the machine it is running. Thats one advantage with that.
What exactly do i mean to say “dealing with Java applications”? Does it mean typing the source code? Absolutely NOT! That does not require any special settings and you can start typing as you would with any other file. I mean to say, “Compiling” and “Running” of Java applications.
In EditPlus, we cannot direclty deal with Java Applications and they need some sort of settings to do that. Lets see them one by one.
1. Options to set for Compilation (“javac”):
Go to “Tools” Menu -> and click on “Configure User Tools…” option.
Click on the individual images to see the full-size screenshots if it does not display the image in full.
Every image has the required description and explanation for the step.
Image1: Clicking on “Configure User Tools…” Option in the “Tools” Menu
It will open a new dialog box where in you can enter your details to configure for the tools.
Image2: The Initial Groups and Tools Window dialog box
Image3: Clicking on “Add Tool” button in the Dialog box
Image4: The Initial window on “Add Program”
Image5: Configuring “javac” for compilation – step 1
Image6: Configuring “javac” for compilation – step 2
Image7: Verifying the “javac” tool added in the “Tools” Menu
2. Options to set for Execution (“java”) :
Image8: Configuring “java” for execution
Image9: Verifying the “java” tool added in the “Tools” Menu
Image10: Compiling a Java Program
Image11: Running (Executing) a Java Program by giving the command line arguments
Image12: Output of running the Java Program with command line arguments
Image13: Output of running the Java Program without any command line arguments
Hope the series of screenshots helped you configure and run a Java Program in EditPlus.
I have blogged this steps as i have seen this in one of the threads in JavaRanch. But still, i would suggest you to just proceed with Notepad and the normal Command Window if you are in the beginning stage because the ordinary plain text editor like Notepad will help you improve your language syntax by not having any support for syntax highlighting!
It would be so nice if you could please share your feedbacks and suggestions if any for the improvement of the material.