jaybaz [MS] WebLog

We believe in nothing.

  • jaybaz [MS] WebLog

    PDB always

    • 8 Comments
    In my last post , I wrote: “ Debugging information (pdb). Set with ‘csc /debug[+|-]’. It doesn’t affect codegen, so it’s really not very interesting.” In my opinion, this should always be on, and compilers...
  • jaybaz [MS] WebLog

    Parting words for dear friends

    • 7 Comments
    I have a few thoughts that I'd like to express about Microsoft's software development before I go. Clearest code wins . Most developers at Microsoft haven't yet learned the incredible value of writing the clearest code possible. Once I saw a someone...
  • jaybaz [MS] WebLog

    'switch' in C#

    • 20 Comments
    On Eric's blog, a discussion about 'switch' statements in C# & why they require 'break' inspired this post. One of my favorite principles in the design of C# is that it forces you to be explicit when that removes confusion. The best example is the...
  • jaybaz [MS] WebLog

    Uh-oh, it's google

    • 59 Comments
    So now I have GMail , the Google Toolbar , the Google Deskbar , and the Google Desktop . To search MSDN help, I use google . At home, all my computers use Google as their home page. When I want to browse the web on my phone, I use Google Number Search...
  • jaybaz [MS] WebLog

    debug vs. release in C#

    • 2 Comments
    A question came up on an internal DL about checking if an assembly was debug or release. I’m always looking for something to spout about, and this seemed like a good one. There are 3 things people typically identify as the difference between...
  • jaybaz [MS] WebLog

    Comparing ranges

    • 10 Comments
    Ryan Farley talks about comparing date ranges . In his post is this phrase “ First range represented by r1start to r1end and second range represented by r2start to r2end ”. Aha, a code smell! 2 things that are related should have that relationship represented...
  • jaybaz [MS] WebLog

    What are my goals?

    • 10 Comments
    Today one of my tasks is to state my goals for the coming year. I did something unusual today. I showed my goal list to the people who work for me, and asked them for feedback. This is an opportunity for them to say what we should be working on as...
  • jaybaz [MS] WebLog

    new job

    • 6 Comments
    Quiet here, huh? Been busy , including a 12 week parental leave . Now that I've been back at work a couple weeks, I can tell you what I've been up to. I'm no longer on the C# or Debugger teams. I have a new gig. The neat thing about working on...
  • jaybaz [MS] WebLog

    Performance of 'for' vs. 'foreach'

    • 12 Comments
    I saw someone ask if 'for' or 'foreach' is faster. I was surprised. My code is often slow when I first write it, but it's never something that could have been fixed by a microoptimization like that. So I wrote this: In my code, I find that the most important...
  • jaybaz [MS] WebLog

    Winforms designed code and C# partial classes

    • 29 Comments
    In Whidbey, the WinForms designer takes advantage of a new C# language feature called “ partial classes ”. This allows them to pull out the designer generated code into a separate file. It has several advantages: · Users are less likely...
  • jaybaz [MS] WebLog

    Safely firing an event, Part 2

    • 12 Comments
    A while back I wrote about Safely firing an event . I come to you now with another solution to the problem, which I like quite a bit more. In Properties with events: another attempt , we tried initializing an event with an empty anonymous...
  • jaybaz [MS] WebLog

    I need a new look

    • 13 Comments
    This is how I looked in 1999 . My hair had a few more inches on that at its longest. When I shaved the back of my head, I sent a 21“ braid to Locks of Love . I also sent two braids from the main part of my head. This past December I sent the...
  • jaybaz [MS] WebLog

    No private methods

    • 22 Comments
    I’m heading off into the deep end here. If you want to come with me, make sure you’re wearing your SCUBA gear. One of the first questions that come up in TDD with NUnit is “ How do I test private methods?” Usually the answer...
  • jaybaz [MS] WebLog

    My blogroll

    • 5 Comments
    I don't have a blogroll listed in the sidebar. I read in SharpReader , and maintaining two lists seems tedious. So, I've saved an OPML file that you can import into your reader if you're curious. Be sure to use “Save Target As”.
  • jaybaz [MS] WebLog

    Thoughts on bit fields.

    • 6 Comments
    In C there is a long tradition of using bit fields to store a collection of boolean values: enum { TF_KEYWORD = 0x0001, TF_MEMBER = 0x0002, TF_IDENTIFIER = 0x0004, TF_STRINGLITERAL = 0x0008, TF_CHARACTERLITERAL = 0x0010, } TOKENFLAGS; DWORD dwTokenFlags...
  • jaybaz [MS] WebLog

    Formatting code in blogs

    • 12 Comments
    In a comment , Steve asks how I format code in my blog. Here's the answer: Write the code in Visual Studio. Include correct references, 'using' directives, helper classes, fields, etc. Make sure the code builds. (I really should use NUnit to make...
  • jaybaz [MS] WebLog

    Properties? Not my bag, baby.

    • 30 Comments
    Eric recently posted a blog: “ Property or backing store from inside a class? ”, and I responded in a way that skirted the issue entirely. I want to discuss them in a little more detail. Part 1: Why bother? First, why do we use...
  • jaybaz [MS] WebLog

    Safely firing an event

    • 14 Comments
    This came up on an internal alias, and I thought I should spread it around. If you’re going to fire an event, you may have code like this: void F() { if (SomeEvent != null ) { SomeEvent(); } } There’s a...
  • jaybaz [MS] WebLog

    How to make a bootable USB flash drive

    • 1 Comments
    This can be useful with Windows Home Server in a number of ways. - If you are building your own WHS in a small case, and don't have a DVD drive, you can transfer the WHS software to a USB flash drive of WHS to install from. - If you are building...
  • jaybaz [MS] WebLog

    Windows Home Server on a virtual machine

    • 2 Comments
    Here at Microsoft, when we talk about Windows Home Server, one of the things that comes up pretty often is a question about hosting WHS in a virtual machine under Virtual Server. Most often people want this because they already have one always-on machine...
  • jaybaz [MS] WebLog

    Disclaimer

    • 3 Comments
    My employer says I should have a disclaimer. I suggested “Not for use by minors” but they declined. This disclaimer applies to all posts on my blog: This posting is provided "AS IS" with no warranties, and confers no rights. Use...
  • jaybaz [MS] WebLog

    Bush supports Amnesty International

    • 69 Comments
    I'm pretty pissed off about a lot of things that I see my goverment doing right now. For example, we claim to be fighting a "War on Terrorism", but we're missing a few important facts: The US is the #1 perpetrator of terrorism world-wide After Sept 11...
  • jaybaz [MS] WebLog

    properties vs. fields... again

    • 6 Comments
    Eric Gunnerson just posted Properties vs public fields redux... It's no secret that I agree with Eric whole-heartedly on this matter. I've posted about this before as well: http://blogs.msdn.com/jaybaz_ms/archive/2004/04/29/123333.aspx . Fundementally...
  • jaybaz [MS] WebLog

    What are named indexers?

    • 8 Comments
    Someone asked me about this, so I decided to write up the answer here in case other folks are interested. Indexers are pretty well documented on the web; I’ll quote some here. http://www.csharphelp.com/archives/archive140.html C#...
  • jaybaz [MS] WebLog

    RANU: smarter CPL and MSC

    • 7 Comments
    I wish that .CPLs and .MSCs were smarter about normal users. I want to be a normal user, open a Control Panel applet , and have it prompt me for credentials if needed. Same thing for the administrative tools. Here's what I do instead. I create a...
Page 1 of 10 (238 items) 12345»