blue hill bay swim 2021

:: granitemon

By: John Clements

Another year! The 2021 swim is in the books. I must say, I’m still looking for a name for this event. Long Island Challenge is (it turns out) not a unique name. Granite Mon is unique but also very … dated? Also, a lot of the rock here isn’t granite. Okay, this isn’t a puzzle I can solve on my own.

Anyhow, predictions of a terrifying cold blob… did not come to pass. It was apparently very very cold (54F?) a few weeks ago, but the day itself—that would be yesterday—dawned cool and glassy with water that was just fine. It may be that in my dotage I have lost my ability to detect cold water, but I would have guessed 70s. Others said 60s.

The turnout was spectactular. We had fourteen swimmers, a new record! Here’s the list:

  • Alice Clements
  • Amanda Herman
  • Chris Guinness
  • George Pendle
  • Jerome Lawther
  • John Clements
  • Julie Forsyth
  • Justin Pollard
  • Lane Lucas
  • Lucy Lawther
  • Mark Read
  • Mary Clews
  • Pat Starkey
  • Tricia Sawyer

We had two new first-time swimmers, Julie Forsyth and, in the first ever intergenerational transfer, Lucy Lawther.

As always, there are many many people who get up at the crack of dawn in order to make this amazing thing happen. This year, that list included these amazing people and probably others that I’ve neglected to include (but lif so, let me know!):

  • Andy Wanning
  • Anika Clements
  • Anna Huseby
  • Ben Walker
  • Brennan Starkey
  • Charlotte Clews
  • Charlotte Taylor
  • Eliza Wilmerding
  • Ella Murnik
  • Hal Clews
  • Mike Murnik
  • Nathan Semler
  • Neddy Clews
  • Sean Guinness
  • Silas Murnik
  • Springer Huseby

All-time swimmer stats : /Granite-Mon-Website/

The Bectons were gracious hosts as always, tolerating our last-minute scheduling with hospitality and good cheer.

Finally, a huge thank-you to Mary Clews, Justin Pollard, and Amanda Herman for their organizational work!

Peaceful disagreement

:: Politics

By: John Clements

Peaceful disagreement is the foundation of our American government.

It is not surprising that we disagree with each other. Each of us has individual opinions, circumstances, and understanding. Each of us sees a different part of the problems that surround us. Each of us has a different insight into the world, and sees different things that need to change.

And, for better or worse, pretty much all of us are justifiably angry about some aspect of government and society.

Our great virtue, as a nation, is that we have the ability to set that rancor aside; to suspend our anger, and to use the democratic process to decide upon a path forward. I don’t use the word “agreement”, because we may never truly agree. Fortunately, our nation and our government do not depend on our ability to agree with each other. They depend only on our ability to participate peacefully in a democratic process.

It has worked well since 1776. I have faith (and I do mean faith) that it will continue to work, and that America—the greatest nation on Earth—will continue to thrive and prosper, creating peace and prosperity and allowing each of us the pursuit of happiness.

how to not cheat

::

By: John Clements

So, this post isn’t very timely: hopefully COVID–19 will soon go away and we’ll all return to forms of education that actually work.

In the meantime, though, I’ve been learning things about online testing.

It probably goes without saying that there are many many differences between taking tests online and taking tests in person.

However, one of them that hadn’t occurred to me until very recently was how much more difficult it is… to not cheat.

Here’s what I mean. When you’re taking an in-person test in a classroom setting, your basic task is to focus your attention on your own desk. I’m not saying that’s easy for everyone, but I’ve come to realize that online testing presents an incredibly different experience.

Specifically, I think it’s safe to assume that most of the people in my courses taking exams still have their phones on. And what do you do if you’re taking a quiz, and you get a message from a friend, begging for help on a particular problem? You have to either deliberately snub them, or actually tell them “no”. Both of those are kind of hostile.

What this means is that we’ve taken an environment in which it’s incredibly easy to insulate yourself from those trying to cheat, and turned it into one where the burden is on those who don’t want to cheat to actively reject those who do.

So, I’m guessing that this is incredibly obvious to all of my students, but it sure wasn’t to me.

Is there an easy solution? Well, my easy solution would just be to turn off my phone during the test. But I suppose I wouldn’t do that unless the possibility of being asked for my answers occurred to me beforehand.

And, of course, this does absolutely nothing for the problem of students that actively conspire ahead of time to cheat.

So, although it’s a little late to do this now—the exam is in two days, and we can’t really discuss it in person—I’m going to make this suggestion now: please just turn off your phone and put it in another room, for the duration of the test?

the spirit of liberty

:: Politics

By: John Clements

I was forwarded this today. It’s a speech given in 1944 by Judge Learned Hand, on “I am an American” day in 1944, in the middle of a terrifying world war.

The first few sentences are somewhat hard to read; his assertion that we are made of people that have chosen to immigrate or are descended from those who did rings terribly terribly false for the thousands and thousands of slaves that were brought to this country in grotesque conditions, entirely against their wills.

Can we move past this? I hope we can, because his statements about Liberty, and the distinction between Liberty and the simple anarchy of unbridled will, are incredibly powerful and relevant in January 2021, when we face an insurrection of those who seem to believe that “do what thou wilt shall be the whole of the law.”


We have gathered here to affirm a faith, a faith in a common purpose, a common conviction, a common devotion. Some of us have chosen America as the land of our adoption; the rest have come from those who did the same. For this reason we have some right to consider ourselves a picked group, a group of those who had the courage to break from the past and brave the dangers and the loneliness of a strange land. What was the object that nerved us, or those who went before us, to this choice? We sought liberty; freedoms from oppression, freedom from want, freedom to be ourselves. This we then sought; this we now believe that we are by way of winning. What do we mean when we say that first of all we seek liberty? I often wonder whether we do not rest our hopes too much upon constitutions, upon laws and upon courts. These are false hopes; believe me, these are false hopes. Liberty lies in the hearts of men and women; when it dies there, no constitution, no law, no court can even do much to help it. While it lies there it needs no constitution, no law, no court to save it. And what is this liberty which must lie in the hearts of men and women? It is not the ruthless, the unbridled will; it is not freedom to do as one likes. That is the denial of liberty, and leads straight to its overthrow. A society in which men recognize no check upon their freedom soon becomes a society where freedom is the possession of only a savage few; as we have learned to our sorrow.

What then is the spirit of liberty? I cannot define it; I can only tell you my own faith. The spirit of liberty is the spirit which is not too sure that it is right; the spirit of liberty is the spirit which seeks to understand the mind of other men and women; the spirit of liberty is the spirit which weighs their interests alongside its own without bias; the spirit of liberty remembers that not even a sparrow falls to earth unheeded; the spirit of liberty is the spirit of Him who, near two thousand years ago, taught mankind that lesson it has never learned but never quite forgotten; that there may be a kingdom where the least shall be heard and considered side by side with the greatest. And now in that spirit, that spirit of an America which has never been, and which may never be; nay, which never will be except as the conscience and courage of Americans create it; yet in the spirit of that America which lies hidden in some form in the aspirations of us all; in the spirit of that America for which our young men are at this moment fighting and dying; in that spirit of liberty and of America I ask you to rise and with me pledge our faith in the glorious destiny of our beloved country.

  • Judge Learned Hand, 1944

Facebook Apparently Terrified by Default Privacy

:: Security, Privacy

By: John Clements

Based on their full-page advertisements in various newspapers, Facebook is extremely upset about Apple’s upcoming move to make cross-app privacy the default. Their two main “hooks” are that it will hurt small businesses, and make the internet less “free”. I believe that neither of these is the case.

What is clear to me is that this move will hurt Facebook’s ability to collect piles of information about its users, and to leverage that to collect huge amounts of advertising money.

The Current Situation

Before I go on, a caveat here: while I’m a programmer and a researcher, I am not a security and privacy researcher, so you should check the things I’m telling you.

With that said, a brief summary of the current situation: Currently, Apple’s iOS includes a notion of an “IDFA”, an “identity for advertisers.” This IDFA can be seen by apps, and apps can send information about what a user is doing in this app back to its central servers. This information can then be connected to other information uploaded by other apps in order to build a detailed picture of you.

This allows Facebook and others to understand what you’re like, and how best to separate you from your money by presenting you with advertising that’s likely to convince you to buy things. It also allows Facebook to identify characteristics that will allow them to present content that you will be really really interested in.

Back in June 2020, at their developer’s conference, Apple announced a change to the way that IDFAs would work. Since this is a developer conference, they were addressing app developers, and telling them how they would use their new framework to observe a user’s IDFA:

"To ask for permission to track a user, call the AppTrackingTransparency framework, which will result in a prompt that looks like this.

opt-in tracking dialog

opt-in tracking dialog

This framework requires the NSUserTrackingUsageDescription key to be filled out in your Info.plist.

You should add a clear description of why you’re asking to track the user.

The IDFA is one of the identifiers that is controlled by the new tracking permission.

To request permission to track the user, call the AppTrackingTransparency framework. If users select “Ask App Not to Track,” the IDFA API will return all zeros."

So, which button would you click?

My guess is that relatively few people will click the “Allow Tracking” button.

This will mean that Facebook and other apps will not be able to observe your IDFA, and will not be able to use this extremely convenient way to gather and share information about you.

Small Businesses

What does this mean for small businesses?

Let me offer another caveat here, and tell you that I am not an expert on small businesses, their use of targeted advertising, and the effectiveness of their use of targeted advertising.

However, I’m going to observe that small businesses, by and large, are hurt by online advertising in general, and are unlikely to have the kinds of data science teams that are best positioned to sift through and profit from reams of consumer data.

Some (like Facebook?) might respond that their interfaces are designed to make high-quality data analytics available to even businesses that don’t have giant data science teams. I don’t think this argument holds much water, and I think that whenever Facebook provides better information on their users, companies with high data-science ability will be the ones best positioned to capitalize on it.

Facebook makes the specific claim that “Facebook data shows that the average small business owner stands to see a cut of over 60% in their sales for every dollar they spend.” This claim is (I claim) fairly preposterous; I’m guessing that they’re measuring the relative effectiveness of targeted and non-targeted advertising. What this ignores is the fact that people are still going to buy things, so that if targeted advertising goes away, more dollars will go toward non-targeted advertising.

Of course, they might be right, in the situation that the stuff that people are buying because of targeted advertising is worthless junk that they didn’t need. In that case, maybe targeted advertising is really important because it allows advertisers to sell us worthless junk. I’m not sure that’s a good argument for allowing targeted advertising.

The Free Internet

Next, Facebook makes the argument that this move is in opposition to the “free” internet. Specifically, they argue that “Many [sites] will have to start charging you subscription fees or adding more in-app purchases, making the internet much more expensive and reducing high-quality free content.”

This paragraph makes it clear that Facebook’s definition of “free” here is “free as in beer”, not “free as in speech”. That is, Apple’s change will not reduce the liberty of the internet. It will simply make it harder for sites to pay for their content-generation using targeted advertising.

Again, I think this argument doesn’t hold water, for the same reason given in the case of small businesses; unless the items being advertised are completely useless, shifting from targeted to untargeted advertising will simply level the advertising playing field, and make it harder for large companies to leverage their data science teams to separate you from your money.

However, a reduction in targeted advertising will make one huge difference; it will mean that small businesses will be more likely to work directly with the sites that their projected customers will use, rather than giving a huge slice of their money to middlemen like Facebook that mediate and control access to the targeted audiences. If I think that my customers read the Wall Street Journal, I will contact the Wall Street Journal and place an ad. This may sound like business as usual, but it’s absolutely terrifying to advertising middlemen whose current value is in holding all of the information about customers, and placing advertisements directly in the pages of those who are likely to click on them.

In Summary…

To summarize: tracking is still possible after this move; it’s just that users must opt into it, rather than having it on by default.

And here’s the thing. If you’re as terrified as this by the idea that users might have to explicitly consent to your practices… maybe you’re not actually the good guy.

Or, as That Mitchell and Webb Look put it: “Hans … are we the baddies?”

Further reading:

Mozilla campaign to thank Apple

Apple Developer Conference Video (with transcript)

Forbes article on the proposed change

EFF opinion on advertiser IDs (both Google’s & Apple’s)

facebook full-page ad

facebook full-page ad

On the relationship between mathematical functions and program functions

:: Programming, Teaching

By: John Clements

NOTE: this text is a brief overview intended for instructors of a CS course that we’re developing; it is not technical. It tries to make the case that our early courses should steer students toward understanding problems in terms of pure functions. If you have suggestions or feedback, I’d love to hear them/it.


This section of the course introduces functions, a crucial topic in the field of computer science AND in the field of math.

Programmers and mathematicians sometimes think about the term “function” somewhat differently. Furthermore, some people who are familiar with both fields assign different meanings to the word “function” in the two fields.

The definition of a function in the mathematical domain is fairly well specified, though of course things get a little fuzzy around the edges. We’re going to define functions as the arrows in the category Set, more or less (if that’s not helpful, ignore it). That is, a function has a specified domain and a specified codomain, and it maps every element of the domain to a particular element in the codomain. There’s no requirement that it map every element of the domain to a different element of the codomain (one-to-one) OR that there be some element of the domain that maps to any chosen element of the codomain (onto). This (I claim) is the standard notion of “function” in math.[*]

Programmers also use and love functions. Nearly every programming language has a notion of functions. Of course, they’re sometimes called “procedures” or even “paragraphs” (I believe that’s COBOL. Yikes.). In programming, functions are often thought of as being elements of abstraction that are designed to allow repetition. And so they are. But it turns out that they also, in most modern programming languages, can be thought of as mathematical functions. Well, some of them can.

For many functions, this is totally obvious. If I consider the function from numbers to numbers that we might write in math class as f(x) = 14x + 2, then I can write that as a function in most programming languages. (If you disagree with me, hold that thought.)

But… things aren’t always so clear. What about a function that doesn’t return at all? What about a function that takes input, or produces output? What about a function that mutates an external variable, or reads a value from a mutable value? What about a function that signals an error? All of these present problems, some more substantial than others. None of these have a totally obvious mapping to mathematical functions.

There certainly are ways to fit these functions into mathematical models, but in general, the clearest lesson is that when there is a natural way to express a problem using functions that map directly to mathematical functions, we should. These are generally called “pure” or “purely functional” functions.

So, why should it matter whether our functions are pure? What benefits do we gain when we express functions in purely functional ways?

The clearest one is predictability, also known as debuggability and testability. When I write a pure function that maps the input “savage speeders” to 17, then I know that it will always map that string to 17; I don’t need to worry that it will work differently when the global foo counter is less than zero, or when it’s run in parallel, or on Wednesday, or when the value in memory location 0x3342a7 is less than the value in memory location 0x3342a8.

Put differently, pure functions allow me to reliably decompose problems into sub-pieces. When I’m debugging and testing, I don’t need to worry about setup and teardown to establish external conditions.

Another way to understand this is to dip into functions that use mutation. If we want to model these as mathematical functions, we need to understand that in addition to their stated inputs, they take additional hidden inputs. In the simplest case, this may be the value of a global counter. Things get much more complex when we allow mutation of data structures; now we need to worry about whether two values are the “same” value; that is, whether mutating one of them will change the other. Worse still, mutating certain values may affect the evaluation of other concurrent procedures.

For these reasons and others like them, pure functions are vastly easier to reason about, debug, and maintain. Over time, many of our programming domains and paradigms are migrating toward primarily-pure settings. Examples include the spread of the popular map-reduce frameworks, and the wild explosion of popularity in deep learning networks. In both cases, the purity spreads downward from a mathematical framework.

Note that it is not always the case that pure approaches are the most natural “first choice” for programmers, especially introductory programmers, for whom programs are often imagined as a “sequence of changes”; do this, then do this, then do this, then you’re done. In this model, the program is performing a series of mutations on a larger world. Helping introductory programmers move to a purer model is a challenge, but one with substantial payoff.

For this reason, this section focuses directly on pure functions, and invites students to conceive of programs using the models that they’ve been taught in elementary and secondary school, most particularly tables mapping inputs to outputs.

[*] The only reason I mention the category Set is to draw attention to the distinction between “codomain” and “range”; every function has a named codomain, regardless of whether its range covers it. For instance, the “times-two” function from Reals to Reals is a different function from the “times-two” function from integers to integers, and the “times-two” function from integers to reals is yet a third function.

Granite Wo-Mon 2020

:: granitemon

By: John Clements

(All pictures courtesy of Chris Guinness and Mary Clews.)

Well, it’s been a rough year—Covid–19, George Floyd, and the extended blundering reign of the orange one—so you might have been forgiven for expecting the seas to boil, or all of the swimmers to be struck by a sharknado (in fact, we’ve had both sharks and tornados in the last month).

Thankfully, none of that happened. Indeed, the largest problem encountered by any swimmers was that the ocean was frankly a bit too warm for those who wore wet suits. Yes, Blue Hill Bay is back to being warm warm warm, which is great for swimmers, if not for all of the other fauna that call it home.

I think all of the swimmers got right out in the floodiest part of flood tide, as well. My timer wasn’t working, but I think that we made it to the dock in something near record time. (I’d be glad to hear from anyone who’s timing device wasn’t on the fritz.)

This year was a bit smaller than average, with five swimmers. The swimmers were definitely well-accompanied, by a stellar support crew.

This year’s event was organized by Mary Clews, who did an amazing job of corralling both swimmers and chase boats. Also, we got great pictures from both Mary and from Chris Guinness. Many many thanks!

Swimmers this year:

  • Mary Clews
  • Mark Read
  • Tricia Sawyer
  • George Pendle
  • John Clements

Support Crew:

  • Sean Guinness
  • Chris Guinness
  • Nathan Semler
  • Andy Wanning
  • Brenna Cohen
  • Charlotte Taylor
  • William Taylor
  • Hal Clews
  • Anna Clews
  • Mouse

All-time swimmer stats : /Granite-Mon-Website/

See y’all again next year!

Granite Wo-mon 2019

:: granitemon

By: Mark Read

Another year, another foolhardy venture across mackerel-infested waters.

Mother Nature, always the trickster, loves to make folly of our predictions, to wit (from last year): “I hate to say it, but I think the days of wet suits in Blue Hill Bay are over. Pretty soon it’s going to be like the Bahamas up here.”

Oh, John, if only you’d knocked on some wood after writing that we might not have had such a spate of hypothermia this year.

This is all to say that the water was very very cold this year. Four swimmers pulled up short and shivered their way to shore on boats, while others of us that did make it shivered upon completion at the Becton’s dock. It was the Year of the Great Shiver. It was also the 25th ANNIVERSARY of the Granite, née Long Island, challenge. WOW! Congratulations all around! And it was a banner year in all respects other than water temperature. We had a large-ish complement of 10 swimmers, and 7 chase boats watching, ready to ward off any seal attacks. We caught a pretty good flood tide which got the first swimmer (yours truly, Mark Read) into the dock in about 01:20. Tricia Sawyer was leading the way but had to pull up short after an hour in the water due to the cold. It was a glorious morning of bright blue sky, strong sun, a light breeze, and camaraderie to spare.

This year the swimmers were:

  • Mary Clews
  • Moira McMahon
  • Lane Murnik
  • Jenney Wilder
  • Amanda Herman
  • Mark Read
  • Tricia Sawyer
  • George Pendle
  • Molly
  • Heather Dawn Jones

We also had help from an incredible support crew, including:

  • Sean Guinness
  • Mike Murnik
  • Ellis Murnik
  • Nathan Semler
  • Andy Wanning
  • Eliza Wilmerding
  • John Jeffrey
  • Abby Jeffrey
  • Charlotte Taylor
  • Jenny
  • Sara Ardrey
  • Neddie Clews
  • Ana Huseby

None of it would have been possible without the superior cajoling and organizing skills of Mary Clews, per usual. Much gratitude to her and to all the volunteers that help out. The Bectons were especially welcoming this year, with hot beverages and ample towels to warm the cold and weary swimmers. So thanks to them as well.

See you next year!

Photos courtesy of Christina Guinness, and Eliza Wilmerding. Thanks!

class size update

:: Department Data

By: John Clements

Again: not too much new here, but the spring and fall quarters quarter is new:

Here’s the college as a whole (we’re better):