Shared posts

18 Aug 03:49

How to Take Your Open Source Project from Good to Great

by Yuraima

Hint: documentation, documentation, documentation.

Illustrations by Min Heo

Setting up your project for success

Not too long ago I wrote a post about an open source project I released through The New York Times. Although I have had some experience contributing to open source software (OSS) in the past, this was my first time launching an open source project where I was the sole contributor and wanted others to use what I had written in their own projects. As someone who has benefitted from plenty of incredible OSS projects, I had some idea of what a “good” open source repo on GitHub looks like: it should have a README.md file, installation instructions and enough documentation to get started. But beyond that, I was totally lost: what would take my repo from good to great?

What follows is a short guide, pulled from my own experience, on best practices when making a project open source. Most of what I learned was found through research online, conversations with coworkers and friends and checking out dozens of projects available on GitHub.

Documentation is Key

Probably one of the biggest pitfalls for open source projects is a lack of documentation. Having easily accessible, human readable and reference-able documentation can be the difference between a project that is readily consumed by others and one that falls by the wayside without much fanfare.

There are a few places where you can place important information, but the most central and accessible is in the project’s root README.md file.

Start with a README

The README.md is the most visible file in your repository and likely the first one a person will see. The project’s main README file is usually located in the root of your repository and acts as the landing page for your repo; it should communicate the most important information about your project clearly and concisely. There aren’t hard and fast rules about what should and shouldn’t be in a README, but the following are some good starting points.

Why your project exists. What purpose does it serve and who does it serve? This is a mission statement of sorts and should be prominently visible for anyone who’s visiting the repo for the first time.

Quick start instructions. Usually includes instructions on how to download and use your code as quickly and easily as possible.

In-depth API documentation. Depending on how robust your API is, you could opt to include the documentation for it directly in your README file. If there is too much to fit in one place or you need more documentation features (such as search capability, FAQ, forum, etc.), this is where you can link to an external site.

How to contribute. The next part of this post will do a deeper dive on how to instruct others to contribute to your project via a contributing guide, but the README.md file is a great place to encourage contributions and link them to that guide.

Shout out to your contributors. It’s important to give thanks and recognize those who help support your project. The All Contributors project is a great resource on how to best reward different kinds of contributions along with some handy tools that make it easier to streamline the process.

Where to turn for help. If a user or contributor needs help using your code, who should they reach out to? Would you prefer they ask you directly, open an issue in GitHub or reach out to others working on the same things? Some larger communities set up IRC or Slack spaces where anyone can ask questions and get help from others.

Code of conduct. No one wants to deal with a jerk on the internet. Including a code of conduct can clearly point out the kinds of behavior that aren’t tolerated and can help structure an inclusive community around your project. The Contributor Covenant is a widely adopted code that celebrates and encourages diversity of thought and people, and clearly defines enforced punishments for those who act in discriminatory or ill-intentioned ways. There are a plethora of examples of different types of code of conduct out there, so do your research and pick the one that best aligns with how you and your community members want the developers around your open source project to behave — or create your own.

The README file is meant to direct users to where they need to go, either with code samples, set-up instructions or links to more in-depth forms of documentation. These are just some of the topics you can include in your README, but there are so many others that might be right for your particular project. Don’t be afraid to take a look at other repos, whether or not they’re similar to yours or completely different, and borrow ideas whenever you think it makes sense!

Helping Others Contribute

Whether or not you expect anyone to contribute to your project, you should be prepared for the possibility of others wanting to help your cause. And when that happens, your contributing guide will show those helpers exactly how they can get involved. This guide, usually in the form of a CONTRIBUTING.md file, should include information on how one should submit a pull request or open an issue for your project and what kinds of help you’re looking for (bug fixes, design direction, feature requests, etc.).

GitHub pull requests tab with contributing guidelines link
Contributing guidelines get called out automatically by GitHub in the “Pull Requests” tab, making it easier for new contributors to find the information they need.

The following are some examples of information you can include in your contributing guidelines.

Instructions on how to work in the codebase locally. This is for anyone who wants to make code contributions. It should include any start or run scripts, suggestions for how to navigate the codebase, code style expectations and other details you deem necessary to successfully have changes incorporated into the project.

Testing instructions. If your codebase has tests that need to pass for any PR to be considered, include instructions on how to run tests for your project and how to write additional tests for the contributor’s proposed changes.

An issue template. Clearly define the information you want included in new issues. Details like the kind of issue being filed (bug, feature request, documentation change), OS version, browser, language/environment specifics and steps to reproduce can save you and the contributor hours of debugging. To help reporters write a helpful issue, consider including an issue template that will prepopulate a new issue with the information you expect to be included.

A GitHub issue template example
With an issue template, whenever a new issue is opened it will be pre populated to help guide the reporter.

A section on your repository’s license. Having a license protects you, your contributors and anyone who uses your work. Knowing which license will work for you and your audience is probably the most difficult part of checking this requirement off, but choosealicense.com and tl;dr legal make it easier for anyone to make an informed decision.

Going the Extra Mile

Having a thorough README, contributing guidelines and helpful templates are just the beginning of getting your OSS project ready for launch. While these can be considered the “bare bones” of any project worth its salt, there are plenty of additional steps you can take to create a project that is both pleasant to use and to contribute to.

Make sure your codebase is secure. Your code could be used or seen by tens, hundreds or maybe even thousands of people. Take precautionary steps to secure your accounts by following best practices like keeping your passwords and secrets out of your git history, running regular security scans on your codebase and keeping your dependencies up-to-date with the latest security packages. Luckily, GitHub makes this task easier by providing automatic security alerts for public repositories so you can stay up-to-date on the latest vulnerabilities in your projects.

Write and enforce tests. Including tests in your codebase can help reduce the possibility of accidentally introducing bugs or making a breaking change; This is especially important in a codebase where many people are working simultaneously. If you’re accepting Pull Requests from contributors, make sure you clearly define when and how to include tests.

Use a code linter. Linters can help catch the small mistakes, like using a tab instead of a space, and the big mistakes, like when forgetting a semicolon can be absolutely detrimental (*cough* PHP *cough*). They also give you the power to enforce certain coding styles without having to personally enforce coding styles character by character.

Include git hooks. Git Hooks are commands or scripts that are automatically run before certain actions take place in Git. They can hook into several different git commands — commit, push, merge, etc. — and are used to automatically run processes that you deem necessary before or after these commands. For example, many engineers use git hooks that run tests before a commit or push; If the tests fail, the commit or push will fail. This adds another level of protection to a project by automatically rejecting any code changes that break tests or fail linting standards, before ever making it into a PR or the master branch.

Add Continuous Integration/Development tools. CI/CD are great for automating the mundane tasks associated with reviewing, maintaining and shipping code. This could be anything from assigning someone to perform a code review on a PR to deploying a branch to a staging environment. There’s an ocean of resources and tooling available for any type of project, so I won’t go into too much detail here. But the GitHub Apps Marketplace is a smorgasbord of tools you can integrate into any project.

Include Editor/IDE configuration files. Helping your contributors set up their code editors or IDE to work within the constraints of your project’s can reduce a contributor’s time spent toying with settings. Popular (and free) text editors like VSCode and Atom allow you to control settings like whether to use tabs or spaces in a project, running linters automatically on save and many others.

Get to it

The basics covered above are only the tip of the iceberg, but they will help get you well on your way to creating a well-organized, maintainable and accessible open source project. However, there’s no one right way to set up or maintain your project, so continue to do some research to find out what works best for you and your codebase. Pull inspiration from OSS repos that you’ve used or have contributed to, or ask your colleagues and peers for any advice they can share.


How to Take Your Open Source Project from Good to Great was originally published in Times Open on Medium, where people are continuing the conversation by highlighting and responding to this story.

18 Aug 03:48

The Best USB Car Charger

by Nick Guy
The Best USB Car Charger

For a few bucks, a good USB car charger can charge your phone and other devices faster than the port that came in your car. After testing more than 60 models, we think the best car charger is the dual-port Nekteck PD 45W Type-C Car Charger. You can fast-charge phones, tablets, and laptops from its USB-C port, and simultaneously charge a second phone on its USB-A port. No other charger offers as much power for a better price.

18 Aug 03:48

That Native App Is Probably Just an Old Web Browser

Chris Hoffman, How-To Geek, Aug 15, 2019
Icon

As this article says, "Many of the applications you run on Windows, Mac, and even Linux consist of outdated pieces of Chromium, the engine that forms the basis for Google Chrome." I cvovered this in a presentation a few months ago called Electron Express. This article suggests that these browser instances are out of date, but this is true of any application. More of an issue is the size and speed of Electron-based applications, but the ones I use (such as, say, Visual Studio Code) run just fine. To me, the larger issue is how to merge desktop and mobile applications, and how to synchronize data across applications.

Web: [Direct Link] [This Post]
18 Aug 03:47

My Friend Anna: The True Story of a Fake Heiress

Rachel Williams was a young, ambitious assistant at Vanity Fair when, on a girls’ night out, she met Anna Delvey. Delvey was nice, friendly, and happened to be rich: she was in New York to set up a small art foundation and to buy a building to house its gallery and performance space. Rachel and Anna hit it off; they started working out together, meeting for drinks, meeting for dinner. Anna was generous about picking up the tab, and gracious in letting Rachel occasionally pay for things and handle arrangements. Then Anna took Rachel to Marrakesh along with her personal trainer and her videographer. It was lots of fun.

Something was wrong with Anna’s credit card, and soon something is very wrong with everything and Rachel owes almost $70,000 in hotel charges on her corporate Amex. It turns out that Anna wasn’t an heiress at all. Solving this becomes quite a puzzle.

One thing that’s fascinating here is that it's not quite clear whether Anna was actually running a long con. If so, she doesn't seem to have had a crew, or to have known a lot about the business. Yet she was very good at fooling a lot of people for a long time, and it makes for an enthrallingly good yarn.

18 Aug 03:46

A Picture of Progress

by Stephen Rees

I have been following the Washington State Department of Transportation on Flickr for quite a while. They are a remarkably progressive organisation and their photographers have captured some amazing images. But this evening they excelled themselves.

I am not going to comment I am just going to post the picture and their text.

Before and After photo of the I-5 and SR 16 interchange
Before and After photo of the I-5 and SR 16 interchange

“It’s easy to forget what the I-5/SR 16 interchange looked like before efforts began to widen the interchange. We found two photos that really show the comparison. The historic Nalley Valley interchange first opened to traffic in 1971. At the time, the average daily traffic volumes for both directions of SR 16 were 40,000 vehicles. Fast forward to 2018, and that number has tripled.”

And because I did not know where this is, here is a map

I5 SR16 Intersection Tacoma
18 Aug 03:45

Making Greenland Great Again

by Josh Bernoff

News reports suggest that President Trump is interested in purchasing the island of Greenland which is currently a possession of Denmark. We join the President at his first campaign rally in Nuuk Stadium, capacity 2,000, a football stadium in Greenland’s largest city. Wow. What a warm welcome! Not an empty seat in the house. Seems … Continued

The post Making Greenland Great Again appeared first on without bullshit.

18 Aug 03:44

How to Extract Audio from a Video

Richard Byrne, Free Technology for Teachers, Aug 16, 2019
Icon

This video from Richard Byrne explains how to extract the audio from a video. This way you could add it to a podcast. He uses an Apple computer and GarageBand. I have neither. So I created a video explaining how to convert an MP4 video to an MP3 audio using Windows 10 and ffmpeg. The text in this video is a lot clearer than my last one, and it's only 10 minutes long.

Web: [Direct Link] [This Post]
18 Aug 03:43

The Age Machine

by peter@rukavina.net (Peter Rukavina)

When Oliver and I were in Wolfsburg in 2010, we visited Phaeno, the excellent science museum. One of the exhibits there was an “age machine” that would snap a photo of you and apply an algorithm that would project your appearance in the future; it’s a technology that’s now reached our phones via FaceApp.

This photo, by Daniel Burka, featured in this photo montage of silverorange’s 20th anniversary, looks like I’ve been through the age machine filter, but it’s really just the way I look at age 53 (Oliver’s youthful countenance beside me only serves to accentuate my oldness) .

Photo of me at the Silverorange 20th Anniversary

My father and I look nothing at all alike, but I realize, looking at this photo, that the topography of our aging is similar. I can also see hints of my mother, and of my grandparents, on both sides.

Life itself is the ultimate age machine, so perhaps rather than recognizing my actual ancestors, all I’m really seeing is getting older as it’s universally expressed.

18 Aug 03:43

The Exercise Power of EBikes

by Sabrina Hockett

In the last week, a study by Brigham Young Professors has caused major outpouring of support in favor of ebikes and debunks the long held myth that ebikes do not provide a form of exercise. Over the last few months, studies have falsified this claim and state ebikes ARE a great form of exercise. Check out the latest Blix Journal to learn what experts have to say about exercise on an ebike and how Blix ebikes can help you spend more time riding!

                                                                               

Recent Findings:

As discussed by Men's Health, Electrek, and The Verge, the study by researchers at Brigham Young University reveals that ebikers "got nearly as strenuous a workout form an ebike as riding a traditional bike without pedal assistance."Additionally, "riding both types of bikes 'placed the vast majority of participants in the vigorous-intensity heart rate zone'." More specifically, the heart rate of ebike riders was "93.6% of those riding conventional bikes." This suggests that ebikes are a super great form of cardiovascular exercise, even for experienced riders who are already in great physical shape. Whether you are just starting or continuing your riding career, don't skip the ebike because you don't think you will get a good exercise, rather choose it because you'll have the benefit of having a FUN workout! 

Another recent study by the Transportation Research Interdisciplinary Perspective, focused on the "average energy expenditure of different forms of transportation including riding an electric bicycle."  After analyzing over 10,000 adults, a general trend was found that "e-bikers use their bikes more, go longer distances, and often substitute their ebike for driving or transit."

Because of this tendency to ride more often and longer, ebike riders are actually on average expending more energy and thus, getting more exercise. Another fun finding is that ebikes are encouraging older adults, people with sedentary lifestyles, and past injuries to get back on a bike and exercising. Ebikes can be a way "to overcome the 'workouts are too difficult' problem." Imagine the possibilities!

Blix thinks it is clear, these studies encourage us all "to put to bed that idea that e-bikes are somehow cheating."

 Blix Sol riding

How do Blix eBikes Promote Exercise:

The study also mentions that in order to get this type of exercise, riders must use pedal assist and not just the throttle. Blix designed their models to have 5 levels of assist that allow riders to choose how much exercise they want to get and when it is appropriate for them to use more or less assist based on their riding needs. 

Blix ebikes are also designed to make commuting easy and have riders carry everything they might need. This encourages replacing the car, riding more frequently, and often riding for extended distances. The Packa is also designed to help families or people with more cargo to switch up their routine and ride their bike instead of drive as well. Each time the ebike is chosen over a car, not only are you reducing your carbon footprint, you are increasing your calorie burn!

 Blix electric bikes make exercise fun, and in no way should the thought that you are "cheating" by riding an ebike cross your mind.

Happy Exercising!

                                                                                            

 Check out Blix Ebike Models here!

Learn how an ebike increases freedom here!

Follow us:

Blix Owners Group

Instagram

18 Aug 03:42

How do you verify that PyPI can be trusted?

by Brett Cannon

A co-worker of mine attended a technical talk about how Go's module mirror works and he asked me whether there was something there that Python should do.

Now Go's packaging story is rather different from Python's since in Go you specify the location of a module by the URL you fetch it from, e.g. github.com/you/hello specifies the hello module as found at https://github.com/you/hello. This means Go's module ecosystem is distributed, which leads to interesting problems of caching so code doesn't disappear off the internet (e.g. a left-pad incident), and needing to verify that a module's provider isn't suddenly changing the code they provide with something malicious.

But since the Python community has PyPI our problems are slightly different in that we just have to worry about a single point of failure (which has its own downsides). Now obviously you can run your own mirror of PyPI (and plenty of companies do), but for the general community no one wants to bother to set something up like that and try to keep it maintained (do you really need your own mirror to download some dependencies for the script you just wrote to help clean up your photos from your latest trip?). But we should still care about whether PyPI has been compromised such that packages hosted there have not been tampered with somehow between when the project owner uploaded their release's files and from when you download them.

Verifying PyPI is okay

So the first thing we can do is see if we can tell if PyPI has been compromised somehow. This takes on two different levels of complexity. One is checking if post-release anything nefarious has occurred. The fancier step is to provide a way for project owners to tell other folks what they are giving PyPI to act as an auditor.

Post-release trust

In a post-release scenario you're trusting that PyPI received a release from a project owner successfully and safely. What you're worrying about here is that at some later point PyPI gets compromised and someone e.g. swapped out the files in requests so that someone could steal some Bitcoin. So what are some options here?

Trust PyPI

The simplest one is don't worry about it. 😁 PyPI is run by some very smart, dedicated folks and so if you feel comfortable trusting them to not mess up then you can simply not stress about compromises.

Trust PyPI up to when you froze your dependencies

Now perhaps you do generally trust the PyPI administrators and don't think anything has happened yet, but you wouldn't mind a fairly cheap way that's available to today to make sure nothing fishy happens in the future. In that case you can record the hashes of your locked dependencies. (If you're an app developer you are locking your dependencies, right?)

Basically what you do is you have whatever tool you're using to lock your dependencies – e.g. pip-tools, pipenv, poetry – record the hash of the files you depend on upon locking. That way in the future you can check for yourself that the files you downloaded from PyPI match bit-for-bit what you previously downloaded and used. Now this doesn't guarantee that what you initially downloaded when you froze your dependencies didn't contain compromised code, but at least you know going forward nothing questionable has occurred.

Trust PyPI or an independent 3rd-party since they started running

Now we're into the "someone would have to do work to make this happen" realm; everything up until now you can do today, but this idea requires money (although PyPI still requires money to simply function as well, so please have your company donate if you use PyPI at work).

What one could do is run a 3rd-party service that records all the hashes of files that end up on PyPI. That way, if one wanted to see if the hash from PyPI hasn't changed since the 3rd-party service started running then one could simply ask the 3rd-party service for the hash for whatever file they want from PyPI, ask PyPI what they think the hash should be, and then check if the hashes match. If they do match then you should be able to trust the hashes, but if they differ then either PyPI or the 3rd-party service is compromised.

Now this is predicated on the idea that the 3rd-party service is truly 3rd-party. If any staff is shared between the 3rd-party service and PyPI then that's a potential point of compromise. This is also assuming that PyPI has not already been compromised. But at least in this scenario the point in time where your trust in PyPI starts from when the 3rd-party service began running and not when you locked your dependencies.

You can also extend this out to multiple 3rd-parties recording file hashes so that you can compare hashes against multiple sources. This not only makes it harder by forcing someone to compromise multiple services in order to cover up a file change, but if someone is compromised you could choose to use quorum to decide who's right and who's wrong.

Auditing what everyone claims

This entire blog post started because of a Twitter thread about how to be able to validate what PyPI claims. At some point I joked that I was shocked no one had mentioned the blockchain yet. And that's when I was informed that Certificate Transparency logs are basically what we would want and they use something called Merkle hash trees that started with P2P networks and have been used in blockchains.

I'm not going to go into all the details as how Certificate Transparency works, but basically they use an append-only log that can be cryptographically verified as having not been manipulated (and you could totally treat recording hashes of files on PyPI as an append-only log).

There are two very nice properties of these hash trees. One is it is very cheap to verify when an update has been made that all the previous entries in the log have not changed. Basically what you need is some key values from the previous version of the hash tree so that when you add new values to the tree and re-balance it's easy to verify the old stuff is still the same. This is great to help monitor for manipulation of previous data while also making it easy to add to the log.

The second property is that checking an entry hasn't been tampered with can be done without having the entire tree available. Basically you only need all nodes along a path from a leaf node to the root plus all immediate siblings of those nodes. This means that even if your hash tree has a massive amount of leaf nodes it doesn't take much to audit that a single leaf node has not not changed.

So all of this leads to a nice system to help keep PyPI honest if you can assume the initial hashes are reliable.

Release-in-progress trust

So all of the above scenarios assume PyPI was secure at the time of initially receiving a file but then potentially was compromised later. But how could we check that PyPI isn't already compromised?

One idea I had was that twine could upload a project releases' hashes to some trusted 3rd-parties as well as to PyPI. Then the 3rd-parties could either directly compare the hashes PyPI claims to have to what they were given independently or they could use their data to create that release's entry in the append-only hash tree log and see if the final hash matched what PyPI claims. And if a 3rd-party wasn't given some hashes by the project owner then they could simply fill in with what PyPI has. But the key point is that by having the project owner directly share hashes with 3rd-parties that are monitoring PyPI we would then have a way to detect if PyPI isn't providing files as the project owner expected.

Making PyPI harder to hack

Now obviously it would be best if PyPI was as hard to compromise as possible as well as detecting compromises on its own. There are actually two PEPs on the topic: PEP 458 and PEP 480. I'm not going to go into details since that's why we have PEPs, but people have thought through how to make PyPI hard to compromise as well as how to detect it.

But knowing that a design is available, you may be wondering why hasn't it been implemented?

What can you do to help?

There is a major reason why the ideas above have not been implemented: money. People using Python for personal projects typically don't worry about this sort of stuff because it just isn't a big concern, so people are not chomping at the bit to implement any of this for fun in their spare time. But for any business relying on packages coming from PyPI, it should be a concern since their business relies on the integrity of PyPI and the Python ecosystem. And so if you work for a company that uses packages from PyPI, then please consider having the company donate to the packaging WG (you can also find the link by going to PyPI and clicking the "Donate" button). Previous donations got us the current back-end and look of PyPI as well as the recent work to add two-factor authentication and API tokens, so they already know how to handle donations and turning them into results. So if anything I talked about here sounds worth doing, then please consider donating to help making it so they can happen.

18 Aug 03:42

Ted Chiang :: Exhalation #nowreading

by Volker Weber

Annotation 2019-08-17 115310

Eine Empfehlung von Barack Obama. Gestern angefangen und ich kann es nicht mehr weglegen. Tolle Short Stories!

More >

18 Aug 03:42

Market, Purity, Riverview, Receiver

by peter@rukavina.net (Peter Rukavina)

Oliver and I cycled the entire Local Food Trail this morning: from home to the Charlottetown Farmers’ Market, down to Purity Dairy for milk and butter, a double back to Riverview Country Market, and then to Receiver Coffee Brass Shop for bread.

Oliver was much more comfortable on his bike this morning, zipping along beside me and sometimes overtaking. Every time we met oncoming cycle traffic he rang his bell in solidarity and gave a hearty “good morning.”

The only debacle, and it was a minor one, was that the hex bolts that hold my handlebars on came loose as we headed homeward through Joe Ghiz Park. I had high hopes that I’d be able to use the bicycle repair station in the park to get myself sorted, but the hex key, if it was ever there, had been vandalized off.

Fortunately, as we entered the Water Street gravel storage lot to loop around to Receiver, we encountered more professional-grade cyclists, and I was able to borrow a hex set and tighten things up.

You wanna know the greatest thing about cycling to the market? It’s not the carbon we’re not emitting, it’s not the exercise, it’s not our membership in the grand fellowship of cyclists (although all those things are great). It’s that Oliver and I can do it together. Cycling is an inherently social practice in a way that driving a car is not.

Given that Oliver has been cycling for only three weeks, and that he’s naturally taken to this new mode of getting around on Saturday morning, I feel confident that I can say to you that if you live in Charlottetown and you’re still driving your car to the market, you’re doing something wrong.

Please consider following his lead: confront the innumerable reasons you will inevitably come up with for why you can’t possible not take your car, get your bicycle out of the shed, and join us on the trail next Saturday.

18 Aug 03:41

Brainio - Darren McDonald

I just stumbled upon this app that is in closed beta. From the blog on their website, it seems the philosophy behind the app is similar to thebrain. Anyway, have a look ...

https://blog.brainio.com/our-story/what-is-brainio/
18 Aug 03:41

"I'd like one Factory Coffee, but charge me for two..."

by peter@rukavina.net (Peter Rukavina)

In a way that keeps one foot in each of North American and European café billing practices, Island Chocolates sometimes takes money up front for coffee, and sometimes advises “just take a seat,” with the implication one should pay afterwards.

Walking in the front door this afternoon, on my weekly break while Oliver is making art with Jennifer Brown, I suddenly realized that two weeks ago things had gone in the “have a seat” direction but that I hadn’t actually paid on the way out.

I penitentially declared my sin at the cash today, and was thanked for my honesty.

18 Aug 03:41

Weeknotes 32 & 33/2019

by Doug Belshaw

I’m composing this from Boston Logan airport before an overnight flight to Manchester, and a drive back home. Team Belshaw has been in New England on holiday for the past couple of weeks. In many ways it’s felt a lot longer than that.

Let’s deal with the positives first. Our experiences here have been the kind we’ll remember for the rest of our lives. The kids have got on well together — gloriously screen-free, apart from the occasional movie on a TV in an Airbnb.

The weather has been exactly what we hoped for: hot without being scorching. We travelled clockwise from Boston, to Cape Cod, to Providence, Rhode Island. From there we went up to Vermont and then across to Maine. Finally, we drove back to Boston to fly home.

It’s the most expensive holiday we’ve ever been on for a couple of reasons. First, New England is an expensive place to take a vacation in there summer. We managed to score super-cheap flights thanks to Jack’s Flight Club, but the accommodation cost a lot more than we were expecting.

Second, it was announced a few days into our holiday that the British pound was the lowest it had been against the US dollar since 1985. In these kinds of situations, you can decide to economise as much as possible, or just enjoy your holiday and deal with the consequences when you get home. Unusually, we decided to do the latter.

Some of the many memories I’ll take back with me:

  • Going whale-watching off Cape Cod at the same time as starting to read Moby Dick for the first time.
  • Playing ‘baseball’ with a foam bat-and-ball pretty much everywhere we stayed.
  • Visiting, and photographing, beautiful old lighthouses along the coast of Maine and Cape Cod.
  • Kayaking near Cape Elizabeth (it was our daughter’s first time!)
  • Paddling in Queechee Gorge in Vermont and imagining what it must have been like hundreds of years ago.
  • Eating whole lobster and feeling like we were eating an alien!

We’d definitely come back, especially to Cape Cod which we absolutely loved.


Now then, while I was away, the plan was to uninstall all messaging and social media apps from my phone. It was supposed to be a break from what can feel very much like an always-on, hyperconnected lifestyle back home.

As I’ve already written, we stepped off the plane to some tragic news about my good friend Dai Barnes. Given that Twitter is the place many know him from, it was important to try and balance honouring his memory with being present for my family.

As a result of being on Twitter, I couldn’t help but become briefly embroiled in a debate which happened amongst educators in Twitter. I didn’t originally engage with it directly, but rather reminded white guys with a decent following that they have responsibilities via this tweet:

If you're a white male with a bunch of followers, it's probably worth:1. Telling people that you're anti-racist, anti-homophobic, and anti-transphobic (if, indeed, you are)2. Acting like it.#its2019people

(I delete my tweets every month, so this is a screenshot)

Unfortunately, instead of any kind of nuance or healthy debate, the whole thing descended into A Hashtag About Which People Should Take Sides™. I’ve been a little skeptical when people have called Twitter a ‘rage machine’ because of the move they’ve made towards an algorithmic timeline. Well, I was wrong to be doubtful; this was that in action.

If you want to read more on the whole debacle, I’d recommend that you read Shame Cycles and Twitter Rage by Sherri Spelic, and Edutwitter, Witches, and Whiteness by Michael Cole.


Next week will be all about the jet lag and catching up with developments with MoodleNet while I’ve been away. I’ve been mostly Telegram-free all holiday, so I guess I should be thankful for small mercies.

18 Aug 03:10

Quebec’s first all-electric city transit bus with a 250 km range launches in Laval

by Brad Bennett

The Société de transport de Laval (STL) has announced that Quebec’s first all-electric bus is coming to Laval for testing. 

The STL plans to launch a 100 percent all-electric bus line in the summer of 2020, so this bus is just the first step in making that happen.

The new line will comprise of 10 electric busses each with a range of 250km. The buses are estimated to reduce greenhouse gas emissions by 70 to 80 tonnes a year, according to the STL’s press release.

The Canadian-based New Flyer company which is also working with the Government of Ontario and the Toronto Transit Commission to bring electric buses to other Canadian cities.

The STL is excited about these buses since they’ll be much quieter than a combustion engine model, and since there is no engine or exhaust the transit company is expecting a 20 percent drop in maintenance costs.

Source: Société de transport de Laval

The post Quebec’s first all-electric city transit bus with a 250 km range launches in Laval appeared first on MobileSyrup.

18 Aug 03:09

Apple Watch maintains steady lead in North American smartwatch market: report

by Bradly Shankar

Apple continues to dominate its competition in the smartwatch space, according to a new report from technology market analyst Canalys.

In the second quarter of 2019 (Apple’s Q3), the tech giant held a 37.9 percent smartphone market share, notes Canalys. In terms of specific figures, this works out to 2.9 million Apple Watches shipped in North America during the second quarter, marking a 32 percent growth from the same period last year. Altogether, North America accounted for 60 percent of Apple’s total of 4.7 million wearable shipments in Q2 2019.

In second place in Q2 was Fitbit with a 24.1 percent market share, while Samsung placed third with 10.6 percent. It’s important to note that Canalys is factoring in all wearable shipments, which includes fitness trackers from Fitbit and Samsung. Therefore, Apple’s market share would likely be even higher when strictly comparing smartwatch shipments.

In the report, Canalys’ Jason Low wrote about other companies’ struggles to catch up to Apple.

“Vendors are racing to announce LTE connectivity for their smartwatches and it is becoming increasingly difficult to challenge Apple, which has been laying robust groundwork for cellular-connected devices,” said Low. “Apple is poised to reinforce its leading position by including aggregated health data, which can reveal new trends and insights, both for consumers and the broader healthcare ecosystem.”

Apple doesn’t announce smartwatch sales in its quarterly earnings reports, leaving it to firms like Canalys to reveal this kind of market data.

In related news, the Apple Watch Series 4 recently received its long-awaited electrocardiogram feature in Canada.

Source: Canalys Via: 9to5Mac

The post Apple Watch maintains steady lead in North American smartwatch market: report appeared first on MobileSyrup.

18 Aug 03:09

Here’s how Apple’s AirPods would look if designed by original Mac team

by Bradly Shankar
Unum headphones

In the ’80s, Frog Design became well-known for designing Apple’s early computers.

Now, the original Mac design team has tried its hand at a modern Apple product — the AirPods.

While Apple’s in-ear buds have become popular, Frog Design has opted for an open-hoop concept called “Unum.” The reasoning behind this, according to the company, is that in-ear buds can take you too far out from the world around you.

“In the future, voice assistants will become so ubiquitous that the constant connection to our personal headphones will be too isolating of a social experience,” a Frog Design spokesperson told Digital Trends. “Consumers will need headphones that support long augmented audio experiences without disrupting their real-world communications.”

With its open ring design, the Unum can channel sound into your ear while still leaving your ears exposed. Part of the reason for doing so is because it “signals a new social etiquette for the future,” says Frog Design. As the firm notes, having headphones in can sometimes be construed as a non-verbal cue for people to not speak to you. The design of the Unum is intended to eliminate this communication barrier.

As it stands, the Unum is only a concept. Therefore, there’s no guarantee it will ever be produced and sold commercially. Still, it’s an interesting look at how headphones — Apple’s AirPods or otherwise — could evolve over time.

Via: Digital Trends

The post Here’s how Apple’s AirPods would look if designed by original Mac team appeared first on MobileSyrup.

18 Aug 03:08

Major Bluetooth security flaw exposes devices to hackers

by Bradly Shankar

Researchers have discovered a significant Bluetooth security vulnerability that leaves devices susceptible to hacking.

The flaw was discovered by a group consisting of researchers from the CISPA Helmholtz Center, Information Security, Singapore University of Technology and Design and the University of Oxford.

The flaw, referred to by the researchers as the “Key Negotiation of Bluetooth” (KNOB) attack, allows bad actors to interfere with the Bluetooth pairing process. In practice, hackers are able to make the connection’s encryption shorter than what it’s supposed to be, rendering the devices vulnerable to attacks. Through this exposure, hackers can listen into and even alter the content of the Bluetooth transmission.

However, the researchers note that hackers need to be nearby in order to do this and will only have “a narrow time window” to pull it off. Further, the vulnerability doesn’t apply to Bluetooth Low Energy (BLE) devices like AirPods, only standard devices supporting Bluetooth BR/EDR. Therefore, the team says there’s been “no evidence” that the vulnerability has been used maliciously.

Still, the report sheds light on a potentially dangerous vulnerability in a commonly used form of technology. At this point, Bluetooth can’t fix what’s already happened, so it will have to increase security going forward to prevent similar problems from occurring.

Source: Usenix

The post Major Bluetooth security flaw exposes devices to hackers appeared first on MobileSyrup.

18 Aug 03:08

Do you care about the 3.5mm headphone jack?

by Brad Bennett

We’re inching closer to the end people. The Note 10 and 10+ are on the cusp of being released to the public, and it recently dropped the headphone jack.

This adds another phone to the growing pile of devices without a headphone jack. Samsung used to be the stronghold on headphone jacks since all of its flagships still featured the legacy headphone port.

Does the Note 10-series dropping the port suggest that the Korean company is moving away from the headphone jack? Hopefully not, but it could be the beginning of the end.

That leads us to question if we need the headphone jack anymore? Sure, it’s nice to have, but once you get a set of wireless headphones, it’s easy to forget about it.

So let us know in the comments how you feel about the headphone jack being gone from the Note 10 and if you still have a phone with a 3.5mm port.

The post Do you care about the 3.5mm headphone jack? appeared first on MobileSyrup.

18 Aug 03:08

Amazon’s Online Bezos Brigade Unleashed On Twitter

by Aric Toler
mkalus shared this story from bellingcat.

On August 14, a Twitter thread that included a small army of “Amazon FC Ambassadors” went viral, bringing to light Amazon’s year-long social media brand ambassador program.

What exactly are these “Amazon FC Ambassadors”, how many of them are there, and are they actually real people?

The Amazon Research Agency

These “Amazon FC Ambassadors” all ostensibly work at Amazon Fulfillment Centers, which employ tens of thousands of workers and have faced widespread allegations of a “dehumanizing” workplace environment.

Last year, Amazon rolled out a program where employees at these fulfillment centers (warehouses) are able to also work as brand ambassadors to describe their experiences working at Amazon. A number of media outlets reported on this new program last year after the first wave of Ambassadors sent out bizarre tweets promoting Amazon’s workplace conditions.

Per the 2018 reports, these Ambassadors were given “an extra paid day off and a [$50] gift card” for their efforts in volunteering to defend Amazon from their online detractors.

How Many Ambassadors Are There?

We started looking for every real Amazon FC Ambassador account on Twitter, and have compiled our results here. If you find additional accounts, please add them as suggestions, and we’ll keep them in. Please note that there are a number of parody FC ambassador accounts that were started today (August 15th), and any account that was started in August 2019 should be considered a likely parody/fake account.

Spreadsheet of suspected / confirmed Amazon FC Ambassador accounts

We’ve found 53 Ambassador accounts so far, including 29 American accounts, five Spanish, seven German, four British, four French, two Polish, and three Italian “ambassadors.”

Our search for these accounts used the following methods and search terms:

source:sprinklr

This search term on Twitter will only bring back tweets sent from the Sprinklr platform–an enterprise marketing tool used by nearly all Amazon FC Ambassadors.

url:amzn.to

Many Amazon FC Ambassadors use this shortened link when sending URLs for Amazon Fulfillment Center Tours when replying to critical comments.

“Amazon FC Ambassador” or “Portavoce FC Amazon” or “Amazon FC Ambassadeu” or “Amazon FC Botschafter” or “Embajador Amazon FC” or “Amazon FC Ambasador”

All Amazon FC Ambassadors have one of these phrases in their display name, making it easy to sort out workers from different countries. Important to add the until:2019-08-14 operator with this search to filter out parody accounts.

until:2019-08-14

Adding this search operator to all other terms described here is important to weed out parody accounts and jokes people are making about the Amazon FC Ambassador program, which started in high volume on August 15th.

Hashtags: #amazonvestlife; #deliveringsmiles; #behindthesmiles; #proudamazonian

These hashtags were used by many Amazon FC Ambassadors accompanying their tweets

Hashtags: #bcn1; #dtm2; #bhx4; #passocorese; #ber3; #wro2

These hashtags are used by many Amazon FC Ambassadors working in European fulfillment centers, namely in Barcelona, Spain; Dortmund, Germany; Coventry, England; Passo Corese, Italy; Brieselang, Germany; and Wroclaw, Poland.

Often, it isn’t too hard to track down these brand ambassadors, as some will tweet at each other or include their names from promotional material, as Ruben helpfully provided:

Sprinklr Stations

A closer examination at the tweets from the dozens of brand ambassadors reveals a few trends — they all use Sprinklr, an enterprise marketing tool.

At the bottom of each tweet, the platform used for Twitter is displayed — for most people, this will be “Twitter for iPhone”, “TweetDeck”, “Twitter for Android”, or “Twitter Web App”. For all of the Amazon FC Ambassadors, it’s Sprinklr, showing that they are all logging into the same enterprise marketing app, certainly provided on laptops or computers at fulfillment centers participating in the ambassador program.

A tweet from a Spanish Amazon worker shows a laptop used by employees, possibly showing the Sprinklr dashboard.

Another employee’s tweet from the Coventry, England fulfillment center shows a few PCs that are also used for sending out tweets:

It’s possible that some Amazon FC Ambassador tweets are being sent out from an Amazon corporate office, but it seems more likely that the employees participating in the program are using a Sprinklr dashboard from the fulfillment centers themselves.

Zombie Ambassadors?

While many of the employees tweeting out Amazon’s praises seem to be actual people, some are either using fake identities or sending messages out from recycled or incorrect accounts. As one person noted, Amazon FC Ambassadors rotate out accounts, reanimating them with new identities:

We can also see this with Michelle/Rafael, who went from a woman named Michelle who loves gardening and cooking to a Filipino man named Rafael.

However, not every dead account is brought back to life, as seen with an old tweet showing a now-deleted @AmazonFCAgatha account.

While this account zombification is quite bizarre to see, it is likely being done in order to cut down on maintaining new accounts that require SMS and email verification. A quick survey of some of the Amazon FC Ambassador accounts shows that they all use standardized emails (fc______@amazon.com) and have actual phone numbers attached to them for SMS verification.

Conclusion

It’s hard to imagine how and why Amazon decided that such volunteer brand ambassadors would be a good idea — especially considering they almost all write the exact in the same manner and use the same hashtags and similar photos in their tweets.

While there may be different faces behind these accounts, it is hard to tell them apart, and their activities all seem to be thematically orchestrated from a corporate office. In reviewing ambassador accounts, only a few English-language participants stood out as having any personality and not using near-perfect capitalization and punctuation.

If you find any additional ambassador accounts, please add them as suggestions in our Google Sheet, or include them as a comment to this article.

 

Update:

An Amazon public relations staffer provided this statement to our general contact email address.

The post Amazon’s Online Bezos Brigade Unleashed On Twitter appeared first on bellingcat.

15 Aug 14:22

Kangaroos are hopping through the snow as an Antarctic cold front brings historic snowfall to Australia pic.twitter.com/3fIgDNLv12

by nowthisnews
mkalus shared this story from nowthisnews on Twitter.

Kangaroos are hopping through the snow as an Antarctic cold front brings historic snowfall to Australia pic.twitter.com/3fIgDNLv12




321 likes, 134 retweets
15 Aug 14:22

UK could unilaterally exit EU in next 10 days, senior Tory MP says | Politics

mkalus shared this story from The Guardian:
Considering that Article 50 talks about “extension” to the date I am not quite sure why the UK couldn’t just leave earlier if it so chooses. The entire reason for the two year period was to time box the process and give it a definitive end.

A senior Conservative MP has raised the idea that Boris Johnson could unilaterally withdraw the UK from the European Union in the next 10 days to try to avoid attempts by parliament to block a no-deal Brexit.

Tom Tugendhat, who chairs the Commons foreign affairs committee, put forward a possible chronology of a unilateral withdrawal by 24 August followed by an immediate general election, with the Irish border issue then solved by a Northern Ireland-only backstop.

The plan, if carried out, would be hugely controversial, and would take companies and the financial markets by surprise before no-deal preparations had been completed.

However, Tugendhat, the MP for Tonbridge and Malling, is a respected and well connected backbencher. He was among 20 Conservative MPs, alongside the former chancellor Philip Hammond, who have written to Johnson accusing him of setting the bar too high in negotiations with the EU to have a hope of getting changes to a deal.

In a tweet, Tugendhat asked:

In response to tweeted questions about the repeated objections by the Democratic Unionist party to any regulatory provision that applied only to Northern Ireland, Tugendhat argued that a Johnson government could ignore this if it won a majority in the subsequent election, and that a referendum would give the idea credibility.

Such a plan, particularly the idea of unilateral withdrawal without any warning followed by an immediate election, would seem hugely politically risky, and could prompt a furious reaction from MPs, businesses and many members of the public.

However, No 10 is known to be concerned that the Commons could find a way to block Johnson’s much-promised departure by 31 October if it involved leaving the EU without a deal, whether through taking control of the parliamentary order paper or means such as a no-confidence vote in the government.

Steve Peers, a professor of EU law at the University of Essex, said he did not think such a plan was feasible. While changing the date of withdrawal could be done via so-called secondary legislation, not voted on by MPs, he tweeted, the EU Withdrawal Act states it must happen “in accordance with article 50(3) of the Treaty on European Union”, which sets out the EU’s constitutional basis.

Section 50(3) of the treaty says an extension to the standard two-year wait for departure under article 50 can only take place if “the European council, in agreement with the member state concerned, unanimously decides to extend this period”. This indicated any change of date would need agreement, he said.

Peers wrote: “So the EU would have to agree to change the date. ‘Unilateral’ change of date is therefore illegal.”

15 Aug 14:20

Training the next generation of ethical techies

by Ethan

My friend Christian Sandvig, who directs the Center for Ethics, Society, and Computing at the University of Michigan, started an interesting thread on Twitter yesterday. It began:

“I’m super suspicious of the “rush to postdocs” in academic #AI ethics/fairness. Where the heck are all of these people with real technical chops who are also deeply knowledgeable about ethics/fairness going to come from… since we don’t train people that way in the first place.”

Christian goes on to point out that it’s exceedingly rare for someone with PhD-level experience in machine learning to have a strong background in critical theory, intersectionality, gender studies and ethics. We’re likely to see a string of CS PhDs lost in humanities departments and well-meaning humanities scholars writing about tech issues they don’t fully understand.

I’m lucky to have students doing cutting-edge work on machine learning and ethics in my lab. But I’m also aware of just how unique individuals like Joy Buolamwini and Chelsea Barabas are. And realizing I mostly agree with Christian, I also think it’s worth asking how we start training people who can think rigorously and creatively about technology and ethics.

It’s certainly a good time to have this conversation. There’s debates about whether AI could ever make fair decisions given the need to extrapolate from data in an unfair world, whether we can avoid encoding racial and gender biases into automated systems, and whether AI systems will damage the concept of meaningful work. In my area of focus, there are complex and worthwhile conversations taking place about whether social media is leading towards extremism and violence, whether online interaction increases polarization and damages democracy, or whether surveillance capitalism can ever be ethically acceptable. And I see my colleagues in the wet sciences dealing with questions that make my head hurt. Should you be able to engineer estrogen in your kitchen so you can transition from male to female? Should we engineer mice to kill off deer ticks in the hopes of ending Lyme disease?

That last question has been a major one for friend and colleague Kevin Esvelt, who has been wrestling with tough ethical questions like who gets to decide if your community (Nantucket Island, for instance) should be a testbed for this technology? What is informed consent when it comes to releasing mice engineered with CRISPR gene drive into a complex ecosystem? Admirably, Dr. Esvelt has been working hard to level up in ethics and community design practices, but his progress just points to the need for scholars who straddle these different topics.

I think we need to start well before the postdoc to start training people who are comfortable in the worlds of science, policy and ethics. Specifically, I think we should start at the undergraduate level. By the time we admit you into somewhere like the Media Lab, we need you to already be thinking critically and carefully about the technology we’re asking you to invent and build.

I was lucky enough attend Williams College, which focused on the liberal arts and didn’t seem to care much what you studied so long as you got into some good arguments. I was in a dorm that had a residential seminar, which meant that everyone in my hall took the same class in ethics. Arguments about moral relativism continued over dinner and late into the night, in one case ending with a student threatening another with a machete in her desire to make her point. It wasn’t the most restful frosh year, but it cemented some critical ideas that have served me well over the years:

– Smart people may disagree with you about key issues, and you may be both making reasonable, logical arguments but starting from different sets of core values
– If you feel strongly about something, it behooves you to understand and strengthen your own arguments
– You probably don’t really understand something unless you can teach it to someone else

My guess is that courses that force us to have these sorts of arguments are critical to unpacking the intricacies of emerging technologies and their implications. To be clear, there’s the field of science and technology studies, which makes these questions central to its debates. But I think it’s possible to sharpen these cognitive skills in any field where the work of scholarship is in debating rival interpretations of the same facts. Was American independence from England the product of democratic aspirations, or economic ones? Is Lear mad, or is he the only truly sane one?

The fact that there’s dozens of legitimate answers to these questions can make them frustrating in fields where the goal is to calculate a single (very difficult) answer… but the problems we’re starting to face around regulating tech are complex, squishy questions. Should governments regulate dangerous speech online? Or platforms? Should communities work to develop and enforce their own speech standards? My guess is that answer looks more like an analysis of Lear’s madness than like the decomposition of a matrix.

But liberal arts isn’t all you’d want to teach if the goal is to prepare people who could work in the intersection of tech, ethics and policy. Much of my work is with policymakers who desperately want to solve problems, but often don’t know enough about the technology they’re trying to fix to actually make things better. I also work closely with social change leaders like Sherrilyn Ifill, the president of the NAACP Legal Defense Fund. She came to our lab to learn about algorithmic bias, noting that if the NAACP LDF had been able to fight redlining two generations ago, we might not face the massive wealth gap that divides Black and White Americans. Sherrilyn believes the next generation of redlining will be algorithmic, and that social justice organizations need to understand algorithmic bias to combat it. We need people who understand new technologies well enough to analyze them and explain their implications to those who would govern them.

My guess is that this sort of work doesn’t require a PhD. What it requires is understanding a field well enough that you can discern what’s likely, what’s possible and what’s impossible. One of my dearest friends is a physicist who now evaluates clean energy and carbon capture technologies, but has also written on topics from nuclear disarmament to autonomous vehicles. His PhD work is on Bose-Einstein condensate, a strange state of matter that involves superimposing atoms at very low temperatures by trapping them in place with lasers. His PhD and postdoc work have basically nothing to do with the topics he works on, but the basis he has in understanding complex systems and the implications of physical laws means he can quickly tell you that it’s possible to pull CO2 from the environment and turn it into diesel fuel, but that it’s probably going to be very expensive to do so.

I’m imagining a generation of students who have a solid technical background, the equivalent of a concentration if not a major in a field like computer science, as well as a sequence of courses that help people speak, write, argue and teach technological issues. We’d offer classes – which might or might not be about tech topics – that help teach students to write for popular audiences as well as academic ones, that help students learn how you write an oped and make a convincing presentation. We’d coach students on teaching technical topics in their field to people outside of their fields, perhaps the core skillset necessary in being a scientific or technical advisor.

There’s jobs for people with this hybrid skill set right now. The Ford Foundation has been hard at work creating the field of “Public Interest Technology”, a profession in which people use technical skills to change the world for the better. This might mean working in a nonprofit like NAACP LDF to help leaders like Sherrilyn understand what battles are most important to fight in algorithmic justice, or in a newsroom, helping journalists maintain secure channels with their sources. I predict that graduates with this hybrid background will be at a premium as companies like Facebook and YouTube look to figure out whether their products can be profitable without being corrosive to society… and the students who come out with critical faculties and the ability to communicate their concerns well will be positioned to advocate for real solutions to these problems. (And if they aren’t able to influence the directions the companies take, they’ll make great leaders of Tech Won’t Build It protests.)

(I was visiting Williams today and discovered a feature on their website about four alums who’ve taken on careers that are right at the center of Public Interest tech.)

Building a program in tech, ethics and policy helps address a real problem liberal arts colleges are experiencing right now. The number of computer science majors has doubled at American universities and colleges between 2013 and 2017, while the number of tenure-track professors increased only by 17%, leading the New York Times to report that the hardest part of a computer science major may be getting a seat in a class. Really terrific schools like Williams can’t hire CS faculty fast enough, and graduates of programs like the one I teach in at MIT are often choosing between dozens of excellent job offers.

Not all those people signing up for CS courses are going to end up writing software for a living – my exposure to CS at Williams helped me discover that I cared deeply about tech and its implications, but that I was a shitty programmer. Building a strong program focused on technology, ethics and policy would offer another path for students like me who were fascinated with the implications of technology, but less interested in becoming a working programmer. It also would take some of the stress off CS professors as students took on a more balanced courseload, building skills in writing, communications, argument and presentation as well as technical skills.

Christian Sandvig is right to be worried that we’re forcing scholars who are already far into their intellectual journeys into postdocs intended to deal with contemporary problems. But the problem is not that we’re asking scholars to take on these new intellectual responsibilities – it’s that we should have started training them ten years before the postdoc to take on these challenges.

15 Aug 14:20

Notion.io is my new favorite - Simon

I didn't get beyond their privacy policy:

"As a condition of your use of the Service, you grant Notion a nonexclusive, perpetual, irrevocable, royalty-free, worldwide, transferable, sub-licenseable license to access, use, host, cache, store, reproduce, transmit, display, publish, distribute, modify and adapt and create derivative works (either alone or as part of a collective work) from your Content. As part of the foregoing license grant you agree that (a) the other users of the Service shall have the right to comment on and/or tag your public Content that you make available to them and/or to use, publish, display, modify or include a copy of your public Content that you make available to them, and (b) we have the right to make any of your public Content available to third parties, so that those third parties can distribute, make derivative works of, comment on and/or analyze your Content on other media and services (either alone or as part of a collective work); except that the foregoing (a) and (b) shall not apply to any of your Content that you post privately for non-public display on the Service."

https://www.notion.so/Terms-and-Privacy-28ffdd083dc3473e9c2da6ec011b58ac

That alone is enough to stop me from ever using Notion.
15 Aug 14:19

How do you develop algebraic thinking?

by Eric Normand

A few people have asked me how to develop Level 3 thinking. I’m not sure. But I’ve got some directions to try. In this episode, I go over 3 and a half ways to develop algebraic thinking.

Video Thumbnail
How do you develop algebraic thinking?

A few people have asked me how to develop Level 3 thinking. I'm not sure. But I've got some directions to try. In this episode, I go over 3 and a half ways to develop algebraic thinking. https://share.transistor.fm/s/9c95d191 https://www.youtube.com/watch?v=cdEDunhynmM Transcript Eric Normand: How d

Transcript

Eric Normand: How do you develop algebraic thinking? By the end of this episode, you should have three or maybe four different approaches to it. My name is Eric Normand. I help people thrive with functional programming.

I’ve been getting a bunch of questions along the lines of, “How do I develop level three thinking?” I’m writing a book. To do that, it’s part of writing the book. It’s a book about functional programming.

I’m trying to organize the material. Functional programming is a big, broad field. I have to choose what to teach and what not to teach. I’ve organized functional programming into three levels. I probably should call it functional thinking.

The first level is where you are able to distinguish actions from calculations and data. You can spot side effects. You’re pretty good with immutability. You know how to solve problems without resorting to side effects like global immutable variables, things like that. You can move stuff around and isolate the calculation from the action, that kind of thing.

Level two gets a little bit more sophisticated. You’re able to do higher order thinking. You’re using higher order functions, higher order actions. You’re using first class actions and even first class state if you need to. This lets you do stuff like data transformation pipelines with map filter and reduce, things like that.

Then there’s level three which is what we’re talking about today. This I’m calling algebraic thinking. I’ve also thought about calling it…Because algebraic thinking just brings up all sorts of questions like why algebra? This isn’t high school math, those kinds of associations with the term algebra. It’s about building composable models.

This may be a better way of talking about it but it’s a third level where you’re building very robust abstractions and basically algebras. Which I explained in the last episode so you should look that up.

I’ve been getting a bunch of questions about how to develop this. Now this whole show has been me exploring these ideas so that I can figure out how to put them into the book and so this is another exploration. I’m not sure. I don’t know.

This part is the last part of the book. It is the part that I have worked on the least and so these are really rough. Which is cool, you get to see them really early.

Here are three approaches to self-study to get to level three. Here we go. The first one I’m going to bring up is property-based testing. You’re probably familiar with unit testing or example-based testing where you give some arguments to a function and tell the system what to expect and that’s your test. You give specific values.

In property-based testing you don’t give specific values, those are generated randomly and you have to give a function basically that will tell the system whether the system under test got the right answer. This is called property-based testing because you’re developing properties — like algebraic properties — that your function must obey, must uphold.

Let’s just really quick because I don’t want to teach property-based testing right now. I just want to give it as an example. If you were going to test the Sort function, like you write a new Sort, you could test that with two properties. One is that the returned list — you call Sort and you get a list back — that that list is in order.

There’s another property you need which is that the return list is a permutation of the argument that you pass to Sort, the input list.

With those two properties you kind of covered the whole behavior of that function. You could test it with examples. You could give it the empty list. The empty list, sorting the empty list gives you empty list. Sorting a one gives you a one.

Sorting the list 2-1 gives you the list 1-2. You could give all the examples, but you never have to think higher order. You have somewhere in the back of your mind that it’s got to be the same elements. You have somewhere in the back of your mind that it’s got to be sorted when it comes out.

What you haven’t thought about how to write that down. How do you actually write a test that says for any input list, the output list is in order? What does it mean to be in order? How do I test that it is actually in order?

Likewise, how do I test that this list is a permutation of another list? How do I write that down? Those kinds of thinking where you have to deal with not just a given list, but every list. Any list. Each and every list. That is the kind of thinking that gets you to that next level.

It’s like first order logic. It’s not just A and B, it’s for all A. It’s a different level of thinking. By doing property-based testing I think you really force your mind to go there, because it’s all mental stuff. It’s all mental skills. I’m not talking about some very concrete thing, it’s all in your head.

Very related, that’s number two, is algebraic properties. There’s a lot of talk in the functional programming world about categories, category theory. This is similar reason to learn them, to learn categories as well as algebraic properties. Same idea.

They are very succinct truths about certain operations. They’re expressed in very small formulas. They’re relationships between a function and itself, or a function and another function. As an example, I could say a function F is commutative if F of A and B is equal to F of B and A.

To relationship, it’s an equality, and it’s of that one function F with itself. It relates how this function should operate in a totally abstract sense. We didn’t say what A was. We didn’t say what B was. We’re basically saying for all A and all B that are valid arguments to that function, then this should be true.

We’re thinking at a more abstract level, at an algebraic level, where you can start talking about F of A and B. You don’t have to say F of one and seven, those are very specific numbers. You’re talking about all numbers, A and B, or any numbers A and B.

It’s the same thinking, but it’s a different approach. You study algebra, you start to see that things can have meaning without being specific.

Addition, you can say A+B because you’ve been to algebra class. You sat through it, you did all the exercises, and now you get that there’s stuff that you know about A+B, even though you don’t know A or B.

That’s the kind of thinking that you need to get, to get to level three. Another one, the third one. This one is much more difficult material, but it is material. It is something I can link you to that you can watch. Whereas, the other two are a little bit more general concepts.

The third thing is called denotational design. This is basically some talks and some papers by Conal Elliott. He’s big in the Haskell community. He gave a really good talk. It’s like a workshop. It’s 2 hours and 20 minutes of him stepping through his thought process, which he calls denotational design for building a graphics system.

I’ve watched it many times. [laughs] I think that that is the best resource available for understanding the mindset from first principles designing something like that. Some notable things about it. The first one is that he’s working with the type signatures of the functions.

The function signatures, what arguments does it take, what does it return, totally never shows a single implementation of what an image is. The fact that he can walk through slide after slide of code with no implementation. He’s just showing the function signatures. That is the level you need to get to.

I have a whole thing on types which I’m about to say after I finish with denotational design. I’m not saying you need types. I’m not. What I’m saying is that he was thinking at the level of this function does this. I can talk about it and how it behaves without showing the implementation.

He starts from first principles, he builds a type for the image, what is an image, and then he starts showing how you could implement a combinator that acts on the image. How do we overlay two images? How do we have a mask where a shape, a region is shown through and then the rest isn’t shown?

How do we add a background color, a certain transparent color? All these operations he does show how they are simply implemented, as long as you have this very simple notion. Simple, but elegant simple. It’s a very elegant notion of what an image is.

You never know how he’d implemented image, which is where you need to get to. You need to be able to think about the operations on image, without thinking about the concrete implementation. In his system, an image isn’t an array of pixels because you’ve already limited yourself to a certain representation.

He has said, “Let’s not even implement it yet, so that we can talk about the kinds of operations we want to be able to do in the abstract.” You notice I’m trying to get at something almost ineffable without using the term algebra. [laughs]

With all these three examples, the property-based testing, the algebraic properties, the denotational design, you’re able to think about the system without caring about how it’s implemented. That’s the algebra part. You’re thinking in this static reasoning. You can look at the expressions that you can build out of this algebra and reason about them.

A couple of people asked if this was something that types help with. I mentioned that Conal Elliott uses the types to talk about functions without having to implement them. I don’t want to get into the typed versus untyped debate. Not in this episode. I don’t think that types are necessary in the language you write them in. I think that this is all stuff that’s happening here.

What the types do help you with though, if you used a strongly typed language, a statically typed, strongly-typed language, like Haskell, what you get is the discipline for free. You are forced to internalize the type system. What you’re internalizing that helps is a few things that helps with this kind of thinking. One is the case-based thinking.

In Haskell, if you have multiple cases in your algebraic data type, there’s a warning or you can turn it into an error if you forget on your cases. I suggest turning it into an error so you always have to deal with all the cases.

What that makes you do is make sure that you’re covering the whole thing, that you create a total function. At least it helps. It makes you think about that. I’m going to make this function work for all values of this type. That is something that I see people not doing in the untyped world that they could learn better from. They’ll have to do it themselves [laughs] with internal discipline. Sit and really make sure that all the bases are covered.

The function works for all values because you don’t want corner cases. That messes up your algebra. Another thing is pushing information into the type. What do I mean by that? Some functions don’t work for negative numbers. There’s no built-in type in Haskell for non-negative numbers, but you can make one and it wouldn’t be hard. It’s a common exercise to do. It’s a few lines. Then you have this type that represents non-negative numbers.

What is a little harder and speaks to the level three thinking — algebraic thinking — is to realize that when you’re using that type you don’t really need to care where it came from. It came from somewhere.

When I’m programming this function, when I’m implementing this function and it has that type, it’s a function that takes a non-negative integer, I don’t have to care where it came from. I’m not thinking about that. I just know that this type guarantees x, y, z.

I’m pushing that information into the type. That kind of encapsulation is also part of it. That I don’t really have to worry about where it comes from. I can let that be for now. I’m encapsulating that knowledge. This function’s functionality.

Conal Elliot once said that one of the cool things about numbers and one of the reason why they’re so useful is if you have the number seven, you can’t know how you got that seven. You don’t know if it was 3+4, or 5+2, or 1+6, or 14*0.5, or whatever. You don’t know where it came from. It’s equal to every other seven, regardless of where it came from.

That’s it. That’s level three. [laughs] I don’t know how else to say it. If you’re thinking in those terms, I don’t care where this come from, I don’t care how it got generated, that is level three.

To bring back the video example, I’ve been developing this example over several episodes. When I’m concatenating two videos, I don’t care where the videos came from. I want to be able to concatenate them, regardless of where they came from. I shouldn’t care. That is what I’m talking about, where you don’t care where it came from.

If you start in the wrong place, you could say, “Well, a video is a file on disc that has a sequence of frames.” Now when I’m developing concatenate, I brought all of this concrete stuff to concatenate. I might think, to implement concatenate, I open up a new file, copy the existing frames, and then add the other frames to the end of it.

You’ve already lost the abstract game. We do that. Before level three, we do that way too much, where we’re actually thinking about how to implement it way too fast. Way before we’ve thought about, what should it mean, what should it do, how does it relate to the other operations that are allowed.

This is a thing that I’ve experienced in Haskell where, if the type starts getting complicated, then you know you’ve got a problem. If you’ve got seven fields on your type, now there’s something wrong. You’re not really doing this kind of algebraic thinking.

The type has become too complex, it’s going to be impossible to do this kind of smooth, elegant algebra anymore. When you push information into the type, you got a signal for how complex the thing is. That’s really all I’ve got about to how to get to level three.

Part of it is pointing at it. Trying to point out to people who are not there and part of it is to try to use things that are there that you could go learn right now that will help you, that will help you get the ideas to get there.

My challenge as the author of the book that’s trying to get people there is to come up with good examples, good scenarios where this is useful. [laughs] It’s not just some abstract notion and also the exercises will get you there. You could see the benefit because it is a feeling. It’s not something. There’s a gray line that you cross.

At some point, you think, “Wow, this is a really solid algebra. No corner cases, very small and elegant. I can think abstractly about it.” It’s just some invisible line that you cross at some point.

If you like this episode, you can find all the old past episodes at lispcast.com/podcast. There you’ll find audio, video, and text versions of all the episodes. You’ll also find links to subscribe whether it’s on your podcast player or YouTube or however you want to consume it. Also links to social media where you can get in discussion with me.

That’s all I’ve got. This has been my thought on functional programming. I’m Eric Normand. Thank you for being there and rock on.

The post How do you develop algebraic thinking? appeared first on LispCast.

15 Aug 14:16

Subsume JSON a.k.a. JSON ⊂ ECMAScript

Subsume JSON a.k.a. JSON ⊂ ECMAScript

TIL that JSON isn't a subset of ECMAScript after all! "In ES2018, ECMAScript string literals couldn’t contain unescaped U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR characters, because they are considered to be line terminators even in that context."

Via @mathias

15 Aug 14:16

Dealing with The Dreaded Blank Page

by Raul Pacheco-Vega

I have been writing a lot for a very long time, and I *still* find myself dreading the process of opening and facing a new document template.

The Dreaded Blank Page.

Dreaded Blank Page

For many of us, facing The Dreaded Blank Page is an exercise in self-loathing, frustration and hand-wringing. Even though I write a lot, and I specifically focus much of this blog to the scholarly writing enterprise, I still find myself, on occasion, stumped and dumbfounded by The Dreaded Blank Page.

The way out, in my view (and this is what I preach to my students and research assistants and to anyone who will listen to me) is to gradually develop a writing practice and to make of each Dreaded Blank Page not a summit to CONQUER, but an issue that we have to to DEAL WITH.

To recap, my suggestions to deal with The Dreaded Blank Page:

  • Break down the project in smaller pieces.
  • Deal with each piece of writing/research on its own.
  • Use the completion of each small piece of writing as a Quick Win, or just focus on it for 30 minutes at a time.
14 Aug 23:33

84K by Claire North

by Ton Zijlstra

Very entertaining book about a dystopian UK, 84K. Takes Snowcrash‘s Burbclaves, strips them of their nerdy irony and replaces it with despair. Adds a dose of propagandistic Orwellian Newspeak, to which the title also alludes (84k is the amount calculated to be the economic damage of the killing of a key character: pay it and you walk free, or end up in slave labour). Where public tasks have been outsourced to corporations who, feeding on each other, coalesce up until the point there is just one Corporation that is both all corporations and the government. Resulting in sociopathic public governance, where everyone who starts out in the wrong place or falls through the (wide) cracks ends up shredded by the system, and where each factory and workplace has its own killing field in the back yard. Enough never ending madness in short to make anybody scream…unless you look away like everyone else.

14 Aug 23:08

Wide Awake at 3 a.m.? Don’t Just Look at Your Phone.

by Joanne Chen
Wide Awake at 3 a.m.? Don’t Just Look at Your Phone.

The only thing worse than feeling completely wired at 11 p.m. when you’re ready for sleep is being stark awake at 3 a.m. Blissfully passing out at an appropriate bedtime is cold comfort when the brain wakes up too soon and refuses to take advantage of those eight full hours. I toss and turn and scrunch up my pillow every which way, exasperated and fixated on the impending doom of the alarm clock set to go off at 6.

About half of all insomnia sufferers experience this middle-of-the-night “sleep-maintenance” insomnia, either by itself or along with the “sleep-onset” sort, trouble falling asleep in the first place, said Jennifer Martin, PhD, a professor of medicine at the University of California at Los Angeles. If, after 20 minutes, you’re still up, the American Academy of Sleep Medicine recommends stepping out of the bedroom and doing some reading or other quiet activity. But I didn’t realize that it’s actually a last-resort tactic. “Get up only when you’re so upset you can’t fall asleep anyway,” said Martin, an insomnia specialist. In fact, some of the best first-line strategies are pursued (more or less) lying down. The next time you find yourself staring at the ceiling at 3, try these six things:

Remain in bed. For you to fall asleep, your heart rate needs to slow down, said Michael Breus, PhD, a Los Angeles–area clinical sleep psychologist. But when you get up, you elevate it. So my impulse to use the bathroom just because I’m awake only makes matters worse. “Do that only if you need to,” said Breus, who is also the author of The Power of When. And skip the middle-of-the-night snack, unless you have diabetes or low blood sugar. To prevent untimely internal wake-up calls, keep hydrated during the day so that you don’t drink and fill your bladder before bed. Don’t eat too little or too much for dinner, and keep it balanced, complete with protein and fiber, both of which help sustain blood sugar levels until morning. Most important, avoid alcohol in the evening—although it may make you fall asleep faster, it also disrupts your sleep later in the night.

Stay in the dark. When you can’t sleep, LED indicator lights on, say, printers and cable boxes can feel intrusive. The same goes for light streaming in through cracks in the curtain. “They’re point sources of light that your eyes are drawn to, and that can keep you up,” said John Hanifin, PhD, an assistant professor at Thomas Jefferson University in Philadelphia who studies circadian rhythms, the brain’s internal sleep/wake cycle. Hanifin covers indicator lights with black electrical tape and wears a sleep mask. (Wirecutter’s top pick has deep eye cups so your eyes can open and shut.) Of course, avoid scrolling through your smartphone and turning on the lights. If light outside your window consistently keeps you up, it may be worthwhile to install blackout shades (here are Wirecutter’s recommendations for the best options).

Block out noise. For you to fall asleep, your soundscape doesn’t have to be completely silent, but it does need to be monotonous, which signals the brain that it’s safe to sleep. That’s why rattling radiators and dripping faucets keep you up even if you hardly notice them during the day. If you have a white noise machine (or an app) for bedtime, turn it on (Wirecutter recommends the LectroFan or the myNoise white noise app).

Adjust the temperature. If the room feels warm, lower the thermostat—around 65 degrees fosters sleep, said Breus. Another part of the sleep equation is skin temperature. “A cool core and comfortably warm skin is best for sleep,” said Roy Raymann, PhD, vice president of sleep science at SleepScore Labs (maker of Wirecutter’s favorite sleep tracker). You cool your core by breathing in the cool bedroom air; you warm your skin with bedding and PJs. Socks can also help, said Raymann, who has published research on the phenomenon in Physiology & Behavior. Feet have lots of temperature sensors: When they’re warm, that information gets transmitted to the brain areas involved in both sleep and thermoregulation to help you doze off. In a small study published in the Journal of Physiological Anthropology, subjects with socks took about half as long as those without socks to fall asleep. If temperature control is a recurring problem, a smart thermostat lets you dial it up or down from bed via voice command (or smartphone, if you must), or you can preset it to do so at certain times of the night. (Wirecutter recommends the Nest Thermostat E.)

Quiet your mind. Ruminating about past events or worrying excessively can cause a surge in stress-related chemicals, which in turn sparks a rise in heart rate and core temperature; it also charges up the regions of the brain responsible for memory and emotion at a time when they should be calm. Give relaxation techniques (deep breathing, meditation, mindfulness exercises) a try. “What works is personal preference,” said Raymann, who also suggests doing simple math problems in your head or imagining all the things that come in, say, green. “The point is to keep your brain busy with something that doesn’t require effort or trigger emotional responses.”

Think positive. If your wake-up time is 6:30 a.m. and the clock reads 3 a.m., don’t think, Oh no! I have only three hours left! Negativity only sets off a stress response that keeps you up. Instead, say, Oh great! I have three more hours to sleep! “It sounds hokey, but it works,” said Breus. Also remind yourself that even if you’ve slept less than you’d like, plenty of people do just fine with less sleep on any given day, and you will too. But if insomnia strikes more than three times a week for more than three months, and it affects your quality of life, find a sleep specialist who can help identify the root cause and customize a plan for you.