Moving blog

I moved my blog to http://blog.eireads.com See you all there :)

Beware at AJAX beta 2 migration

Since beta 2 is here, I decided yesterday to update beta 1 version of my project. I always tell my self not to touch things still they work, but as usual the new things are attractive. I already hed expirience of migrating from "Atlas" to "Ajax" - thats was real hurt. But I did not think that so meny diffrence will be from one beta to another and shame on me :). After updating ajax extention library my project totaly failed to run, Jscrpit failure something with 'Sys' object was wrong. Not likable error at 01:00AM. Well googling did not bring the desired results. Then I created new ajax enabled project and copied all related web.config settings to my project. Fourtunately project is working. Must stop this 'try a new staff' things...

SqlDataSource update parameters

If You are using SqlDataSource for gridview edit, and stored procedure for data layer please notice that sp parameters are match original table colums. For example @LinkUrl in sp -> LinkUrl in table column. Otherwise you will get exception.

ASP 2.0 Membeship and database different collations problem

I use sql 2000 for my project and asp.net 2.0 application with membership integrated feature. Suddenly, user to role mapping stopped to work. After a debugiing I found a problem in database layer that caused by some collation incompatibility. I realized the It could be only caused by fact that I use two computers with different sql server collations. I tried to search a web to find solution for this trouble but did not found anything. So the only solution was to rebuild entire database.

Meta tags makes Atlas UpdatePanel not to work

I faced this bug then I tried to add a keywords to page with UpdatePanel, partial rendering not working. I do not know how this related but it is certanly very nasty bug. Update: the good news is that Atlas July CTP solve the problem :)

Excel.exe designated as virus by McAfee antivirus

After update of McAfee antivirus I found that excel.exe is a virus and it was quarantined. Thay must be joking, right?  

Ten of the Biggest Mistakes Developers Make With Databases

Not bad post http://www.123aspx.com/redir.aspx?res=33900.

I know few people that do not have any clue in normalization or database design but are very succesfull in thier software business. How to explain this paradox? Maybe good marketing it is the key...

Good programmer

I was asked who on my opinion is a good programmer. Well here is my opinion

1. Has an ability to determine project scope.

2. Writes efficient code, I mean fimilar with efficient algorithms and knows how to classify them by efficiency. 

3. Lazy enough not to write same snippet of code twice.

4. Not conservative in willing to learn new technologies and design patterns.

And final section that I would prefer to put in index 0 is the ability to market his self.

Regex pattern for url matching

This pattern is to validate urls - www\.[\w-_]+.[\w\.]+.

Matches: www.msn.com , www.msn.co.il

Not matches: http://www.msn.com etc.

 

 

Problem while reinstalling MS SQL Server 2000

I had to install full text search feature, and I did not found a better way exept of reinstalling SQL Server 2000. When I tryed to reinstall  it gave me an exeption "A previous program installation created pending file operations on the installation machine". Here is explanation how to solve this problem http://support.microsoft.com/default.aspx?scid=kb;en-us;312995

Joke :)

The girl gets irritated with the smoke and says to her lover:

"Can't you see the warning written on the cigarette packet,

Smoking is dangerous to your health?"

The boy replies back

"Darling, I am a programmer, we don't worry about

WARNINGS, we only worry about ERRORS!

DataSet vs. DataReader

I have a to make a decision between using DataSet or DataReader. I am working on dating portal and my dilemma whever to fill dataset once and make all possible action like views , search and etc on it. Another option is to use collections for storing data but i need to get data from data base each time. I read in some article that dataset thirty times slower than datareader, but there are some other opinions regarding this issue. I would like to hear what do you think? 

Nice tips for speeding up ASP.NET pages

Very useful article about ASP.NET speeding up.

Get data from tables using stored procedure when table name is variable

I need to get static data from database like countries, cities and e.g. They certainly stored in different tables but thier structure very similar. It is like id and name. I have 15 tables like that, so I write function that gets table name and returns all rows from that table. It is realy easy to make such function on C#/VB.NET. Here is how does it look like as stored procedure: 

CREATE PROCEDURE GetIdNameCollection
(
 @table_name varchar(256)
)
AS
DECLARE @var as varchar(500)
IF OBJECT_ID(@table_name) IS NULL
 RAISERROR('User table or view not found.',16,1)
select @var = 'SELECT * FROM '+@table_name
exec(@var)
GO
  

blog new engine

Today I found my blog compeletely different. Thanks to our admins the entire blog engine was upgrated. That is cool... I hope spam comments problem now is gone.

Showing progress in console application

Sometimes It helps us to see progress of our console application. But if It will print each line it will be a little confusing. So here is code that will print status in one line:

for(Int i=0;i<1024;i++)
{
   Console.Write(“Showing {0}\r“, i);
}

Enjoy :)   

Top 20 Replies by Programmers when their programs do not work

20. "That's weird..."

19. "It's never done that before."

18. "It worked yesterday."

17. "How is that possible?"

16. "It must be a hardware problem."

15. "What did you type in wrong to get it to crash?"

14. "There is something funky in your data."

13. "I haven't touched that module in weeks!"

12. "You must have the wrong version."

11. "It's just some unlucky coincidence."

10. "I can't test everything!"

9. "THIS can't be the source of THAT."

8. "It works, but it hasn't been tested."

7. "Somebody must have changed my code."

6. "Did you check for a virus on your system?"

5. "Even though it doesn't work, how does it feel?

4. "You can't use that version on your system."

3. "Why do you want to do it that way?"

2. "Where were you when the program blew up?"

And the Number One Reply by Programmers when their programs doesn't

work:

1. "It works on my machine."

Google personalization

Now you can personalize you search page by adding some services to it, like weather, news , quote of the day. Check this out http://www.google.com/ig/customize