Your Ad Here

Thursday, February 12, 2009

How To Disable Error Reporting in Windows Vista

 
Windows Error Reporting is designed to help identify bugs with Windows. and it�s kind annoying or If you do not want to send information about errors; thus, eliminating the message shown above, follow these steps.


Start Group Policy EditorStart > Run > �gpedit.msc�
In the left panel, navigate to Computer Configuration > Administrative Templates > Windows [...]


Related posts:
  1. Download Windows Vista Service Pack 1
  2. How to Back Up and Restore Windows 7-Vista-XP Registry
  3. How to Disable and Enable Windows Vista Hibernation


Read More...

Your Ad Here

You're Doing It Wrong


In The Sad Tragedy of Micro-Optimization Theater we discussed the performance considerations of building a fragment of HTML.



string s =
@"
{0}{1}

{2}

{3}
{4}
";
return String.Format(s, st(), st(), st(), st());


The second act of this particular theater was foreshadowed by Stephen Touset's comment:



The correct answer is that if you're concatenating HTML, you're doing it wrong in the first place. Use an HTML templating language. The people maintaining your code after you will thank you (currently, you risk anything from open mockery to significant property damage).


The performance characteristics of building small string fragments isn't just a red herring -- no, it's far, far worse. The entire question is wrong. This is one of my favorite lessons from The Pragmatic Programmer.



When faced with an impossible problem, identify the real constraints. Ask yourself: "Does it have to be done this way? Does it have to be done at all?"


If our ultimate conclusion was that performance is secondary to readability of code, that's exactly what we should have asked, before doing anything else.


Let's express the same code sample using the standard ASP.NET MVC templating engine. And yes, we render stuff like this all over the place in Stack Overflow. It's the default method of rendering for a reason.



<%= User.ActionTime %>

<%= User.Gravatar %>

<%= User.Details %>
<%= User.Stuff %>



We have a HTML file, through which we poke some holes and insert the data. Simple enough, and conceptually similar to the String.Replace version. Templating works reasonably well in the trivial cases when you have an object with obvious, basic data types in fields that you spit out.


But beyond those simple cases, it's shocking how hairy HTML templating gets. What if you need do to a bit of formatting or processing to get that data into shape before displaying it? What if you need to make decisions and display things differently depending on the contents of those fields? Your once-simple page templates get progressively more and more complex.



<%foreach (var User in Users) { %>
<%= ActionSpan(User)%>

<% if (User.IsAnonymous) { %>
<%= RenderGravatar(User)%>

<%= RepSpan(User)%>
<%= Flair(User)%>

<% } else { %>
anonymous

<% } %>
<% } %>


This is a fairly mild case, but you can see where templating naturally tends toward a frantic, unreadable mish-mash of code and template -- Web Development as Tag Soup. If your HTML templates can't be kept simple, they're not a heck of a lot better than the procedural string building code they're replacing. And this is not an easy thing to stay on top of, in my experience. The daily grind of struggling to keep the templates from devolving into tag soup starts to feel every bit as grotty as all that nasty string work we were theoretically replacing.


Now it's my turn to ask -- why?


I think existing templating solutions are going about this completely backwards. Rather than poking holes in HTML to insert code, we should simply treat HTML as code.


Like so:



foreach (var User in Users)
{
[ActionSpan(User)]

if (User.IsAnonymous)
{

[UserRepSpan(User)]
[UserFlairSpan(User)]

}
else
{
anonymous

}
}


Seamlessly mixing code and HTML, using a minumum of those headache-inducing escape characters. Is this a programming language for a race of futuristic supermen? No. There are languages that can do this right now, today -- where you can stick HTML in the middle of your code. It's already possible using Visual Basic XML Literals, for example.


Visual Basic XML Literals used in an ASP.NET MVC view


Even the hilariously maligned X# has the right core idea. Templating tends to break down because it forces you to treat code and markup as two different and fundamentally incompatible things. We spend all our time awkwardly switching between markup-land and code-land using escape sequences. They're always fighting each other -- and us.


Seeing HTML and code get equal treatment in my IDE makes me realize one thing:


We've all been doing it wrong.





[advertisement] In charge of a mountain of Windows servers? PA Server Monitor to the rescue! Download the Free Trial!



Read More...

Your Ad Here

how do i create username and password log in box for ppl on my site

ok so i wan2 make it so ppl can log onto my site. how do i do so? can someone give me html code to create a box wit username and password login and any other codes i need to make it.... more files or idk someone help plesasse!!!!!!!

Read More...
Your Ad Here

10 Harsh Truths About Corporate Websites

We all make mistakes running our websites. However, the nature of those mistakes varies depending on the size of your company. As your organization grows, the mistakes change. This post addresses common mistakes among large organizations. Most of the clients I work with are large organizations: universities, large charities, public sector institutions and large companies. Over the last 7 years, I have noticed certain recurring misconceptions among these organizations. This post aims to dispel these illusions and encourage people to face the harsh reality.



Screenshot of Zeldman's website



The problem is that if you are reading this post, you are probably already aware of these things. But hopefully this article will be helpful to you as you convince others within your organization. In any case, here are our 10 harsh truths about websites of large organizations.




Read More...
Your Ad Here

The Two Types of Browser Zoom


From the dawn of the web -- at least since Netscape Navigator 4.x -- it has been possible to resize the text on a web page. This is typically done through the View menu.


netscape 4.x View, Font menu


This was fine in the early, primitive days of the web, when page layouts were simple and unsophisticated. Want the font to be three times larger? No problem! Pump it up until your eyes bleed; you're unlikely to break the design, because there's precious little design at all.


yahoo-homepage-circa-1998.png


But this was a time long before the web had become a platform for full-blown applications, with complex, dense, almost GUI-like designs.


The accepted web design guidance is that you should generally produce web page layouts that work at:



  1. the default font size (obviously)
  2. one size below the default font size
  3. one size above the default font size


I agree, and you should be testing for this on your own websites. The handy keyboard equivalents in most browsers are:













Ctrl + 0



Reset font size to default


Ctrl + +



Make font one size larger


Ctrl + -



Make font one size smaller


(yes, holding down the Ctrl key and then scrolling your mouse scroll wheel works, too, but no real programmer would use that.)


It is important to let the user control their browsing experience. But I think that the traditional method of font-only browser sizing is a solution whose time has come and gone. There's a better way. Opera was the first browser to introduce full page zoom as an alternative to traditional font sizing, but Firefox 3 is where most people actually experience it. In fact, in Firefox 3, it's the default page sizing mode.


Firefox 3 View, Zoom menu


Note that "Zoom Text Only" is unchecked. And for good reason. Compare for yourself. Here's the Digg homepage using old-school Netscape 4.x style font scaling.


Browser Font Scaling: Default


digg-text-zoom-default-thumb.png


Browser Font Scaling: Size +1


digg-text-zoom-plus-1-thumb.png


Browser Font Scaling: Size +2


digg-text-zoom-plus-2-thumb.png


Digg follows the design rule of thumb I suggested above: it scales to font size +1, but beyond that, all bets are off. With the fonts at +2, the top menu is scrunched, the search box clipped, and the digg numbers are spilling out over the boxes. The "most recent" navigation element has completely disappeared! Now compare this with the newer method of full page zooming:


Browser Full Page Zoom Scaling: Default


digg-page-zoom-default-thumb-256.png


Browser Full Page Zoom Scaling: Size +1


digg-page-zoom-plus-1-thumb-256.png


Browser Full Page Zoom Scaling: Size +2


digg-page-zoom-plus-2-thumb-256.png


While the page does get wider, the full page zoom method has tremendous advantages:


  1. Full page zoom works on almost every web page in the world, with no changes whatsoever by the web designers
  2. Full page zoom scales far, far beyond the +1/-1 sizes that you can reasonably expect from traditional browser font sizing approaches.


To prove that full page zoom scales like nobody's business, here's a screenshot I captured of the Digg homepage scaled to fit the entire width of my 1920 x 1080 monitor. In comparison, increasing the fonts beyond +2 results in a jumbled, unreadable mess.


Honestly, I can't see much use for traditional browser font sizing. It's increasingly fragile on today's web. I wish more browsers would take the lead from Firefox 3, and adopt full page zoom as the new default page sizing method.





[advertisement] Who filled the file server with MP3 files again? PA Storage Monitor can tell you. Disk and directory growth reports too. Download the Free Trial!



Read More...

Your Ad Here

The Ferengi Programmer


There was a little brouhaha recently about some comments Joel Spolsky made on our podcast:



Last week I was listening to a podcast on Hanselminutes, with Robert Martin talking about the SOLID principles. (That's a real easy-to-Google term!) It's object-oriented design, and they're calling it agile design, which it really, really isn't. It's principles for how to design your classes, and how they should work. And, when I was listening to them, they all sounded to me like extremely bureaucratic programming that came from the mind of somebody that has not written a lot of code, frankly.


There's nothing really objectionable about Bob's object-oriented design principles, on the face of it. (Note that all links in the below table are PDFs, so click accordingly.)




























































The Single Responsibility PrincipleA class should have one, and only one, reason to change.
The Open Closed PrincipleYou should be able to extend a classes behavior, without modifying it.
The Liskov Substitution PrincipleDerived classes must be substitutable for their base classes.
The Dependency Inversion PrincipleDepend on abstractions, not on concretions.
The Interface Segregation PrincipleMake fine grained interfaces that are client specific.
The Release Reuse Equivalency PrincipleThe granule of reuse is the granule of release.
The Common Closure PrincipleClasses that change together are packaged together.
The Common Reuse PrincipleClasses that are used together are packaged together.
The Acyclic Dependencies PrincipleThe dependency graph of packages must have no cycles.
The Stable Dependencies PrincipleDepend in the direction of stability.
The Stable Abstractions PrincipleAbstractness increases with stability.


While I do believe every software development team should endeavor to follow the instructions on the paint can, there's a limit to what you can fit on a paint can. It's the most basic, most critical information you need to proceed and not make a giant mess of the process. As brief as the instructions on a paint can are, they do represent the upper limit of what most people will realistically read, comprehend, and derive immediate benefit from.


Expanding from a few guidelines on a paint can into a detailed painting manual is far riskier. The bigger and more grandiose the set of rules you come up with, the more severe the danger. A few broad guidelines on a paint can begets thirty rules for painting, which begets a hundred detailed principles of painting..


Pretty soon you'll find yourself believing that every possible situation in software development can be prescribed, if only you could come up with a sufficiently detailed set of rules! And, of course, a critical mass of programmers patient enough to read Volumes I - XV of said rules. You'll also want to set up a few messageboards for these programmers to argue endlessly amongst themselves about the meaning and interpretation of the rules.


This strikes me as a bit like Ferengi programming.



Ferengi Rules of Acquisition, book cover


The Ferengi are a part of the Star Trek universe, primarily in Deep Space Nine. They're a race of ultra-capitalists whose every business transaction is governed by the 285 Rules of Acquisition. There's a rule for every possible business situation -- and, inevitably, an interpretation of those rules that gives the Ferengi license to cheat, steal, and bend the truth to suit their needs.


At what point do you stop having a set of basic, reasonable programming guidelines -- and start being a Ferengi programmer, an imperfect manifestation of the ruleset?


Like James Bach, I've found less and less use for rules in my career. Not because I'm a self-made genius who plays by my own rules, mind you, but because I value the skills, experience, and judgment of my team far more than any static set of rules.



When Ron says there is an "absolute minimum of practice" that must be in for an agile project to succeed, I want to reply that I believe there is an absolute minimum of practice needed to have a competent opinion about things that are needed -- and that in his post he does not achieve that minimum. I think part of that minimum is to understand what words like "practice" and "agile" and "success" can mean (recognizing they are malleable ideas). Part of it is to recognize that people can and have behaved in agile ways without any concept of agile or ability to explain what they do.


My style of development and testing is highly agile. I am agile in that I am prepared to question and rethink anything. I change and develop my methods. I may learn from packaged ideas like Extreme Programming, but I never follow them. Following is for novices who are under active supervision. Instead, I craft methods on a project by project basis, and I encourage other people to do that, as well. I take responsibility for my choices. That's engineering for adults like us.



Guidelines, particularly in the absence of experts and mentors, are useful. But there's also a very real danger of hewing too slavishly to rulesets. Programmers are already quite systematic by disposition, so the idea that you can come up with a detailed enough set of rules, and sub-rules, and sub-sub-rules, that you can literally program yourself for success with a "system" of sufficient sophistication -- this, unfortunately, comes naturally to most software developers. If you're not careful, you might even slip and fall into a Methodology. Then you're in real trouble.


Don't become a Ferengi Programmer. Rules, guidelines, and principles are gems of distilled experience that should be studied and respected. But they're never a substute for thinking critically about your work.





[advertisement] Who filled the file server with MP3 files again? PA Storage Monitor can tell you. Disk and directory growth reports too. Download the Free Trial!



Read More...

Your Ad Here

How To Enable MSN Messenger Polygamy and Run Multiple Copies

Most of us have several live ID and we want to login to all these ID in the same time There are many patch or add-on That allow you to run Multiple Compies of msn.
Here is a trick to run Enable MSN Messenger Polygamy and Run Multiple Copies without installing any additional patch or add-on.
1. [...]


Related posts:
  1. Check Your Username If It Taken or Available At More Than 60 Sites
  2. How To Add Internet Explorer Icon to the Desktop in Vista
  3. How to Back Up and Restore Windows 7-Vista-XP Registry


Read More...
Your Ad Here

How To Enable Hotmail POP3 and SMTP in all countries

Microsoft has announced the availability of POP3 for Hotmail users in the United Kingdom, Canada, Australia, France, Japan, Spain, Germany, Italy and the Netherlands. For users in the other countries this feature will be rolled out later this year 2009. POP3
If you are not living in any of these countries and wanted to enable [...]


Related posts:
  1. How to Capture Screenshots from Windows Media Player
  2. How To Enable MSN Messenger Polygamy and Run Multiple Copies
  3. Microsoft adds free POP3/SMTP support to Windows Live Hotmail


Read More...
Your Ad Here