RSSAmplifier

Blog

Software Development by mm-dev on mm-dev

Recent content in Software Development by mm-dev on mm-dev

mm-dev.rocksRSS feed ↗56 posts

Latest posts

(untitled)

(untitled)

(untitled)

Proper Dotted Borders

Issues with CSS dashed and dotted border styles CSS has dotted and dashed borders. They’re fine but don’t always look the way you might expect or prefer. border-style: dotted dots are round (on my site I wanted square) border-style: dashed dashes are nice and sharp but on corners the dashes become L shapes Both dots and dashes are drawn inconsistently depending on how thick they are.…

Hugo Component Pattern

For this example we’ll make a block to display user testimonials. The testimonials might be shown in more than one place on the site, so it’s important that the data be stored in a single place (otherwise when testimonials change in future we’ll need to change it everywhere manually, risking missing some instances). Create data file: /data/testimonials.toml For this project the…

End Results and Bonus

Good I love that it’s silent Apple Silicon is as good as I’d hoped — the bang-per-watt is great for my circumstances with solar power etc The annoyances with not knowing when it’s turned on are largely alleviated with my scripts, as long as I’m using it on my LAN (which, realistically I always am) Bad MacOS, when I do have to use it (sorry Mac fans… I do at…

Running Headless: What I've Learned

The lid Removing the lid turns it on (hall sensors in the base are activated by magnets in the lid) Replacing the lid leaves the device visible on the network, but it can no longer be SSH ed into (some form of ‘sleeping’) During a user-initiated shutdown process (which takes some time, up to 20-30 seconds], replacing the lid re-wakes the machine — so wait 30 seconds or more…

Remote Access

Now I’m past the novelty of plugging in monitors this is how I actually use the machine. Remote builds over SSH I’m working on an Android tablet most of the time , using Termux, Proot-distro and Termux/X11 to run Debian Bookworm arm64. This setup has shortcomings but I find it very comfortable and manage to get 90% of my work done on it. One current problem is that the arm64 version of…

Magnets

Macbook sitting on top of its lid. Don't do it. I experienced a ridiculous amount of confusion and wasted time due to a silly oversight I made (repeatedly!). As mentioned earlier, I’d kept the lid for the Macbook, detached from its hinges and with the broken screen removed, to use as a kind of… lid. When in use, it seemed like the obvious place to put the lid was under the Macbook,…

Factory Reset

The display was removed, things were looking clean. This is a used device. It seemed like the OS was a fresh install, but I like to be sure, so I did a factory reset. The process seemed smooth, until the reboot. I wasn’t sure how long to wait for boot after a factory reset. I’ve had some devices (eg Android phones after installing custom ROMS) take many minutes on first boot after a…

Is This Thing On?

One of the most difficult problems I’ve had with using this machine headless, is knowing whether it’s turned on or not . Seriously. If I connect the external monitor (ok, not headless in that case), no image on the screen might mean: The Macbook is not turned on The Macbook is asleep There is a problem with the monitor or connection (eg bad cable) If I try to connect over NoMachine or…

Removing the Display

Removing the display was relatively easy, but time-consuming. There were lots of screws and they had pentalobe and torx heads, but these are standard in any electronics screwdriver set — I have one of those. I checked a couple of disassembly videos on YouTube to make sure I wasn’t going to encounter any plastic tabs which might break off, short tearable ribbon cables etc, and to find…

It's from eBay. Does it Even Work?

Being an eBay purchase (albeit from a seller with good feedback) the first thing I needed to do was make sure that this thing was actually functional. The screen was damaged (as per the listing) and displayed basically nothing, or to be specific a few single-pixel lines of colour which hinted at whether the machine was on or off, on a black smashed background. Nothing so garish as ‘an LED to…

M1 Macbook Air

Despite its laptop-ness, I decided to think harder on the Macbook Air: It’s thin, light and particularly low-powered It’s fanless Although I’ll never prefer it, Apple (/my?) users tend to love the trackpad , so the ability to check out my apps on the M1 Air’s trackpad and make sure everything feels ok might be useful My issue with the redundant (for me) display being…

Which Mac Should I Get?

The strongest factors affecting my decision were: Cost. I wanted to spend as little as possible. Power usage. I live in a low-power environment and didn’t want to introduce a new device that was going to dramatically increase my electricity usage. Clearly Apple Silicon was what I needed in terms of power. I’ve preferred ARM processors for years and use them for as much of my work as…

Intro

Macbook Air M1 Headless I don’t tend to enjoy using Apple products. I want to be able to make my software available on their platforms though. To publish apps for MacOS/iOS/iPadOS, you really need Apple hardware. Also, if I am to provide software for their platforms, and especially if I want to sell my work, I need to be able to experience my apps in the same way my users will experience…

Set up Vim for Flutter

There are various ways of installing Vim plugins. I use vim-plug in my examples here but I’ll add links to instructions for each plugin so you can do it your own way. Dart As Flutter uses the Dart language, install Dart support for Vim . I add the following to my ~/.vimrc : ' Between the 'plug#begin()' and 'plug#end()' lines Plug 'dart-lang/dart-vim-plugin' Then I restart Vim and run…

Install Flutter

Follow instructions from https://docs.flutter.dev/get-started/install/linux/android Download the flutter_*.tar.xz archive Unpack the archive into $HOME/.local/bin (creates $HOME/.local/bin/flutter/bin ) At first I tried putting this at /usr/bin , but that caused invisible errors in coc-flutter as it couldn’t access the path properly to find the Flutter SDK Add the new path as above to $PATH…

Install the Android SDK

Getting the Android SDK set up manually can be tricky, I think the expectation is that most people will use Android Studio so not a lot of work has been put in to making manual installation user-friendly. Pick a directory where you’ll keep the SDK This is an important directory that will always store all the Android-SDK specific tools, platforms, build tools etc. Various bits and pieces need…

Dependencies and Environment

To get started I’m presuming you have a Linux installation of something like Debian/Ubuntu. General Dependencies Git You probably already have this but just in case: sudo apt install git Ensure Java JDK is installed and recent enough sudo apt install openjdk-17-jdk Stuff Flutter Needs The latest info about this should be here but at time of writing: sudo apt-get install -y curl git unzip…

Parts of the SDK

There are several components making up the SDK. I’ll list them here along with examples of how they can be installed later on when the SDK manager is set up and working. This is just an overview to help your mental model of what’s what, we’re not installing anything just yet. We download them as a zip and place them in a specific directory, as detailed later. Command Line Tools…

Intro

Given the choice, I’d rather avoid huge complex apps like Android Studio. They use a lot of system resources and are very GUI/point-and-clicky. Those things definitely have their place but I prefer keyboard control where it makes sense, and for me programming in Flutter is one of those situations. A lot of what Android Studio does behind the scenes is automatically editing text files and…

I'm Not a Perfectionist

A nice compliment I’ve occasionally been paid is “you’re a perfectionist”. I’m calling it a nice compliment because it’s been delivered by kind people who have intended it as a compliment, and it’s gracious to accept it as it was intended rather than throw it back in their faces. I used to think of perfectionism as a virtue, but I no longer do. Why My View…

Building Apps and Getting Notified

If you’ve followed along with all of the articles in this series you’ll now have: A complete F-Droid build environment set up in a container A Telegram bot raring to go Now we’ll put it all together, add some bash scripts to make everything easy to work with, and see how to get notified in Telegram when the local F-Droid build process has finished. We use a couple of shell…

Creating a Telegram Bot

Create the bot This is done via the Telegram app, so we need to open that up (if you don’t have it installed yet you’ll need to do that first). Use search (magnifying glass icon) to find the bot called ‘BotFather’. This is an official Telegram bot, used for setting up new bots. Tap it to start a chat with it. In the chat with ‘BotFather’, use the /newbot…

Storing Secret Credentials

If you’ve already set up a Telegram bot and added it to a channel, you only need 2 things to be able to write code that uses that bot: The BOT TOKEN - when you create a bot on Telegram you are given this A CHAT ID - this points to a specific chat/channel on Telegram These bits of info are used to send messages via the Telegram API. Anybody who has them can use your bot, so you want them to…

Setting Up the LXC Container

I’m using LXC containers on Proxmox . If you have a different method of working with containers I’m pretty sure you’ll be able to use the info here and repurpose it to your preferences. Create an Alpine container I won’t go into the details of how to do this as it’s specific to Proxmox and no different to setting up any other LXC container in Proxmox. I’m using…

The F-droid Build Process

There are two main git repositories involved in getting an app listed on F-Droid, fdroiddata and fdroidserver . You’ll need local, shallow clones (see below) of them both. The fdroiddata repo The fdroiddata repo stores metadata about all of the apps on F-Droid. On a regular basis, F-Droid servers will run through each of the apps listed in the fdroiddata repo, specifically the…

Intro

Building apps for F-Droid is a fairly complex process, involving: A couple of git repos (besides any your own project may have) Using docker Forking and merge requests on GitLab F-Droid’s specialised build commands F-Droid gives instructions on their process here . I managed to get my first Android app ( BendyStraw ) published on F-Droid but felt a little out of my depth at times and…

Vanilla JS

Toolchain I enjoy using plain/vanilla JS where possible. For my own projects I try to avoid the sprawl and long build times of NPM. I do like to split my code up into separate modules though, and to be able to benefit from bundling/minification etc, for which I use esbuild . I also want to be able to use SCSS and JSDoc for type annotations. So I do allow myself some minimal tooling (the cone and…

The Bad Parts

The Low Memory Killer Daemon - Official Docs . This feature of modern Android versions kills tasks (/apps) when it thinks they are causing memory-related performance problems. It can feel pretty heavy-handed, with apps abruptly closing at seemingly random intervals. In practice this can irritate but I’ve never lost any work because of it. The most noticeable occurrence is when Termux:X11…

Software

Although this is all in relation to working on Android, the software I use is generally the same as if I was on a Linux desktop. That’s kind of the point, nowadays I can use almost the same environment on Android as I can on my desktop. Termux Termux is a brilliant free terminal app and Linux environment for Android. It has most of the Linux commands I need and I can install git , Vim , Tmux…

Hardware

Hardware My favourite and most commonly-used device is my Samsung Tab S8 Ultra: 14.6" OLED display 2960x1848 resolution 16:10 aspect ratio 8-core, 4nm processor 8GB RAM The OLED ( my favourite display tech along side e-ink ) screen is gorgeous. Black is really black and running everything in dark OLED (black) UI modes gets a little more out of the battery too. This tablet is roughly on par with…

Intro

I get a lot of my development work done on Android devices. That usually means a large tablet, but it’s not impossible to get work done on smaller tablets or even phones (although the smaller you go, the harder it is to maintain ergonomics and practicality). With Termux / PRoot Distro / Termux:X11 (explained below) I can run all of my most-used Linux apps just like I was sitting at a…

Android Bluetooth Keyboard Mapping

I use Bluetooth keyboards with Android a lot, and often want to remap keys (eg swapping CAPS_LOCK to CTRL_LEFT ). Maybe it’s a failing in my search technique or I’m doing something that nobody else does nowadays, but whenever I search for info about this I find really old articles with out-of-date info, or just links to apps. To be fair Key Mapper is good and I do use it, but sometimes…

Pipe Dream (Web Game)

Pipe Dream is a game you can play in your browser here . You don’t need to log in or install anything and of course there are no ads/tracking. The game is about as simple as it gets. There are loads of blobs floating about — avoid some of them and eat the others. To control the player move your mouse pointer (or drag your finger) over the control area - a rectangle on the right or…

OLED Devices

Samsung Galaxy Tab S8 Ultra Tab S8 Ultra My main device, I use this for most of my coding work and it’s gorgeous for media consumption. I run Termux X11 with proot-distro allowing me to use a relatively complete Linux (Ubuntu 20.04), including full desktop (aarch64) versions of Firefox and Chromium. If I need more power, or to access a Windows VM, I use this same device via AVNC to VNC into…

E-ink Devices

reMarkable reMarkable 1 (my drawing of John C. Lilly) I use this for notes and sketching. Also sometimes as an e-reader (with KOReader) as the screen size is really nice and it’s a very light device. I find that the act of writing with a pen feels good and believe it helps me with thinking. My thoughts seem to work in a different pattern somehow when I’m using a pen vs a keyboard…

Intro

In recent years I’ve developed pretty strong preferences for a couple of display technologies. For the time being at least, I’ll probably only buy devices that use these technologies (OLED and E-Ink). My preferences are bound to environmental factors, so I should point out that: While using electronic devices I usually work in a relatively dimly-lit environment For most of the year I…

My OLED and E-ink Devices

Generally, I prefer my computing devices in a tablet format. A display, with all the gubbins inside, which allows me to connect my input devices of choice without redundancy. It means I can position the display at an appropriate height. If I have a keyboard I like, I can use it with all of my devices, rather than it being glued inergonomically to a particular screen. The same applies to pointing…

Staying Pragmatic

I’ll never stop learning new things. A while back I built my first Garmin watch app . This involved using: A new-to-me language called Monkey C and its special compiler A device simulator Garmin’s Connect IQ SDK Most developers are doing this on Windows, using either Eclipse or VSCode . VSCode is very nice software but I try to avoid Microsoft. If I must use Windows I boot up a virtual…

My 'Big PC'

Sometimes I need to step up to the next level and use a desktop PC: Some development tools are not available for my Android system architecture (AArch64), namely Garmin Connect IQ tools and a small part of Flutter (which I use to develop Android apps) It’s useful to connect other devices via USB to test software on a real device (eg my Garmin watch) during development (while it may be…

Keeping My Equipment Powered

Solar Power My aim is to live completely off solar power. I’m not quite there yet. With my current system it works out roughly like this: During the sunniest 6 months of the year I can basically do what I want During the darker months , depending on how much and what kind of work I have (and therefore how much power my computing devices need), I must supplement my power by plugging into…

Intro

Small Space, Small Footprint (Cara)-Van Life A few years ago I decided to leave bricks and mortar behind and move into a caravan. A small, summer touring caravan, German-built in 1983. The construction is more solid than a modern ‘van would be, but it is, ultimately, built for summer. Painted caravan The first couple of winters in here were hard, but there was a feeling of excitement and…

Work Considerations

I’ve had to adapt my working methods to fit with this current lifestyle, namely to solve problems related to the following key areas: Tablet arms Physical Working Space Small! So I have a couple of tablet arms extending from a pole near the ceiling. They provide me with a nice healthy angle for my tablets while I’m working, then when I’m not working and don’t need them they…

dontdillydally (Web App)

dontdillydally helps you track time and money. Aimed at the self-employed Focused on simplicity and ease of use As this is a web app you don’t need to install it, just go to dontdillydally.app to start using it immediately in your browser. How to Use Tap the bird at any time in the app to see the built-in guide On the left-hand side of the app you will see icons which you can tap to change…

(untitled)

Holistik: Activity Overview (Garmin Watch App)

Garmin watches (such as the Fenix 5 Plus which I have) gather a lot of info about your exercise activity, but to see it you need to log in to your Connect IQ account in their app or a browser, using a separate device such as a phone or laptop. One of the things I like most about this watch is that despite the usual ecosystem tie-ins, you can do most things with it offline, even including GPS…

(untitled)

Download .

(untitled)

Download .