Archive for November 2009

Wordless Wednesdays: Kohanaiki Tidepools

DSC_5158

C# and VB Compilers Being Rewritten in Themselves; “Immutable” attribute coming?

Darryl Taft interviews Luca Bolognese, Group Program Manager for languages at MS, and comes up with some interesting hints.

The lede revolves around MS’ plans to make the compilers more “open” (as in an open can of beer) by providing a “compiler-as-a-service” facility. On face value, “compiler-as-a-service” doesn’t make much sense — compilers aren’t large and I don’t perceive parallel make of C# programs being a grave problem. It’d be lovely to have Visual Studio in the cloud, though…

Apparently they’re rewriting the C# and VB compilers in themselves, which is interesting, if for no other reason than the performance characteristics coming out of the managed side of things.

The buried lede revolves around concurrency and code words like “declarative” and “immutability.”  The hint is that Microsoft sees some big wins coming from the low-hanging fruit of declaring that a variable is single-assignment. (If you know that a variable doesn’t change its value over time, you can use it’s value in different threads without worry.)

What’s interesting about this is not that single-assignment has some advantage (we knew that), it’s the hint that Microsoft sees enough advantage to mention it as a specific optimization. It’s not obvious (to me) that such an attribute would have profound effects in the real world, in that a real application would have a mix of mutable and immutable variables with complex dependencies. So to get a meaningful speedup presumably requires some far-from-trivial reasoning at compile and/or runtime.

Five Years Ago In Language-Oriented Programming

Five years ago I called attention to Language-Oriented Programming, which is now coming to fruition in the form of products such as JetBrains’ MPS and Intentional Software’s Intentional Workbench: http://www.knowing.net/index.php/2004/11/22/language-oriented-programming/

Pirating Reputation in the Consulting Market

A cautionary tale from the iPhone market in which a successful app developer discovered that an unscrupulous development house included his product in their portfolio.

I can attest that this happens. I have had direct experience with a component that, in retrospect, was almost certainly stolen and reverse-engineered. When confronted with irrefutable proof that an identical component was in the hands of a competitor, the Indian subcontracting company said “Wow! They must have stolen our component!” (There’s no proof they were lying, but the circumstantial evidence was substantial.)

Astrophotography: Registax and Vado HD

Registax needs a VFW H264 compressor in order to process video from the Vado HD camera. After installing DTS x264 Vfw 01.22.2007 things seem to work.

Mortgage Meltdown Financial Instrument is NP-Complete

Complex derivatives are “intractable” — you can’t tell if they’re being tampered with – Boing Boing.

Determining if a “Collateralized Debt Obligation” was tampered with is a “densest subgraph” problem, which is NP-Complete. Which is a fine thing to depend a global economy on.

Stellarvue Refractor Telescopes: Stellar Service (See What I Did There?)

I had put off buying a telescope my entire adult life because I knew that you had to spend a good amount of money for quality and that, when it comes to a hobby that revolves around fleeting glimpses of faint and fuzzy objects, you must have confidence in your equipment.

But, I couldn’t forever ignore my easy access to one of the premier dark sky sites in the world. Once you’re resigned to spending enough money for a quality scope, there’s another tension: aperture versus convenience. On the one hand, Dobsonian-mount reflectors are inexpensive per inch of aperture. On the other hand, they’re bulky. I knew that I didn’t want to fall down the rabbit hole of aperture fever, so I decided to get a high-quality refractor.

Considerable research led me to a 102mm Stellarvue ED. I have been absolutely blown away by this scope. But something happened in mid-October — the scope must have been jarred during the ride back from Mauna Kea — and an element in the focuser fell off.

After posting a plaintive “Can I fix this myself?” post on the Stellarvue Yahoo group, Vic Maris of Stellarvue directly contacted me, said “Call me up to talk about this,” walked me through a quick check of the problem on the phone, and then said “Send it in and we’ll take care of it.”

Two weeks later I received a package back from Stellarvue containing an entirely new focuser. Invoice: $0.

I don’t know how long it will be before I buy another refractor, but when I do, it will be from Stellarvue.

Posting Ink to My Blog

Coding style in tag-based languages

HTML is typically formatted to show structural containment:

<h1>Topic</h1>
   <p>Some paragraph.</p>
   <p>Next para.</p>
   <ul>
      <li>item 1</li>
      <li>item 2</li>
   </ul>

Code is typically formatted to show flow-of-control:

node = tree.append "Topic 1"
node.append "Some paragraph."
node.append "Next para."
list = tree.append "Unordered"
items.each { | i |
   list.append i
}

One reason that tag-based languages can lead to such confusing pages is that they are often formatted both ways:

<h1>Topic</h1>
   <p>Some paragraph.</p>
   <p>Next para.</p>
   <ul>
      <% items.each { | i | %>
         <li><%= i =></li>
      <% } %>
   </ul>

The purpose of formatting is to make structure apparent, not to slavishly increase the amount of whitespace in the world. Since the page is primarily the UI designer’s domain, I think that flow-of-control ought not to be indented in tag-based pages:

<h1>Topic</h1>
   <p>Some paragraph.</p>
   <p>Next para.</p>
   <ul>
      <% items.each { | i | %>
      <li><%= i =></li>
      <% } %>
   </ul>

I’ve tried to make the difference more explicit in this image. Note how the 2nd sample, which combines indenting styles, has control-flow indenting (in blue) which I recommend eliminating:
indent

Update: A more programmer-like thought is something alone the lines of “Control-flow on a page ought to be encapsulated,” but I don’t think the design tools of designers are capable of rendering componentized snippets, which I think is why designers are so darned resistant to them.

Looking for an excellent developer who believes that quality is the best route to productivity?

I have recently finished an engagement with a client and am footloose and fancy free.

If anyone is looking for an excellent developer with an object-oriented bias and a deep belief that to improve productivity teams should concentrate on quality, please drop me a line at lobrien “at” knowing “dot” net. The technologies I most prefer right now are: Ruby, Rails, iPhone using MonoTouch, or C# with ASP.NET MVC. However, I’m very comfortable and have experience ranging from “some to extensive” with most major technologies.

Additionally, I am hoping to continue working with some colleagues with whom I have been collaborating on recent projects. These are developers who are highly productive, committed to quality, and responsible.

Here’s my CV on Stack Overflow Careers: http://careers.stackoverflow.com/lobrien

div>