Blue Hill Bay Swim 2023

:: granitemon

By: John Clements

Hmm… well, that was harder than it used to be. Probably I’m just getting old.

Okay, rewind. This year was the 29th swim! The water was a good deal colder than it has been in the last few, and the choice of date meant that the tide was not compatible with an inbound swim, so our swim was (for the second time ever) from the Becton’s dock out to the island. Besides meaning that swimmers couldn’t see much in the way of landmarks, it also meant that the water got colder and colder as we approached the finish.

Justice had the bright idea of borrowing race markers to help guide the swimmers and the chase boats, which was quite helpful. Who knows where we would have ended up otherwise.

I personally cannot comment much on the pointy end of the swim; I was slow slow slow, and by the time I crawled out of the water the rest of the swimmers were relaxing in easy chairs, sipping martinis. Not quite but pretty close. This was definitely a wet suit year.

Many kudos to two first-time swimmers: Mike Keene, and Laura Lutton. I would like to offer a huge shout-out to Laura for her entering-the-water howl, which kept me going for most of the swim. This was also the fifth swim for Ted Heyd and Pat Starkey, a tip of the swim cap to them.

This was also a year that honored Jeannie Becton, who is no longer among the living, and will be forever missed. Swimmers and others made donations to the Heritage Trust in her name.

Next year will be the 29th anniversary, and the 30th swim. Goodness.

Swimmers:

  • Amanda Herman
  • Jerome Lawther
  • John Clements
  • Justice Pollard
  • Laura Lutton
  • Mary Clews
  • Mike Keene
  • Pat Starkey
  • Ted Heyd

Inimitable and priceless support crew:

  • Andy Wanning
  • Anika Clements
  • Brenna Cohen
  • Charlotte Taylor
  • Eliza Wilmerding
  • Hal Clews
  • John Manderson
  • Joyce Ferris
  • Neddy Clews
  • Springer Huseby
  • … whom did I leave out? Yikes I hate this part

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

The photos above are courtesy of Andy Wanning and Eliza Wilmerding.

Many many thanks to Mary Clews for taking the lead on planning the event and getting up very very early to bake scones!

blue hill bay swim 2022

:: granitemon

By: John Clements

The year is 2022. This is the 28th swim, and it was warm, and it was quite calm. Really, a balmy morning all around. The big news was that we picked up another multi-generational team, and there were a total of 3 “next-generation” swimmers: Ahren Michaud, Lucy Lawther, and Liadan Taylor, in addition to first-time swimmer Renee Michaud.

This was also Justice Pollard’s 20th swim, a pretty substantial milestone.

We did this one with not much tidal assist, starting only 15 minutes after dead low. Maybe next year we’ll go against the tide! No, no, just kidding.

In other news, we missed those of you that couldn’t make it. Come back next year!

Swimmers:

  • Ahren Michaud
  • Charlotte Clews
  • John Clements
  • Julie Forsyth
  • Justice Pollard
  • Liadan Taylor
  • Lucy Lawther
  • Mark Read
  • Mary Clews
  • Renee Michaud

Inimitable and priceless support crew:

  • Andy Wanning
  • Anika Clements
  • Charlotte Taylor
  • Charlotte Weir
  • Guy Ardrey
  • Hal Clews
  • Henry Becton
  • Jeannie Becton
  • Neddy Clews
  • Wing Taylor

A special mention here goes to the Becton crew, who arrived with hot chocolate and pastries at the moment above all others in the year when they are most most needed. Thanks so much!

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

Many thanks to Andy Wanning and Anika Clements for the pictures that appear here.

Finally, and this is very very literally true, this event would almost certainly NOT have happened without Mary Clews, who herded the mackerel into the chute successfully.

the long shadow of cleverness in computer science

:: programming

By: John Clements

I don’t have time to write an actual essay here, so I’m just going to take a 5-minute break from what I should actually be doing to share with all of you (my millions of adoring readers) a thought that I’m having while teaching engineering non-majors how to program.

To wit: For the last fifty years, cleverness has been extremely important in programming a computer.

But that’s not really true any more, at least not for the vast majority of programmers.

But we still teach computer science like it is.

And I’ll stop starting my sentences with conjunctions now.

In the 1950s, 1960s, and 1970s, computers were generally speaking slow and small; fitting your desired computation into the time and space afforded by computation was a challenge. Programmers had to come up with clever encodings and clever algorithms. They did!

Now, in the 202s, computers are very large and very fast, compared to the programs that most of us want to run. There are exceptions, of course; weather simulations and “high-energy physics” still want as much computing power as they can get. Most of our computing tasks, though, are relatively more modest.

Unfortunately, we haven’t yet figured out how to teach programming in ways that focus on correctness and reliability.

Honestly, I think that’s because most of our teachers are still much more interested in working on problems that exercise their cleverness. There’s a strong parallel here to Math; for many math faculty, teaching a Calc 1 class doesn’t sound fun; there may not be much that’s challenging or interesting about the material, and much of the work is oriented around nurturing and caring for young minds, rather than inventing new and magical ways of thinking.

In computer science (which in many ways is just applied math), we haven’t yet reached this state, for the simple reason that we still have not developed the tools that allow people to efficiently generate correct and reliable programs. In other words, it’s not too late for cleverness! That cleverness, though, must be directed not at the students, teaching them how to write clever programs in complex and interesting languages; instead, it must be directed at the tools and materials that surround those students; we need to develop programming tools and teaching methods that efficiently endow those young minds with the ability to generate correct and

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!