- Posted by justin on January 31, 2007
I have to say that I completely agree with the blog post below. I have experienced many developers that could code but were not good developers.
Original Blog Post From: http://codebetter.com/blogs/jeremy.miller/archive/2007/01/31/Being-a-Better-Programmer.aspx
There's a flurry of great posts and comment discussions going on right now about the divide between good developers and bad developers
The Great Divide
Like Jeff Atwood, I do believe there is an almost binary switch between effective and ineffective developers. I'm not exactly sure why this is, but if you'll indulge me, I've got a couple pet theories:
- People that are good coders are able to do make code work faster, which leads to getting more experience than their slower , and spare more thought cycles for how to do things better next time. The innately talented developer is able to get better and faster each time, which gives him or her more time to invest in getting better. From there I think it's simply a snowball effect.
- To Phil Haack's point that it's not entirely innate ability, any degree of contemplative thoughtfulness on the part of a developer will make that developer much better over time. The smartest guy in the world can still be intellectually lazy (but I don't see how you *could* be smart without intellectual inquisitively). Thoughtful people gain more valuable experience. People who aren't thoughtful may only be practicing their typing skills.
- Joannes added this as a prerequisite for being a great developer: "… a passionate curiosity for software related matter …." Every very good or great developer I've ever worked with enjoyed software development. I've been interviewing developer candidates lately, and a passion and intellectual curiosity about software development counts far more with me than Trivial Pursuit Q&A exchanges.
- Software development takes a very strong ability for abstract thought. I don't think that concrete thinkers have an easy time with software that's by definition a mental model of something else. I'd say visualization is important, but I've worked with good developers who had zero visualization ability. All the great developers I've worked with did though. People do think differently and have different modes of learning.
You can get Better
Like everyone else I believe that your best bet is to hire the best and brightest, but in reality you have who you have. Maybe the hiring process gets you the wide swings in productivity, but wringing out a 10-30% productivity gain out of journeyman developers is still a substantial gain. Training, coaching, discipline, better practices, communication techniques -- they can all contribute to productivity. "It's not the methodology, it's the man" is a hackneyed and cheap way to get some sort of imaginary high ground in any discussion, but it's partially BS. Anybody can get better, even if it's only in the way they interract with other people in the team. Besides, it's extremely unlikely that you can instantly go and replace poorly performing team members with better developers at will. You're largely stuck with the folks that you have. Making them better is probably your only option.
Following a tangent, when any debate about software practices or processes is going on some clown always pulls out this phrase: "you should just pick the best practices from waterfall, XP, Agile, RUP, whatever..." Hah! I've now seized the high ground you might think. No you haven't, you've simply indulged in the intellectual equivalent of empty calories. It's a worthless statement. The question "what *is* the best way to work" is still on the table. If we knew what the best of everything was, without a shred of doubt, we wouldn't be having the debate, now would we? Plus it's even harder than that because mix and match practices might not work well because many practices reinforce each other. I think you could happily add TDD and CI to any methodology and get some benefits, but they shine a bit more in an adaptive process. On the other hand, doing continuous design or adaptive project management on a codebase without automated tests and CI sounds dangerous to me.
- Posted by justin on January 27, 2007
I am glad I saw this blog post before I deployed my ASP.NET 2.0 application into the web farm.
from: http://www.mattberther.com/?p=853
Earlier today, we tried deploying an application to our clustered test environment. The application had gone through a fairly rigorous amount of testing and had passed with flying colors.
The strangest thing happened though, once we rolled to our clustered test environment… Funny how that works, isnt it?
Eventually, we were able to troubleshoot the error down to a CryptographicException that was occuring within WebResource.axd. If you’re not aware, the WebResource.axd is an ASP.NET IHttpHandler implementation that is able to extract embedded files from a resource assembly (javascript files, for example) and return them to the client.
Turns out that this was an issue documented at Microsoft. A little bit of googling turned up the fix.
Basically, what was happening was that both machines had their <machineKey> elements set to AutoGenerate. This was causing the cryptographic hash that was being used for the querystring to be invalid when the request came in to the other server.
There is also an article available on MSDN that has a little console application that you can use to generate the machineKey elements.
Pretty simple fix, for a problem that took up a lot of our day today. I’m posting this to hopefully help someone else struggling with the same issue.
- Posted by justin on January 19, 2007
from: http://blogs.iis.net/thomad/archive/2007/01/17/how-to-speed-up-your-most-popular-web-page.aspx
How to speed up your most popular web page
What's your most popular web page?
I assume it is the default document of your web site, for example if a client requests www.mysite.com IIS would execute www.mysite.com/default.htm. Your default document list is easy to query:
C:\>%systemdrive%\inetpub\adminscripts\adsutil get w3svc\defaultdoc
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
defaultdoc : (STRING) "Default.asp,index.htm,index.html,iisstart.htm,default.aspx,Default.htm"
What happens for a request to
www.mysite.com is actually pretty simple:
IIS will read the default document list and check file for file if the document exists in the physical directory of your site or vdir. IIS executes the document as soon as it finds the first match. You can imagine that this is pretty expensive. In the above case, supposing default.htm is the only default document that exists in your sites root directory, IIS would check five times until it finds default.htm. And this happens for every request!
The fixes for this problem are obvious:
1) trim down your default document list
2) put default documents that exist at the beginning of the list
Fix 2 has another huge benefit. IIS can put the first default document into the HTTP.SYS kernel-mode cache. It can stay there until IIS invalidates the cache, for example if the default document configuration changes. Kernel-mode caching is now possible because if an existing document is at the top of the list the existence of other default documents doesn't have to be checked anymore.
- Posted by justin on January 19, 2007
I love Virtual PC/Server. The biggest problem I have is the size of the images. They tend not to be very portable.
from: Getting a Small Virtual PC Image - WinXP Pro in 550MB
Tools: TweakUI, XPlite ($40), CCleaner, defrag, VM Optimizer
Steps to a Small VPC
- Install Windows XP Pro SP2
- Install all Windows Updates
- Follow steps 3. to 6. (first group) then steps 1, 2, & 3 (second group) in here
- Follow steps 1. to 11. (first group) in here
- Complete w/ steps 4, 5, 6 (second group) in here
- Posted by justin on January 19, 2007
This is very good to know since I have used this in the past.
from: Submit disabled controls in ASP.NET 2.0
I recently built a JavaScript function in HeadLight that filled a textbox from JavaScript and then disabled the textbox to prevent the user to alter its contents. When the form was submitted, it didn’t submit the contents of the disabled textbox. It puzzled me, but then I found that ASP.NET 2.0 doesn’t submit client-side disabled controls by default. However, there is an easy way to force it to do so.
All you have to do is to put this line in the Page_Load:
Page.Form.SubmitDisabledControls = true ;
The reason why I’ve never seen this property before, is that I have never had the need for it. I guess I’m just slow, but then again, slow is the new fast.
- Posted by justin on January 19, 2007
from: http://weblogs.asp.net/jeff/archive/2006/10/25/Modal_2D00_style-pops-in-Javascript-and-CSS.aspx
I haven't seen a simple example on how to do this, so I thought I'd post one here. I've seen the components in various places (how to center stuff, move with scrolling, etc.), but I wanted to tie it all in to one place.
Start with the actual HTML:
<div id="modalPage">
<div class="modalBackground">
</div>
<div class="modalContainer">
<div class="modal">
<div class="modalTop"><a href=http://weblogs.asp.net/jeff/archive/2006/10/25/"BLOCKED SCRIPThideModal('modalPage')">[X]</a></div>
<div class="modalBody">
<p>total solid</p>
</div>
</div>
</div>
</div>
Forget the script call there for a minute. The top level div "modalPage" acts as a big container to hide everything. The next one, "modalBackground" is the div we'll use to cover the entire page, somewhat transparent, so you can't click on stuff. The "modalContainer" div is the actual meat of stuff we want to show, which happens to contain a little window-esque header and a body element.
Next up is the CSS. There's a lot of it, but it's not very complicated.
<style type="text/css">
body
{
margin: 0px;
}
#modalPage
{
display: none;
position: absolute;
width: 100%;
height: 100%;
top: 0px; left: 0px;
}
.modalBackground
{
filter: Alpha(Opacity=40); -moz-opacity:0.4; opacity: 0.4;
width: 100%; height: 100%; background-color: #999999;
position: absolute;
z-index: 500;
top: 0px; left: 0px;
}
.modalContainer
{
position: absolute;
width: 300px;
left: 50%;
top: 50%;
z-index: 750;
}
.modal
{
background-color: white;
border: solid 4px black; position: relative;
top: -150px;
left: -150px;
z-index: 1000;
width: 300px;
height: 300px;
padding: 0px;
}
.modalTop
{
width: 292px;
background-color: #000099;
padding: 4px;
color: #ffffff;
text-align: right;
}
.modalTop a, .modalTop a:visited
{
color: #ffffff;
}
.modalBody
{
padding: 10px;
}
</style>
- "modalPage" is set to cover the entire page, and it's set as "display: none" so that initially you can't see it.
- "modalBackground" sets up a gray screen over the existing page. Note the hacks to get opacity to work in all of the browsers (works in Safari too). The z-index is one of several we'll set so that it's layered correctly.
- "modalContainer" is next and is set up further in the z-index, with its top left corner positioned at the center of the page.
- "modal" is set in the container, and will be the same size, so to make it appear in the right place, we need to set its dimensions, but make its position relative to the container. Since the container's top-left is dead center of the page, we want to go half the width and height from that spot, in a negative direction. This z-index is highest because it's on top.
- The other elements are to setup the content in the "window" that will sit in the middle of the page.
Finally, you'll need just a little Javascript to make it work.
<script language="javascript" type="text/javascript">
function revealModal(divID)
{
window.onscroll = function () { document.getElementById(divID).style.top = document.body.scrollTop; };
document.getElementById(divID).style.display = "block";
document.getElementById(divID).style.top = document.body.scrollTop;
}
function hideModal(divID)
{
document.getElementById(divID).style.display = "none";
}
</script>
revealModal(divID) takes the name of the div and attaches a handler to the window's scroll event. It moves the div to the top of where ever page is, so that it moves with the page and keeps everything covered. The next line changes the display to "block" so you can see it. The third sets the div's initial position. hideModal(divID), appearing in the little link we put in there, will naturally hide it.
To make it go, just attach this onclick to a button or link or something:
<input id="Button1" type="button" value="Click here to be naughty" onclick="revealModal('modalPage')" />
That's it!
- Posted by justin on January 19, 2007
I have run across this problem several times.
from: Properly Set 100% Table Heights Using CSS
I like making webpages that expand to fill the entire browser window, but ever since browsers started rendering in full-compliance mode it has been a chore because tables do not respond very well to their heights being set to 100% directly in the table tag or using CSS. I normally just revert back to "quirk" mode by removing the DOCTYPE element from the Visual Studio generated pages to get the table to expand out. But there is a better way!
The following article explains why the tables behave this way and how to get them to expand to a 100% height using valid CSS code. Very useful stuff!
http://apptools.com/examples/tableheight.php
- Posted by justin on January 19, 2007
This looks cool. I have not tried it yet though.
CvsIn Addin for Visual Studio .Net 2002 and 2003 and Visual Studio 2005
- Posted by justin on January 19, 2007
Good post on how to get users to read the manual. The post is a little but it has some good points.
How to get users to RTFM
- Posted by justin on January 19, 2007
It is a little old but still has some very useful tools list.
Scott Hanselman's 2006 Ultimate Developer and Power Users Tool List for Windows