I went to grab water in the break area and saw the TV spouting news of Sanjay Dutt’s impending verdict today. And there was this anchorman telling the news of Sanjay Dutt leaving his house. Should I even honor the word “news” for what the anchorman told? Do we have so much happening that it has to be told as it happens? How is it going to affect me today – will I lose electricity today, will there be a traffic jam in Bangalore? It wont be even a blip in my radar – nor so for the billion people in the country – perhaps for the one or two souls called producers who have invested on Mr.Dutt. Things are rapidly falling the Fox,CNN way – I remember once seeing some thing like this : breaking news : 10.01 PM somecriminal has been escorted by somePD to the airport, 10.08PM : he has been seated in the plane, 10.23 PM : he has been served prawn rice, 10.40 PM : he has been escorted to the loo. What idiocy is this? How do I save myself from the idiot box and the idiots pushing stupidity in the guise of “news”. Will someone pull the plug please?
All posts by haikvr
Disconnected from mothership !!
Today I removed my blog ka link from Thoughtworks profiles site. I had always wanted to do it – because it was kind of inhibiting my writing. I should watch what I say, be politically right – even though TW does not say anything of that sort – I felt I have to be a responsible citizen and not land TW in trouble. Now I can write what I feel about Karnataka Govt, the Indian Govt, Indian cricketers, Airport Road, people who park their cars on the road jamming traffic, the smokers who smoke their and my lungs out, the ridiculous property prices in Bangalore, the sad state of working children, our friendly neighbors P & C and so much more !! I thought I will start another blog – when I am this lazy to write in one blog itself – I will end up not writing on any of them.
Later !!
I am back on broadband in Bangalore !!
ahh…my 7th grade English teacher would have written a “V.G” for the alliteration in the title. Anyway – last week the nice folks at AirTel set up a DSL modem in our home – and life is at supposedly 256Kbps now. Had hathway cable internet till now – but it was hopeless – net was good for checking emails – sudo apt-get updates will never complete. The list of woes is endless and it all got sorted out after the bandwidth expanded.
Anyway here is what I have accomplished at home. A full fledged ubuntu “headless” server.
Subversion :
This was the first app I installed. You might be wondering why subversion. It keeps some of the files – like an excel sheet of expenses I have – versioned. I am trying to organize lot of stuff – and its time to get disciplined and versioned !!
Torrentflux :
This is one sweet app. Throws a web interface to the torrent downloads.
Wiki :
I have installed phpWiki. Why wiki?? I have been using it at work for the past couple of years and I have always wanted one at home. Nothing can beat the wiki when it comes to organizing stuff. The wife loves it too – the simple interface and the japanese zen like philosophy it has running through it.
mt-dappd :
Rendezvous for streaming music out of the linux box. So now my linux server shows up on itunes and can enjoy music from anywhere in the home.
It took some time googling trying to figure installing all of the above. And since its a headless server – I installed all the apps using command line. My advice will be to download the ubuntu server version – I had to spend some time configuring LAMP stuff – so it will be a great headstart.
Perhaps, if I have the enthu bug biting me will expand on each of the installation – but who knows when the next post will be…..!!
Moving back to India
For some reason I have kept this blog impersonal – because I was too lazy to write about myself, or perhaps nothing big happened. Well anyway now I have to – We are moving back to India. Thoughtworks has accepted my request for transfer to Bangalore and we are moving in July 06.
Top 10 things I will miss when I am in India :
10. Starbucks
9. Netflix
8. Apple show room
7. Interstates and its gas stations and its restrooms !!
6. Daily show ( thanks youtube!! )
5. NPR ( thanks podcasts )
4. 8.00pm sun light, snow ( but I dont like the cold that comes with it)
3. BestBuy window shopping
2. Americans in general – and especially the friends I made whom I might or might not meet again.
1. Hot water anytime and long showers.
2 months of linux bliss
I have Ubuntu dapper running on Dell Latitude D610 – with some help and inspiration from my colleague Josh Cronemeyer – a linux whiz. I have tried linux in fits and starts but never covered so much ground as I have in the past 2 months – and now very rarely I boot into Windows world.
Pros :
Stable.
Gnome.
Boots up fast, everything is ultra responsive – compared to windows xp on the other side of the laptop.
Lotus notes on wine works surprisingly ok. ( damn you IBM for lotus notes )
Cisco VPN !!
Java compilation time – 20% less time than windows
apt-get install
Multi desktops, desktop spanning.
Wireless support much better from Dapper onwards.
Hard drive never starts threading – uses virtual memory the way it is supposed to be.
I run lot of stuff all the time and the OS never twitches.
Cons :
No TextPad
No TortoiseSVN
Lotus notes ( damn damn you IBM )
Colibri – perhaps there is an equivalent – havent researched
Lot to catch up with OS X – but far ahead than that thing called windows.
How to become a Java Developer?
Who is this post for?
Anyone trying to switch careers ( I was in mainframes, asp then php developer then a swing developer before I switched to this web-app java development), or who is already in Java and wants to get to the next level.
What this post is about?
Few years back I was slogging on a swing app without knowing what the market was all about – though the swing app taught me the good and bad about Java – it did not help me in getting a job. This post is a guideline for that directionless soul…
this.post :
Heres some philosophy of mine. Ask yourself – how much did you spend last year on books on technology? If technology is your livelihood, think of it as an investment. You need to invest a lot ( and read a lot ) to get good returns. So do not hesitate to buy books, magazine subscriptions – its worth every penny/paisa/rouble.
Lets start.
Step 1 : Get to know Java’s strength.
Assuming it was me years ago, happily coding php in dreamweaver and nodding along with the posters in slashdot who say how bloated and slow java is and how fast and nimble php or any scripting language is…Here are some of the arguments “for” java to that nay sayer that I was.
Java is not for a 10 page web application.
Java is not for a guest book like application.
Java is for an enterprise. Something big – really big – having some 500 plus pages, 100 or more modules.
Java is when you need your app to scale to crazy levels – say 2000 users per second?
Java is when your app has to live and be maintained over a period of – say 10 years?
Java is when your client wants important stuff like transaction, security, clustering, fail safe
Java is when you have a team of 20 or more developers, 10 or more Analysts and a no-nonsense client who will sue your company for any goof ups.
Ask yourself and try to find answers. How has Java become to what it is today? Sun is not microsoft when it comes to hype, marketing – still – how did Java become the next COBOL? ( meaning – something the enterprise trusts, and also there are lot of developers with Java expertise ). Why is there such a huge ecosystem in the Java world?
Frameworks ( Spring, IBatis, nano container, pico container, Struts),
IDEs ( IntelliJ, Eclipse, Netbeans, JDeveloper, WSAD),
Webservers ( Tomcat, Weblogic,Websphere,Oracle App Server,JBoss),
Object Relationship Mapping ( Hibernate, Toplink),
Tools ( JUnit, Ant, Maven, Cruise Control),
EJBs ( Entity, Session and Message Driven )
and the above list is not even 50% complete.
Its a little overwhelming but it all makes sense – each one exists to solve a specific problem. You need not try and understand everything in one go – you simply cannot and even the most experienced developer might not know all. But once you have the fundamentals in place you can quickly master any of the above technologies or the new ones that are being cooked right now.
I have given you a nice path to go from a dabbler to becoming a master – that I found through trial and error and from my friends and co-developers. So rest easy and keep reading.
Check this link – comparision of programming languages to see for yourself how Java is doing.
Step 2 : SCJP, fundamentals
It takes a month of preparation to clear SCJP – Sun’s certification program. What do you get out of this?
Very clear understanding of the language’s syntax
OO Basics – Polymorphism, Inheritance, Encapsulation – are drilled into you
Collections – A Java Developer’s best friend
I strongly suggest you take the SCJP exam. Everything else is built on top of this so its very essential to have a clear understanding of Java.
Books I own : Head First Java, Khalid Mugal’s book for SCJP.
Step 3 : Jump into web application world
Download Tomcat.
Download Eclipse. ( Notice the No in Notepad.)
Write a simple hello world servlet and print it on a web page.
Send a string on the response to a JSP page and print the value on the JSP page
Download mysql database server and start it up.
Connect to mysql and try saving some data. Dont worry about the beauty of code, design etc- just get it working.
Move on to Struts and see what MVC is all about. I have 2 posts on struts on my blog. If you have patience try reading them.
Try writing a simple web application – a guestbook – in Struts.
All along you might be asking – why the heck do I need to do so much? Again the answer is these technologies were not designed for a small app in mind. Its for a goliath – an enterprise.
Here are some design tips :
1. Separate the business logic from the Action Servlets. Write unit tests to test the business logic. Write unit tests before you write business logic. This is called Test Driven development (TDD). Net is full of resources – this is a powerful programming style – and my company – thoughtworks – believes in it strongly unlike any other company.
2. Separate stuff like Database connection into seperate objects – and use that object in those objects that need database access.
3. Most important – keep all logic out of your JSPs. Its only for presentation. The most complex logic a JSP page can ever have is iterating a collection and displaying it on the page. If you are curious, explore custom tags – so you can even move most of the logic needed for presentation into java class files.
Books I used : Head First JSP / Servlets, Struts in Action.
Step 4 : Become a smart Java developer – with your best friend – Ant.
Ant probably is the most widely used tool. Get to know Ant – try incorporating starting and stopping tomcat inside your build.xml. So you can do cool things like :
ant startserver
ant stopserver
ant runalltests
ant can also compile your application
ant can deploy your applicaton
ant can win you girls.
Step 5 : Get adventurous
Incorporate hibernate
Try doing some AJAX stuff in your app – its very very easy – and might give you the edge in a job hunt
Step 6 : Next step
Having a fair knowledge of Java, Struts can get you a entry/medium level developer position. To go to the next step you can explore the following areas :
EJBs – Great concept but bad reputation – Read Head First EJB.
Design Patterns – Get to know Factory pattern, Command pattern – my favorite and the rest – Read Head First Design Patterns book.
SOA, Web Services – These buzz words are picking steam this year – find out about them and arm yourself for that curve ball in the interview.
If you have specific questions, email me or post a comment here and I will be more than happy to respond to your question.
Good luck and welcome to the world of Java !!
Bad Ant in Fedora linux
I messed up the Java that came with Fedora linux and had JAVA_HOME pointing to Sun’s JDK. Then I downloaded Ant, set ANT_HOME to this new location and whenever I typed ant i got an error message :
Unknown argument: -cp
Even though when I did a “which ant” it pointed to the correct location which was in ANT_HOME/bin/
Googling did not give me any useful results. Then I thought am I the only one having this problem – so I tried in yahoo ( was planning on trying dark lord’s search if it didnt work) – and got the first result with the solution itself. You can try this search query “ant unknown argument: -cp” to see how Yahoo trumps Google in this. Google if you are reading this clean up your act.
Anyways heres the solution. Remove the ant that came with fedora.
Become root and type : “yum remove ant”
Done.
How to browse the web…in 2006!!
Well heres a primer for the un initiated in the new www. Googling for something has become so 90s. I will list some tools/techniques I use daily which are far more effective.
1. RSS – RDF Site Summary, or Rich Site Summary, or Really Simple Syndication
Think of it as SMS text messages sent by websites all the time. Once you subscribe to it you need not hit the website to see if there is any new content. Firefox, Safari, Opera all have RSS built right into them ( The Dark Lord is still building as of this post) . So if you have the urge to see whats happening in the world you need not type cnn.com – instead you can just pull up the RSS list to see if anything interesting has happened before you last checked – It saves time, saves bandwidth and you can quickly check across multiple such websites in under a minute.
The above screenshot is one I took just now.
2. del.icio.us – A social book marks manager.
Before I go further lets go back to early 90s – pre Google days. There was this website called yahoo which I used to go which had stuff classified under categories – much like a library. Entertainment, sports, news etc. So if you want to find something you have to follow the path set by yahoo’ s classifier monkey/bot/whatever – if you deviate you will be the loser.
Enter Google – which indexed everything and turned the entire world upside down. So you can find anything about anything. Now billion web pages spring up every month – and Google still does a great job of finding relevant stuff – but there has to be a better way.
Enter del.icio.us – what a smart name !! Here you or me or any one can assign metatags to websites. So instead of searching on the content on the websites, now at del.icio.us – the tags are searched. One step above Google God. Results are more accurate and relevant to what I am searching. Sweet.
3. Stumble Upon – another social bookmarking site
Google says there are 8,870,000,000 websites in this tiny earth of ours. Even if you randomly go to any website – to find something useful out of luck is highly improbable. Enter Stumble upon – a tool that discovers websites for you – according to your tastes. First you have to install the firefox extension of stumble upon. When you hit a nice website – click on the I like It! icon and enter a tag – much like del.icio.us. You help others and others help you. Now when you are bored at work or at home – just click on stumble upon toolbar and lo and behold there is a random website someone has discovered and seem to like it. A great way to discover new interesting stuff. Let me click on my stumble upon button now..
..and this is what I got – my age on other worlds. Ha – did you know there was a site like this? Me neither.
Still there is digg, slashdot, bloglines, lifehacker.org, wikipedia’s random page – I will leave them as an exercise for you !!
Enjoy WWW – in a new way !!
Developers developers developers developers
I heard this song in a home made video that I saw in google videos. It piqued my interest and found this song. Pretty hilarious.
First watch this Steve Balmer’s monkey dance.
Next watch this music video.
And read the lyrics.
Now have a good laugh.
EPIC
EPIC.
I found this link on a ThoughtWorks employee’s blog. The flash movie is so engrossing, for the rivetting presentation and the content. Its a nice guess, gotto wait and watch to see how it all develops.