If Medium’s CEO Ev Williams cared about users
1. Authors would be able to edit their posts no matter how they navigated to them
2. It would be possible to find the article to which your comment belongs
3. The easily gamed and therefore meaningless multiple clap concept would be replaced by a small set of positive emoji responses
Twenty five years ago, in a paper titled “Programmers’ Canvas,” I recommended that software developers push to and pull from the same repository consistently — preferably every day. Instead of working in silos for months and losing weeks of productivity in Merge Hell, everyone should stay in sync and fix issues as they arise. In order for this to work, teams needed automated builds and tests to know whether it was safe to pull down the latest code.
Back then, this idea was neither obvious nor popular. My big mouth resulted in me owning the build scripts. …
The bane of automating single-page apps is, ironically, good frontend error handling. Our CodeceptJS-based screen scraper has no idea when a REST error was handled. The frontend team never thought to add a common class to button elements having text like “An error occurred. Please try again.”
Even worse: auto retry. The scraper is unable to distinguish between “no data available” versus a failure. Scraping jobs that run for hours need to pause only as long as necessary. Is an element missing because there is no data, or did an error occur, or did the scraper not wait long enough? It’s impossible to know.
Like everything, you don’t learn this until you try it yourself. If you’re embarking on a new frontend project, I hope you will consider the plight of those who write scrapers and integration tests.
And then there’s infinite scrolling.
While scraping or testing websites, sometimes it’s convenient to open a link (e.g., via “control-click”) on a page into a new browser tab, do some work in the new tab, and close it. This avoids the hassle of using breadcrumbs or the Back button. This approach can also result in less work for the website’s backend since closing tabs doesn’t normally request remote data.
Here’s how to automate “control-clicking” a link in Chromium, in order for the link’s contents to appear in a new tab. This example uses CodeceptJS and Puppeteer. This solution has been tested on OSX and Ubuntu. It should work on Windows.
First, create a helper for CodeceptJS and alter CodeceptJS’s configuration to use it:
Then use this in your scenario:
Here’s a Dockerfile that:
Most libraries can be unit tested. Most applications can only be integration tested. Apps should be nothing more than mosaics of libraries. But unit tests are never 100% effective. Even with 100% coverage, bugs will be found — especially in the parts that are hard to use. Writing the user guide for each library is especially difficult because it exposes design and implementation issues. Therefore, pick a milestone and add the task that developers typically do last and learn from the most: API and user documentation. This will improve your team’s understanding of what and for whom they’re building.
This SLS config file is compatible with Serverless 2.28+ and defines an AWS step function that waits 5 minutes and invokes a lambda. The lambda is granted access to the following RDS resources:
May this serve as a map for lost SLS travelers.
No matter how hard they tried, they couldn’t coax forEach to use await — at least not as expected. Instead of resorting to for .. in (to which Airbnb’s linter vociferously disapproved) they discovered a magic incantation involving reduce. Alas! “But how much memory does this consume?” they pondered. “Is this efficient? Has @goodware published an npm module that runs a maximum number of tasks in parallel? A task queue of some sort?”🤔 Indeed.
Answers to the questions:
For applications that serve a global community, storing the date and time of an event in only UTC can be insufficient. Storing only the server time can be even worse.
The times of important events should instead be captured as tuples consisting of:
If your users want the benefits of TypeScript, such as a better IDE experience and fewer bugs, they will need to install TypeScript as a dev dependency…
He/him. Coder and gamer since 1980. Lately I’ve been coding in Node and React. Always seeking The Best Way.