Top 5 people I want to chat with on WeChat

Here is an interesting competition hosted by WeChat messenger and Indiblogger to identify a top few people I would like to chat with in a WeChat group. I found the topic very interesting and here is my first attempt to create a blog entry for IndiBlogger. Please note that this is my personal opinion and I don’t intend to demean anyone anyhow. Don’t drag me to the court of law for this post Smile

BTW had this topic been “Which top 5 persons you don’t want to chat with”? I’d have finished this post in 2 minutes (Just type the name of wifey 5 times). I seriously hope she doesn’t read it Winking smile. In case you are reading it, I’m just kidding baby.

Ok so while authoring this note, a lots of name came up in my mind but the first person/entity I’d like to mention is

  1. The GOD himself: Not that I’m a hardcore follower of our religion institutions but I’m not a disbeliever either, but I really always had this question to the all mighty GOD. WHY??? Why us. Why did you do this to us. I mean what were you thinking. Whats your game. Why do we exist. Is this a game for you. I just don’t get it and I mean c’mon. You could do better than this. You built all the universe and then you gave us the power to question you but in the end you don’t give us the answer to the puzzle (may be you do when we are dying but that doesn’t count yet). C’mon Sir. You owe me the answer, you know you do.
  2. Second name that comes to my mind is ACP Pradhyuman (sorry ACP if I spelled incorrectly). Sir your serial is all well and good and it beats other comedy serials hands down but dear SIR how can you somebody ask so dumb questions. When somebody is being murdered two peoples are echoing the same thing '”dal main kuch kal hai” or when you see somebody is killed by knife, “Daya lagta hai ye chaku, ise marne ke liye pet main dala gaya hoga” and other guy replies:”Han sir, lagta to yahi hai, Chaku to ise marne ke liye hi dala gaya hoga”. I mean FTW as if common sense is so uncommon. I know I should stop watching CID if I don’t like it but as you know bad habits don’t let you quit them so easily. BTW I’m wondering what happens if Daya and Rajni comes face to face.
  3. Another name that is so important to this topic and can probably get me disqualified but since it’s a name worth mentioning I’d rather take my chances and say Mr. Digvijaya Singh He can turn any boring discussion into entertainment. I’m sure even GOD himself didn’t know he made him so funny. we need to make the chat interesting and controversial and who better than Mr. Singh can do this?
  4. Now since we have a corum we need someone to manage it (an TV anchor) and Mr. Arnab Goswami fills the post. He is someone with a infinite source of question, a reporter full with facts (don’t know how he get hold of so many facts). I believe our other participants (esp. GOD) would love to ask him how does he know so much when Inventor himself doesn’t know it. I’m sure Arnab won’t mind someone asking questions to him though ‘coz he rarely listens to anyone. He is so busy asking questions that he doesn’t bother hearing answers to them.
  5. Well I pity next candidate in the list, he hates this online stuff. He likes to wake up early, goto teaching in scholl, come back home bring some fresh vegetable, have his dinner at home with the rest of the family and watch Doordarshan News at night and sleep early. It’s my DAD He doesn’t like me spending my whole time on laptop or watching tv. Just thinking how will he manage if I force him into a chatroom with all these people. I pity two people in the list My DAD and the GOD himself. Both would be thinking how on earth we ended up on this chat room with these Great souls and what in their past life could have earned them this fate.
    While concluding this post suddenly another name popped up in my mind “Stephen Hawkins”. No disrespect to him (he is a great scientist and I totally respect him) but just thinking about him sitting among all these gentlemen above is hilarious. Imagine him trying to answer a question of Arnab Goswami while Arnab fires another rapid fire round of 1000 question per second on him.

Well that’s it for now. Feeling tired. Time to go for a nap. Have to fly to Maldives day after tomorrow.


Written for:
http://www.youtube.com/user/WeChatIndia 
http://indiblogger.in

Solution: Virtual Drives not working in Windows 8

If you are having problem loading Virtual Drives on Windows 8 (most probably after you upgraded from Windows 7 to Windows 8), the following should solve the problem.

  • Open devmgmt.msc and see if you have yellow warning icon in front of your virtual drives. Try to reinstall the driver for them and see if it fixes it.
  • If it doesn't then uninstall the drivers. Goto HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318} and delete the following values
    • UpperFilter
    • LowerFilter
After deleting these two registry values, you should be able to see your virtual drives in the explorer. These keys created problem for all my native virtual drive and also with the CloneDrive. I had tried uninstall/reinstall of clone drive many a times but in the end it's the registry that always helps.

Reference: http://technet.microsoft.com/en-us/library/cc772156(v=ws.10).aspx 

Rising Petrol price in India under UPA Govt


Lol...
Courtsey: TheekHai Dr. Manamohan Singh and Sonia Gandhi
Source: https://www.facebook.com/swami.ramdev

Proof that excessive sunburn makes your skin darker.


Proof that excessive sunburn can permanently color you black.

Look at the dog sleeping in the shade, it's still white while the one sleeping in the sun became dark.

0x80070422 while deploying application to Windows Phone device

I’m developing an application for my Windows Phone 7 and today I got an error when I was finally ready to deploy my application on my Phone. I hit deploy and whoa I get an error that “WP7 - Zune software is not launched. Retry after making sure that Zune software is launched.” Sure Zune was opened and connected to my phone alright. It did sync and stuff but still no luck.

Luckily I found about WPConnect.exe found in your “C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x86”

Running this again gave ne the same error but at least with an error code 0x80070422

Now we have a little bit more information so I was able to identify the solution.

Due to my very slow system I’m working on I had disabled all the unused System Services and one of them was “zune windows mobile connectivity service”. This Service is used by Visual Studio to connect to your Windows Phone 7.1/7.5 and restarting it fixed it.

So in short if you get an error stating error code 0x80070422 or “WP7 - Zune software is not launched. Retry after making sure that Zune software is launched.”  one of the first thing you should try is to enable and start “zune windows mobile connectivity service”

 

Will be posting my app to Windows Phone Marketplace very soon.

Choosing a CMS for your website

One of the first and most difficult question while you are planning to build your own hosted website is “which CMS to use for my blog/website”. Googling for the best CMS doesn’t help either as all people have their own expertise and comfort level with their recommendation. I too have my bias towards the CMS I chose but since I had no particular experience with any of the CMS I have tried and I’m building it from ground up, it’s applicable to all newbies (I’m primarily a .Net developer so I haven’t worked with other php based CMS and mainly looking for a .Net CMS, people preferring php should use some other reliable resource).

I have tried Wordpress, Joomla, Drupal, DotNetNuke, Kentico, Blog.Net and blogger of course (had tried several others but don’t remember their names). I’ve given them a try multiple times but for one reason or another always comes back to the following two.

  1. Wordpress, and
  2. Orchard

Wordpress is one of the best CMS out there, mainly a blogging platform but can easily (and I mean really easy) be extended for website purpose. There are so many themes and modules out there that it simply doesn’t make sense to choose any other if you don’t want to customize via code (which is not a problem if you are a php developer). I prefer .Net so I chose Orchard over wordpress but on every other aspect it’s simply perfect, fast and extensible. You can customize it the way you want and most of it is available from admin interface.

Orchard is ASP.Net/MVC based CMS from Microsoft. It is being actively developed by a very talented team and I’ve seen a lots of improvement over the time in Orchard. Installation is simple. Developing a theme is also easy and you can easily build modules for Orchard (I ‘m still learning it but it’s really good).

If you are looking for a easily setup and extensible CMS for your website, choose one of these two without blinking. They are worth their cost which is free Smile. I love freebies.

For simple blogging purpose blogger.com is also a very good choice. You don’t need to host buy a hosting space for your blog and it allows you to use custom domains (which is a disadvantage for wordpress free hosted blogs).

One CMS I would dis-recommend is DotNetNuke. It’s cumbersome, slow and not very user friendly (my personal opinion ofcourse). It’s highly commercialized and developed in VB.Net and you’ll find a lots of paid modules for DNN as well but since I like freebie I dint find it good. Also it was too slow for my taste when I last tested it (I’ve been using it on shared hosting so that could be a reason for slowness but I can’t afford costly servers not now) so it’s a no-no for me.

Recommendation: No brainer Wordpress (non-developers or php developers)/ Orchard (.net developers)

 

If you are using Orchard I’d highly recommend TheThemeMachineResponsive theme. It’s a simple responsive theme from the Orchard developers. I’m using it on my beta portal http://backup.sandeeprawat.com which will soon replace my primary domain http://www.sandeeprawat.com

[Update] Forgot to mention another CMS which is very good, light-weight and .Net based. N2 CMS is also very nice to work with. Had worked with it and is very easy and powerful.

If you are bored, sharing a nice song from a very talented singer Rabbi

Challa by Rabbi

Lambda closure and compiler generated code in C#

I came across an interesting problem today.

In our WPF application we are heavily using unity and prism framework and we build pieces of application using unity IModule interfaces. We also make use of EventAggregator.

Now we had a perfectly fine piece of code that was working without any problem so far until today. Here is the code snippet

Note: this is only a sample code to illustrate the problem.

class MyModule:IModule
{
void Initialize(IEventAggregator aggregator)
{
Parameter param = new Parameter();
aggregator.GetEvent<MyEvent>.Subscribe(
() => {SomeStaticMethod(param);});
}

public static void SomeStaticMethod(Parameter param1)
{
//Do Something
}
}


So far so good. Now one of my collegeue made a small change to the code.



class MyModule:IModule
{
ISomeType someTypeObj;
void Initialize(IEventAggregator aggregator, ISomeType someTypeObject)
{
someTypeObj = someTypeObject
Parameter param = new Parameter();
aggregator.GetEvent<MyEvent>.Subscribe(
() => {SomeStaticMethod(param, someTypeObj);});
}

public static void SomeStaticMethod(Parameter param1, ISomeType someTypeObject)
{
//Do Something
}
}


 



I guess you can see the small difference. We just added a new parameter to the method call in our lambda and whoa our application stops working…



Looking at the change doesn’t give a clue. Why the heck it stopped working with a small change.



Here reflector came to our rescue. After fiddling with our debugger and looking at the reflected code we figured out the issue and it was a very interesting find.



Previously we were only calling a single static method in our lambda and passing a local variable, hence compiler optimized the generated code and produced a static method for our lambda. In the second case though we passed an instance variable and hence generated method had to be an instance method.



Now you must be wondering what difference does it make. But it does when you are using it inside IModule and lambda is used by EventAggregator. By definition IModules are short lived and unless there is a reference to the Module object, it will be garbage collected. Secondly, EventAggregator by default keeps a weak reference to the event handler in the aggregated list. So now since my Module is dead so is my event handler. This event handler was doing stuff, which was life line of my application and hence it went dead too.



Learnings:




  • Compiler does and will optimize anything it wants to and it wont ask you.


  • Test your code thoroughly event when you think it’s a small change.


  • Debug, Debug, Debug…….



top