38 stories

★ Opening New Tabs Next to the Current Tab in Safari


The way Safari tabs work on the Mac:

  • If you ⌘-click a link or use the contextual menu to open a link in a new tab, that new tab will be created next to your current tab.
  • If you make a new tab with File → New Tab (⌘T), the new tab will be created at the rightmost end of the tabs in the current window.

This is the way Safari tabs have worked as long as I can remember, and it matches the way tabs work on other browsers on the Mac.

It’s fine if you don’t have a lot of tabs. But I always do, and the behavioral mismatch has long bothered me. If I have, say, 10 tabs open in a window and I’m currently using, say, tab 2, when I type ⌘T to open a new tab it feels like the rightmost end of the row of tabs is “way over there”, but what I want is the new tab to open “right next to where I am” — like what happens when I ⌘-click a link.

A few months ago I asked on Twitter if there was a secret preference in Safari that would change this to what I want — which is for new tabs to always open right next to the current tab. There is no such preference. set about trying trying to figure out if this could be done using AppleScript, but I couldn’t figure it out.

Jeff Johnson figured it out, though, and was kind enough to share the solution and explain the rather ungainly syntax required.

Here’s my slightly modified version of Johnson’s solution:

tell application "Safari"
    tell front window
        set _old_tab to current tab
        set _new_tab to make new tab at after _old_tab
        set current tab to _new_tab
    end tell
end tell

What tripped me up is that in Safari’s AppleScript object model, tabs have an index property. The leftmost tab in a window has an index of 1; the next tab 2, etc. But index is a read-only value — you can’t change the index to move a tab, and you can’t create a new tab with specific index value.

As Johnson notes:

Here’s the somewhat unintuitive AppleScript. It’s “at [location specifier]”, where “after [item]” is a location specifier.

Which gives us make new tab at after _old_tab. AppleScript’s English-Likeness Monster rears its head.

Ungainly syntax aside,[1] this simple script works exactly how I want it to. I use Red Sweater Software’s excellent FastScripts to provide a system-wide scripts menu, and assigned this script the shortcut ⌘T in Safari. FastScripts “sees” the ⌘T shortcut before Safari does, so when I invoke it, the script runs instead of the File → New Tab menu command. One could set it up using Keyboard Maestro just as easily. If you don’t use either FastScripts or Keyboard Maestro, I don’t know what to tell you other than that you’re missing out.

I’ve been using this for two months, and at this point it feels indispensable. I was using a different Mac the other day where I hadn’t yet set this up, and it felt like Safari was broken. Which, yes, also means that ⌘T in Safari on iPad now feels broken.

  • Given my complaints about AppleScript’s goofy syntax here, I thought this might be a good example to try to recreate in JavaScript for Automation (JXA). Apple added JXA as an alternative to AppleScript back in MacOS 10.10 (which, yes, was called OS X 10.10 at the time). Maybe I’m missing something, but I’ll be damned if I could get it to work. Maybe the problem is me being a JavaScript dummy, but I sort of think this might not be possible in JXA because JXA might be an unsupported hot mess. If someone can prove me wrong, let me know. ↩︎︎

  • Read the whole story
    3 days ago
    I use a Chrome extension to get this same behavior. That all of the browsers have the default of opening new tabs "way over there" seems dumb to me.
    Share this story
    1 public comment
    4 days ago
    I don't think this matters if ctrl+tab cycles tabs in most recently used order.
    San Antonio, TX

    Facebook’s Tipping Point of Bad Behavior?

    1 Comment and 3 Shares

    The NY Times has published a long piece about how Facebook has responded (and failed to respond) to various crises over the past three years: Delay, Deny and Deflect: How Facebook’s Leaders Fought Through Crisis. It does not paint a very flattering portrait of the company. This part is particularly damning (italics mine):

    When Facebook users learned last spring that the company had compromised their privacy in its rush to expand, allowing access to the personal information of tens of millions of people to a political data firm linked to President Trump, Facebook sought to deflect blame and mask the extent of the problem.

    And when that failed — as the company’s stock price plummeted and it faced a consumer backlash — Facebook went on the attack.

    While Mr. Zuckerberg has conducted a public apology tour in the last year, Ms. Sandberg has overseen an aggressive lobbying campaign to combat Facebook’s critics, shift public anger toward rival companies and ward off damaging regulation. Facebook employed a Republican opposition-research firm to discredit activist protesters, in part by linking them to the liberal financier George Soros. It also tapped its business relationships, lobbying a Jewish civil rights group to cast some criticism of the company as anti-Semitic.

    Are you fucking kidding me? Facebook paid to promote the right-wing & anti-Semitic conspiracy theory that George Soros pays protestors? Shame on you, Mark Zuckerberg, Sheryl Sandberg, and the rest of Facebook leadership team. Legitimizing this garbage actively hurts our democracy. On Twitter, The Guardian’s senior tech reporter Julia Carrie Wong gets at what is so wrong and different about this behavior:

    There’s something about this Soros story that feels significantly different than the usual Facebook scandal. Most recent negative Facebook stories are issues relating to challenges of scale and a tendency toward passivity.

    Facebook’s standard playbook is to admit that they made a mistake by being slow to react, remind us of their good intentions, then promise to do better. It’s the aw geez who woulda thought in the dorm room that we would have to deal with all these tricky issues defense.

    This has been very effective for a company that still gets the benefit of the doubt. No one would ever suggest that Facebook *wanted* to bring about the ethnic cleansing of Rohingya or lynchings in rural Indian villages. They just were in a little over their heads.

    But this Soros thing is different. This is no passive failure. It’s a malevolent action taken against groups who criticize Facebook for things that Facebook admits it has failed at. It takes advantage of and contributes to the most poisonous aspects of our public discourse.

    It makes you wonder if the “ah geez” thing has just been an act all along. Mike Monteiro, who speaks and writes about ethics in the design profession, is surprised that Facebook’s employees haven’t spoken out more.

    What surprises me is that Facebook employees are still at their desks after finding that their company was actively attempting to discredit activists. No doubt some of them are shook. No doubt some of them will make public statements against their company’s policy. And those are needed. No doubt there will be internal spirited conversations within the company. And those are needed as well. But there won’t be a walk-out. I say this hours after the article was released. But I doubt that I’ll have to come back to this paragraph and revise it. I wish I wasn’t so sure of that. But I am.

    Tags: Facebook   George Soros   Mike Monteiro   politics
    Read the whole story
    26 days ago
    Of course the employees won't speak out, they're all investors in the company. They've got bills to pay and most of them aren't wealthy. They're counting on the future value of Facebook as part of their income. That's why companies love paying employees with equity, it makes the employees invested in the company such that they don't act against the company's interests.
    26 days ago
    Google employees walked out recently... I have friends who have walked out of companies for selling surveillance services to the Saudis. At some point your values come up against who you're working for. Courage rarely comes from privilege.
    Share this story

    ★ iPhone XR Review Roundup


    The bottom-line conclusion in my iPhone XR review:

    It sounds too good to be true, but the XR is almost as good as the XS models at a far lower price. Dollar for dollar, the XR is almost certainly the best iPhone Apple has ever made.

    I’ve read over a dozen other reviews of the XR this week, and that’s been the bottom line of every single one of them. It’s a remarkable consensus. There are some interesting differences though.

    Matthew Panzarino thinks the biggest compromise is the lack of a telephoto second camera:

    However, I found myself missing the zoom lens a lot. This is absolutely a your mileage may vary scenario, but I take the vast majority of my pictures with the telephoto lens. Looking back at my year with the iPhone X I’d say north of 80% of my pictures were shot with the telephoto, even if they were close ups. I simply prefer the “52mm” equivalent with its nice compression and tight crop. It’s just a better way to shoot than a wide angle — as any photographer or camera company will tell you because that’s the standard (equivalent) lens that all cameras have shipped with for decades.

    Wide angle lenses were always a kludge in smartphones and it’s only in recent years that we’ve started getting decent telephotos. If I had my choice, I’d default to the tele and have a button to zoom out to the wide angle, that would be much nicer.

    But with the iPhone XR you’re stuck with the wide — and it’s a single lens at that, without the two different perspectives Apple normally uses to gather its depth data to apply the portrait effect.

    Nilay Patel, on the other hand, doesn’t miss the telephoto second camera much but instead thinks the LCD display is the biggest compromise compared to the XS iPhones:

    Those differences are interesting and worth pulling apart, but really, the simplest way to think about the iPhone XR is that it offers virtually the same experience as the iPhone XS for $250 less, but you’ll be looking at a slightly worse display.

    So, how much do you care about the display on your phone?

    Look. The display on the iPhone XR is… fine. It’s fine! It has a lower-resolution and pixel density than the OLEDs in new flagship phones like the iPhone XS, Galaxy S9, and Pixel 3, but it’s the same 326 pixels per inch as Apple’s previous non-Plus LCD iPhones. Anyone coming to this phone from any iPhone, save the iPhone X, will not notice a huge discrepancy in resolution. I suspect most people will find it totally acceptable.

    That’s not to say it matches the quality of previous iPhone LCDs. The iPhone XR LCD definitely shifts a little pink and drops brightness quickly when you look at it off-axis, which often leads to a bit of a shimmery effect when you move the phone around. I noticed that shimmer right away, but I had to point it out to other people for them to see it. (It’s one of those things you might not notice at first, but you can’t un-see it.) Apple told me the XR display should match previous iPhone LCDs in terms of performance, but side by side with an iPhone 8 Plus, the off-axis shifts are definitely more pronounced.

    Neither Panzarino nor Patel are wrong. It’s obvious that the display and lack of a second camera are the two biggest compromises on the XR that allow it to be priced so much lower than the XS models. Which one matters more to you is purely subjective. Panzarino says “If I had my choice, I’d default to the tele and have a button to zoom out to the wide angle”; Patel says “I rarely take zoom photos, so I didn’t miss the telephoto lens from the iPhone XS at all”.

    Count me on Panzarino’s side, though. If I could have a next-gen iPhone XR that either (a) keeps the same LCD display but adds the XS’s second camera, or (b) switches to the XS’s OLED display (including smaller bezel) but still lacks the second camera, I would choose (a) in a heartbeat. After a day with the iPhone XR I stopped seeing anything wrong with the display or wider bezel. I miss the telephoto camera every day.

    Another tidbit from Patel, regarding the amazing work Apple put into making the XR display as nice as they could:

    Apple’s also done some extremely detailed work to make the rounded corners of the LCD perfectly match the corners of the phone itself, which is work I desperately wish other companies would do. (Most other phones with rounded corners have mismatched radii, and the Pixel 3 XL has different corner radii at the top and bottom, which, to me, looks far worse than any chunky bezel.)

    It’s somewhat easier to round the corners of an OLED panel: each pixel is its own light source, so you can turn them off individually around the curve to smooth it out. You can’t do that with an LCD panel because there’s just one single backlight for the entire display, which will shine through the black pixels along the edge. So Apple built little apertures for the pixels around the corners of the XR display to mask some of the light coming through, on top of antialiasing the curve in software. It’s a neat example of Apple’s attention to detail.

    The sub-head from Panzarino’s review made me laugh:

    The iPhone XR is Apple’s best knockoff yet of its groundbreaking iPhone X.

    I think it could have worked to write an entire iPhone XR review using the conceit that it’s an amazing knockoff of the iPhone X.

    Speaking of design details, Rene Ritchie, in an otherwise glowing review, points out some small industrial design niggles:

    Less fine is the sudden loss of Z-axis asymmetry thanks to the shoved down Lightning port on iPhone XR. Again, yes, this is only something I.D. nerds like myself care about, but after iPhone XS broke X-axis symmetry to fit a 4 × 4 MiMo antenna on the bottom, iPhone XR has gone and broken the Z by top aligning instead of middle aligning Lightning to the screws and grills, probably to make room for the not-as-thin-as-self-illuminating-OLED edge-to-edge LCD.

    I still haven’t gotten used to the steel screws and ports not always being vapor coated to match the aluminum anodization, now this?

    I know it bugs the designers and engineers even more than it does me. And while it’s still not as rando as some other companies seem to be by tossing elements into the casing like drunken darts at a board, and as nit-picky (and I’m sure eye-rolling) as I’m sure it is for some of you, I’ve given Samsung shit about it for years, so I’m not going to stop just because, this time, my eyes are bleeding courtesy of Apple.

    I hate to admit it, but I didn’t mention the Lightning port not being centered with the screws or speaker grills because I didn’t notice it until I read Rene’s review. (Nilay Patel mentions it too.) But now I can’t unsee it:

    Bottom view of the iPhone XR, showing how the Lightning port is not center-aligned with the screws or speaker grills.

    It’s not perfectly aligned but it is perfectly excusable. It’s simply really, really hard to make an LCD phone with no chin or forehead to mask the display controller. It’s hard to make an OLED phone with no chin or forehead — just ask Google. But LCD is a different ballgame. To my knowledge, iPhone XR is the only LCD phone ever made, by anyone, with no chin or forehead. With the display controller underneath the display, the Lightning port had to be pushed down. It is absolutely a compromise, but well worth it for the overall look of the device. Everyone would notice if the XR had a chin; almost no one is going to notice the Lightning port is top-aligned rather than centered with the screws and speakers.

    Joanna Stern, as usual, has the best video. She got the Product Red variant, and her video really shows how great it looks. She also illustrates well the sort of scenarios where you’ll miss having a telephoto lens.

    Lastly, a point on pricing and the notion that today’s phones are “just” phones. Here’s Lauren Goode at Wired:

    Apple wants to make it clear that it’s not trying to gouge you. Sure, when the iPhone X launched last year, Apple priced it at nearly $1,000. And yes, this year’s iPhone XS sells for the same amount. And of course, Apple killed off its smallest and most affordable handset, the iPhone SE, right as it was introducing the most expensive iPhone yet.

    But Apple wants you to know you have a choice. You get to pick from a very small pool of potential devices, but hey, at least you have options! Never mind that certain choices, like color, were predetermined for you by a room full of powerful tastemakers who decided to make coral or cerulean happen. Never mind that whatever you pay, it’s still a crazy amount of money for a phone. You are making the call. You, sir or madam, have your choice of new iPhones.

    I think the rest of Goode’s review contradicts the notion that $750 (or better, $800 for the 128 GB version) is a “crazy amount of money for a phone”.

    Phones are the most important computer in most people’s lives. They’re the only computer in many people’s lives. Nobody says it’s crazy to spend up to $1,500 on a laptop — but most people use and care about their phone more than they do their laptop. That’s why phone displays are getting bigger. We’ve been corrupted by thinking of them as “phones” in the pre-2007 sense of the word.

    A cell phone used to be just a wireless telephone. No longer. They are our ever-present personal computers. They are also our most important cameras (and often our only cameras). A decade ago, point-and-shoot cameras ran $200-400, easily. It’s your watch, it’s your alarm clock, it’s your Walkman, it’s your map and GPS. It’s your wallet full of photos of your family and friends. It’s also, increasing, your actual wallet.

    If you took an iPhone XR back to 2006 people would be amazed. If you told them they could buy one for $750 they’d think you were lying.

    On a related note, I would argue that iPhone prices aren’t really going up. Last year’s X and this year’s XS models are a new premium tier. The iPhone XR is the phone at the previous “regular” top-of-the-line tier. New top-tier iPhones used to cost $600-650, yes, and the iPhone XR starts at $750. But when you account for inflation that starting price is about the same. The iPhone 4 was introduced in June 2010 starting at $600. $600 in June 2010 dollars is about $700 today. That $600 got you a 16 GB iPhone in 2010. The 32 GB model cost $700. That’s about $810 in today’s dollars — $10 more than the price of a 128 GB iPhone XR, which I think is the sweet spot in the lineup for most people. Inflation adjusted, the iPhone XR is right in line with the iPhone 4 prices from 2010.

    Considering how much more capable an iPhone XR is compared to an iPhone 4, I’d say $750 is an amazing bargain.

    Read the whole story
    50 days ago
    I think it’s crazy to spend up to $1,500 on a laptop. But thankfully modern laptops are overpowered so I can buy slightly used ones on eBay for what I consider reasonable dollars.
    49 days ago
    Same for used iPhones on ebay
    Share this story
    1 public comment
    49 days ago
    You could swear that he's on Apple's payroll. Always so apologetic and making up excuses for the company. Apple's products are overpriced and over hyped. They are good products, but they're not cheap or world saving. Apple is a public company, they only care about their profits, and their shareholders. It is a business, therefore they will expand those profit margins as much as they can, their consumers be damned... people will keep buying their phone until a new product class replaces the smartphone. Apple is smart enough to keep improving their cash cow. The XR is outrageously overpriced for what it is, no doubt about that. The sole reason it exists is to hit a price point that otherwise would've been usually handled by the previous year's phone. But because they didn't want to lower the price of the X, and decrease their margins in the process, they created the XR... IMO the only things that make any iPhone worth buying is iOS's security and update track record.

    iPhone XR is not a bargain, a $750 USD phone will never be a bargain. Unless you are privileged enough to think it is.
    Beijing/Hong Kong

    Morgan Knutson on Working as a Designer on the Google Plus Team


    Morgan Knutson on Twitter:

    Now that Google+ has been shuttered, I should air my dirty laundry on how awful the project and exec team was.

    I’m still pissed about the bait and switch they pulled by telling me I’d be working on Chrome, then putting me on this god forsaken piece of shit on day one.

    Air some dirty laundry indeed. This whole thread is kind of nuts — you just don’t see former employees expose dysfunctional workplaces like this very often. Here’s a real eye-opener — teams across Google were effectively bribed to integrate Google Plus, regardless if such integration made sense for their products:

    If your team, say on Gmail or Android, was to integrate Google+’s features then your team would be awarded a 1.5-3x multiplier on top of your yearly bonus. Your bonus was already something like 15% of your salary.

    You read that correctly. A fuck ton of money to ruin the product you were building with bloated garbage that no one wanted. No one really liked this. People drank the kool-aid though, but mostly because it was green and made of paper.

    Read the whole story
    61 days ago
    Former employees don't usually do this because they still need a job and don't want to be seen as a potential troublemaker by future employers. I gather from this guy's last few comments that he probably no longer needs a job and can afford to burn bridges.
    Share this story

    Running Docker on Docker Enterprise Edition 2.0

    1 Comment and 2 Shares

    Docker EE 2.0

    Did you know that Docker Hub has millions of users pulling roughly one billion container images every two weeks — and it all runs on Docker Enterprise Edition?

    Docker Enterprise Edition 2.0 may now be available to commercial customers who require an enterprise-ready container platform, but the Docker operations team has already been using it in production for some time. As part of our commitment to delivering high quality software that is ready to support your mission-critical applications, we leverage Docker Enterprise Edition 2.0 as the platform behind Docker Hub and our other SaaS services, Docker Store, and Docker Cloud.

    Some organizations call it “dogfooding;” some call it “drinking your own champagne.” Whatever you call it, the importance of this program is to be fully invested in our own container platform and share in the same operational experiences as our customers.

    Our Migration to Kubernetes

    One of the main features of this latest release is the integration of Kubernetes so we wanted to make sure we are leveraging this capability. Working closely with our SaaS team leads, we chose a few services to migrate to Kubernetes while keeping others on Swarm.

    For people already running Docker EE, upgrading to the latest version to get a Kubernetes cluster running is really easy. It only required running a single command to upgrade our existing Universal Control Plane (UCP) in Docker EE – for new users, simply swap “upgrade” with “install”. Yes, it’s this easy:

    docker run --rm -it --name ucp -v /var/run/docker.sock:/var/run/docker.sock docker/ucp:3.0.0 upgrade --interactive

    You don’t need to build your own etcd cluster or follow a detailed installation guide! A vanilla Kubernetes installation is built and managed by Docker EE 2.0 out of the box, removing the complexities of a Kubernetes deployment.

    We then went to work on making sure our existing architecture and solutions worked with the Kubernetes services. Good news – if you’re already working with a Docker environment, introducing Kubernetes with Docker EE 2.0 integrates without any changes in your architecture or tools for your environment.  For instance, we were able to keep all of our existing logging and monitoring solutions. Only minor updates were made to our routing solution to support running Swarm and Kubernetes services in parallel, building on top of Project Calico networking components that come integrated with Docker EE 2.0.

    From there, our application teams took over to move some applications into Kubernetes. No changes were needed in application code since we were only changing the container scheduler, and since we already had Compose files defining our Swarm services, it was simple to translate them for Kubernetes deployment.

    This all happened before public release of Docker EE 2.0. If you pulled an image from Docker Hub in the past couple weeks, part of your request passed through a container orchestrated by Kubernetes in our Docker EE 2.0 cluster!

    Secure Application Zones within the Docker Team

    Our goal as an infrastructure team is to provide self-service infrastructure resources to our development teams. Because there are many teams and sets of applications that go into running Docker’s SaaS products, it’s critical that we are able to segregate the Docker EE workloads and permissions across our 100+ node production cluster. Docker EE handles this through the concept of Resource Sets, and with Docker EE 2.0, this concept has been extended into Kubernetes namespaces.

    By adding nodes to Resource Sets and granting users access to that Set with the role-based access controls, we can guarantee that when a user on it will land on the correct nodes and have the correct permissions to other Kubernetes objects based on the namespace. This means we can provide infrastructure for many teams while keeping workloads secure and separate where required, and prevent resource contention between sets of applications and teams. This makes my life, and the lives of our developers, a lot easier!

    Next Steps

    To learn more about this release:

    commitment to deliver the highest quality software to our customers starts with running #Docker Hub…
    Click To Tweet

    The post Running Docker on Docker Enterprise Edition 2.0 appeared first on Docker Blog.

    Read the whole story
    232 days ago
    "Pulling roughly one billion container images every two weeks"? "Pulling 70 million container images a day" didn't sound good enough? Seems like an "enough basketballs to fill a football stadium" measurement.
    Share this story

    3D Touch Needs to Be Pervasive


    Juli Clover, writing for MacRumors:

    Kuo says that the 6.1-inch iPhone will use what he calls “Cover Glass Sensor” (CGS) technology, relocating the iPhone’s touch module from the display panel (in-cell technology) to the surface glass. The CGS method reportedly results in a display that’s lighter and more shock resistant.

    With this display technology, Apple will add a thin-film sensor to the touch film sensor included in the CGS, but the purpose of the new layer is unknown. It will, however, result in a 15 percent increase in the cost of the touch panel, resulting in a higher purchase price of $23 to $26.

    To offset the cost of the new display it plans to use, Kuo believes Apple will remove the 3D Touch functionality on the 6.1-inch iPhone, which would be a curious move as 3D Touch is well-integrated throughout the operating system that runs on the iPhone at this point.

    I don’t generally link to rumors like this, but this one caught my eye because I’ve been thinking a lot about 3D touch lately. 3D touch is the sort of feature that either needs to be on all iPhones or else should be dropped. If it’s not pervasive across the entire platform, developers can’t count on it. I think that’s why it’s underutilized today. But it’s one thing to wait for older iPhones from the pre-3D touch era to drop out of usage. It’s another for Apple to sell a brand new phone in 2018 without it. I’m not going to rant and rave about something that’s only a rumor — but if September rolls around and Apple ships this new phone without 3D touch to save a few measly dollars, I’m going to rant and rave.

    I also think it’s a serious problem that iPhones have 3D touch and iPads don’t, but iPads are stuck running an OS where 3D touch is the way to bring up a contextual shortcut menu, but that’s a different rant.

    Read the whole story
    232 days ago
    I was kinda surprised and disappointed to find that my new iPad doesn't have 3D touch. Once I discovered on my phone that you can use 3D touch on top of the keyboard to move the cursor around I use that all the time. Having to go back to trying to directly place the cursor in text reminds me how much I think that UX fails.
    232 days ago
    You can use multitouch to do that on ipad, just put two fingers on keyboard and you can place cursor anywhere.
    232 days ago
    Well look at that. That's awesome. Thanks!
    232 days ago
    Good to know, I was wondering the same thing.
    232 days ago
    231 days ago
    I hate that that two-finger gesture isn't on my iPhone as well...especially with an SE, it is ridiculous to move the cursor around.
    Share this story
    1 public comment
    231 days ago
    Wow! Thanks! I didn’t know that either.
    South Puget Sound
    Next Page of Stories