Once upon a time I referred to the technology I mastered as "weapons", that I would use to kill bugs. That was the time when I called myself a "bugslayer" and my satisfaction was to eliminate bugs. That was before I took a step back and see the whole picture.
Fast forward a couple of years and I have met my mentor/friend who recommended a book to me, "The Passionate Programmer" by Chad Fowler. In the book (Part 1) he compared technology to "stocks" and compared spending time to master a technology to spending money to buy stock. With stock investing as a hobby, this idea sat really well with me and have since then influenced my choice of technology to master.
In traditional stock market, there are blue chip stocks that represent the big, established companies. They won't go bankrupt tomorrow, but they won't double in price tomorrow either. People buy these stocks for their stable return. In the IT world, blue chip technology would be like Java and C#, by mastering these languages, you have the key to a big part of the IT job market, there are thousands of jobs available, but at the same time there are also thousands of professional with the same background. So the salary won't be great, but one should have no problem making a living.
Then there are the small companies (The penny stocks), they represent the small companies which the price may shoot up to the sky the next day or may as well disappear from the market the next day. Investment in these stocks consist of high risk but at the same time the return can be phenomenal. In the IT world, we have technologies such as small talk, rubies on rail, or other less popular programming languages or technologies that not many people know, but at the same time there are also few jobs asking for these skills. However, when a company is desperate for such a skill, and you happen to be the only one knocking on their door, you will be in a very good bargaining position. On the other side, if the demand of the technology dies down, then all the time you have spent on aquiring the knowledge would be wasted.
Stocks in the IPO could sometimes be a good investment, and so is a new technology. The first ones to master the new technology is usually well on their way to enjoy the payoff while others are still learning. However, while we cheer for the andriod developers, we must not forget the poor symbian developers.
So what technologies should we spend our time on? Like the good old investment advice: "Don't put all your eggs in one basket." Everyone should have a "portfolio" consisting of serveral technologies that belong to each categories. Do the homework, follow the trend closely and watch for signs of a market change. Don't be afraid of make a switch when the market has changed. As for myself, I started off as a Java developer, but then I realized that C# is more popular in the Norwegian market than Java so I made the switch. As I have gotten comfortable with C#, I have added Microsoft BI into my portfolio and now I am able to enjoy the boom in ETL projects while I can always go back to traditional programming should it become less popular in the future.
So whenever I meet a student and they ask me for advice as for what technology they should focus on, I tell them this story above, and recommend them to read the book as well.