JUnit Assumptions API

Today, I discovered a powerful feature in JUnit: the Assumptions API. This API allows you to define assumptions for your tests. If an assumption isn’t met, the test execution is aborted rather than marked as failed. This distinction is crucial in scenarios like conditional test execution in CI pipelines. When a test is skipped due to an unmet assumption, it appears as “skipped” in the test reports, not as “passed” or “failed....

Status: 🌿 Budding · Planted: Aug 24, 2024 · 1 min

(rb)² – Road Bike Route Bot auf Mastodon

Ein Erfahrungsbericht, weil ich … mal wieder was mit Geodaten machen wollte (und mich OpenStreetMap schon eine ganze Weile immer wieder umtreibt) schon länger darüber nachdenke, wie gut es wohl funktioniert, einen zufälligen Fahrrad-Routenvorschlag nach eigenem Gusto zu erzeugen schon länger im Fediverse (Mastodon) bin und während des Alle-Verlassen-Twitter-Hypes einen Bot zu bauen nahe liegt Also los geht’s. How hard can it be? Zunächst soll nicht unerwähnt bleiben, dass Dienste wie Strava erlauben, eine zufällige Route zu erzeugen; meinen Geschmack treffen die Ergebnisse jedoch eher selten....

Status: 🌳 Evergreen · Planted: May 9, 2022 · 6 min

comparing the incomparible -

Lucky me, living in the metropolitan area of Nuremberg, … this year I attended three different developer-oriented open spaces hosted within one hour driving range from home. devops camp in Nuremberg, six iterations so far, first one back in March 2014 And starting this year there are now two developer-centric events (both more or less claiming to be the first one): developercamp in Würzburg, back in September 2016 swecamp in Tennenlohe/Erlangen, right yesterday & today...

Planted: Nov 20, 2016 · 4 min

Starting a local developer meetup

As Ansbach (and the region around it) neither has a vibrant developer community nor a (regular) meetup to attract people to share their knowledge, mainly @niklas_heer and me felt like having to get active… Therefore we came up with the idea to host a monthly meetup named /dev/night at @Tradebyte office (from August on regularly every 2nd Tuesday evening), give a short talk to provide food for thought and afterwards tackle a small challenge together....

Planted: Aug 10, 2016 · 3 min

Pig Latin Kata

Yesterday I ran the Pig Latin kata at the local software craftsmenship meetup in Nuremberg. Picking Pig Latin as the kata to do was more a coincidence than planned, but it turned out to be an interesting choice. So what I’ve prepared were four user stories (from which we only tackeled two; one team did three), going like this: (if you’d like to do the kata refrain from reading ahead and do one story after another)...

Planted: Aug 5, 2016 · 3 min

Serverless Pub Sub with AWS IoT

I’m currently very interested in serverless (aka no dedicated backend required) JavaScript Web Applications … with AWS S3, Lambda & API Gateway you can actually get pretty far. Yet there is one thing I didn’t know how to do: Pub/Sub or “Realtime Messaging”. Realtime messaging allows to build web applications that can instantly receive messages published by another application (or the same one running in a different person’s browser). There even are cloud services permitting to do exactly this, e....

Planted: Apr 2, 2016 · 4 min

Heroku custom platform repo for V8Js

Yesterday @dzuelke poked me to migrate the old PHP buildpack adjusted for V8Js to the new custom platform repo infrastructure. The advantage is that the custom platform repo only contains the v8js extension packages now, the rest (i.e. Apache and PHP itself) are pulled from the lang-php bucket, aka normal php buildpack. As I already had that on my TODO list, I just immediately did that :-) … so here’s the new heroku-v8js Github repository that has all the build formulas....

Planted: Mar 28, 2016 · 1 min

V8Js improved fluent setter performance

After fixing V8Js’ behaviour of not retaining the object identity of passed back V8Object instances (i.e. always re-wrapping them, instead of re-using the already existing object) I tried how V8Js handles fluent setters (those that return $this at the end). Unfortunately they weren’t handled well, that is V8Js always wrapped the same object again and again (in both directions). Functionality-wise that doesn’t make a big difference since the underlying object is the same, hence further setters can still be called....

Planted: Mar 25, 2016 · 1 min

V8PromiseFactory

V8 has support for ES6 Promises and they make a clean JS-side API. So why not create promises from PHP, (later on) being resolved by PHP? V8Js doesn’t allow direct creation of JS objects from PHP-code, a little JS-side helper needs to be used. One possibility is this: class V8PromiseFactory { private $v8; public function __construct(V8Js $v8) { $this->v8 = $v8; } public function __invoke($executor) { $trampoline = $this->v8->executeString( '(function(executor) { return new Promise(executor); })'); return $trampoline($executor); } } … it can be used to construct an API method that returns a Promise like this:...

Planted: Mar 25, 2016 · 2 min

thoughts on phpspec

As I’ve recently been poked whether I had used phpspec and I had to negate, today I finally gave it a try (doing the Bowling Kata) … phpspec has some class and method templating built into it. If for example a test fails due to a missing function, it asks whether it should create one (that does nothing at all). This is nice but IMHO breaks the workflow a bit as you have to move the cursor to the terminal window and answer the question....

Planted: Mar 24, 2016 · 2 min