Thursday, 24 July 2025

IntelliJ might be evil


  • Very good
    • Generally, it's very good - the refactoring etc - even if Kotlin's refactoring could usefully be beefed up with 'extract extension function' and 'move method to other class. 
  • Evil:
    • IntelliJ is rife with modal dialogues
    • They pop up tiled panels, but completely fail to flash them or otherwise draw the eye to them, so you can be trying to do something repeatedly and cursing at it, not noticing the quiet little panel in your peripheral vision because you're looking at something at the top of the frame.
    • The terminal emulator is tantalisingly function enough to use, but rubbish in so many gotchyas.
  • I always lose how to set the colour of the line numbers in the gutter.
    • It's something that's apparently only available once you save a customised Colour Scheme.
      • Or maybe not. Try without saving first. 
    • Preferences > Editor > Colour Scheme > General > Scheme: [Whatever...] (cog-menu) > Duplicate Theme
      • Under the non-default Colour Scheme > General > Code > Line number and Line number on caret line

Wednesday, 18 June 2025

Docker has evil

Here's something I chased around for an hour or so.

You get the minimal version: 

% cat Dockerfile
ARG THANG=zero
FROM alpine
ARG THING=one
RUN export THING=two && echo ${THING?} && echo ${THANG?}
% docker build --no-cache --progress=plain .

 

Account for the weirdnesses in the output. Here's a non-spoilery except:

------
 > [2/2] RUN export THING=two && echo one && echo ${THANG?}:
0.072 two
0.072 /bin/sh: THANG: parameter not set
------
 

Sunday, 19 May 2024

Amazon Fire Kids mode accessibility voice thing is sort of evil

My son plays TT RockStars for school, but unfortunately if he has a tablet with anything else on it, he'll do that instead.

We had an old iPad Air which was horrible and slow, but functional, but the screen shattered and left splinters of glass. It's probably not worth repairing, so I bought a glass-on-top cover to try to make it safe to use. Unfortunately I put the first one on upside down by mistake, covering the button, so it picked up splinters of loose glass I can't remove from it, and then shattered the spare one while peeling off the backing. Argh.

I found an old 7" Amazon Fire tablet - and after noticing we'd forgotten to cancel the Kids+ subscription for the past few years (thanks to Amazon for not pointing out that we weren't using it but continuing to pay for it, yay capitalism) - it's mostly OK. Except that TT RockStars doesn't speak the questions, which Max finds helpful to keep his attention.

I tried turning on the accessibility voice, in case this was the solution.

It... wasn't. And worse, it changed the UI so much that the thing bordered on unusable - there should at least have been some sort of idiot mode help button in the notification bar!

1. To turn off the voice - because it's soooo grating - double tap with three fingers.

2. To get into the settings to disable accessibility entirely:

From the child profile, tap the notification bar - it should highlight. (If you need to type the pin on the keyboard to get into the child profile, it's probably similar typing the parent PIN, next).

  1. Double tap but hold the second tap and pull down. This should open the navigation.
  2. Hereafter, tap each thing and wait until it highlights, then double tap it:
    1. Note: when you double-tap the screen, you are NOT tapping the thing under your finger, you're tapping the thing that has the green rectangle highlight around it.
    2. The settings gear
    3. The parent profile
    4. Each digit of the PIN
    5. The enter key on the number pad
    6. Hopefully you're looking at the settings screen
    7. Drag down to 'Modify web browser'
    8. Swipe left to right and it should scroll to the next page down
    9. Tap, then doubletap accessibility
    10. Tap, then doubletap Voiceview Screen Reader
    11. Tap, then doubletap voiceview
    12. Tap, then doubletap continue
    13. Should have turned the damned thing off.

3. If you make the mistake of entering the tutorial and then 'try gestures', only to find you can't do anything to get out of 'try gestures' mode because everything you do is just printed on the screen and there's nothing saying "4 finger double tap to leave this screen"... press the power button. Or do a 4 finger double tap.

Friday, 13 October 2023

Kotlin is not evil

 I like Kotlin. But there are some grumbles:

  • I really miss the ?: operator.
    • It makes me squirm to write ${if (condition) value1 else value2} as if some idiot thought Python was a good idea, instead of ${(condition) ? value1 : value2} like Java, C, Perl.
    • It's especially saddening when ?: is right there in front of me like a tease to remind me of its absence.

Monday, 23 May 2022

I hate Macs

I hate:
  • The top-of-screen menu system. The top-of-window menus on Windows/Linux are only marginally better. Best of all are the pure context-sensitive menus of RISC OS.
  • The apple-key/control key clash between Windows/Linux and Mac.
  • Lack of focus-follows-mouse and typing into background windows
  • find does not have '.' as the default directory (despite grep -r having that)
  • Struggling to have the dock at the bottom of the top monitor.
  • The inflexibility of binding global hot-keys without having to 'allow' it for every application individually.
  • The red dot on system settings that nags me to log in to apple cloud even though I don't want to and never will.
  • My wife's Mac - we linked her apple watch to her account, and the computer grew slower, and slower, and slower. We gave her a different account ON THE SAME MACHINE without reformatting or anything other than a different user WITHOUT THE WATCH LINKED, and it runs like a dream.
  • How the whole system arrogantly behaves as if it's perfect, but when it goes wrong, it's nearly impossible to work out why or how to fix it.
  • That you can't set 'Even more space' on a monitor in display preferences, just because Apple is too lazy and opinionated to let you exceed their range of scales: I have a screen in the office which is physically as large as my 3840x2160 at home, but is only 2650x1440 in resolution. I don't care about text looking worse: I want 66% scaling. I want the effective screen real estate back!
    • I've tried the alternatives I've found for this, and they don't work. Or I'm too stingy to pay for what should come for free. apple.
    • Notwithstanding https://forums.macrumors.com/threads/guide-fixing-external-monitor-scaling-and-fuzziness-issues-with-mbp-and-osx.2179968/ I still have no overscaling.
  •  You can't set 'tiled' background images. Not unless you happen to find an image which the system mysteriously considers 'small' enough. This doesn't mean pixel-small, but some weird other idea. Once you find an image like that, the 'tile' option appears, AND THEN YOU CAN SELECT ANY OTHER IMAGE TO TILE REGARDLESS OF SIZE. If apple had any pride, they'd at least re-evaluate the setting and block it for images of the 'wrong' size. But... apple care so little about anything other than taking money, they don't even care about their own software. apple developers have no pride in their work: if they did, they wouldn't work there.
    • aPPLE IS WORSE THAN MICROSOFT EVER USED TO BE.
    • apple UIs are unintuitive, inconsistent, and badly designed.
    • apple have contempt for their users. Once they have your money, they don't care
    • apple starts with a silent 'cr'.


I like:

    The fingerprint thing. But then my Android phone had that before the macbook. Some of the screensavers are nice.

Every new Mac...

Things I have to do for every new Mac work forces me to use (and they only force me to use them because apple are so scared of fair competition that they make it illegal to run their software on any other hardware).
  • Delete all the icons to the crappy Apple apps that Google does much better.
    • Remove all icons: defaults write com.apple.dock persistent-apps -array
  • Download Chrome
  • Preferences
    • ScreenSaver
      • Hot Corners
        • Delete the stupid bottom right 'notes' rubbish
        • Set up 'Start screen saver' in the top left
    • Keyboard
      • Input Sources
        • British PC
      • Function keys as function keys
      • Shortcuts
        • Services
          • General
            • Launch Terminal -> F4  (see Automator later)
    • Trackpad
      • Disable 'Natural' scrolling
  • Finder > Go > Go to Folder.
    • Type ~/Library in the Go To Folder
    • Drag the word 'Library' to the Favourites
      • Allows Automator to save in Library/Services
  • Automator.app
    • Choose Application type
      • Library > Utilities > Run shell script
      • Paste: osascript -e 'tell application "Terminal" to do script ""' -e 'tell application "Terminal" to activate'
      • Save in ~/Applications as 'StupidTerminalLauncherApp.app' or something.
    • Choose type Quick action
      • 'Workflow (actually quick action)' receives no input
      • Library > Utilities > Run shell script
      • Paste:
        • open -a /Applications/StupidTerminalLauncherApp.app
        • This indirection avoids having to give EVERY app permission to open Terminal, if you press f4 on it.
        • Used to be Applescript - on run {input, parameters} tell application "Terminal" do script " " activate end tell return input end run - but this is terser.
      • Click the 'Run' |> triangle to check the terminal appears
      • Go allll the way up to the top of the screen to save your work from the window right down at the bottom of the screen.
    •  Quit Apple's Settings (if it's running) and re-launch it
      • Keyboard> Shortcuts> Services> General> It should appear here. Eventually.
        • It WON'T let you press anything other than a function key
        • If you press the wrong function key, you must move the pointer OFF the highlit field and then back on again, or it will ignore you.
        • Heaven help you if you actually want to override some stupid Apple default, like Fn-E, because Apple certainly won't let you. It just goes 'beep' to tell you that you that Apple don't understand why you might want to do something Apple weren't clever enough or considerate enough to think someone might want to do. You must comply with Apple.
      • Oh, but it seems you can map globe to ctrl: Settings> Keyboard> Shortcuts (?!!?)> Modifier keys (!?!)> Globe key = Ctrl
  • Shell
    • Set up 'infinite history'
    • Install xcode (cc just comes with Unix, normally)
    • brew
    • magic docker - podman... or actually now brew docker colima
    • Disable stupid long-press keyboard letters international stuff:
      • defaults write -g ApplePressAndHoldEnabled -bool false 
      •  I want K to auto-repeat, not to offer ķ - I'm on an explicitly BRITISH keyboard. If I want international letters, I'll insert them from the characters thingy. If you MUST offer the long-press thing, bring up a link to the relevant part of Settings alongside the proffered character!
  • Always show .files in finder and search dialogues
    • defaults write -g AppleShowAllFiles -bool true

Monday, 5 October 2020

Graphical User Interfaces are evil

Many GUIs have this sort of issue:

Until a recent upgrade, every time I tried to reconfigure a machine on the Kubernetes dashboard nodes page: scrolling to find it, clicking to open the menu, moving to choose the menu item... the page refreshed just a fraction of a second before I could click on the now absent menu item.

Similarly, trying to read labels from the 'show all' dynamic link: before I could read the labels and values properly, the page refreshed with its inexorable 5 second march.

It was like playing Crossy Road, but without the intellectual rigour.

Many other applications have similar problems: long lists of items which are continually re-sorted as more data comes in - forcing me to wait until the list takes several seconds to stop jumping around, despite the item I want having been on the screen in various places from the very start - so this sort of issue is endemic and really should be addressed by UI frameworks: I'm looking at Microsoft, Apple, Gnome, KDE, Chrome, FireFox, etc.

What I expect to happen:
  1. When I scroll or click anywhere on a page (even the background), the refresh/update timer should reset, and animations/updates should pause.
  2. The local configuration should be able to set the refresh time, in addition to changing the background colour (because wall-mounted displays might need faster updates than a human).
  3. The local configuration should be able to prevent the page from jumping to the top on refresh/update - at least, if the user has been active within some locally configurable time. (Again, wall-mounted displays might benefit from jump-to-top behaviour.)
  4. The interface should detect that a press action has landed in a region of the screen where the resulting operation has changed within a normal human reaction time - different machine, etc - and take suitable action, particularly if the region appears similar: proactively alerting the user of the change (e.g. displaying a slowly fading a circle around the pointer, beeping, etc) and/or ignoring the likely accidental operation (but with feedback similar to the proactive alert to explain why the operation was ignored).

Friday, 15 March 2019

Cucumber is evil

Cucumber. What to say about it.

Cons:

  • Thin end of the wedge/bait and switch:
    • It's nominally free and very easy to start using, however there is no central 'best practice' for maintainability to address the sorts of issues that arise from serious 500+ multi-targeted use.
    • With a tool this flexible, centrally collected best practice is vital, but you have to pay for training that isn't necessarily going to address the various scaling issues, and
    • By the time you reach that point, you've invested so heavily in it, it's hard to switch.
  • Encourages use of Ruby
    • Nobody actually uses the 'duck-typing' feature - everyone really wants a more strictly typed language with type inference like Kotlin because nobody wants run-time failures.
  • No enforced separation of Given When Then step definitions.
    • You have to structure your language to high level concepts and only to work with the GIVEN/WHEN/THEN prefixes, but the baked-in example steps are unhelpfully low-level and work with any prefix.
    • You should use:
      • GIVEN noun-phrase: user "Sam" with black handbag
      • WHEN sentence: "Sam" goes into new airport security tunnel
      • THEN check-sentence: check "Sam" emerges from tunnel
      • AND check "Sam" still has handbag
  • No parallel execution support. Sure you can use 'parallel_test' or 'parallel_calabash', but...
    • that leaves you at the mercy of any of your threads/phones/browsers crashing. There should be a central feed queue of tests, supplying test execution threads and monitoring their health - re-scheduling tests if the thread died, or whatever else.
    • and even with parallel_cucumber offering a central queue, you still have an ugly nightmare of layers.
    • you have to collate reports yourself. Which is a nightmare with the ugly HTML source code that wasn't designed with parallel anything in mind.
  • Internal formatters do not follow the same naming convention as user-supplied ones: -f pretty invokes class Pretty, whereas -f myformatter is an error, not invoking class MyFormatter. This is not clearly documented.
  • Error handling is deeply inconsistent. Goes ten times more when you throw Calabash iOS or Android into the mess.
  • No support for multiple concerns: modern systems test on several levels - basic functionality, user interface consistency, activity tracking, response time, etc. There is no provision for a test to fail in response time or sending activity markers, but to pass in basic functionality: it's an all or nothing test.

    Pros:
    • Non-programmers can use it, so long as the language is clear enough and the system under test simple enough, and you have programmers to write sufficiently unambiguous steps, and the number of steps doesn't get completely out of hand, and you have some sort of auto-completion to make it easy to navigate which of the hundreds of step names you want.
    • Actually, there aren't really any pros.