Categories
Uncategorized

Windows 7 RTM: Now Available to TechNet Subscribers!

This article also appears in Canadian Developer Connection.

Windows 7 logo

If you have a TechNet subscription, you’re in luck – you can download the official ISO files for the RTM version of Windows 7, both 32- and 64-bit!

You can grab it right now at: https://technet.microsoft.com/en-ca/subscriptions/securedownloads/default.aspx

My co-worker Rick Claus, Senior IT Pro Evangelist with Microsoft Canada reports that he’s got it up and running on a couple of his boxes and he’s pretty impressed.

Some things to mull over while you’re waiting for the ISOs to download:

  • You can install without a key and have it run for 30 days. Great for a lab environment.
  • Are you running a beta or RC version of Windows 7? You’ll should use the Migration Wizard – migwiz.exe – to save your data settings, then do a clean install.
  • Windows 7 resources abound online. Be sure to visit the Canadian “Springboard” site.
  • Use the Upgrade Advisor tool. It does a check and tells you if your hardware and applications have any known issues (get it here).
  • Check out the great video series on XP to Windows 7 migration that my friends Adam Carter and the gang from edge.technet.com have created.
  • Looking for some great technical training on Windows 7? Check out the TechDays conference to register for the client track at a city near you!

  • Categories
    Uncategorized

    The Tragedy of the Coffee Shop

    This article also appears in Coffee and Code.

    blocked_outletToday’s edition of the Wall Street Journal has an article about the Tragedy of the Commons being played out at coffee shops in New York: No More Perks: Coffee Shops Pull the Plug on Laptop Users.

    This excerpt captures the general gist of the article:

    Amid the economic downturn, there are fewer places in New York to plug in computers. As idle workers fill coffee-shop tables — nursing a single cup, if that, and surfing the Web for hours — and as shop owners struggle to stay in business, a decade-old love affair between coffee shops and laptop-wielding customers is fading. In some places, customers just get cold looks, but in a growing number of small coffee shops, firm restrictions on laptop use have been imposed and electric outlets have been locked. The laptop backlash may predate the recession, but the recession clearly has accelerated it.

    "You don’t want to discourage it, it’s a wonderful tradition," says Naidre’s [a coffee shop in Brooklyn] owner Janice Pullicino, 53 years old. A former partner in a computer-graphics business, Ms. Pullicino insists she loves technology and hates to limit its use. But when she realized that people with laptops were taking up seats and driving away the more lucrative lunch crowd, she put up the sign. Last fall, she covered up some of the outlets, describing that as a "cost-cutting measure" to save electricity.

    The conflict between cafe owners and laptop users is nothing new. Back in 2005, the New York Times ran an article titled Some Cafe Owners Pull the Plug on Lingering Wi-Fi Users, and the complaints on both sides don’t sound all that different from those made in the Wall Street Journal article.

    The difference, it would appear, is the recession. Rising unemployment means more people hanging out in cafes with their laptops, and the downturn is making cafe owners nervous about “squatters” who use up space and electricity while contributing little back in return. One cafe owner in the article talked about how some ultra-parsimonious customers were bringing in their own food; others brought their own teabags and made use of the free hot water offered at the cafe.

    The Cafe Tradition

    Painting of the goings-on in a coffeehouse in Old London

    It may seem that cafe-as-workplace is a new phenomenon, but that’s not so. They’ve been places where customers have done work since their debut in the 1650s. Here’s how the Norton Anthology of English Literature describes the early coffeehouses of London:

    The first London coffeehouse opened in 1652. Though Charles II later tried to suppress them as "places where the disaffected met, and spread scandalous reports concerning the conduct of His Majesty and his Ministers," the public flocked to them. By 1739 there were 551 coffeehouses in London, including meeting places for Tories and Whigs, people of fashion and haberdashers, wits and clergymen, merchants and lawyers, booksellers and authors, stockjobbers and artists, doctors and undertakers — and politicians of every kind. According to one French visitor, the Abbé Prévost, coffeehouses, "where you have the right to read all the papers for and against the government," were the "seats of English liberty."

    The Economist also wrote about coffeehouses in an article comparing them to the internet:

    The coffee-houses that sprang up across Europe, starting around 1650, functioned as information exchanges for writers, politicians, businessmen and scientists. Like today’s websites, weblogs and discussion boards, coffee-houses were lively and often unreliable sources of information that typically specialised in a particular topic or political viewpoint. They were outlets for a stream of newsletters, pamphlets, advertising free-sheets and broadsides. Depending on the interests of their customers, some coffee-houses displayed commodity prices, share prices and shipping lists, whereas others provided foreign newsletters filled with coffee-house gossip from abroad.

    Rumours, news and gossip were also carried between coffee-houses by their patrons, and sometimes runners would flit from one coffee-house to another within a particular city to report major events such as the outbreak of a war or the death of a head of state. Coffee-houses were centres of scientific education, literary and philosophical speculation, commercial innovation and, sometimes, political fermentation. Collectively, Europe’s interconnected web of coffee-houses formed the internet of the Enlightenment era.

    Then, as now, they functioned as what sociologists like to call “Third Places”: places that are neither home (the “First Place”) nor work (the “Second Place”), but  a place that functions a community gathering place where broader, and often more creative social interactions happen. Cafes, community centres, churches, pubs in the U.K., town squares, open-air basketball courts, the parking lots of 7-11s and hackerspaces like Toronto’s HacklabTO are all third places.

    Perhaps it’s the North American approach. People lingered in cafes before the laptop era, and before the rise of coffee chains like Starbucks, which are as ubiquitous as hamburger chains. Benjamin Hoff wrote about both in The Tao of Pooh:

    In China, there is the Teahouse. In France, there is the Sidewalk Cafe. Practically every civilized country in the world has some sort of equivalent–a place where people can go to eat, relax, and talk things over without worrying about what time it is, and without having to leave as soon as the food is eaten. In China, for example, the Teahouse is a real social institution. Throughout the day, families, neighbors, and friends drop in for tea and light food. They stay as long as they like. Discussions may last for hours. It would be a bit strange to call the Teahouse the nonexclusive neighborhood social club; such terms are too Western. But that can roughly describe part of the function, at least from our rather compartmentalized point of view. "You’re important. Relax and enjoy yourself." That’s the message of the Teahouse.

    What’s the message of the Hamburger Stand? Quite obviously, it’s: "You don’t count; hurry up."

    (The hamburger stand message isn’t limited to hamburger stands anymore, and it’s not simply implied either: many branches of Tim Hortons actually have signs announcing a twenty-minute limit on seating.)

    If cafes are going to discourage laptop use, are they also going to discourage other kinds of work or lingering? Students have used cafes as places to do homework or hold study groups long before laptops, and there’s also the time-honoured tradition of enjoying a book with a cup of coffee at the local coffeehouse. Or is the laptop (symbolic of work) and the act of plugging into an outlet (a symbol that some might interpret as being a leech) the only mark of a good-for-nothing customer?

    Some Ideas

    My laptop on the table at the Dark Horse Cafe

    The first thing to remember is not think of it as the cafe owners declaring war on their customers. Cafe owners are in business to make a living, and they do this by selling their wares. If you’re going to hang out at a cafe for a long time, “pay the rent”! They offer their seats and tables in the understanding that you’ll buy something. My rule of thumb is to buy something regularly while you’re there – at least a large cup of coffee every hour.

    Cafes that serve lunch or dinner and have large “rushes” should consider disallowing laptop use during those periods. It’s an approach that Panera, a sandwich-and-coffee chain that caters to the freelance and mobile worker crowd, uses. They very clearly state the rules on signs on the table, and from what I can tell, it works.

    Know your cafe. Just as different restaurants and bars expect different kinds of clientele and behaviour, so do different places that sell coffee. Some places are perfunctory coffee dispensers, where they expect you to get your coffee and then get the hell out. Others encourage conversation, or are date-y places. The trick for the mobile worker is to find a place that encourages (or at least doesn’t shoo away) laptops. Cafes in neighbourhoods near startups and other “creative class” workplaces tend to be most tolerant. as are places that cater to students.

    Know the people at the cafe. Working out of a cafe is so much better when you have a relationship with the owners and employees. It fosters understanding and makes it more likely that you won’t get the boot. You might even make some new friends. Hey, you might even start a relationship, but speaking from personal experience, I must tell you that it’s not without its risks.

    Finally, remember that it’s possible to write customer-ready software at a cafe. I wrote good chunks of some of my best software at a cafe, as did the guys from Delicious Monster.

    Will Shipley and the developers at Delicious Monster

    Categories
    Uncategorized

    Do You Code in Visual Basic?

    "Visual Basic" graphic from the old packaginOver at Canadian Developer Connection, the blog I’m actually paid to write for, I’m asking readers – presumably Canadian software developers who write code for Microsoft’s platforms – if they write code in Visual Basic. I’ve posted code in C# and (Iron)Ruby, plan to post code in (Iron)Python, F# and JavaScript, but none in Visual Basic.

    Since you make an ass out of umption when you make an assumption, I thought’s I’d ask if the Canadian Developer Connection readership coded in VB, and thus far, the answers run the gamut from “no” to “only if I have to”.

    Categories
    Uncategorized

    Exceptions: The Airbags of Code

    This article also appears in Canadian Developer Connection.

    its_okay_i_wrote_an_exception

    The trouble with a lot of example code covering exceptions is that the examples are often cases in which you shouldn’t be using an exception in the first place. Consider the classic known as “Someone’s trying to divide by zero” – here’s the C# version:

    // C#
    
    try
    {
        result = dividend / divisor;
    }
    catch (DivideByZeroException ex)
    {
        Console.WriteLine("Idiot.");
    }

    and here’s the Ruby version:

    // Ruby (works in IronRuby too!)
    
    begin
        result = dividend / divisor
    rescue ZeroDivisionError
        puts "Idiot."
    end
    
    // You have to hand it to Ruby for picking great keywords for
    // exception handling. While C# borrowed Java's "try / catch / finally",
    // Ruby went with the more macho "begin / rescue / ensure".
    // As Yoda himself would say: "Do or do not. There is no try."

    The better approach would be to do a little defensive programming and make sure that divisor is non-zero before performing the division operation. So why do tutorials on exception handling almost always bring out the “Someone’s trying to divide by zero” example?

    There are two reasons:

    • It’s simple. It’s only a handful of lines of code.
    • It’s predictable. Set the value of divisor to zero and the exception gets thrown. Always.

    The truly exceptional exceptions — I/O errors, timeouts and other things that cause exceptions are a little harder to set up and take more code to handle. Hence the divide-by-zero example; it illustrates try and catch (or rescue in a Ruby block) in a way even the newest newbie can understand.

    The problem is that many tutorial authors don’t get any deeper than simply explaining the keywords with simple examples, leading people to misuse exceptions, either as a substitute for checking for preconditions or as an unstructured form of flow control in the style of the much-maligned goto (which in many cases is considered harmful).

    Like goto, exceptions are unstructured jumps, which make your program’s flow more complex. Unlike goto, exceptions are computationally “expensive” because of all the extra work involved in setting up and backtracking program flow that comes with a thrown exception.

    A good guideline to follow is that exceptions are for exceptional cases. Stuff that you can’t easily predict. You can tell if a division operation is going to result in an undefined result – just look at the divisor! Harder to predict are things like whether a server access will time out or if the hard drive will decide that the moment you’re reading a file is the best possible time to corrupt it. Those hard-to-foresee, believed-to-be-rare, exceptional cases are really what exceptions are meant to handle.

    Think of exceptions is as being like the airbags in your car. The idea is that they’re a last resort; they’re no substitute for defensive driving. (Like airbags, they’re also expensive to reset.)

    Lee Dumond goes into further detail on the topic of defensive programming as being like defensive driving in an article titled Defensive Programming, or Why Exception Handling Is Like Car Insurance. He cites the “Someone’s trying to divide by zero” example, provides a list of defensive programming strategies that you should consider before coding up that exception handler and talks about those exceptional cases when you will have to use an exception. Check it out!

    Categories
    Uncategorized

    Know Your Cat Ports

    cat_ports

    For more comics like this, see www.slowwave.com.

    Categories
    Uncategorized

    Windows Mobile Case Study: Porting Amplitude to WinMo

    HTC phone with Amplitude on screen (simulated)

    The Windows Mobile Blog points to an MSDN article covering how Amplitude, an application for the iPhone, was ported to Windows Mobile.

    Here’s a quick description of Amplitude, which is developed by Gripwire, a mobile and social app company based in Seattle, courtesy of the Windows Mobile Blog:

    Amplitude picks up any sound in a user’s surroundings through the microphone and then amplifies the sound, rendering it into a rich graphical representation on the device. Amplitude can be used to amplify any sounds, such as human or animal heartbeats, that usually wouldn’t be picked up by the human ear. Amplitude provides a cool user interface featuring an oscilloscope that allows users to view and visually quantify, signal voltages, as you can see the volume of the sound that you are listening to.

    The MSDN article on the Amplitude porting project covers a lot of ground, including:

    Whether you’re thinking of expanding your iPhone application to other platforms or starting a new Windows Mobile app project, you’ll find this case study packed with useful information and links. I’m going to expand on some of the topics covered in the article in future posts on this blog.

    And don’t forget – there’s the Race to Market Challenge, in which you’re automatically entered whenever you submit a mobile app to Windows Marketplace for Mobile. Here’s a quick reminder of what Race to Market is all about:

    Categories
    Uncategorized

    Science 2.0: How Computational Science is Changing the Scientific Method

    This article also appears in Canadian Developer Connection.

    Victoria Stodden speaking at the Science 2.0 conference    

    Here’s the third in a series of notes from the Science 2.0 conference, a conference for scientists who want to know how software and the web is changing the way they work. It was held on the afternoon of Wednesday, July 29th at the MaRS Centre in downtown Toronto and attended by 102 people. It was a little different from most of the conferences I attend, where the primary focus is on writing software for its own sake; this one was about writing or using software in the course of doing scientific work.

    My previous notes from the conference:

    This entry contains my notes from Victoria Stodden’s presentation, How Computational Science is Changing the Scientific Method.

    Here’s the abstract:

    As computation becomes more pervasive in scientific research, it seems to have become a mode of discovery in itself, a “third branch” of the scientific method. Greater computation also facilitates transparency in research through the unprecedented ease of communication of the associated code and data, but typically code and data are not made available and we are missing a crucial opportunity to control for error, the central motivation of the scientific method, through reproducibility.  In this talk I explore these two changes to the scientific method and present possible ways to bring reproducibility into today’ scientific endeavor. I propose a licensing structure for all components of the research, called the “Reproducible Research Standard”, to align intellectual property law with longstanding communitarian scientific norms and encourage greater error control and verifiability in computational science.

    Here’s her bio:

    Victoria Stodden is the Law and Innovation Fellow at the Internet and Society Project at Yale Law School, and a Fellow at Science Commons. She was previously a Fellow at Harvard’s Berkman Center and postdoctoral fellow with the Innovation and Entrepreneurship Group at the MIT Sloan School of Management. She obtained a PhD in Statistics from Stanford University, and an MLS from Stanford Law School.

    The Notes

    • Research has been how massive computation has changed the practice of science and the scientific method
      • Do we have new modes of knowledge discovery?
      • Are standards of what we considered knowledge changing?
      • Why aren’t researchers sharing?
      • One of my concerns is facilitating reproducibility
        • The Reproducible Research Standard
        • Tools for attribution and research transmission
    • Example: Community Climate Model
      • Collaborative system simulation
      • There are community models available
      • Built on open code, data
      • If you want to model something a complex as climate, you need data from different fields
      • Hence, it’s open
    • Example: High energy physics
      • Enormous data produced at LHC at CERN — 15 petabytes annually
      • Data shared through grid
      • CERN director: 10 – 20 years ago, we might have been able to repeat an experiment – they were cheaper, simpler and on a smaller scale. Today, that’s not the case
    • Example: Astrophysics
      • Data and code sharing, even among amateurs uploading their photos
      • Simulations: This isn’t new: even in the mid-1930s, they were trying to calculate the motion of cosmic rays in Earth’s magnetic field via simulation
    • Example: Proofs
      • Mathematical proof via simulation vs deduction
      • My thesis was proof via simulation – the results were not controversial, but the methodology was

    Victoria Stodden and her "Really Reproducible Research" slide

    • The rise of a “Third Branch” of the Scientific Method
      • Branch 1: Deductive/Theory: math, logic
      • Branch 2: Inductive/Empirical: the machinery of hypothesis testing – statistical analysis of controlled experiments
      • Branch 3: Large-scale extrapolation and prediction – are we gaining knowledge from computation/simulations, or they just tools for inductive reasoning?
      • Contention — is it a 3rd branch?
        • See Chris Anderson’s article, The End of Theory (Wired, June 2008)
        • Systems that explain the world without a theoretical underpinning?
        • There’s the “Hillis rebuttal”: Even with simulations, we’re looking for patterns first, then create hypotheses, the way we always have
        • Steve Weinstein’s idea: Simulation underlies both branches:
          • It’s a tool to build intuition
          • It’s also a tool to test hypotheses
        • Simulations let us manipulate systems you can’t fit in a lab
      • Controlling error is central to scientific process

    Victoria Stodden at Science 2.0 and her "Top reasons not to share" slide

    • Computation is increasingly pervasive in science
      • In the Journal of the American Statistical Association (JASA):
        • In 1996: 9 out of 20 articles published were computational
        • In 2006: 33 out 35 articles published were computational
    • There’s an emerging credibility crisis in computational science
      • Error control forgotten? Typical scientific computation papers don’t include code and data
      • Published computational science is near impossible to replicate
      • JASA June 1996: None of the computational papers provided any code
      • JASA June 2006: Only 3 out of the 33 computational articles made their code publicly available
    • Changes in scientific computation:
      • Internet: Communication of all computational research details and data is possible
      • Scientists often post papers but not their complete body of research
      • Changes coming: Madagascar, Sweave, individual efforts, journal requirements
    • A potential solution: Really reproducible research
      • The idea of an article as not being  the scholarship, but merely the advertisement of that scholarship
    • Reproducibility: can a member of the field independently verify the result?

    Victoria Stodden at Science 2.0, with her "Controlling error" slide

    • Barriers to sharing
      • Took a survey of computational scientists
      • My hypotheses, based on the literature of scientific sociology:
        • Scientists are primarily motivated by personal gain or loss
        • Scientists are primarily worried about being “scooped”
    • Survey:
      • The people I surveyed were from the same subfield: Machine learning
      • They were American academics registered at a top machine learning conference (NIPS)
      • Respondents: 134 responses from 638 requests (23%, impressive)
      • They were all from the same legal environment of American intellectual property
    • Based on comments, it’s in the back of people’s minds
      • Reported sharing habits
        • 32% put their code available on the web
        • 48% put their data
        • 81% claimed to reveal their code
        • 84% said their data was revealed
        • Visual inspection of their sites revealed:
          • 30% had some code posted
          • 20% had some data posted
    • Preliminary findings:
      • Surprising: They were motivated to share by communitarian ideals
      • Surprising: They were concerned about copyright issues
    • Barriers to sharing: legal
      • The original expression of ideas falls under copyright by default
      • Copyright creates exclusive right of author to:
        • Reproduce work
        • Prepare derivative works
    • Creative Commons
      • Make it easier for artists to share and use creative works
      • A suite of licences that allows the author to determine the terms
      • Licences:
        • BY (attribution)
        • NC (non-commercial)
        • ND (no derived work)
        • SA (share-alike)
    • Open Source Software Licencing
    • Creative Commons follows the licencing approach used for open source software, but adapted for creative works
    • Code licences:
      • BSD licence: attribution
      • GPL: attribution and share-alike
    • Can this be applied to scientific work?
    • The goal is to remove copyright’s block to fully reproducible research
    • Attach a licence with an attribution to all elements of the research compendium

    Victoria Stodden at the Science 2.0 conference and her "Real and Potential Wrinkles" slide

    • Proposal: Reproducible research standard
      • Release media components (text, data) under CC BY
      • Code: Modified BSD or MIT (attrib only)
    • Releasing data
      • Raw facts alone are generally not copyrightable
      • Selection or arrangement of data results in a protected compilation only if the end result is an original intellectual creation (US and Canada)
      • Subsequently qualified: facts not copied from another source can be subject to copyright protection
    • Benefits of RRS
      • Changes the discussion from "here’s my paper and results" to "here’s my compendium”
      • "Gives funders, journals and universities a “hook”
      • If your funding is public, so should your work!
      • Standardization avoids licence incompatibiltiies
      • Clarity of rights beyond fair use
      • IP framework that supports scientific norms
      • Facilitation of research, thus citation and discovery
    • Reproducibility is Subtle
      • Simple case: Open data and small scripts. Suits simple definition
      • Hard case: Inscrutable code; organic programming
      • Harder case: Massive computing platforms, streaming sensor data
      • Can we have reproducibility in the hard cases?
      • Where are acceptable limits on non-reproducibility?
        • Privacy
        • Experimental deisgn
      • Solutions for harder cases
        • Tools
    • Openness and Taleb’s criticism
      • Scientists are worried about contamination by amateurs
      • Also concerned about the “Prisoner’s dilemma”: they’re happy to share their work, but not until everyone else does