Ionic e2e tests – scroll to your goal

Another slightly niche tip on end-to-end testing with the latest Ionic – 4.x stable as of this post. Maybe it’s obvious to more seasoned JS testers, but I struggled to find all the info in one place to successfully implement a test that needs to scroll content in an Ionic app. (I would assume a similar approach will also work when using Protractor with any other modern Angular app.)

The specific scenario? You’ve got a ‘thing’ your test needs to click, but it’s a scroll / drag away. It might technically be in the viewport, but below something else, like Ionic’s tab bar. Seems like a relatively common occurrence, and one that should be simple to deal with in your test.

Continue reading

In defence of deterministic password managers

[Update 30 January 2019 – I made an Ionic mobile app that does just this. 🙂 Read all about it!]

If there’s one thing two decades on the internet has taught me, it’s that techies enjoy binary battles between opposing and equivalent technologies.

iOS vs Android. Vi vs Emacs. Tabs vs spaces. Didactic and fundamentalist exposition is kind of the norm when it comes to these discussions.

One topic I had not expected to see alongside these traditional battlegrounds is the nature of the tool one uses to manage distinct passwords across web sites. Until now.

Continue reading

Multi-threaded quicksort! In PHP!

Yeah! In PHP!

Why would you do this?

Well, I went to a PHP meetup presenting some common implementations and comparing them to the speedy native PHP implementation of sort() and related functions.

I figured that while efficient sorting isn’t the most common use case for PHP – and in a web context you often don’t want to let each user spin up numerous threads – for command line cases this approach should be able to provide a real performance boost.

In particular, the already-PHP-favoured quicksort algorithm works with a divide and conquer approach that should be perfectly suited to divvying up work between threads.

Continue reading