May 2008 - Posts

If you have ever thought that the famous if(Page_ClientValidate("validationGroup")) {/*JS Code*/}  and myValidator.ValidationGroup = "validationGroup"; are sure not enough client side capabilities in ASP.NET validators, you are right.

The list of client side API for ASP.NET Validators can be found on this MSDN page "ASP.NET Validation in Depth":

http://msdn.microsoft.com/en-us/library/aa479045.aspx#aspplusvalid_properties

Look for subtitle: "Client-Side APIs".

 

Thanks Simone Chiaretta for mentioning the topic, Mohamed Tayseer for sharing the topic on facebook, and Richard Cook for his comment on the post making me search for the complete list.

This is collected from some quotes sent in dotNETreporter.com's "Weekly Top Posts" newsletter messages in the past months, in no particular order:

  • "Solitude is painful when one is young, but delightful when one is more mature." (Albert Einstein)
  • "I can teach anybody how to get what they want out of life. The problem is that I can't find anybody who can tell me what they want." (Mark Twain)
  • "The person who goes farthest is generally the one who is willing to do and dare. The sure-thing boat never gets far from shore. (Dale Carnegie)
  • "The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance." (Confucious)
  • "The father who does not teach his son his duties is equally guilty with the son who neglects them." (Confucious)
  • "The royal road to a man's heart is to talk to him about the things he treasures most." (Dale Carnegie)
  • "Problems cannot be solved at the same level of awareness that created them." (Albert Einstein)
  • "History is strewn thick with evidence that a truth is not hard to kill, but a lie, well told, is immortal." (Mark Twain)
  • "Tell the audience what you're going to say, say it; then tell them what you've said." (Dale Carnegie)
  • "Study the past if you would divine the future." (Confucious)
  • "All you need in this life is ignorance and confidence, and then Success is sure." (Mark Twain)
  • "Politics is far more complicated than physics." (Albert Einstein)
  • "Everybody talks about the weather, but nobody does anything about it." (Mark Twain)
  • "Remember, today is the tomorrow you worried about yesterday." (Dale Carnegie)
  • "Our greatest glory is not in never falling, but in rising every time we fall."  (Confucious)
  • "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." (Albert Einstein)
  • "Remember, happiness doesn't depend upon who you are or what you have, it depends solely upon what you think." (Dale Carnegie)
  • "Only the wisest and the stupidest of men never change." (Confucious)
  • "It is a miracle that curiosity survives formal education." (Albert Einstein)
  • "If we knew what we were doing it wouldn't be research." (Albert Einstein)
  • "Education is the progressive realization of our ignorance." (Albert Einstein)
  • Accident is the name of the greatest of all inventors. (Mark Twain)
  • "Many of the things you can count, don't count. Many of the things you can't count, really count." (Albert Einstein)
  • "Courage is resistance to fear, mastery of fear -- not absence of fear." (Mark Twain)
  • "People rarely succeed unless they have fun in what they are doing." (Dale Carnegie)
  • "Always do right. This will gratify some people and astonish the rest." (Mark Twain
  • "You can make more friends in two months by becoming interested in other people than you can in two years by trying to get other people interested in you." (Dale Carnegie)
  • "Most of us have far more courage than we ever dreamed we possessed." (Dale Carnegie)
  • "I have found out that there ain't no surer way to find out whether you like people or hate them than to travel with them." (Mark Twain)
  • "Life is really simple, but men insist on making it complicated." (Confucious)
  • "Common sense is the collection of prejudices acquired by age eighteen." (Albert Einstein)
  • "Our fatigue is often caused not by work, but by worry, frustration and resentment." (Dale Carnegie)
  • "In the middle of difficulty lies opportunity." (Albert Einstein)
  • "Most of the important things in the world have been accomplished by people who have kept on trying when there seemed to be no help at all." (Dale Carnegie)
  • "To know what is right and not do it is the worst cowardice." (Confucious)
  • "He who conquers himself is the mightiest warrior." (Confucious)
  • "A man who has committed a mistake and doesn't correct it is committing another mistake." (Confucious)
  • "It's not the size of the dog in the fight, it's the size of the fight in the dog." (Mark Twain)
  • "If you want to be enthusiastic, act enthusiastic." (Dale Carnegie)
  • "A habit cannot be tossed out the window; it must be coaxed down the stairs a step at a time." (Mark Twain)
  • "The true sign of intelligence is not knowledge but imagination." (Albert Einstein)
  • "There is only one way... to get anybody to do anything. And that is by making the other person want to do it." (Dale Carnegie)
  • "To see and listen to the wicked is already the beginning of wickedness." (Confucious)
  • "It is easier to stay out than get out." (Mark Twain)
  • "You can conquer almost any fear if you will only make up your mind to do so. For remember, fear doesn't exist anywhere except in the mind." (Dale Carnegie)
  • "The secret to creativity is knowing how to hide your sources." (Albert Einstein)
  • "The only source of knowledge is experience." (Albert Einstein)
  • "It is better to deserve honors and not have them than to have them and not deserve them." (Mark Twain)
  • "If you have nothing to say, say nothing." (Mark Twain)

 

Note to not waste your time: The website no longer has new content.

Resources:

Avoid Much Talk

I wrote about Resharper 4 performance improvements in an earlier blog post today showing my VS Color Scheme including use of R# nightly builds. My friend Mohamed Tayseer pointed me out that Resharper 4 BETA was released yesterday. If you already know Resharper, skip the blah blah blah talk and get to the download.

Resharper, AKA R#, Who ???

Resharper used to be a must-have add-in for Visual Studio. It completes the features existing in Visual Studio like intellisense (not just smarter intellisense, but also available everywhere, like those areas in ASP.NET markup when you start typing non-standard code to Visual Studio to hook some properties and you get lost alone usually).

Of course it makes the expected enhancements to standard VS editor like parentheses and semicolon completion and other similar features, although it takes you w while to get used to stopping writing those after R# writes them for you!

It also has interesting stuff like SPEED find options (instead of this "Compiling the Solution" messages whenever you want to "Find Reference") also extended for things like 2-way jump between the base classes / interfaces and their children classes/methods. ad also tons of "Guideline promoting" features like intellisense for  VARIABLE names (like when you type "MailMessage" for local variable type, it recommends names like "mailMessage", "message", etc...), and options to detect unused variables and "using" namespace directives, and many other features.

It also offers very handy icons that do interesting stuff like inverting "if" statements and reversing assignments (very handy in ASP.NET donkey code behind files, in an edit page, call on page load a method with all txtProductName.Text = currentProduct.ProductName;, copy that to the method that's called from the "Save" button click, select it and click "Reverse Assignment"), and many great other features appearing as very small icons to the left of the code to not interrupt your work.

It's also smart. It can realize that Console.WriteLine("{0}, {1}", object0); will fail because the string format method is a "string formatter method" and it expects two objects while I passed only one! It has tons of interesting warnings and recommendations like this. Leave apart small features like quick use of "var" instead of type and suggesting and quickly applying conversion of normal static method to extension method, and so many other features.

For more advanced users than me it has advanced code snippets style and advanced template engine and advanced plug-in model for extending all features it offers (some interesting plug-ins), but I never used those ... too advanced for my "code monkey" use of VS :D. It even has integration with Testing frameworks, although TestDriven.NET already also handles this for me.

Resharper - Major Turnoff Removed

Earlier, the worst thing that prevented me totally from recommending it to friends (besides the price, I believe it is expensive [$199 for personal use, $149 if skipping VB.NET support], especially when you convert US dollar$ to Egyptian pounds :D) was the performance issue. With a 15+ VS solution each of over 15 classes (not small ones), you get slow down at project opening and many times at typing (while it's trying to get the smart intellisense or other great features to me).

This also cost A LOT of memory. I had a friend who installed it only in code review sessions and uninstalled it just after the code review because how greedy it is in terms of RAM. Things got a little better from R# 2 to 3, but also my work got bigger at the same time, so, it felt tedious.

Now with Resharper 4 (still in BETA) this is no longer an issue. I totally do not notice a difference in Visual Studio whether Resharper is there or not. This makes it great to develop and complete the parts that are missing and are actually must-have features Microsoft is missing in Visual Studio. It's a really elegant piece of work.

I'd still worry about pricing, especially vs. FREE Visual Studio (you get via your company's MSDN subscription usually, so, it "feels" free to you), but this is another story.

Reshaper 4 BETA News / Download

In my last post, I put a note about R# 4 nightly builds performance that more than anybody targeted mainly Mohamed Tayseer, my colleague who used R# only in some code review sessions and uninstalled it just after. A few hours later he returned the favor by pointing me out that R# 4 BETA was announced yesterday.

BTW, if you haven't guessed already, R# 4 BETA is a FREE evaluation version.

Here are the related resources:

 imageI blogged my old Visual Studio settings before for Visual Studio 2005, using a dark color theme and optimizing it for Resharper features like Resharper colorings and "Current Line Highlight".

Today I'm sharing with you my settings for VS 2008. Things have changed a bit since the first time, so, you'll find the layout different and colors as well, although still dark as well.

The one thing to notice is using "Lucida Console" font instead of the popular "Consolas". Also, if things look a bit small to you, this is because I'm using "Lucida Console" with size 9, and my entire Windows OS layout is using "Arial Unicode MS" font with size "7". It's killing for someone with sight shortage, but you never get enough of a 15 inch laptop screen, even if wide one!

By the way, the version of Resharper used with VS 2008 is the latest of the nightly builds of Resharper 4. The best thing I like about it besides supporting C# 3.0 of course is the performance improvements. Now "Solution Wide Analysis" is off by default and I still get most of the features I need of Resharper. Maybe This is the reason for the massive performance increase or whatever the reason, it's just nice.

 

You can download my settings right here:

File iconVS_Dark_Colors-W-Resharper-20080522.vssettings

 

By the way, if you are interested in how my old VS settings looked like, check this:

dotNETwork 4th gathering will be Saturday May 31st.

Agenda:

12:00 PM - 01:30 PM SharePoint Development
Marwan will give us an overview about SharePoint development. This session will be first session of a SharePoint sessions series.
Marwan Tarek
MOSS MVP - Team leader
ITWorx
01:30 PM – 02:00 PM Coffee Break
02:00 PM – 03:30 PM Introduction to Silverlight
Hussien will talk about Silverlight. Silverlight™ is the Microsoft® cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of media experiences and rich interactive applications for the Web.
Hussien Zahran
Development Manager
Link Development

The gathering will be in:Canadian International College.
There will be busses available at: Nady El-Sekka (11:00 AM - 11:30 AM)

See the map on the right.

 

Unfortunately I'll not be able to attend due to exams. A number of students have the same issue as well. However, it is a dotNETwork habit to have a session every month you know.

The official statement on this is:

"Hi Guys & gals,

We're really sorry, but we were already canceled last month's gathering not to conflict with EDC.. We'd better keep it regular for the continuity of our userGroup gatherings.. That u can always get compensated by attending the next months' gathering..

& be sure we will do our best to compensate u soon isA..

Thanks for your passion about dotNetWork.org.. =)" 

 

However, if you can make it, go attend the gathering. I have heard good stuff about Hussien Zahran if I recall correctly. I have also attended a SharePoint session for Marwan Tarek before and it was a very nice one (I wrote about it in my old blog).

Event Links:

Microsoft .NET framework 3.5 Service Pack 1 and Visual Studio 2008 Service Pack 1 now have public BETAs. The service pack of Visual Studio 2008 has really interesting stuff.

Highlights I'm interested in are performance improvements in HTML editor, collection of JavaScript intellisense hotfixes plus new ones enabling better JavaScript intellisense for libraries like jQuery, JavaScript Code Formatting, ASP.NET Routing engine (the one used in ASP.NET MVC, it is actually developed as separate component), new release of the Entity Framework and LINQ to Entities and ADO.NET Data Services, WCF tools, minor C# editor improvements and interesting LINQ to SQL debugging improvements.

Other improvements include ASP.NET AJAX history management (browser back button support), ASP Classic server-side code intellisense fix, new desktop applications installation model called "Client-only Subset", ClickOnce improvements, various WPF improvements, and some new WPF and Windows Forms controls.

This post is not for repeating the announcements, instead referring to other related content:

 

In case any of you has been wondering why I'm not blogging so lately although I have many topics interested in (See my Google Reader Shared Items), and have already mentioned topics I should be blogging about, I was getting many "last minutes" exams and quizes lately at university.

This is going to remain for a while. I'm having exams May 21st to June 3rd, and already had vacation from work that has just started. The same applies to blogging I guess, but with small difference, that sometimes while getting too bored of all the circuits and communications stuff I have to study (I'm in last year of computer engineering major), I may just come up writing something very quick into this blog.

This is hopefully my last term at university. Hopefully I will not have to write similar posts afterwards. Instead, I believe I'll have some way better news in different areas ;-). (If God Will).

Wish me luck.

More Posts