Browse through the showcased feeds, or enter a feed URL below.
A feed by Martyn Chamberlin
Permalink - Posted on 2017-08-29 14:38
I am deprecating all current feeds at Drinking Caffeine, and replacing it with one single feed at /feed.xml. If you’re reading the site from a feed reader, then you’ll want to change your URL to that.
Sorry for the hassle! I’m switching from Jekyll to Hugo1 and while Hugo is better at most things, it’s worse at customizable feeds.
More on this later. ↩︎
Permalink - Posted on 2017-08-26 21:18
Privnote is a drop-dead simple service that lets you “share a confidential note via a web link that will self-destruct after it is read by your intended recipient.” Very cool.
Permalink - Posted on 2017-08-26 16:09
It is often the case in web applications that designers must afford the user a progressive disclosure of complexity. One of the great ways to achieve this without disrupting the user experience is with HTML modals. The term modal means different things to different people in the web community, but when I use it here, I’m referring to exactly this: any UI element that is overlaid atop the current UI layer, regardless of whether it be a small detail or a fully enveloping layer, such that the only way to dismiss it is to either click outside of or mouse away from said modal.
There are three ways that modals can be triggered into view:
Having thus briefly described modals, we now come to the heart of today’s subject, which is this: from a technical standpoint, how do you handle the dismissal of these modals? There are three ways to do this that I have encountered.
The first method is by initially focusing on the modal and then dismissing on the
onblur method. Here’s a simple example:
This is great for very a simple modal that does not contain HTML form tags that accept focus. Envision a menu that is the visual equivalent of right-clicking on the desktop or a Finder window in macOS — that sort of simple menu. A practical web example would be the “more options” of an Instagram post when viewing it at Instagram.com. One very nice thing about this method is just how fragile focus is. It’s easily broken. You lose it as soon as you click something within the menu. You lose it if you switch to a different tab in your browser, or to a different app. This transient nature is also similar to right-clicking on macOS: switching to a different space causes the menu to disappear. The main downside to using this solution is just how limited the items inside the modal must be. If the modal contains form elements or its own set of clickable actions that upon click should not dismiss the modal, this solution won’t work.
The second method is by stopping the upward DOM propagation of click events that occur from within the modal itself, and setting a click listener on the overall document. For a generic code example, I can’t improve on this StackOverflow answer. Assume that
#menucontainer is the identifier for your modal in this scenario here. When you set this up, any click events that get triggered on the document are guaranteed to have not occurred from within the modal. This is a terrible solution though, and the reason for its terribleness is pontificated quite nicely at this CSS Tricks piece. Stopping propagation of an event is never necessary and leads to many potential pitfalls. I recommend reading this CSS Tricks piece in its entirety to get a firm grasp as to exactly why this is so.1 To quote a pertinent part from it:
Modifying a single, fleeting event might seem harmless at first, but it comes with risks. When you alter the behavior that people expect and that other code depends on, you’re going to have bugs. It’s just a matter of time.
Not only is it “just a matter of time” until you have bugs with
event.preventDefault(), but unless you have strenuous test coverage on your UI, this is the sort of thing that will silently break and be very difficult to debug once you discover it later, depending on how nested your DOM is. You’ll have to step through each layer of DOM nodes to see where the click event propagation is getting stopped.
This brings us to the third and gold standard for handling the dismissal of HTML modals, which is by manually detecting whether a given click occurs inside or outside the modal. The popular examples are all in jQuery but few serious web applications use jQuery, so I’ll give an example in VueJS instead, in Single File Component parlance:
For the more curious, the eventhub import is nothing more than a singleton instance of Vue, shared between all components within the application. This is standard practice. The
eventhub.js file contains nothing more than this:
If you’re wanting to adapt this to something other than VueJS, the main part you need to worry about in the example above is the contents of the
documentClick() method. The Node.contains() method is a standard method and you can use this in any framework — React, Angular, etc. As long as you have the event object and the modal’s node object, you’re good to use this.
Permalink - Posted on 2017-08-26 13:48
Yesterday, Stephen Hackett linked to an Outline piece titled Why Are There So Many Knobs in GarageBand?. Aside from the headline, the word GarageBand occurs just twice in the article, and those are throwaways. There are many mentions of other applications and screenshots of them, but there are no screenshots of GarageBand. In other words, John Lagomarsino threw in an Apple application to make the headline catchy but then proceeded to talk about other audio software.
GarageBand is an excellent application. It’s not a fraction as skeumorphic as the screenshots in this article. I’ve spent about five hours this week in GarageBand playing around with some mixups, and the interface is more or less exactly what I would expect and desire from an Apple audio application in 2017. The fact that John can’t critique it is telling. It’s a very well designed application that’s been through multiple revisions.
Linkbait aside, I found this to be inaccurate as well. John writes:
Faders, switches, knobs, needles twitching between numbers on a volume meter — they’re all there. Except you have to control them with a mouse.
First, how many people use GarageBand on a Mac versus on an iPad or an iPhone? Some of them are using a mouse. Many of them are using touch, and knobs make perfect sense on a touchscreen device.
Second, while it’s somewhat cumbersome to the uninitiated to use a mouse on a knob, it’s difficult for me to think of a UI control that would be its superior. What does John want here? A slider? A numerical input? The nice thing about a knob is that it gives you a 270° spin. If you’re used to controlling things with knobs, you can just look at a knob and know exactly where it’s set, in a way that’s not as visually intuitive with a slider or numerical input or anything else I can think of.
I have yet to find a piece from The Outline that I liked.
Permalink - Posted on 2017-08-26 02:38
Looks like this will be the day we see the new
iPhone 8 iPhone.
Permalink - Posted on 2017-08-26 02:25
Spectre was one of the truly great video games of the ’90s. Today I discovered an online embedded version of it and it’s exactly how I remembered it. Reading through the user manual, I realize that there were all kinds of features I hadn’t ever used, too. I’ve previously talked about the dangers of remembering past software too fondly but in this case, it’s well founded. Definitely worth checking out over the weekend, regardless of whether you’ve played it before.
Permalink - Posted on 2017-08-24 15:38
Gaby Galvin, writing for U.S. News last year:
The gender gap in computing jobs has gotten worse in the last 30 years, even as computer science job opportunities expand rapidly, according to new research from Accenture and Girls Who Code.
In 1984, 37 percent of computer science majors were women, but by 2014 that number had dropped to 18 percent, according to the study. The computing industry’s rate of U.S. job creation is three times the national average, but if trends continue, the study estimates that women will hold only 20 percent of computing jobs by 2025.
Women are 55 percent of undergraduate students in college, but only 18 percent of computer science majors are women. Why isn’t that number 55?
If you think that one hundred percent of that 37 percent delta is explainable in terms of gender bias then you believe in Santa Claus.
Permalink - Posted on 2017-08-23 21:08
Really, Firefox. Really. You’re the new Internet Explorer.
Permalink - Posted on 2017-08-23 18:57
Gleb Budman, Backblaze CEO:
With news coming out this morning of CrashPlan exiting the consumer market, we know some of you may be considering which backup provider to call home. We welcome you to try us.
I’ve been using Backblaze for a couple years now and I love it. The reviews from Mossberg and Gruber are well founded.
As some have recently pointed out, Backblaze doesn’t backup your entire computer the same way that Time Machine does. To me, this isn’t a problem though. There are two scenarios in which Backblaze actually comes into usefulness.
~/) and serves this scenario well. I’ve used it for this on a few occasions.1
Anyone who plans to use Backblaze as a full restore method is crazy. Why be throttled by your ISP’s download speed (or wait for a mail restore2) when you could just restore from a 1TB drive via Time Machine?
The whole point of Backblaze is to protect yourself from situations that you aren’t expecting.
Time Machine could serve this roll too, if you’re got frequent automated backups set up with it. I daresay most people aren’t that sophisticated though—me included. I just connect an external drive to my computer and back up via Time Machine once every 6 months, give or take. If you’re using Backblaze, the only real times to use Time Machine are when you’ve bought a new Mac and want to transfer everything to it, and when you’re about to install a beta of macOS that you suspect you may have to revert. ↩︎
Permalink - Posted on 2017-08-22 20:39
David Brooks, in an op-ed at the New York Times that’s 11 days old and aging quite nicely:
There are many actors in the whole Google/diversity drama, but I’d say the one who’s behaved the worst is the C.E.O., Sundar Pichai.
Either Pichai is unprepared to understand the research (unlikely), is not capable of handling complex data flows (a bad trait in a C.E.O.) or was simply too afraid to stand up to a mob.
The linked Atlantic piece is also most excellent.
Permalink - Posted on 2017-08-21 14:06
Abhimanyu Ghoshal, writing at The Next Web:
Tesla and SpaceX CEO Elon Musk, along with 115 other artificial intelligence and robotics specialists, has signed an open letter to urge the United Nations to recognize the dangers of lethal autonomous weapons and to ban their use internationally.
All the arguments in this piece could be used to apply to the transition from donkeys to tanks, or from muskets to machine guns, or from low explosive bombs to nuclear bombs. Artificial intelligence is simply the next step in that process. Now granted, it’s a huge step, and if people want to argue that it’s too big of a step, they’re welcome to make the best argument that they can.
But good luck trying to persuade the military to not use a superior technology. Historically that isn’t how it works longterm, ever.
Permalink - Posted on 2017-08-19 18:18
I’m trying to remember when I first visited DaringFireball.net. My best guess is that it was somewhere around 2009 or 2010. I was a teenager at the time, and the site was too sophisticated for my adolescent taste. But as I finished high school and eventually realized I wanted to be a software developer, my interest in the site increased. By 2012 I was reading the site fairly often and listening to an occasional episode of its Talk Show podcast. By 2013 I bought my first t-shirt. By 2014 I bought my second t-shirt. By 2015 I was reading everything and listening to most everything. By 2016 I had built a robot that sent me an SMS message whenever new linked list items were posted to the site. Today, I don’t know where I would be without Daring Fireball.
This week, Daring Fireball turns fifteen years old. When the blog started in 2002 as a column for “Mac Punditry and Curmudgeonry,” Apple was relatively small in the list of world companies, and the World Wide Web was still relatively new. Today, Apple has the highest market capitalization of any company in the world, and the World Wide Web has matured into a platform of billions of regular users. It stands to reason then that over the course of the past fifteen years, many blogs and columns surrounding the subject of Apple would have cropped up. They have. But none of them have arrived at the same caliber with which Daring Fireball started. Daring Fireball has no peers; it has no close seconds. I cannot improve upon how its author put it two years after the site’s debut:
The implicit immodesty of the sentence to follow pains me, but here goes: I don’t think there’s anything else quite like Daring Fireball.
This statement was factually correct in 2004, and it remains so in 2017. There’s a danger in attempting to list an outline of the reasons why there’s nothing else quite like Daring Fireball, and that is this: it might incline the reader to reduce its differentiation into a formula that is replicable. And while it might be tempting for skeptics to postulate that there is no secret sauce to the site’s superiority to all other Apple columns, such skeptics would be remiss to deny that there is a peculiar quality about Daring Fireball that is difficult to place one’s finger on. Though hard to define, it is undeniably present. I have spent much time thinking upon this, but I am no closer to arriving at pontificating what precisely this is than when I began, though my lack of success has not stifled my enthusiasm for its pastime. Be that as it may, the obvious points of outward distinction can be described easily enough, and they are worth visiting on the fifteenth anniversary.
I do not agree with Daring Fireball on many things, and I am very vocal about my disagreements. I mention this as a strength of the site. Strongly disagreeing with certain pieces on the site does not preclude enjoying it. That’s a testimony to just how there’s nothing else quite like Daring Fireball.
To avoid the embarrassment of being perceived as obsessing over a specific site or individual, there is a constant temptation to say that all good tech columns are more or less operating on a level playing field, and that they deserve an equal amount of time in one’s browser. This is profoundly wrong. Not all Apple blogs are created equal. Daring Fireball’s unique position is recognized by Apple’s VPs, who read it and give its author exclusive access at WWDC. Spending a disproportionate amount of time with Daring Fireball is becoming.
There’s a tendency in human nature to be silent in admiration and loud in complaining. I am as guilty as anyone in this matter. We keep quiet about Daring Fireball’s excellence because we know it, and we assume everyone else knows it. We find plenty of time to murmur, and too little time to praise. At the fifteen year anniversary, it’s a good time to reflect upon what the world would be without Daring Fireball.
Here’s to another fifteen years, John.
Permalink - Posted on 2017-08-17 21:43
Tim Cook had this to say to his employees:
I disagree with the president and others who believe that there is a moral equivalence between white supremacists and Nazis, and those who oppose them by standing up for human rights. Equating the two runs counter to our ideals as Americans.
Nobody respectable is saying that there’s a moral equivalence between white supremacists and Nazis, and those who oppose them. We have no place in this country for true Nazis. It’s sadly true that some of the protesters at Charlottesville were unequivocally white supremacists and wannabe Nazis, and those people should be renounced. But many of them weren’t that at all. Just because you oppose the taking down of statues does not make you a monster. I think Scott Adams made the best argument for why taking down the statues is a good thing for America at this time, but not everyone would agree with that, including black confederates. To quote Walter E. Williams:
The flap over the Confederate Flag is not quite as simple as the nation’s race experts make it. They want us to believe the flag is a symbol of racism. Yes, racists have used the Confederate Flag, but racists have also used the Bible and the U.S. Flag. Should we get rid of the Bible and lower the U.S. Flag? Black civil rights activists and their white liberal supporters who’re attacking the Confederate Flag have committed a deep, despicable dishonor to our patriotic black ancestors who marched, fought and died to protect their homeland from what they saw as Northern aggression. They don’t deserve the dishonor.
These are complex issues, and there well-intentioned and evil-intentioned people on both sides of this issue. If someone isn’t willing to come to terms with that, and if they get all bent out of whack by anyone who says as much, they’re blinded by partisan politics and they’re hallucinating an alternate reality. If someone can’t conceive a universe where there’s a way to peacefully protest on either side of an issue like these statues, they are being unfaithful to history. The peaceful aspect of this is key, and sadly neither side of Charlottesville maintained a peaceful spirit.1
Tim Cook redeems himself in the next paragraph:
Regardless of your political views, we must all stand together on this one point — that we are all equal. As a company, through our actions, our products and our voice, we will always work to ensure that everyone is treated equally and with respect.
Within the legal framework, there’s a time and a place for violence: namely, if you or those in your care are being violently assaulted. The violence on both sides extended past this boundary, and there is no justification for that. That said, if you take the worst that the opposition did and compare that to the worst that the anti-opposition did, it is clear that the former is guilty of the greater evil in this particular case — that of cold blooded murder. ↩︎
Permalink - Posted on 2017-08-17 13:45
Cloudflare CEO Matthew Prince:
Earlier today, Cloudflare terminated the account of the Daily Stormer. We’ve stopped proxying their traffic and stopped answering DNS requests for their sites. We’ve taken measures to ensure that they cannot sign up for Cloudflare’s services ever again.
We’re going to have a long debate internally about whether we need to remove the bullet about not terminating a customer due to political pressure. It’s powerful to be able to say you’ve never done something. And, after today, make no mistake, it will be a little bit harder for us to argue against a government somewhere pressuring us into taking down a site they don’t like.
Aside from whether Cloudflare made the right move here or not, it’s kind of hard to keep a bullet point that’s no longer true.
Permalink - Posted on 2017-08-16 13:38
I just started noticing this feature the other day and I love it. It’s a fantastic iterative improvement. You can even paste a permalink from one private repository to another private repository, and it’ll expand it.
Permalink - Posted on 2017-08-14 13:37
Jason Snell, writing at Six Colors:
If I had to guess why Safari doesn’t support favicons in tabs, I’d say that Apple’s designers probably think most favicons are ugly and contribute to visual clutter.
This sounds right to me. When Apple makes a product decision, its top priority isn’t, What will get the most market share? Apple isn’t primarily worried about market share. Keep that in mind when you read this quote from Gruber’s piece:
I really can’t say this strongly enough: I think Safari’s lack of favicons in tabs, combined with its corresponding crumminess when displaying a dozen or more tabs in a window, is the single biggest reason why so many Mac users use Chrome.
If Apple’s designers have it in their heads that “most favicons are ugly and contribute to visual clutter,” then they can’t care less that adding this visual clutter might increase Safari’s popularity. Gruber is going to need better persuasion than this if he hopes to change the thinking at Apple regarding Safari favicons.
As an aside, it’s hilarious that a person would make this favicon issue the determining factor in whether they used Safari versus Chrome. They’re two completely different products. Safari is unusable for frontend developer work, so I pretty much never use it except to troubleshoot CSS flexbox bugs that are specific to it. I was only vaguely aware prior to Gruber’s piece that macOS Safari didn’t show favicons. To me that’s just one of the many inferior design choices that the team made. The real issues with Safari lie in its developer console tabs UI and UX. That’s where Chrome really is the best in the industry. If we did a survey of how many frontend developers on Macs did their development in Chrome versus Safari, I bet it’d be a 20:1 ratio, or higher.
Permalink - Posted on 2017-08-12 21:05
The bigfoot.js library is a popular solution to footnotes on the web. I’ve never personally been a fan of it though, because bigfoot.js footnotes are invisible unless you interact with the page. I prefer the visual beautify of small footnotes omnipresent at the bottom of the page, with links that jump you to and from them. It’s a slightly less ideal UX, but it’s a much superior UI.
I’ve noticed two problems that arise with out-of-the-box kramdown footnotes, however:
This solves both problems mentioned above:
parents()call). The resulting parent will usually be a
<li>tag. This is nice, because it gives you the full context of citation. Only in cases of very long paragraphs of text would this result in the user getting scrolled so high that the footnoted sentence is out of sight.
Permalink - Posted on 2017-08-11 22:02
Conor Friedersdorf, writing at The Atlantic:
I have a question for the CEO.
Given that the full text of the memo is public, that it is the subject of a national debate on an important subject, that many educated people disagree with one another about what claims it made, and that clarity can only help Google employees adhere to the company’s rules going forward, would you be willing to highlight the memo using green to indicate the “much” that you identified as “fair to debate” and red to flag the “portions” that you deemed Code-of-Conduct violations?
This gets to the crux of the matter.
As an aside, I’m loving how diplomatic Daring Fireball is about this whole affair. Very aloof.
Permalink - Posted on 2017-08-11 15:26
Jim Edwards, writing at Business Insider:
Google may have difficulty establishing that he broke the company’s code of conduct because he used message boards the company provided to allow employees to discuss these issues, and because his manifesto repeatedly states he favors diversity and intended to “increase women’s representation in tech.”
“Damore’s possible claims really have nothing to do with whether white males are discriminated against in wages and promotion,” Sharpe said. “It is about whether he was fired because he complained that Google’s diversity efforts were unfair to men. He doesn’t have to prove the allegation, just that he made the claim for the purpose of advancing working conditions of himself and others.”
So James won’t have to prove that his allegations were correct to win his case.
Permalink - Posted on 2017-08-11 12:59
Nathan Ingraham, writing at Engaget:
If you’ve ever plugged your phone into your car stereo, only to have the same song start playing every single time, I have some good news for you. Yesterday, a true internet hero named Samir Mezrahi released a song on iTunes that’s just 10 minutes of silence – and he named it “A a a a a Very Good Song.” Since the iPhone starts playing music alphabetically when you plug it in to many car stereos, that usually means there’s one song that you hear whether you want to or not. Many songs starting with the letter A have probably been ruined thanks to this quirk – but if you download Mezrahi’s creation, you’ll instead have plenty of time to queue up the songs you want to hear.
This has been a source of grief to me for ages. That song has heretofore been Abandoning Ship from the film score of Pixar’s Ratatouille. I’ve added A a a a a Very Good Song to my Apple Music library as its replacement. Well done, Samir Mezrahi.
Via 512 Pixels.