A repository of my thoughts, a blog, a source to get insight, know-hows, my views on Software Development and everything else in between......
Saturday, March 28, 2009
Strenght & Weakness
Now i am trying to find out whether it is same with every body else or not.
Let me know about yours.
Friday, March 27, 2009
Wednesday, March 25, 2009
How to: Check login name availability in ASP.NET MVC using jQuery Validation plug-in
< input type="text" name="txtUserName" id="txtUserName" class="textBoxes" />
$(document).ready(function() {$("#frmSelfRegister").validate({rules: {txtUserName:{required: true,remote: { type: "post",url: "Register/IsLoginAvailable" }},messages:{txtUserName: { required: "User Name is Required.",remote: jQuery.format("{0} is not available.")}}});});
[AcceptVerbs(HttpVerbs.Post)]public JsonResult IsLoginAvailable(FormCollection collection){JsonResult result = new JsonResult();try{ilogIn.Text = this.GetLoginByUsername(collection.Get("txtUserName").ToString().Trim());}catch (Exception ex){Helper.ErrLogger(ex.Message);}if (ilogIn.Text == collection.Get("txtUserName").ToString()){result.Data = false;}else{result.Data = true;}return result;}
Interface Inheritance Naming Conflicts
public interface IA{string Name { get; set; }String Adress { get; set; }}
public interface IB{string Name { get; set; }}
public interface IC : IA, IB{int Id { get; set; }}
class Test{public void GetSomething(){IC objIc = new IC();Textbox1.Text = objIc.Name();}}
class Test{public void GetSomething(){IC objIc = new IC();Textbox1.Text = ((IA)objIc).Name();}}
Monday, March 23, 2009
23 March 1931
Today would mark 78 years of the sacrifice three young men gave for the nation. Bhagat Singh- Raj Guru- Sukh Dev.
So today no one in news would talk about Bhagat Singh, Sukh Dev and Raj Guru the three young men who were hanged on this day near Ferozpur near the present India-Pakistan border. These men never cared about religion and fought for the freedom of the nation.
Indians seem to have forgotten the sacrifice and keep remembering Gandhi. It is definitely an unfortunate thing that people who were not in congress and worked for India's freedom never got the credit they deserve.Bhagat Singh, Sukhdev and Rajguru shall remain in my heart till I die. These are the people whom the young generation should have as idols. Their sacrifice, their patriotism & their principles, we should never forget them.
Fix Google Chrome (Crash) Error, The application failed to initialize properly (0xc00005)
Saturday, March 21, 2009
Hunt for Indian Secret Societies
Thursday, March 19, 2009
Logging Errors with NLog a .NET Logging Library
NLog is a .NET logging library designed with simplicity and flexibility in mind. With NLog you can process diagnostic messages emitted from any .NET language, augment them with contextual information, format them according to your preference and send them to one or more targets.Using it is very easy. Following steps helps you to get started.
5. Add following entries to your code behind file
using NLog;using NLog.Targets;using NLog.Config;using NLog.Win32.Targets;
catch(Exception ex){Logger errLogger = LogManager.GetLogger("*");errLogger.Debug(ex.Message);}
How to : NLog Intellisense issues with Visual Studio 2005/2008
Wednesday, March 18, 2009
Language Extinction
Monday, March 16, 2009
Sunday, March 15, 2009
Saturday, March 14, 2009
Thursday, March 12, 2009
Why We(I) Support the BJP - Because India Deserves Better
Source : Friends Of BJP
We are some of us - young and professionals. Till some time ago, we assumed that our contribution to the 2009 elections and the future of India would be our one vote. But, somewhere along the line, things changed. Maybe it was 26/11 and seeing some of us out on the streets demanding action. Maybe it was seeing Obama become President, and see politics really change in America, bottom-up. Whatever it was, we have woken up to the fact that we have to do more - much more - if we are going to rewrite our future and rebuild our India into the glorious country that it once was.
We know we are on the wrong track when security warnings sent on September 24 for the event that happened on 26/11 are ignored and not acted on. We know we are on the wrong track when we cannot provide adequate electricity 24×7 in our homes and factories - and yet for the sake of votes our political parties offer free power to millions. We know we are on the wrong track when we have schemes like NREGS and bank loan write-offs which create wealth for the entire value chain - except for the one it is supposed to help. We know we are on the wrong track when we can barely add to the highways in five years. We know we are on the wrong track when a mother says that her biggest challenge of parenting is finding a good school for her daughter.
We are on the wrong track. And it is WE who put us there. By our apathy, by not voting, by accepting mediocrity, by not being part of the political process. The best we do is show up at candle-light vigils when we are shocked from our smugness, but don’t we need something more concrete and impactful?
We are India’s educated civil society. If we cannot act individually and as a team, then we forfeit the right to complain. Democracy comes with responsibilities and duties. It also comes with a generation having to make some sacrifices so the Tomorrow for our children can be better than our Today.
We have less than 90 days only to the elections. India has 2 national parties and a multitude of regional parties. We have to make a choice about the party at the Centre. We can wait for a utopian world and the creation of the Perfect Political Party. Or, we can pick the party with the lighter shades of grey.
A week ago, when some of us got together to talk about the elections and the future, we also made our choice. We decided to support the BJP - and work towards ensuring LK Advani becomes Prime Minister. The BJP may not be the Whitest of the parties, but in our view, it is by far, the better, cleaner, more democratic, less feudal and more promising of the two national options. More importantly, we also realised that in the 2009 Elections, the way things stand, unless the BJP gets 50-75 more seats on its own above the 130 it got in the 2004 elections, there is little hope of the BJP forming a government at the centre.
Thus was formed Friends of BJP. We are neither all signed-up members nor agree with everything and everybody in the party has always said. But we firmly believe that, in 2009, the BJP and LK Advani are the best hopes for India. We have a clear short-term goal, and a grander long-term vision for Friends of BJP.
The 90-day goal is to get BJP to 200+ seats - in the 15th Lok Sabha. This will mean a massive outreach programme through all means at our disposal to get the silent supporters to be more vocal, and the undecideds to be swung the BJP way. Bringing about a BJP government at the centre with Advani at the helm will then bring into focus the longer-term vision. That is about a government that is two-way, that listens to us, that we can feel a part of. Technologies like the Internet and mobile give us the tools to self-organise and make our voices heard. The India of 2009 is very different from that of 2004. The 2009 Elections will be the first where urban India can actually make a difference.
We have to become the Voice of India. For 60 years, we have been Led. And for many of those years, Led down a wrong path. The time has now come for us to Lead.
We Support the BJP. Because India Deserves Better.
Wednesday, March 11, 2009
Tips & Tricks to go Green
Tuesday, March 10, 2009
Monday, March 09, 2009
How to : Creat an empty Solution in Visual Studio 2008
Friday, March 06, 2009
Biggest List of Cheet Sheets, Reference Guides to help you
- Scriptaculous Combination Effects
- What's Ajax
- Form Helpers
- CSS
- xHTML
- SEO
- JavaScript
- Firefox
- mod_reqrite
- PHP
- Ruby on Rails
- Python
- MySQL
- Prototype.js
- jQuery
- Regular Expression
- Adobe Photoshope CS3 Keyboard Short cuts
- Photoshop Toolbox Reference
- Photoshop Lasso Tool
- Photoshop Brush Tool
- RGB Hex Color Chart
- Color Reference Guide
- Web Designer Color Reference Hexagon Mouse Pad
- Web Safe Color Chart
- Hexa Decimal Color Chart
- Typography
- Common fonts to all versions of Windows & Mac equivalents
- Mixing Typefaces
- Approximate Conversion from Points to Pixels
- Megapixels Chart
- Blueprint CSS
- Yahoo Library: CSS Reset,Base,Fonts, and Grids
- CSS Short Hand
- HTML & xHTML Tag Reference
- HTML/xHTML Character Entities
- Dreamweaver CS3 Quick Reference
- Will the browser aplly the rule(s)
- Subversion
- SQL Server
- Microformats
- Ruby on Rails
- ASP/VB Script
- MySQL
Thursday, March 05, 2009
Wednesday, March 04, 2009
Interviewing a Software Engineer
Imagine the following interview with two interviewees, “Player A” and “Player B”:
Interviewer: “Okay, sir. Let’s say a ball is hit a little bit to your left. How do you field it?”
Player A: “Well, I’d take a few steps to the left and try to get my body in front of the ball. I’d use my left-hand to field the ball, switch the ball over to my right hand, and throw it to first.”
Player B: “I’d take a few steps to the left, keeping my body bent at the knees and the back so I could respond to any strange hops the ball might take. If I can get completely in front of the ball, comfortably, I will, but I might have to field it with one hand to the left of my body, if I can’t get my body in front of it. Depending on the direction I’m moving, the time it took me to get to the ball, and whether I got completely in front of it or not, I might have to throw it on the run.”
Based upon the two player’s answers to this question, Player B gets hired.
This might seem like the right call. The problem is that Player B is a recent college grad that majored in English and played intramural ball. Player A is Derek Jeter (Yankees shortstop) before he was really known as the Derek Jeter.
What if you were the interviewer and you had made this decision? You would’ve just altered the entire course of your team. There’s a good chance that from this decision forward you’d be losing a lot of games to the team that hired the person you let pass by.
The above scenario is analogous to the sad state of interviewing in the software industry. Interviewers ask inane questions that don’t have anything to do with whether the interviewee is a good software engineer. I’m not against a company asking basic questions in an attempt to weed out people that don’t have any idea at all about building software, but I am against getting through that process and then being asked similar questions in the next stage of the interview process. That’s almost always the way it goes, right?
One problem that arises when trying to solve this dilemma is that the software world is littered with posers[1] that don’t have any idea how to build software, and then these people are asked to interview people. It’s not even their fault in some cosmic sort of way: they are asked by management to interview the prospective employees. Uninformed managers asking unskillful developers to do such important activities is not a good way for an organization to operate. Since ignorance is bliss, though, these people have no idea what’s going on. Is it really their fault?
If you’re serious about hiring a good software engineer there is only one, effective way to hire serious candidates:
- Conduct a screen interview that weeds out any people that truly don’t belong. In this interview ask relatively basic questions about constructing software. By “relatively basic” I don’t mean totally simple questions; I mean questions that aren’t based on some obscure piece of information you read in the latest technology magazine you subscribe to. Ask questions such as “What is an interface?” or “What problems do you associate with using the ‘static’ keyword?” or “What can you tell me about responsibilities within a software system.” Don’t ask questions such as “How does the compiler optimize a for loop?” Such questions have no relevance toward the creation of software unless you are building software that optimizes for loops. Questions such as this are only asked when the interviewer wants to consciously or unconsciously appear “smart.”[2] There is no time for such silliness if you’re a serious person—and there is certainly no value in such questions for the organization you represent. If your company builds software there are not many more important decisions than hiring good software engineers, so get serious about it or get flattened by the competition. Someone out there is doing things right and they will annihilate you if you don’t clean up your mess.
- This is the most important step: sit down with the person you are hiring and develop something together. It doesn’t matter what it is. The goal is to get a feel for what the person is capable of when actually developing software and to see if the candidate can fit somewhere in your team. Before a sports team signs a player to a contract the team watches him play. The team doesn’t talk to the player about playing.[3] It shouldn’t be much different in the software world. Sit down and develop something together. The candidate doesn’t have to do things exactly like you or your organization. For example, if you’re a TDD shop like we are you don’t have to make sure the interviewee fully understands TDD; all you have to do is to see if writing software with her feels right. There isn’t even a perfect definition of “feels right.” It’s all up to you. In the case of TDD you’ll more than likely force the coding to follow TDD principles whether the candidate has ever done TDD or not. Going through this process will uncover a lot about the potential hire: What kinds of questions does she ask? What are her thoughts regarding TDD? Does she really seem willing and able? More answers than you have questions for will come to the forefront. Having answers surface to unasked questions is always a good thing in an interview, and the nuances of a person’s personality will flow through when you work together. You’ll be amazed at what you learn if you learn to pay attention.
If you’re not serious about hiring a good software engineer then you’re a poser. May as well make it easy and flip a coin.
Post Mortem:
In the end, it really doesn’t matter what you do. The outcome of whatever interview process you choose will be directly proportional to how much the interviewee’s abilities reflect your own. If you only ask the candidate questions, the questions you ask will be based upon your skill and experience in the software world--and the answers you seek will reflect your own answers.[4] If you’re not very good you’ll more than likely hire someone that isn’t very good, regardless of what you ask or do. If you do sit down and develop a piece of software with the candidate, you will develop it according to your ability and look for traits in the candidate that match your own traits. But, at least in the case of writing code together, you will get a much, much more accurate assessment of the interviewee than you will get by asking questions. An overriding reason for this is because coding together is a dynamic, exponentially greater reciprocal relationship than asking questions is. Asking questions generally flows in one direction—from the asker to the answerer—instead of equally in both directions.
In the case of an interview, bidirectional transport wins.
[1] A poser is a faker, but worse. A poser is a faker, only a poser doesn’t understand they are faking. Such people are incredibly annoying and boring. In this way one could say that Poser derives from Faker. I’d probably prefer to have Poser implement IFaker, but that is an argument for another day.
[2] Knowing an answer to this kind of question has nothing to do with being smart. There is a lot more to being smart than keeping extraneous information in one’s head. Intelligence has much more to do with how one associates information with other information, not how one collects it.
[3] A team may talk to a potential player about playing, to get a feel about their attitude and personality, but this is a fraction as important as how the player plays the game. Occasionally a team will let a good player pass by, but only if the player has enough personality baggage that it would get in the way of their playing upside.
[4] It is possible that you are very intelligent and very wise, but inexperienced. If so, you will ask questions and look for answers you currently believe are correct, but you might interview a candidate that is just as intelligent as you but much more experienced. In this case--if you are very wise--you would be prepared for and open to the possibility the candidate is actually better at developing software than you. You would hire him or her on the spot. Many people do not set aside their ego well enough to reach this level of maturity.
Sunday, March 01, 2009
The disaster of ‘me, me’ by S Gurumurthy
This happened in Mangalore as February 14 — now marketed as Valentine’s Day by traders to sell their wares — was approaching.
Upset with public drinking by boys and girls, a freak by name Pramod Muthalik got mad. He got some of them in a pub beaten up like their parents would do, but unlike them. He had informed the media about his show so that the news cameras were in place to telecast the Muthalik action everywhere. Thus the Muthalik show was a joint venture between him and the media to keep away the state police, which could spoil the show. Predictably, the whole world pounced on poor Yeddyurappa who heads the BJP government in Karnataka for allowing Muthalik to take the law into his hands. The BJP, ever torn between its love of Hindu culture and its desire for a modern image, was greatly embarrassed. With the BJP in power in Karnataka, Muthalik knew the publicity value of his show. Had he enacted his theatre elsewhere, like when the Shiv Sena raided pubs years ago in Mumbai and Pune under the ‘secular’ Congress rule, it would have been far less noisy.
More. By just one mad act, Muthalik turned many, including a minister, into full-scale lunatics. Renuka Chowdhury, a minister of state, supported a “pub bharo andolan” to take on Muthalik, thus openly encouraging young boys and girls to take to mass drinking in public. And believe it or not, her portfolio is Women and Child Development. Came an even more mad response to Muthalik’s take on Valentine’s Day. “I support every kind of love, heterosexual, transgender, marital, extramarital”.
This is Arundhati Roy sermonising to youths. Why she left out incest from her catalogue of love is not clear. Now, take the secular media. It quickly equated pubgoing with individual rights, and held Muthalik as an offender against human rights. Evidently, the mad act of a freak Hindu in a distant corner of India is sufficient to turn the whole of secular India into lunatics. Now move away from this trivia to the danger to which Renukas and Arundhatis expose the nation’s economy.
The current Indian discourse on individual and human rights, which tends to smuggle in even gay and lesbian rights, apes the West. As India attempts to copy the West, it clearly misses the serious economic issues that confront West, thanks to its obsession with unfettered individual and human rights. Many in the West now seem to realise that continuously undermining the moral and social order has led to the present economic crisis. The West did not slide overnight. Beginning from the late 19th century, the Anglo-American West gradually moved away from a relation- based lifestyle to a contract-based lifestyle.
While culture and tradition govern relation, law and rights inhere in contracts.
And this move from relation to contracts became almost complete in the second half of the 20th century. With law overriding relations, even parents could not curb the rights of their wards once they legally matured.
It is the other way. If they acted against their wards, the law would punish the parents for child abuse. So contracts replaced relations, and rule of law substituted for moral order. To what effect? The rise of unfettered individualism and undefined feminism have led to the erosion of families and a rise in divorces, singleparent families, unwed mothers, lesbians, gays and almost the collapse of traditional families. Over 50 per cent of the first marriages, 67 per cent of the second marriages, and 74 per cent of the third marriages end in divorce in the US. Over 40 per cent of births are outside wedlock. Almost half of the families are headed by a single parent.
The number is more in most of Europe. It was seen as cultural erosion first. But slowly it has turned into an economic disaster.
The contract-based model undermined families and led to low or no household savings, high personal debt, credit card based living, outsourcing of household functions including kitchen work. The erosion in relation-based lifestyle soon imposed a huge social security burden on the state because the family mechanism that supported the unemployed, infirm, aged and the rest and the state had to step in to aid them. Thus the family functions were taken over by the state. The families were nationalised. The overburdened state consequently had to shed its traditional functions, like public works, and privatise itself.
The socialisation of family functions obviated the need to save for a rainy day and led to even lower savings. With the growth of individualism to the exclusion of kinship and relations, corporates and the state alike promoted unrestrained consumerism.
Result, some 110 millions US households have some 1.2 billion credit cards, almost a dozen cards per household.
As the people saved less and spent more, they got into trillions of dollars of private debt; and as the government spent more, it also ran into tens of trillions of dollars of public debt. The result is that the government is bankrupt and so households are insolvent. More, the US, the largest creditor nation of the world three decades ago, is today the number one debtor of the world, with $12.5 trillion of debt.
A quick survey shows this: all individual- centric economies are deep in debt; but nations more family-oriented and less individual- centric, like Japan, China, India, and generally Asian nations, account for over three-fourths of global savings; the individualist West lives off the savings of family-centric Asia. Today the West says that, in the present crisis only Asia, which has huge savings thanks to family orientation, can save the West, which has almost lost its traditional family lifestyle.
So the idea of unbridled human rights and unrestrained personal freedom that have led to social and cultural degeneration are increasingly seen as the cause of the present economic crisis. Weeks ago, Thomas L Friedman, a leading economic journalist, wrote in the New York Times that he had told those eating in a restaurant that they could no more afford to eat out and they had better cook and eat at home. But how will they cook and eat at home unless families are re-created? If they do, how would the US compensate for loss of employment if restaurants, which exist because households have closed their kitchens, shut down? There seems to be no solution within economic laws to the present crisis of the West. Amoral economics once yielded higher returns. It now yields negative returns.
Here Renukas and Arundhatis advocate unbridled individualism that has undermined families and morals and dynamited the economies of the West. Renuka questions the idea public morals. Arundhati advocates amoral living. Both seem unaware that an economy built at the cost of family and social morals, too collapses on the ruins of the morals it has brought down. QED: morality supports economics; lack of it ruins economies