Skip to main content

Posts

Showing posts from March, 2007

Books -- Great Innovation

Books are not scrolls. Scrolls must be read like the Torah from one end to the other. Books are random access --a great innovation over scrolls. Make use of this innovation ! Do not feel obliged to read a book from beginning to end. Permit yourself to open a book and start reading from anywhere. In the case of Maths or Physics or anything especially hard,try to find something anything that you can understand.Read what you can. Write in the margins. Next time you come back to that books, you'll be able to read more. You can gradually learn extraordinarily hard things this way.

Funtion to Find whether the String is Palindrome or Not

using System;

class test
{

private static void Main()
{

Console.WriteLine("Is 'ada' Palindrome : {0}",IsPalindrome("ada"));
Console.ReadLine();
}

public static bool IsPalindrome(String strParam)
{
int iLength,iHalfLength;
iLength = strParam.Length - 1;
iHalfLength = iLength/2;

for(int iIndex=0;iIndex<=iHalfLength;iIndex++)
{
if(strParam.Substring(iIndex,1)!=strParam.Substring(iLength - iIndex,1))
{
return false;
}
}
return true;
}
}



Detect OS Version Using C#

// Get the Operating System From Environment Class
OperatingSystem os = Environment.OSVersion; // Get the version information Version vs = os.Version;
MessageBox.Show (vs.Major.ToString()); // vs.Major;
//vs.Minor;
//vs.Revision;
//vs.Build;

Adding Errors to Event Log

using System.Diagnostics;
private void AddLog(string sErrSource, string sErrMessage, EventLogEntryType ErrType)
{
EventLog objLog = new EventLog("AppLog");
objLog.Source=sErrSource;
objLog.WriteEntry(sErrMessage,ErrType);
} This function will create an event log called "AppLog" and adds the source and message into that. EventLogEntryType enum contains 1. Error 2. FailureAudit 3. Information 4. SuccessAudit 5. Warning

Debugging Problems in ASP.NET

When you try to debug an ASP.NET application in Visual Studio.NET. you may receive the following debugging error.Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged.Following are reasons and solutions for this problems.Possibility 1:You are not a part of debugger group.SolutionLocal Users and Groups ->Users- > add yourself as a Debugger User (Also check if you are a VSDeveloperPossibility 2:You dont have execute permissions on your virtual folder.SolutionStep 1: Control Panel -> Administrative Tools- >Internet Service Manager Step 2: Default Web Site -> Right Click on your Project-> Properties->Execute Permissions -> Scripts and Executables Possibility 3:You have kept ASP.NET debugging unchecked.SolutionIn VS.NET IDE, Right Click Project - >Properties->Configuration Properties ->Debugging-> Debuggers Enable Check the checkbox for ASP.NET Debugging

Today's Prgamming :skills to make it work

The quality of a good programmer is the ability to know how to beg borrow and steal the right code - AND when not to try and solve a problem from scratch.Interview of two candidates
Q Write a class to put these items in a linked list. Candidate 1 Wrote a nice linked list class and used it - failed
Candidate 2 Derived class from a library linked list class, and used sample code - Got job and went down to pub to celebrate!


As a Software Engineer, problem solving skills are 80% of software engineering. The syntax of programming and programming well is the difference between a good programmer and a great programmer.

I was passed over for a job because I couldn't "Write a function to compute the moving average of a stock price." Heck, I didn't even know what a "moving average" was. But when I got home I sat down and 20 minutes later I had a nifty little recursive function that answered the question. Why couldn't I do that in the interview? Because in the inter…

Programmers!!!!!!!!!!????????????

I think what should be tested is not the knowledge per say, but the capacity to pick stuff up, I got my current Job becuase I took an API I had never used before and figured out how to use it. I'm by no means a pro, but I have the capacity to learn by myself, some people can't pick up new things unless they are spoon fed.

University is not an exercise in cramming your head full of knowledge it's an exercise in learning how to learn quickly and efficiently.

When you know the basics you can teach yourself a new language in a few hours, and depending on the complexity learn a new API in an hour to day. Many grads I find dont have that capacity.

I remember at my first .NET course the teacher asking how many people never programmed before. Many hands were raised, and I felt bad for them for choosing a future profession without knowing what it actually was about. Then he asked how many people never touched a keyboard before. How shock was I to see at least 10 persons raise their ha…

199 out of 200 programmers can't write code....!!!!

Somewhere i read it. They wrote that almost 199 out of 200 can not write programs.

What i think is we cannot judge a person simply taking interview for 30 minutes or 45 minutes.We can always learn to pass interview tests of any kind - that doesn't mean We can program or not. These days Technological growth is very rapid which makes us to remember only the concept not the syntaxes. So we cannot expect every one to remember each and every thing.

We studied many concepts during our Engineering Day's in College but many of the concepts we never used at all.For example, I wrote programs like generating Fibonacci series etc which I never used at all in my programming so far.

If someone were to ask me how to swap two variables w/o a temp variable I'd ask them to give me a good reason why. Not being able to answer that particular question certainly doesn't preclude someone from being a good programmer. That'd be like asking a C# programmer how to d…

Links.......

Followup on the 80 core CPU Intel was boasting about. It's here. It's not commercial yet, but it's real!

If that wasn't enough, here's a Canadian company testing a quantum computer.

There's still some doubt. But if parallel machines weren't enough, quantum computers are just around the corner no matter what. Project V can handle anything that comes along. I couldn't care less what the platform is. What other technology can claim the same?

Here's an article on making best use of system resources, especially the cache, in multi-core systems. This is all too important if you're doing low level programming. Unfortunately, I doubt most people will understand how to properly take advantage of this. Most languages don't let you deal with the cache anyhow.

How to Interview a Programmer

How to Interview a Programmer
by Bill Venners
Summary
Recognizing good programmers among job applicants is not easy. This article contains interview techniques, garnered from a recent summit on writing better code, that can help you can find the most qualified programmers for your project.

Seven Golden Rules Explore an Area of Expertise Have Them Critique SomethingAsk Them to Solve a ProblemLook at Their CodeFind Out What Books They ReadAsk About a People Problem Get to Know ThemIn January, I attended a Writing Better Code summit in Portland, Oregon, organized by Scott Meyers and Bruce Eckel. At the three-day summit, 15 people gathered to discuss code quality and how they could improve it. Throughout this discussion, one theme was clear: good code is written by good programmers. Therefore, one great way to improve the code quality within an organization is to hire better programmers. The trouble is, recognizing a good programmer among a pool of job applicants is not easy. Finding good pro…

One thought about support

As a software developer, I work with systems and software in the real world every day, not just at home for fun. Problems do happen. What is important is how often these problems happen and how quickly they are resolved. But very less companies concentrate on providing good customer support and resolve the issues faced by customers.

Things you should know about AI,Neural Net,Cryptography.......part 2

In this part i will tell you about a method to fight spam's. This concept is called CAPTCHA(Completely Automated Public Turing Test to Tell Humans and Computers Apart).

This test will tell whether the participant is a human or a machine. i think every one knows about an distorted image whenever you try for registration or try to post some thing on orkut like websites. (Take a look at the image below)
This prevents automated code to register or post. So by this now a days companies are trying to fight spams.

It has many applications also apart from fighting spam.I will write about it in future.

I am busy.......

Sorry for the late posts.........i am bit busy with a project related to HP(Hewlett-Packard).........it will take another month to finish up and then i can post new things..............

String Date Validator in C#

Simple string date validator.I am a big fan of maintaining a library of simple and clean helper methods. Here is a simple and clean way to verify if a string formatted date is a valid date. This allows you to encapsulate the exception handling making it easy to use and very readable - another important coding practice.private static bool IsDate(string sDate)
{
DateTime dt;
bool isDate = true; try
{
dt = DateTime.Parse(sDate);
}
catch
{
isDate = false;
} return isDate;
}

Saving Shockwave Flash swf in IE and Mozilla

Firefox
a. Click Tools - Page Info
b. Click the Media Tab on the Page Info Windows
c. The media tab has a complete list (with preview) of Images, CSS Files and Shockwave Flash files that were downloaded by the Firefox browser while rendering (loading) the page.
d. Scroll down the list and locate the swf file.
e. Click the "Save As" button. Select some directory on your hard drive and save the file (No need for a third-party plug-in)

IE browser

a. Click Tools - Internet Options
b. In the General Tab, click the Settings button available in the Temporary Internet Files group.
c. Click View Files to open your Temporary Internet Files folder. Depending upon your IE settings, the Temp. folder can contain tens of thousands of files.
d. Click View - Details. Now click View - Arrange Icons By - Internet Address. Depending upon the webpage, there could one or more Flash files (Shockwave Flash Object) under the Inernet Address.
e. Once you find the right flash file, right-click and choose Copy. …

Links to Free Windows Software from Microsoft

Microsoft has over 150 FREE Windows & Office Programs available for download -- finding them all is extremely difficult . . . until now. THANKS DIGG! Wow, over 3,400 digg's for free Microsoft Software! THANKS Del.icio.us Over 3,700 tags here too! THANKS Google over 50,000 links to this page!
WINDOWS XP GOODIES Agent components provide animated characters (Genie, Merlin, Peedy, Robby & "Custom") to appear during specific help or instruction. (Support FAQ) Alt-Tab Replacement in addition to the icon of the application window you are switching to, you see a preview of the page. Calculator Plus also performs many types of conversions. ConferenceXP enables you to see & hear others in a virtual collaborative space, called a venue. You collaborate on an electronic whiteboard or PowerPoint presentation, send messages and more. Feeds Plus is an Internet Explorer 7 add-on for RSS pop-up notifications. FolderShare keeps important files at your fingertips - anywhere. All fi…