LostFocus

Hi, I'm Dominik Schwind, friend of the internet. Here is /now.
Say hello to me on Twitter or maybe even subscribe to my weekly newsletter.

Bookmarked https://www.manton.org/2022/09/26/introducing-meridian.html.

This looks pretty useful – I’ve been trying to build something like it with OSM overpass but it’s always been a slog. Great URL, too.

Bookmarked https://waxy.org/2022/09/a-mysterious-voice-is-haunting-american-airlines-in-flight-announcements-and-nobody-knows-how/.

Some American Airlines flights are haunted. It’s already kind of funny – and then you watch the video.

A mysterious voice is haunting American Airlines' in-flight announcements and nobody knows how - Waxy.org

A mysterious voice is moaning and grunting on American Airlines' in-flight announcement systems, and nobody knows who or how they're doing it.

A mysterious voice is haunting American Airlines' in-flight announcements and nobody knows how - Waxy.org

The droid in the new Star Wars series is called B2EMO. Which in hindsight would have been a better name for WordPress.

The droid in the new Star Wars series is called B2EMO.

Which in hindsight would have been a better name for WordPress.

Bookmarked https://www.theverge.com/2022/9/22/23365781/tiktok-youtube-bootleg-ratio-social-platforms-original-content.

This is pretty smart – original content vs repackaged "bootleg" content which originated on other platforms.

How platforms turn boring

How to tell when a platform is going bad.

How platforms turn boring

Bookmarked https://blog.webpagetest.org/posts/will-html-content-make-site-faster/.

It’s not the world’s biggest surprise that real HTML content is faster than some JavaScript monstrosity but it’s nice to see it confirmed like that.

Will Serving Real HTML Content Make A Website Faster? Let's Experiment! - WebPageTest Blog

In this post, Scott runs WebPageTest Pro Experiments on several popular websites to see how serving more meaningful HTML will impact their upfront performance.

Will Serving Real HTML Content Make A Website Faster? Let's Experiment! - WebPageTest Blog

Bookmarked https://www.theguardian.com/world/2022/sep/17/museums-on-prescription-brussels-tests-cultural-visits-to-treat-anxiety.

Psychiatrists in Brussels can now prescribe free visits to museums – what a wonderful idea. Maybe I should go to a museum on my next day off.

Museums on prescription: Brussels tests cultural visits to treat anxiety

Psychiatrists in the city can now prescribe free visits to cultural venues to complement other treatments

Museums on prescription: Brussels tests cultural visits to treat anxiety

Oh god no why

Oh god no why

A screenshot of a LinkedIn email with the subject "49 people noticed you"

Bookmarked https://www.wired.com/story/slack-status-updates-green-dot/.

The idea to have a little status page in Slack sounds pretty neat. Even though it might be the first step towards turning Slack into an intranet.

Could Slack Finally Fix the 'Away' Status?

The workplace messaging platform is working on new ways of telling our coworkers that we’re really, really not available.

Could Slack Finally Fix the 'Away' Status?

Bookmarked https://www.youtube.com/watch?v=M1-YeqGynlw.

I can’t quite figure out why some of these things work and how one would use them but this video is fun.

20 Mechanical Principles combined in a Useless Lego Machine

Useless machine that utilizes different mechanical principles. Enjoy!00:00 Schmidt coupling00:17 Constant-velocity joint (CV joint)00:30 Universal joint00:42...

20 Mechanical Principles combined in a Useless Lego Machine

Bookmarked https://www.theatlantic.com/technology/archive/2022/06/spam-twitter-account-horse-ebooks-human-internet-relationship/661409/.

The tweet is absolutely correct – everything does actually happen so much. And yes, I was as disappointed as everyone when horse_ebooks was revealed to be not a ghost in the machine but just two randos.

The 10-Year-Old Tweet That Still Defines the Internet

A cryptic utterance from a supposed spambot never lost its relevance.

The 10-Year-Old Tweet That Still Defines the Internet

I don’t even commit every 10 minutes.

I don’t even commit every 10 minutes.

I actually quite like the new The Verge redesign.

I actually quite like the new The Verge redesign.

It is surprisingly hard to mock the stdClass response that we get from a SoapClient – there are workaround with json_encode/json_decode but that is really not a nice way to got about these things. SimpleXML doesn’t help, so why not use the SoapClient itself? Thanks to this comment on StackOverflow we know how to do these things now.

Let’s assume we have an example response and the WSDL file and that’s how we get the response: (and yes, I’m aware of the fact that I could just manually do that and have the finished stdClass in the test, but that seems tedious.)

$method = 'getData';
$mockResonseFile = 'soapResponse.xml';
$mockWsdl = 'test.wsdl';

$xml = file_get_contents($mockResonseFile);

$soapClientMock = $this->getMockBuilder(SoapClient::class)
    ->setConstructorArgs([$mockWsdl])
    ->onlyMethods(['__doRequest'])
    ->getMock();

$soapClientMock->expects($this->once())->method('__doRequest')->willReturn($xml);

$response = $soapClientMock->__soapCall($method, []);

Everything is a bit dumb, isn’t it?

Everything is a bit dumb, isn’t it?

Time to give this old Omnibus episode another listen.

Time to give this old Omnibus episode another listen.