<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Nathan Brixius : Software Development</title><link>http://blogs.msdn.com/natbr/archive/tags/Software+Development/default.aspx</link><description>Tags: Software Development</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Writing high performance code</title><link>http://blogs.msdn.com/natbr/archive/2009/12/10/writing-high-performance-code.aspx</link><pubDate>Fri, 11 Dec 2009 04:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9935518</guid><dc:creator>Nathan Brixius</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/natbr/comments/9935518.aspx</comments><wfw:commentRss>http://blogs.msdn.com/natbr/commentrss.aspx?PostID=9935518</wfw:commentRss><wfw:comment>http://blogs.msdn.com/natbr/rsscomments.aspx?PostID=9935518</wfw:comment><description>&lt;P&gt;During &lt;A href="http://www.hanselman.com/blog/HanselminutesPodcast191SolverFoundationAndOptimizationWithNathanBrixius.aspx" target=_blank mce_href="http://www.hanselman.com/blog/HanselminutesPodcast191SolverFoundationAndOptimizationWithNathanBrixius.aspx"&gt;Scott Hanselman's&amp;nbsp;podcast&lt;/A&gt; we briefly discussed managed code performance.&amp;nbsp; Here are a few of my thoughts about writing high performance code. In the spirit of a &lt;A href="http://www.amazon.com/Five-Dysfunctions-Team-Leadership-Lencioni/dp/0787960756/ref=pd_sim_b_1" target=_blank mce_href="http://www.amazon.com/Five-Dysfunctions-Team-Leadership-Lencioni/dp/0787960756/ref=pd_sim_b_1"&gt;cheesy business book&lt;/A&gt; (or &lt;A href="http://www.hulu.com/watch/4183/saturday-night-live-down-by-the-river" target=_blank mce_href="http://www.hulu.com/watch/4183/saturday-night-live-down-by-the-river"&gt;motivational speaker&lt;/A&gt;), I will give away my main points in the form of controversial-sounding statements before proceeding to flog them to death:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Don't trust anyone.&lt;/LI&gt;
&lt;LI&gt;Managed is better.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Some background: before I came to Microsoft I built solvers for both discrete and continuous optimization problems, primarily in C/C++, with a bit of Fortran thrown in.&amp;nbsp; Back in 2002 when I was on the &lt;A href="http://blogs.msdn.com/project/" mce_href="http://blogs.msdn.com/project/"&gt;Project Server&lt;/A&gt; team we were faced with the decision of whether to rebuild our scheduling engine in C++ or C#.&amp;nbsp; For the past year or so I have worked on the &lt;A href="http://www.solverfoundation.com/" target=_blank mce_href="http://www.solverfoundation.com"&gt;Solver Foundation&lt;/A&gt; team, which is pure C#.&amp;nbsp; We build solvers that solve a range of large-scale optimization problems, and they are “industrial grade”:&amp;nbsp; tens or hundreds of thousands of constraints are not uncommon.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Don't trust anyone.&lt;/STRONG&gt; &lt;A href="http://blogs.msdn.com/ricom" mce_href="http://blogs.msdn.com/ricom"&gt;Rico Mariani&lt;/A&gt; says the first rule of performance is to measure.&amp;nbsp; &lt;A href="http://blogs.msdn.com/ricom/archive/2003/12/02/40779.aspx" target=_blank mce_href="http://blogs.msdn.com/ricom/archive/2003/12/02/40779.aspx"&gt;Listen to Rico&lt;/A&gt;.&amp;nbsp; There are many reasons for this.&amp;nbsp; The first is that nobody has ever written code that is doing exactly what you are trying to do.&amp;nbsp; Otherwise (being a smart programmer) you should just call their code or (being a smart business person) you should just buy their code, try to do it better, or do something different entirely (perhaps mixed martial arts).&amp;nbsp; So you should seek to understand how the code behaves, otherwise you will never find out - until it is too late.&lt;/P&gt;
&lt;P&gt;The second is that you know your scenarios and priorities better than others do.&amp;nbsp; You should already&amp;nbsp;have an idea of how fast the code is supposed to be. Now sometimes the requirement truly is "make it as fast as possible".&amp;nbsp; For numerical libraries this is often the case because many problems can be made to be arbitrarily complicated.&amp;nbsp; For example, if you are modeling fluid dynamics you could use tighter meshes and get more accurate results.&amp;nbsp; In most other cases (perhaps in a user interface) you have a hard number you need to hit. Of course, there are some simple guidelines that may apply in most situations.&amp;nbsp; If you never go to the database, your server app will be fast. If you never allocate memory, your numeric code will fly. True or false? Well…measure.&lt;/P&gt;
&lt;P&gt;The third is that even if someone else has measured code that seems to be similar to yours, their results may be misleading.&amp;nbsp; For example, you depend on different collection classes, or you are running on a different processor.&amp;nbsp; Or your input data is different in some subtle way.&amp;nbsp; To take a very simple example, suppose you want to sort lists of 1 million integers, and somebody says, "hey, I measured different sorting algorithms on arrays of 1 million integers and quicksort is best."&amp;nbsp; And they hand over the code and all of their results.&amp;nbsp; Well, what do those arrays look like?&amp;nbsp; Because if the data is mostly sorted then something like insertion sort may work better.&lt;/P&gt;
&lt;P&gt;If you follow this advice you may end up with more questions: doesn't this take a lot of time and effort? How do I know when to stop measuring, or stop optimizing my code?&amp;nbsp; If you start profiling at the very start of development, and build some simple skills, it's not too bad (and you learn a lot).&amp;nbsp; If, for example, you are considering whether to use managed or unmanaged code for a project, prototype a couple of key sections in C++ and C# and measure.&amp;nbsp; I did this on the Project Server team and that was the best way to settle the argument.&amp;nbsp; These things often get way too philosophical – just try it and see.&amp;nbsp; I did standard critical path scheduling in both C# and C++ and found that the C# version was only 10-15% slower.&amp;nbsp; We went with C# and in the course of development we were able to find algorithmic improvements that resulted in a faster implementation that the original C++ codebase. Get good at writing simple programs that answer one specific performance question.&amp;nbsp; For example: should I use a list or an array?&amp;nbsp; How should I read this data set?&amp;nbsp; Be a scientist and seek to answer specific questions by controlling the conditions and varying only one thing at a time.&amp;nbsp; And pick the right thing based on your knowledge of the customer scenario.&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;STRONG&gt;Managed or unmanaged?&lt;/STRONG&gt; My blunt opinion is: unless your computation is dominated by &lt;A href="http://www.netlib.org/blas/" target=_blank mce_href="http://www.netlib.org/blas/"&gt;BLAS&lt;/A&gt;-style computations you are better off using C# because of productivity, stability, and maintainability concerns.&amp;nbsp; &lt;BR&gt;&amp;nbsp;&lt;BR&gt;Here are a couple of “pros” for C#:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;There are clear performance differences, but in many cases when you look at the overall system performance they can be washed away due to other factors: I/O, a webservice call, DB access, etc.&lt;/LI&gt;
&lt;LI&gt;Many programmers (myself included) are much more productive writing C# code.&amp;nbsp; This gives me more time to investigate possible algorithmic improvements, write good unit tests, etc. There are opportunity costs!&lt;/LI&gt;
&lt;LI&gt;I&amp;nbsp;think it is easier to make use of multiple cores. For example, the parallel extensions available for .Net 3.5 (and built into 4.0) are very easy to use.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;There are also some clear downsides:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;It is easy to get lazy, or to unintentionally use constructs that are not efficient.&amp;nbsp; People start using List&amp;lt;&amp;gt; and Dictionary&amp;lt;&amp;gt; when a good ol’ array will do.&amp;nbsp; It’s also easy to miss unnecessary memory allocations, because everything is garbage collected.&amp;nbsp; So you need to be vigilant about profiling the code.&lt;/LI&gt;
&lt;LI&gt;There is a lot of unnecessary array bounds checking that slows things down.&amp;nbsp; In particular, with &lt;A href="http://www.netlib.org/lapack/" target=_blank mce_href="http://www.netlib.org/lapack/"&gt;LAPACK&lt;/A&gt;-style routines with tight, nested loops.&lt;/LI&gt;
&lt;LI&gt;As far as I know, the managed code compilers do not make use of SSE2 instructions.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Others have different opinions and I’m not saying they’re wrong - so long as they have measured.&amp;nbsp; Otherwise they are bullshitting you.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9935518" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/natbr/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/natbr/archive/tags/Project/default.aspx">Project</category><category domain="http://blogs.msdn.com/natbr/archive/tags/Software+Development/default.aspx">Software Development</category><category domain="http://blogs.msdn.com/natbr/archive/tags/Solver+Foundation/default.aspx">Solver Foundation</category></item><item><title>Solver Foundation on Hanselminutes</title><link>http://blogs.msdn.com/natbr/archive/2009/12/09/solver-foundation-on-hanselminutes.aspx</link><pubDate>Wed, 09 Dec 2009 15:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9934634</guid><dc:creator>Nathan Brixius</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/natbr/comments/9934634.aspx</comments><wfw:commentRss>http://blogs.msdn.com/natbr/commentrss.aspx?PostID=9934634</wfw:commentRss><wfw:comment>http://blogs.msdn.com/natbr/rsscomments.aspx?PostID=9934634</wfw:comment><description>&lt;P&gt;The latest edition of &lt;A href="http://www.hanselman.com/blog/" mce_href="http://www.hanselman.com/blog/"&gt;Scott Hanselman&lt;/A&gt;'s &lt;A href="http://www.hanselminutes.com/default.aspx?showID=209" mce_href="http://www.hanselminutes.com/default.aspx?showID=209"&gt;Hanselminutes&lt;/A&gt; podcast features yours truly.&amp;nbsp; We talked about Solver Foundation, numerical optimization, and good old-fashioned code optimization.&amp;nbsp; Scott's a great guy and doing the podcast was a lot of fun.&lt;/P&gt;
&lt;P&gt;Those of you new to Solver Foundation (or this blog) may be curious about what you can actually do with Solver Foundation. Here is the &lt;A href="http://code.msdn.microsoft.com/solverfoundation/Release/ProjectReleases.aspx?ReleaseId=1799" mce_href="http://code.msdn.microsoft.com/solverfoundation/Release/ProjectReleases.aspx?ReleaseId=1799"&gt;download location&lt;/A&gt; for the free&amp;nbsp;Express version of Solver Foundation.&amp;nbsp; I hope that by listening to the podcast you already know the basics, so here are a few code-oriented posts:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Here is a short description of “&lt;A href="http://blogs.msdn.com/natbr/archive/2009/10/08/announcing-solver-foundation-2-0.aspx" mce_href="http://blogs.msdn.com/natbr/archive/2009/10/08/announcing-solver-foundation-2-0.aspx"&gt;what’s new&lt;/A&gt;” in our 2.0 release.&lt;/LI&gt;
&lt;LI&gt;Here is a &lt;A href="http://blogs.msdn.com/natbr/archive/2009/04/27/solving-traveling-salesman-problems-using-solver-foundation.aspx" mce_href="http://blogs.msdn.com/natbr/archive/2009/04/27/solving-traveling-salesman-problems-using-solver-foundation.aspx"&gt;C# sample&lt;/A&gt; that solves traveling salesman problems.&lt;/LI&gt;
&lt;LI&gt;Here is a &lt;A href="http://blogs.msdn.com/natbr/archive/2009/05/05/creating-parameterized-solver-foundation-models-using-linq-to-sql.aspx" mce_href="http://blogs.msdn.com/natbr/archive/2009/05/05/creating-parameterized-solver-foundation-models-using-linq-to-sql.aspx"&gt;LINQ to SQL&lt;/A&gt; sample using Solver Foundation.&lt;/LI&gt;
&lt;LI&gt;Here is an&lt;A href="http://blogs.msdn.com/lengningliu/archive/2009/09/04/optimization-domain-specific-language-in-f-with-units-of-measure.aspx" mce_href="http://blogs.msdn.com/lengningliu/archive/2009/09/04/optimization-domain-specific-language-in-f-with-units-of-measure.aspx"&gt; F# sample&lt;/A&gt;.&amp;nbsp; The F# integration features a domain specific language for creating optimization problems.&amp;nbsp; It also supports “units of measure”, meaning you can associate real-life units such as miles, gallons, dollars, or touchdowns to parameters and decisions.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://yetanothermathprogrammingconsultant.blogspot.com/" mce_href="http://yetanothermathprogrammingconsultant.blogspot.com/"&gt;Erwin&lt;/A&gt; did a really nice post on doing &lt;A href="http://yetanothermathprogrammingconsultant.blogspot.com/2009/07/ms-solver-foundation-excel-interface.html" mce_href="http://yetanothermathprogrammingconsultant.blogspot.com/2009/07/ms-solver-foundation-excel-interface.html"&gt;portfolio management&lt;/A&gt; using Solver Foundation and Excel.&amp;nbsp; I like the visuals.&amp;nbsp; In fact Erwin's site has a number of great samples and documents.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;And I'd be remiss if I didn't mention that Solver Foundation ships with TONS of samples that span languages, scenarios, and solvers.&lt;/P&gt;
&lt;P&gt;The last part of our conversation was about writing high-performance code.&amp;nbsp;I'll share some thoughts about that later this week.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9934634" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/natbr/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/natbr/archive/tags/Software+Development/default.aspx">Software Development</category><category domain="http://blogs.msdn.com/natbr/archive/tags/combinatorial+optimization/default.aspx">combinatorial optimization</category><category domain="http://blogs.msdn.com/natbr/archive/tags/Solver+Foundation/default.aspx">Solver Foundation</category><category domain="http://blogs.msdn.com/natbr/archive/tags/optimization/default.aspx">optimization</category><category domain="http://blogs.msdn.com/natbr/archive/tags/project+scheduling/default.aspx">project scheduling</category><category domain="http://blogs.msdn.com/natbr/archive/tags/operations+research/default.aspx">operations research</category><category domain="http://blogs.msdn.com/natbr/archive/tags/interior+point+methods/default.aspx">interior point methods</category><category domain="http://blogs.msdn.com/natbr/archive/tags/self+promotion/default.aspx">self promotion</category></item><item><title>Ctrl+Tab works in Visual Studio, too.</title><link>http://blogs.msdn.com/natbr/archive/2009/04/02/ctrl-tab-works-in-visual-studio-too.aspx</link><pubDate>Thu, 02 Apr 2009 20:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9529468</guid><dc:creator>Nathan Brixius</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/natbr/comments/9529468.aspx</comments><wfw:commentRss>http://blogs.msdn.com/natbr/commentrss.aspx?PostID=9529468</wfw:commentRss><wfw:comment>http://blogs.msdn.com/natbr/rsscomments.aspx?PostID=9529468</wfw:comment><description>&lt;P&gt;I have been brushing up on keyboard shortcuts ever since I installed the Windows 7 beta on my laptop.&amp;nbsp; Tim Sneath has a great summary of keyboard shortcuts &lt;A href="http://blogs.msdn.com/tims/archive/2009/01/12/the-bumper-list-of-windows-7-secrets.aspx" mce_href="http://blogs.msdn.com/tims/archive/2009/01/12/the-bumper-list-of-windows-7-secrets.aspx"&gt;here&lt;/A&gt;, in particular I LOVE the window management shortcuts.&amp;nbsp; If you have IE8 you also probably know that Ctrl+Tab switches between browser tabs.&amp;nbsp; What I did not know, and just discovered by accident, is that Ctrl+Tab works in Visual Studio too.&amp;nbsp; You can use it to switch between active files and tool windows (e.g. the Solution Explorer or Class View).&amp;nbsp; The arrow keys&amp;nbsp;work too. &amp;nbsp;I tend to have lots of active files at once, so this is a nice timesaver.&lt;/P&gt;
&lt;P&gt;Feel free to share other cool shortcuts in the comments.&lt;/P&gt;
&lt;P&gt;A side note: I am a Unix guy by background, and during my first two years at Microsoft I did all my development using the command shell + emacs.&amp;nbsp; But given the improvements that Visual Studio has made over the last 5 years, there is no way I would ever go back now!&amp;nbsp; I am anxiously awaiting their next release.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9529468" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/natbr/archive/tags/Software+Development/default.aspx">Software Development</category><category domain="http://blogs.msdn.com/natbr/archive/tags/tips+and+tricks/default.aspx">tips and tricks</category></item><item><title>How to fix bugs (and influence people)</title><link>http://blogs.msdn.com/natbr/archive/2008/01/04/how-to-fix-bugs-and-influence-people.aspx</link><pubDate>Fri, 04 Jan 2008 22:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6982410</guid><dc:creator>Nathan Brixius</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/natbr/comments/6982410.aspx</comments><wfw:commentRss>http://blogs.msdn.com/natbr/commentrss.aspx?PostID=6982410</wfw:commentRss><wfw:comment>http://blogs.msdn.com/natbr/rsscomments.aspx?PostID=6982410</wfw:comment><description>&lt;P&gt;I work on a large team with a lot of dependencies and fairly tight deadlines.&amp;nbsp; I wanted to share some of a few techniques for fixing bugs quickly.&amp;nbsp; Maybe this is all common knowledge but I’ll share it anyway.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Trade bugs.&lt;/STRONG&gt;&amp;nbsp; It’s not very efficient if you and another dev to be modifying the same code at the same time.&amp;nbsp; Swap bugs with your teammates to define clear ownership.&amp;nbsp; Sooner is better than later.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Fix areas, not bugs.&lt;/STRONG&gt;&amp;nbsp; Don’t just fix one string on a page, fix all the strings on the page.&amp;nbsp; If a validation check was missing in one API, it is probably missing in other APIs too.&amp;nbsp; Proactively look for related bugs assigned to other people and take them on.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Kick off a build every night before you leave.&lt;/STRONG&gt;&amp;nbsp; I have known people who scheduled jobs to do this automatically.&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Pipeline your work.&lt;/STRONG&gt;&amp;nbsp; There is a lot of idle time spent waiting for builds to finish, deploying, etc.&amp;nbsp; Fill that time with something useful by switching over to another bug.&amp;nbsp; My pattern is usually to repro the bug (stepping through the code), code the solution, then do final testing.&amp;nbsp; So I like to work on three bugs (actually three &lt;EM&gt;sets&lt;/EM&gt; of bugs, see above) at once:&lt;BR&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug&amp;nbsp;&amp;nbsp; code&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;test&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;code&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;debug&lt;/STRONG&gt;&amp;nbsp; code&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Sometimes there is a fourth step – “think” – for more difficult bugs.&amp;nbsp; &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Write tools.&lt;/STRONG&gt;&amp;nbsp; Sometimes it is a big pain in the ass to work through the product to repro and fix bugs.&amp;nbsp; Sometimes building simple tools can really help your productivity, for example a simple&amp;nbsp;winforms app that mimicks a more complicated client application.&amp;nbsp; I have written command line apps that talked to webservices in the past.&amp;nbsp; Once you build the tool, let your teammates know.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Unit test and refactor.&lt;/STRONG&gt;&amp;nbsp; Try to think about how you can build a strong foundation of unit tests that are easy to add to.&amp;nbsp; Unit tests prevent regressions.&amp;nbsp; Also, once you have confidence in your unit tests you can fearlessly refactor code if you notice lots of bugs in a certain area.&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Schedule uninterrupted time for yourself.&lt;/STRONG&gt;&amp;nbsp; It’s hard to work effectively in 15 minute chunks.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Don’t break the f***ing build.&lt;/STRONG&gt;&amp;nbsp; That slows down the whole team.&amp;nbsp; If you notice a blocking issue, jump on it immediately &lt;EM&gt;even if it is not your area&lt;/EM&gt;.&amp;nbsp; You will learn something in the process.&lt;BR&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6982410" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/natbr/archive/tags/Software+Development/default.aspx">Software Development</category></item><item><title>What makes a good software developer</title><link>http://blogs.msdn.com/natbr/archive/2007/07/23/what-makes-a-good-software-developer.aspx</link><pubDate>Tue, 24 Jul 2007 03:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4019764</guid><dc:creator>Nathan Brixius</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/natbr/comments/4019764.aspx</comments><wfw:commentRss>http://blogs.msdn.com/natbr/commentrss.aspx?PostID=4019764</wfw:commentRss><wfw:comment>http://blogs.msdn.com/natbr/rsscomments.aspx?PostID=4019764</wfw:comment><description>&lt;P&gt;A colleague asked me to jot down some thoughts on what makes a good developer at Microsoft.&amp;nbsp; This is by no means complete, but three statements come to mind when I think about strong developers:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;We are engineers, not hackers.&lt;/LI&gt;
&lt;LI&gt;A strong dev should be able to fill any engineering role in the company.&lt;/LI&gt;
&lt;LI&gt;Senior devs improve their teams by action and by example.&lt;BR&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;We are engineers, not hackers.&lt;/STRONG&gt;&amp;nbsp; My dev manager in &lt;A class="" title="Project blog" href="http://blogs.msdn.com/project" target=_blank mce_href="http://blogs.msdn.com/project"&gt;Project&lt;/A&gt; (my previous team)&amp;nbsp;said this years ago and it has stuck with me ever since.&amp;nbsp; Engineering is a craft whereas hacking is a hobby, and I expect a Microsoft dev to seek to become a master of the craft.&amp;nbsp; Engineers understand common patterns underlying the problems they solve and seek to make their code predictable and reliable.&amp;nbsp; (This doesn't suck the creativity or joy out of the process, rather it should liberate us.)&amp;nbsp; For an engineer, process is not an end to itself but a tool for arriving at solid designs and trustworthy code.&amp;nbsp; Engineers take great pride in their creations and stand behind them.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Engineering practices apply to all stages of software development.&amp;nbsp; In the design phase I expect a structured approach that leads to a design that clearly meets the needs described in the spec.&amp;nbsp; The deliverable is a design doc that describes how the feature is implemented.&amp;nbsp; A good design doc is an aid to the developer, his/her peers, as well as Test/PM.&amp;nbsp; I don't want to get into details about what makes a good design doc, but it should describe the primary design and implementation challenges and how they are addressed, and why other reasonable approaches were rejected.&amp;nbsp; On a services team it's particularly important to think of the impact the feature has on setup, deployment, and monitoring, and account for these early.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Everyone has things to say about coding guidelines, so I won't dwell on them much here.&amp;nbsp; I assembled a set of team-wide guidelines and I expect those to be followed.&amp;nbsp; I always look for simplicity and consistency.&amp;nbsp; As a services team I particularly value unit tests and tracing.&amp;nbsp; &lt;BR&gt;&amp;nbsp;&lt;BR&gt;Finally, I expect a positive handoff to test.&amp;nbsp; By this I mean a detailed TRD (test release document)&amp;nbsp;that describes what the feature does, what works, what doesn't work, and suggestions for testing the feature.&amp;nbsp; I expect code to be structured so that it is easy to test as possible.&amp;nbsp; I don't particularly care for metrics based on the number of bugs a dev fixes.&amp;nbsp; I value developers who prevent bugs from happening in the first place, and it's easiest to do this in the earliest stages of the project before any code is written.&amp;nbsp; This begs the question of how do we measure the quality of a feature relative to the time spent on it.&amp;nbsp; I don't have easy answers except to say that if leads and peers are involved in the entire development process, it is easier to come to a collective understanding of how challenging a feature is and how well the developer has done at implementing it.&amp;nbsp; In other words, it comes down to judgment.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;STRONG&gt;A strong dev should be able to fill any engineering role in the company.&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; The statement applies in two ways.&amp;nbsp; First, a dev should be able to wear their "PM hat" or "test hat" and operate effectively within that role.&amp;nbsp; Perhaps this is statement is too "old school Microsoft", and I certainly don't mean to detract from the roles of Test and PM.&amp;nbsp; After all, Test and PM are also engineering disciplines.&amp;nbsp;&amp;nbsp; I simply mean that devs have a deep understanding of customer requirements and are able to make their own assessments of the relative priority of features and work items, and can make suggestions as to how to improve the experience.&amp;nbsp; Devs should be able to be ruthless testers of their own (and their teammates) features and provide actionable feedback that results in improvements.&amp;nbsp; They write unit tests, which guarantee a certain level of quality.&amp;nbsp; Having the ability to operate in another role also prevents a dev from becoming blocked, and provides broader perspectives which assist devs in interacting with their Test and PM counterparts.&amp;nbsp; Everyone understands where everyone else is coming from, and that makes for a more enjoyable working environment.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Secondly the statement means that a dev is not dependent on domain-specific knowledge to be effective.&amp;nbsp; A deep understanding of specific technologies, code bases, and design patterns is essential for good engineers.&amp;nbsp; But a strong dev is not a "one trick pony" that can only work in one area (though they may prefer to do so, and may be asked to do so from time to time).&amp;nbsp; A dev has technical depth, but also technical breadth, which allows them to see how their code functions to serve a larger purpose.&amp;nbsp; I'd like to think that I could be dropped into the middle of Windows, and though I would probably hate it, I would be effective.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;STRONG&gt;Senior devs improve their teams by action and by example.&lt;/STRONG&gt;&amp;nbsp; There are only so many hours in a day, so at a certain point it becomes more difficult to provide more value by simply coding more or working longer.&amp;nbsp; Actions that make others better have a compounding benefit that can have a huge impact over time.&amp;nbsp; Most of us can think of old timers that seem to have an awesome level of productivity, to the extent that it's hard to understand how they can be that effective.&amp;nbsp; I suggest that in most cases, these old timers have mastered the art of making others better.&amp;nbsp; First, they typically do not worry themselves about things like "scope" or "area".&amp;nbsp; Making Microsoft better is their "area", and that extends to fixing bugs in other dev's code, fixing build problems, improving processes, giving feedback to other teams.&amp;nbsp; Master devs share knowledge, through conversations, whiteboard sessions, documents, blogs.&amp;nbsp; They cringe when they hear people talk about "their code"; it's "our code".&amp;nbsp; Their movements are not hurried, but always with purpose.&amp;nbsp;&amp;nbsp; They've got time for other people, and still get their work done.&amp;nbsp; They're able to do this because they identify patterns in their work and automate them, either by defining a design pattern, or by architecting the system appropriately, or by writing tools that do their work for them.&amp;nbsp; Then they share this knowledge with the rest of the team and build a culture where others do the same.&amp;nbsp; Lastly, they continually seek new opportunities to make themselves and their team better.&amp;nbsp; These opportunities come up all the time in a product cycle; a master dev spots them first and steps in to fill a need, for example by forwarding an email to someone who knows the answer; seeing that a new platform component could help implement features in two different projects; adding a new unit test that enforces a coding or stylistic convention.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;I love it when devs are passionate about delivering something that works and is useful!&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4019764" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/natbr/archive/tags/Dynamics+Live/default.aspx">Dynamics Live</category><category domain="http://blogs.msdn.com/natbr/archive/tags/The+Best+and+the+Brightest/default.aspx">The Best and the Brightest</category><category domain="http://blogs.msdn.com/natbr/archive/tags/Software+Development/default.aspx">Software Development</category></item><item><title>You know you're busy when...</title><link>http://blogs.msdn.com/natbr/archive/2007/07/20/you-know-you-re-busy-when.aspx</link><pubDate>Sat, 21 Jul 2007 00:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3981098</guid><dc:creator>Nathan Brixius</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/natbr/comments/3981098.aspx</comments><wfw:commentRss>http://blogs.msdn.com/natbr/commentrss.aspx?PostID=3981098</wfw:commentRss><wfw:comment>http://blogs.msdn.com/natbr/rsscomments.aspx?PostID=3981098</wfw:comment><description>...you start scheduling time on your calendar to 'think'.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3981098" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/natbr/archive/tags/Management/default.aspx">Management</category><category domain="http://blogs.msdn.com/natbr/archive/tags/Software+Development/default.aspx">Software Development</category></item><item><title>Why writing software is like moving</title><link>http://blogs.msdn.com/natbr/archive/2007/06/19/why-writing-software-is-like-moving.aspx</link><pubDate>Wed, 20 Jun 2007 03:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3415086</guid><dc:creator>Nathan Brixius</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/natbr/comments/3415086.aspx</comments><wfw:commentRss>http://blogs.msdn.com/natbr/commentrss.aspx?PostID=3415086</wfw:commentRss><wfw:comment>http://blogs.msdn.com/natbr/rsscomments.aspx?PostID=3415086</wfw:comment><description>&lt;P&gt;Me and my brother helped my mom move over the weekend.&amp;nbsp; Advice for movers and software developers:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Don't move anything you don't actually want or need.&lt;/STRONG&gt;&amp;nbsp; Throw out your SAT study guide, your old copies of Maxim, the Michigan starter jacket, the annotated James Joyce that you've never read but impresses people.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Invite the right number of people.&lt;/STRONG&gt;&amp;nbsp; It's a sinking feeling to show up and find out that you and your friend are going to move the whole house.&amp;nbsp; It's fun, but not terribly productive to show up and find 7 other people there - you end up spending a lot of time paging through other people's books, or drinking, or both.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Pack before&amp;nbsp;people show up.&lt;/STRONG&gt;&amp;nbsp; Nothing kills me more than showing up to help a friend move to find that they haven't done the prep work.&amp;nbsp; I don't want to show up at 9:00 to find that I'm supposed to help you pack your t-shirts.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Figure out how to load the truck before lifting anything.&lt;/STRONG&gt;&amp;nbsp; If it turns out that you don't have enough room then you will waste a lot of time moving stuff around, or worse yet, leaving stuff behind.&amp;nbsp; Taking more than one trip is disastrous.&amp;nbsp; That second trip is never very fun.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Wrap fragile items, or items with sharp edges.&lt;/STRONG&gt;&amp;nbsp; It's worth the extra time.&amp;nbsp; Once the truck starts moving objects will tend to bump into each other so it's wise to protect the ones that might break.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Do the heavy stuff first.&lt;/STRONG&gt;&amp;nbsp; That way you'll know if you've got enough room in the truck, besides, it's better for morale.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Don't try to do it all by yourself.&lt;/STRONG&gt;&amp;nbsp; Yes, you have superhuman strength, and that ottoman isn't all that heavy.&amp;nbsp; But if you've got help then why not take advantage.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Spring for the extra five bucks and unhook the dolly.&lt;/STRONG&gt;&amp;nbsp; Then you can stack up all those boxes of books and move them in one trip.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;When you get to the new place, just worry about getting the boxes out of the truck and into the right rooms.&lt;/STRONG&gt;&amp;nbsp; Worry about arranging the furniture and unpacking boxes later.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;And - the appropriate payment is always a six pack.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3415086" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/natbr/archive/tags/Software+Development/default.aspx">Software Development</category></item></channel></rss>