Blogvani.com Nominated in Tata-NEN Hottest Startup Awards

My website – Blogvani.com has been nominated in the Tata-NEN Hottest Startup awards contest. This is a prestigious community driven contest to reward the startups with the brightest prospect of success. The websites are initially nominated by individuals, and then rated by experts. Then public voting will decide which is the winner.

Right now Blogvani is a leader in voting thanks to the power of hindi blogger community. I am glad to say that the entire blogger community is supporting us, and I believe Blogvani should be able to keep its position amongst the top websites in the contest.

Please visit Blogvani.com, and if you like, please vote for it.

You can vote by SMS

SMS ‘Hot 22′ to 56767

Or go to http://www.hotteststartups.in and vote for Blogvani.com

Thank you for your support.

Regards

Cyril Gupta

MS Likes to Make it harder to be a VB.Net Programmer (How to change Target .Net Framework in VB.Net)

Spending years on VB before migrating to C#, I often have this nagging feeling that I am spending more time writing and debugging my code than I should have to. I am sure I would be able to make applications slightly faster in VB, but now I have migrated pack-and-baggage to C#, and I am so comfortable here that I don’t want to change.

But I still program in VB.Net a lot. Right now I am making some updations to an app that I made in VB.Net. Among other things I am migrating it from .Net framework 2, to .Net Framework 3.5.

Most of online documentation on this uses C#, and says that the Framework selection combo bar : ‘Target .Net Framework’ is placed in the Applications Tab of the Project Properties window.

No it isn’t for VB.Net. There’s no Target Framework dropdown. It’s there only in C#.

If you want to change your Target .Net Framework in VB.Net, go to Project Properties –> Compile –> Advanced Compiler Options –> Target Framework.

Quite a few steps more than what you have to do in C#.

I found this information in an online forum, otherwise I would still be hunting and cursing.

Odd .Net Access SQL Behaviour (Query works in Access, not in .Net)

Sometimes memory plays weird tricks. I couldn’t recall earlier that joins have to be fully qualified for use with MS Access, but I perfectly recalled that if you needed to use a LIKE search you’d need to use ‘*’ instead of ‘%’.

Memory may behave oddly, but fate is perfectly in sync with Murphy’s laws. Earlier I my query didn’t run because I forgot Access syntax, and this time it didn’t run because I remembered it. Let me show you how: -

The query

SELECT * FROM Customers WHERE CustName LIKE ‘Acme*’

Will run perfectly if you run it in MS Access, giving you the list of all the customers with names beginning with ‘Acme’. But when you run it from within your .Net program, you will get no rows.

The query

SELECT * FROM Customers WHERE CustName LIKE ‘Acme%*’

Will run perfectly if you run it from within your .Net code. But when you run it from within Access, you will get no rows.

In VB6, the behavior was as per Access, and I was quite confident that I needed to use the *’. So I was quite flabbergasted when my query didn’t work, and kept running around in circles for another half an hour before I got fed-up enough to try ‘%’.

When you’re a programmer, there’s never a dull day.

The day I used .Net framework 3.5’s new features

Couple of months ago I had this conversation with a friend about the practicality of .Net Framework 3.5’s new features. He raised the point that there’s not much to offer in 3.5 in the practical sense. There’s nothing you can’t achieve with the stuff that’s already there in Framework 2, and most features are just simplifications, or layers over existing features.

A good reason to not be so eager about going through a new learning curve? Maybe, but I remember the way I felt about being the last guy to upgrade to .Net.

.Net was launched in 2000, but I started programming professionally in it only by 2004. I was too comfortable programming in VB6, and all my apps were made in it. Meanwhile everyone I knew had sped ahead, and the Internet was chock full of people who were gloating about moving successfully. I felt absolutely rotten about the entire affair.

Then I started programming in .Net, and I worked on it virtually all the time, coming up to speed pretty quickly, but it was embarrassing to be the last to move. I decided then to always stay with the technology, and never lag. Since then I’ve been pretty much kept up with everything that has emerged in my skill-set.

I spent all of July working on an application that I abandoned because there’s a superb alternative available in open-source, complete with a thriving community that leaves me no space to compete in. When I abandoned it, it felt terrible, but there was a silver lining. During all this time I used a lot of .Net 3.5 features, getting to know them better.

Here’s what I used: -

1. Lambda functions.

2. LINQ to objects

3. LINQ to XML

4. Predicates, Anonymous methods (I know they’re in .Net 2, but I didn’t use them much earlier)

What I enjoyed the most was using lambda functions. I liked them better than LINQ to objects. There’s so much power that can be packed in a line using Lambda functions. This is one topic that I hope to study more in the near future.

But now I am going to be busy again for a while. I think I will spent August working on SQL quite a bit. And this month will be glorious in another, very-very important way. An event that I look forward to with a lot of anticipation.

SQL Joins Work For Multiple Fields

SQL has some really powerful tricks and almost never fails to come up to expectation when you need to get data filtering done. In the project that I am working on now, I have this special need of retrieving data from three tables, using OUTER JOINS, run on multiple fields. I.e. multiple tables, and multiple fields. I had worked with data retrieval from multiple tables before and that didn’t seem like hard work, but I was worried about joining on multiple fields. It was simpler than I expected.

Here’s an actual example from my code that joins on multiple fields between two tables: -

SELECT *
FROM Posting LEFT OUTER JOIN DocNarr
ON (Posting.Posting_PartNum = DocNarr.DocNarr_PartNum AND Posting.Posting_DocID = DocNarr.DocNarr_DocID)
WHERE Posting.Posting_AccNum = 63

All you need to do to join on multiple fields is to put in ‘AND’, and enclose your entire join condition in parenthesis. It works wonderfully.

I am using this technique to speed up certain reports in a business software I had made earlier. I think by the time this assignment is over there will be some new SQL tricks in my repertoire.

Occam’s Razor and Microsoft’s MSDN Source Code (Join Expression Not Supported — problem solved)

Occam’s Razor defines a working philosophy that believes the shortest, and simplest way to do something is the most correct (best). What it essentially says is, cut down the nonsense, and focus on the basics, cause that’s what will get the job done. This principle is very important for programmers because they do problem solving on a daily basis, and I’m a big fan of it.

I was modifying a software that uses Access database today. I’ve been working on SQL Server since the last year or so, and I’ve forgotten most of the SQL syntax that is typical to Access. So I was having trouble getting a simple INNER JOIN query run.

The following query doesn’t run on Access

SELECT * FROM DocInfo INNER JOIN Posting ON DocInfo_DocID = Posting_DocID

The error I get is "Join expression not supported".

A little research revealed that the INNER JOIN syntax in Access is slightly different than what I am used to in SQL Sever/MySQL. So I looked up, and found a Microsoft MSDN page that looked like it held a solution (http://msdn.microsoft.com/en-us/library/bb208854.aspx).

All I needed was to understand the simplest INNER JOIN expression, that could tell me how to word the query. Instead this page gives me a query which has two INNER JOINS, field aliases, Grouping clause, bracketed table names (table name with spaces!). An ultra set of bells and whistles that I don’t need to confuse me. Classic case of oversupply.

This scale of Microsoft documentation does little to help. Is it a surprise that blog articles and forum posts are considered more helpful by programmers than MSDN documentation even though it practically has everything. MSDN needs to be more practical, and less preachy. The KISS principle applies even to programmers.

Now coming back to that SQL problem. Here’s how the SQL INNER JOIN query should have been worded in Access: -

 SELECT * FROM DocInfo INNER JOIN Posting ON DocInfo.DocInfo_DocID = Posting.Posting_DocID

Access makes it mandatory to fully qualify the field names in the Join by putting the table name in front of them. SQL Server does not have this requirement. Just add on the table name, and the query works beautifully.

Hope this helps some people

Is Cuil Improving?

Recently launched search engine Cuil was so bad that it just about defined the word ‘Fail’. But either the search engine’s algorithm has been updated or the bad press that Cuil got has shaken the promoters up from their slumber. The search results on Cuil are slightly better than earlier, though they still don’t know what ‘COBOL’ is.

1. Search for Mahatma Gandhi brought up the right photographs on the front page at least. Cuil also showed a side topic bar listing past president’s of the Indian National Congress, which had some interesting information.

2. Search for Bill Clinton didn’t show another guy’s photo after all. :)

3. Search for c# brought up the popular c# websites. Microsoft’s wasn’t one of them. And one link was totally unrelated.

I think Cuil has improved slightly, but is still not as good as MSN, Yahoo, forget Google.

Here are some suggestions for Cuil, though I don’t think they’re listening to me.

– Introduce search results divided into sections (Ex. From Blogs, From WWW, From Forums, From Newsgroups)

– Show more results on the search page.

– Detect User’s monitor resolution size, and show the number of columns according to that.

– Pay more attention on developing the explore by category widget. It’s a good thing.

– The paging buttons are bad. The back link should be before page numbers, the next link after page numbers.

– Font is too small. You need to go one size bigger.

– Demote content harvesters, article directories, aggregators and similar websites in search results. Promote blogs and private websites.

– Do anything, but stop showing incorrect photographs with search results. Better not show any photographs if this situation can’t be solved.

Hmm.. I think I’ll have more suggestions later.

The adventures of the CommonSenseMan: Episode 1: Meet George W Bush

"Common sense is so rare, it’s a super power."

Read this while surfing randomly. Now that’s appealing. It sums up human rationality and intelligence in one small line that you can tell anyone you need to pass on a profound message to.

Since common sense is a super power, there ought to be a Common-Sense Man. Using his super powers to try and save the world. In fact there is one, and here is one of his adventures.

Common-Sense Man

Uniform – cheap gray suit
Special powers  – Can see through logical flaws in any argument. Capability to rationally explain any situation.

Meet GWB

CSM – Ah. Hello! So nice to see you Mr. GWB. I am the Common Sense Man. Here to talk to you about your ‘achievements’ as the president.

GWB – Eh, what? Common sense? Never heard of that. Well, what do you want sonny? Can’tcha see I am busy counting my oil profits.

CSM – Indeed! I won’t take so much of your time. Just need to discuss a few things for our readers.

GWB – What? You think I got time for some stupid punks who spend their time on the Internet instead of joining the army and fighting in AiRack so that we can win that goddamned war?

CSM – Now, just a sec Mr. GWB. Think how good this interview will be for publicity. You really need some PR with all the hate that you’re collecting.

GWB – Hmm… Okay. You got a point their sonny. Shoot!

CSM – Mr. GWB, do you care to tell us what exactly is happening in the middle east, and how are you guys involved?

GWB – Middle East? Umm… Does that lie between the west coast and the east coast?

CSM – No Mr. GWB. I meant Iran, and Iraq.

GWB – Aah. Airan and Airack! I know what you mean. Our soldiers have done a good job in Airack, and I am so proud of it. Now I just hope they can impose democracy with equal fervour in Iran too.

CSM – Why do you want to IMPOSE democracy on Iran Mr. GWB?

GWB – What? You don’t know that? It’s all about freedom. All about the American spirit. As the leaders of the free world, it’s our responsibility to give people people everywhere democracy. You know, it bleeds my heart to see how they treat their women.

CSM – Can’t deny that Mr. GWB. So you believe that democracy and equality should be everywhere? And you want the American army to democratize Iran?

GWB – Yes! You got that right sonny!

CSM – But Mr. GWB, can you deny the fact that in our last two attempts at implementing democracy we’ve failed miserably. The regime in Afghanistan has changed from one hand to another, but it’s still totalitarian. In Iraq people are actually worse off than they were earlier.

GWB – Hey! We did our best. Those creeps are giving our boys a hard time. What can we do if they don’t want freedom?

CSM – Then why do you feel that you can do a better job with Iran?

GWB – Uh… We have to try. Who else will? And don’t you know they are making nuclear weapons?

CSM – Nuclear weapons? Like the ones our government has thousands of? And the same way that Saddam had WMDs?

GWB – That Saddam guy was a dictator. He was a despot!

CSM – Pretty much like Pakistan’s Pervez Musharraf. Wasn’t he? Weren’t you photographed with your arm around his shoulders like he was your long-lost buddy at Camp David where YOU had invited him.

GWB – Uh… Gobble-gobble, mumble. Pakistan is an ally nation. A friend.

CSM – So it’s okay to have friends as despots, but it’s not okay to have despot enemies?

GWB – You’re confusing me Sonny! Next question.

CSM – What about the profits from the war Mr. GWB. Some say that the entire exercise of Iraq war was to benefit some oil companies, and arms suppliers.

GWB – That’s a lie spread by traitors. Our country went to war because we believe in higher ideals, and not because of profit. It was for the nation?

CSM – Do you mean to say that the generous business owners supported the war effort with lower prices, and smaller margins?

GWB – Huh?

CSM – I mean they must have contributed to the higher ideal by earning no or very little profit on the goods they sold to the government. You can always check their balance sheet.

GWB – You lost me there sonny.

CSM – Okay. I will move on. Tell me about the allegations that you weakened the world by going to war unilaterally, and without sufficient cause. That the world government of UN is now a joke.

GWB – You know my rule sonny. If you’re not with us,  you’re against us.

CSM – Does that make the majority of the nation’s people who are against war, traitors?

GWB – Uh… We are Americans here. We believe in our founding fathers’ message.

CSM – And what was that?

GWB – Freedom, and human rights.

CSM – Like what’s said in the first amendment?

GWB – Yes. That too.

CSM – Then how do you respond to the allegations that you have curtailed the basic rights of the people by spreading lies, misinformation, panic, paranoia, and that you’re using it to your advantage by giving undue rights to police, even allowing them to search houses and detain americans without a warrant?

GWB – We need to fight terrorists sonny.

CSM – Who are the terrorists?

GWB – The Al-Qaeda of course.

CSM – The same group that the government sponsored for a long time. We gave them money, we gave them guns, and we gave them training.

GWB – (Dubya look) You know what son. You’re sounding more and more like a traitor to me. Don’t you believe in your leaders?

CSM – I believe in facts Mr. GWB. Now please tell me what are you going to do about the economy?

GWB – All that is needed to be done.

CSM – And what is that?

GWB – Everything.

CSM – Hmm… And that is?

GWB – Full measures.

CSM – What I am saying is. The dollar is falling. Jobs are moving out of the country. We have a huge national debt. People are getting angry. What is your solution?

GWB – Look sonny. I’ve done all that I could for America. My term is about to end. It will be my successors turn to deal with these problems.

CSM – That’s Logic Mr. GWB! And what will happen then?

GWB – Oh… Dad had it all planned out. It was me for two terms. Now we’re running McCain, he will lose the term cuz of the bad press they gave me. Then in the next elections we will blame everything on incumbent president, and rig the votes for Jeb.

CSM – For JWB?

GWB – Yeah, of course. Dad’s done it. I’ve done it. Now it’s Jeb’s turn.

CSM – Thank you Mr. GWB for this frank, and open interview. I can only wait with dread what the next WB will do to the world.

GWB And Obama

"No, I don’t know that atheists should be considered as citizens, nor should they be considered patriots. This is one nation under God."
George W. Bush

"We are a nation of many faiths and of those with no faith at all.  The religious practices of all must be respected."
Barack Obama (in his official article on faith, available from his website)

Why was George Bush so against atheists?

Because they refuse to be misled by faith.

Because they refuse to keep their eyes closed to logic.

Because they desire to investigate and understand all phenomenon.

Because they refuse to believe anything on the word alone.

Because they refuse to be herded like sheep.

Because they refuse to have their lives dictated to them by a preacher.

Because they believe in tackling situations, not praying when there’s a hard time.

Because they believe in the scientific method.

Because they’re not afraid of God, or anyone who invokes God to justify their wrong.

Because they ask for evidence when someone tells them something.

Because they can’t be fooled so easily.

Here are some facts: -

1. The IQ average of atheists is higher than the IQ average of religious people.

2. Atheists do not lead processions, marches, or eat up resources building places of worship.

3. Atheists do not put pressure on anyone to follow a particular god, or to follow no god.

4. Atheists are not offended when you tell them you don’t believe in atheism. They’re usually amused at your naivete.

5. Atheists do not recognize a single leader for who can order them to murder, pillage, or destroy others.

6. Atheists have never declared war on the name of atheism against anyone.

7. There’s the highest number of atheist scientists and researchers than any religion.

8. Eisntein didn’t believe in God. Edison was an atheist. Lincoln was an atheist for the most of his life.

"To you, I’m an atheist. To God, I’m the loyal opposition."
Benjamin Franklin

In a world that’s growing progressively smarter, I see less and less room for organized religion. Religion gives birth to people like Osama and GW Bush.

This is the age and time to denounce religion, one and all, not pray to god.

The world must vote for change.