Why don’t VS2008 Automatic Properties Support Readonly Properties?

Visual Studio 2008 (with .Net Framework 3.5) was launched this week and I have already started working on the express edition. I did get the beta version earlier, but could not really get up and working with it cause I was occupied too much with my professional projects. Now that the final version of VS2008 is out, .Net framework has been dubbed ready by Microsoft for professional projects and I intend to spend the next few week coming to terms with the radical technical changes that have been imposed on me yet again.

I have started creating a small production-level application for one of my websites I was postponing since many days, and using it to learn the new features in VS2008.

Visual 2008 Automatic Properties
Automatic properties is a really smart idea in .Net Framwork 3.5. It reminds me of how Visual Basic 6 used to think of public variables in a class as properties. But this is definitely more professional, with a proper get; set; accessor declaration that makes things really clear. Really nifty!

Here’s a grouse. Automatic properties does not support declaration of readonly properties, you have to declare both the get; and set; accessors. Why is the limitation there? My design would have made more sense if some of my properties were declared readonly and did not have set;. Of course I can always go and declare them the traditional way, but then would it be that much fun working with .Net Framework 3.5?

Is this a limitation by intent? If yes then I would definitely love to know the reasoning. If not then I hope Microsoft provides this feature in the next update or whatever.

Will you take a Kindle to the loo?

kindle Let me confess here, I just can’t go to the loo without a book in hand. It’s a habit that’s stayed with me since more than a decade and a half, and the truth is, this is not going to change anywhere in the future. Lately however I’ve been wondering, why do I have to take a book to the loo. I have amassed a pretty large collection of books and articles on my PC that I wish to read, and just because they are not in print doesn’t mean that I shouldn’t be able to read them. But you really can’t take a laptop to the loo.

So I’ve been waiting for science to catch up with the movies and come with a really compact, flat, portable reader that gives the clarity of real paper. It seems my wish has been just about granted. The great Internet bookseller, Amazon has com up with a portable reader they call Kindle, that’s small, and does not require a backlight to read. So you can read the Kindle in direct sunlight, take it to bed with you, or even the loo.

It’s a bit expensive at $399, and the books have to be all bought from Amazon I expect. On the brighter side it lets you read newspapers too. I don’t know if it supports PDF or txt format, but if it does then it can become your solid reading powerhouse. It should also allow you to sync with the computer to be really effective.

I believe that the device has just been introduced and will evolve a bit. Expect similar stuff from the competition. Meanwhile I will be waiting and checking out the list of the features. If I had a wishlist on Amazon, this would be top on it.

Visual Studio 2008 Express Editions Released

A couple of months ago I downloaded and ran the beta version of Microsoft’s new development environment Visual Studio 2008 Orcas. If .Net framework 2 was cool, .Net Framework 3.5 is like chilled nitrogen. There are some great new things (which we will talk about later), in the new version of .Net, and the best thing is, if you don’t want to pay anything, it’s free.

You can download the Express versions of the software free of cost and use them on your PC without any obligations. Download it from

http://www.microsoft.com/express

Have fun creating software.

Kurkure, Mitharia & Chocolate Covered Marie Biscuits

Diwali I won’t be surprised if you’re confused by the title. This Diwali has been confusing and revealing. The society is evolving, and so are our festivals. Some of the change is spontaneous, while the rest is motivated. Let me tell you about three unique things I noticed about this Diwali.

Have you ever eaten a pack of the ubiquitous ‘Kurkure’, that over-salty, over-spicy, puffy, red colored, poop shaped, corny snicky-snack that’s supposed to be a healthy alternative to mithais this year? Well Kurkure is promoted by Pepsi, and they’ve got a lot of experience notching up the cool factor about the crap they pack and serve us. Here’s what they failed to tell us about Kurkure.

– It is deep fried.

– It contains too much salt and spices. If you eat too much of it, you’re going to be sick.

– It’s got artificial flavoring.

I suspect nobody is sure what exactly is the fibrous material that it is made of. It could be corn, but then again it could be grass, or maybe even dried-crap.

Mitharia is caused by Mithais: Kurkure

Kurkure led a very successful campaign this year highlighting the evils of Mithais. They created a new ‘disease’ out of thin air – Mitharia. Most of the mithais sold in the market are made and sold by unorganized traders, most of whom are not smart enough to, willing to sue. So while Kurkure serves crap that is no way better than any mithai sold in the market, they got away by calling an industry that’s older than pepsi’s great grandfather, names. Their campaign was successful, less mithai was sold this year than any, unfortunately people weren’t buying Kurkure either.

Chocolates do not cause Mitharia

‘Mitharia’ as proposed by Kurkure-crap, is caused only by Mithais. Those sinful chocolates that have more fat and more sugar per gram than Mithais do not cause Mitharia. Why? Well, the chocolate companies are organised, they have a market, and they already have lawyers working on their payroll fighting all the cases they’ve got slapped on them already.

Ingenuity -they name is Chocolate Covered Marie Biscuits

Probably led by those Mitharia fears, one of my associates chose to give me a basket of homemade chocolates. How do I know they were homemade? Well, who has ever seen a company covering a Marie biscuit with chocolate to create a ‘wafer-chocolate’ similar to Kit-Kat, or whatever other wafer covered chocolates that are there?

That was Indian ‘jugaad’ at its prime. Put something in masquerading as something else, and as long as your something puts up a reasonable enough pretense of doing the job; Who cares?

Too much fireworks

Last Diwali they were noticeable by their absence, this Diwali by their opulence. Fireworks made a comeback in my area. It was back to the noise ones, the big ones, the ones that rocketed up in the sky, and the ones that burst up in funny colours and shapes in the sky. It was like 1000 marriages, all in my neighborhood. How many did I light? 2.

By the way Happy Diwali.

Yahoo! Is there a country called Iran?

Iran might have a civilization thousands of years old, and so influential that people allege that India’s Aryans are of Iranian descent. Yet, Yahoo! is not sure there’s a country called Iran. Iran has been removed from the list of countries in Yahoomail.

yahoonoiran

 It’s not surprising though. President Bush had threatened that he would wipe Iran off the world’s map. Has he made a beginning with Yahoo!?

A long time ago I read a book called ‘Hogfather’ from Terry Pratchett. It told the story of Demi-Gods who were dying because people no longer believed in them. Can this happen to a country too? If Yahoo and the entire Bush administration refuses to believe in Iran will it stop existing?

I believe in India’s destiny

It’s 1.11 AM and I’ve just finished reading the chapter on India in Jeffrey Sachs’ ‘End of Poverty’. This is one of the most moving books I have read from an economist. Sachs believes in what he says, and his conviction gushes forth. He talks at length about India’s past experience as a divided and enslaved nation, its first hesitant steps into the world economy, and the glorious rise in the last 17 years.

Like Jeffrey Sachs and Pres. Kalam, I too believe that the new India can not only emerge as a global equal to the world’s top economic powers, but also greatly reduce the glaring economic disparity by 2025.

The potential is present in our nation, but to achieve our destiny we must overcome some very important challenges.

  • Social equality must precede economic equality – Sachs’ wrote that in spite of being such a large nation with such thriving economic potential, India’s fall to the colonial power can be attributed to the lack of social equality to a very large extent. Our rigid caste system, religious practices, and xenophobic culture has hurt us. It has ravaged the soul of our society and nation. We must get rid of it, and the beginnings must be made at the individual level. We must begin not just end, but hate the caste system. We must create a more homogenous culture.
  • Primary Education must be of very high quality – I was fortunate enough to receive good quality primary education which laid a foundation for my future career. Most people in my country do not still have high quality primary education, and find it very hard to graduate to much tougher technical courses later on. Our nation must strive to improve the standards of primary education for everyone.
  • Remove hurdles to establishing businesses – The license Raj is re-surfacing in new ways (in Delhi it’s very hard to open a new business now). There are several hurdles in running a business. Illogical and complex tax structure (a mess of VAT, Service tax, FBT, Income tax…), entrepreneur hating labor laws, and lack of electricity is hurting businesses. We must make laws simpler, logical and must create better infrastructure in non-metros too.
  • We must put a valve on population growth – I don’t know how, but we must bring population growth to rational levels. Is it not possible for the government to provide heavy incentives for model families?
  • We must develop the heavily populated north belt – UP, Bihar, and Rajasthan are India’s undoing. There is a huge population pressure, caste inequalities, poverty, lack of infrastructure, and a very high crime rate in these states. Practically everything that can go wrong is going wrong here. We must tame these states anyhow and give the people here better access to growth possibilities rather than rhetoric.
  • We must promote emigration of people – When I was young, the so called ‘brain-drain’ was supposed to be a problem. Our non-resident citizens are our biggest strength now. We have the highest net inflow from non-residents in the world. Surpassing even that of China. Our people believe in our country, and we must give them every opportunity to develop the skills and potential to help them spread all over the world.
  • We must pollute less – Growth in Indian economy is led by services. That’s a great advantage over industrialization which causes the most amount of pollution. As India grows more industrialized, it must still evolve newer ways to combat pollution, and improve forestation. These resources must not be wasted.
  • We must develop local sources of power – I do not believe in laying electric cables to each and every village from centralized power sources. India receives plenty of sunlight, and wind activity. Can we not develop local power sources that depend on alternative energy? Is it possible to create a cheap windmill for every field? Solar energy is going to be cheaper in the coming years too.
  • We must promote the use of English at all levels – I am a strong advocate for a global language, and though I would definitely like my people to know their local language well, I would also like to see them have a strong command over English so that they can communicate well on the international stage. No there’s no contradiction in here.

I believe that personal growth is the best contribution that we can make to our country’s growth. By working harder, becoming more skilled and creating a better future for ourselves we will create a better future for our nation.