John Melville-- MD

John Melville-- MD John Melville-- MD Equality Through Technology

Niner since 2004

I am a physician and researcher in Kotzebue Alaska. I live, work, and write code 33 miles north of the arctic circle.



  • Checking In: Eric Lippert - On Compiler Evolution, Designing C# and Blogging

    I find it interesting contrast Eric's comment that, in his admittedly limited scenerio, Linq is too slow to the recent lectures on the STL optimization by STL.  Your comments suggest that a certian performance hit is the inevitable result of convenient interface.  In contrast STL does not invariably have to sacrifice speed for a convenient interface, and compiler tricks often reduce to the code you would have written anyway, just more correct.

    I find this curious because C# generics have a very different feature set than C++ templates, which the original designers could not have been ignorant of.  Do you see the lack of metaprogramming as a strength or a weakness for C#.  If C# had templates, would linq have used it?  I already know you won't comment on the future of the compiler, so I won't even ask. 

  • C9 Lectures: Stephan T Lavavej - Advanced STL, 1 of n

    Is "type erasure" another name for the GOF strategy pattern or is there a subletly that I am missing here?

  • E2E: Herb Sutter and Erik Meijer - Perspectives on C++

    In reply to DaveWill's questiom about why you would want to be able to create anonymous interface implementations.

    Please notice that the C# iterator pattern is almost exactly trat -- it lets you create an anoymous IEnumerable in line.  Imagine being able to do the same thing for arbitrary interfaces.

  • Swine Flu (H1N1) Tracker Web Slice Released

    Just because YOU don't need up to the minute information about H1N1 influenza doesn't mean that other people don't.  And, no, I am not an influenza researcher/

    I am the point doc for my hospital on H1N1 influenza, and I have been monitoring the CDC website several times a day to try to keep up with the most recent technical descriptions and guidance documents.  I am also working on several community leaders who need up-to the minute information as we make difficult decisions about community preparedness and planning activities.

    So CDC has two choices 1) spend a lot of resources they don't have trying to verify credentials for each of the thousands of doctors, nurses, ems responders, and cities who have a real need for real time information. or 2) Open it up to everyone and just let the gawkers realize how boring our jobs really are.  (That is, after all, why I demand money to keep me doing it.)  Opening it up also helps lessen the rumors that are eventually going to surface that the government has some deep, dark, ulterior motive regarding flu or its response to it,

    The webslice is a cool idea.  Personally I'm subscribed to the RSS, but to each his own.

  • C# 4.0 - Questions and reasons behind the answers

    Must come as a matter of taste.  I strongly prefer the XElement method to the VB inline method.

    No difficulties in having to line up ending tags.  Its XML exploiting the C# parser.
  • The Future of C#

    My "broadband" isn't up to snuff either.  (Nothing sucks more than paying $100 a month for max 30k/second, but when you live 30 miles north of the arctic circle I guess you learn to deal with it.)

    Anyway, mucking arround in the view source reveals this URL:

    and my download manager seems to take it.  Ask me in 6 hours if it worked.
  • Expert to Expert: Erik Meijer and Bart De Smet - LINQ-to-​Anything

    Congratulations, Charles, on your 100th going deep.

    I vividly remember the first (filter manager with Mr. Christensen) and the little snippet that "we are going to do more of these."  Going deep has rapidly become my favorite show on Channel 9.  Even if I am less than interested in the instant topic, it is fun to hear smart, passonate people talk about their technology.

    Congrats on your 100th show.  Can't wait to hear you say "lets talk about it" again.
  • Algorithms and Data Structures: Mike Swanson - Genetic Session Scheduler

    mswanson wrote:

    The term "genetic algorithm" seems to intrigue almost everyone (including me, when I first heard about them years ago). The reality is that it's a relatively straightforward optimization technique wrapped in a fancy name. The word "genetic" makes it sound like the algorithm is doing something biological in nature and many people then assume that it's an artificial intelligence technique...which it's not.

    The algorithm has a "biological" name because it is an almost element for element match for a very real bioloical process.  Namely evolution.

    The processes of mutation and crosover are not synthetic or allegorical.  The chromosomes actually line up and exchange analagous segments of genetic material; this is called crossover.  Chromosomes actually are subject to errors in copying that actually result in infreuent, but random mutations.

    Perhaps the most interesting point of this is that computerized genetic algorithms have fed back into biology.  A number of years ago a probabalistic arguement was made that the time required to evolved from an ameoba to a human being was many times the (currently believed) geologic age of the earth.  The success of synthetic genetic algorithms causes some, including me, to re-examine that argument.

  • WPF 3.5 SP1 App Model with Jennifer Lee

    DukeNukem wrote:
    Hi, nice video !

    Still can't help but wonder why they just didn't call it "WPF 3.6" it would be allot more clearer for developpers, because some things just don't run on 3.5 , most things are not updates/bug fixes but new features.

    Agreed -- or even just drop the whole SP and call it .Net 3.51

    As hard as it may be to covince developers that its "a service pack with features" convincing users is even harder.

    BTW I like the agility of the wpf team to come out with three really solid (looking) releases in such a short time frame.  I just think that there is no reason to conflate a service pack with a release.
  • Joe Duffy, Huseyin Yildiz, Daan Leijen, Stephen Toub - Parallel Extensions: Inside the Task Parallel

    Has anyone considered a "debug" switch to run with n queues, regardless of how many processors are availaible?  I see a bad scenerio comming.

    1. Developer is on a 1-2 core box, or a many core box with enough other junk (VS, virus scanner, outlook, IE, whatever else) so that unbeknownst to the programmer, there is no real parallelism.

    2.  Dev signs off on the code that has never been tested running truly parallel.

    3. Code gets loaded on the mega-beheamoth 16 core production machine that's not running anything else.

    4. Code runs in parallel for the first time in production.  Or even worse its shrink-wrap software; and next year when bigger machines come out, more parallelism is exposed and the software starts failing randomly.

    Most developers would consider #4 to be a very bad thing, but I find it inevitable.  My dev box is usually running 3-6+ apps when I'm developing, and therefore most of my testing.  If I can't force the code to be parallel in testing, the interleaved paths might get very little coverage, and it will be very hard to know this is happening.

    Just curious if this has been thought about.

  • Pat Brenner: New Updates to MFC in Visual Studio 2008

    SecretSoftware wrote:
    Why does C++ even exist? Why does MS keeps maintaining such a language that caused so many buffer overflows, and generally was not as secure as C# or Vb.NET.

    I'm hoping I just missed the sarcasm in that comment. 

    Even if we assume, as you seem to, that C++ is an obsolete and uselss language then there are still billions of lines of C++ code out there that work and do the job they were designed, and purchased, to do.  There is absolutely no chance that all of that investmen is just going to vanish any time in the next several decades.  C++ will be with us through the remainder of any of our careers and well beyond.

    Since someone will be maintaining C++ code for the next 3 decades at least, Microsoft has, wisely, decided to make more money by selling modern tools to those developers.

    PS: I still find C++ to be pretty useful in some circumstance.  I'm just ingroning that for this post.
  • JAOO 2007: Erik Meijer and Dave Thomas - Objects, Functions, Virtual Machines, IDEs and More

    JChung2006 wrote:
    Can you give an example of what you're talking about, John?

    Say I want to convert a list of strings to a numbered list of strings. This works:

    IEnumerable<String> NumberStrings(IEnumerable<String> input) {
      int i;
      return input.Select(s=>String.Format("{0}. {1}", ++i, s));

    but this does not work:

    IEnumerable<String> NumberStrings(IEnumerable<String> input) {
      int i;
      return input.AsParallel().Select(s=>String.Format("{0}. {1}", ++i, s));

    Evemtually numbers will be repeated or skipped because of race conditions involving the ++i expression.

    [For the nitpickers out there: I know that numbering n items is inherently sequential and that trying to do it in parallel is foolish.  I am trying to write a simple example of code that looks like it should work because its "functional," but doesn't.]

    Even though I am using ParallelFX, lambdas, LINQ, and all the other functional goo, its not a magic wand that lets me ignore the problem of shared mutable state. If I were using lisp, haskel, or another functional language it wouldn't let me do the ++i, because they don't have mutable state at all.  The success of functional languages (in which no beginning student really believes) is that you can actually write meaningful programs without it.

    Then it gets worse because if the ++i were actually a function call.  In functional languages, the language guarentees no mutable state.  In C# I may not know if it mutates state, or it may not do so now and change in the next version.  It might mutate state only in an edge case I didn't test for.  All of the sudden, my correctness depends on a sometimes very subtle implementation detail of (potentially) someone else's code.

View All