Sunday, June 09, 2024

Select URLs in PuTTY

It annoyed me for ages that you cannot just double-click on an URL in Putty to open that URL in your browser. Even selecting an URL for copy/paste is cumbersome.

Yesterday I found the next best thing: Select URLs in PuTTY

In essence you tell putty which characters form "words" and which are stop-characters. More here.

So on the "Window > Selection > Copy" tab, if you add :?= and some other URL characters to class 2, can at least can double click on an URL to select the full URL.

Don't forget to save those settings to your configuration(s).

Friday, December 29, 2023

Jackson vs. Android package optimization

 For some weird reason (including a 20MB text file to be precise) I wanted to turn on 

shrinkResources true
minifyEnabled true

in my Android app.
I did the compression alright, but the app stopped working.
I got weird Exceptions like 
Cannot construct instance of `g1.k` (no Creators, like default ...)

Well that pointed me to obfuscation, because I definitely don't have classes and members like that.

Jackson relies on reflection to find your class properties and getter/setter functions, so you should not obfuscate them. Duuuh.

They way to turn that off is in the file.

-keepattributes *Annotation*,EnclosingMethod,Signature
-keepnames class com.fasterxml.jackson.** { *; }
-dontwarn com.fasterxml.jackson.databind.**
-keep public class** {

The last part keeps the whole package where all my entity classes are.

Sunday, April 16, 2023

NULL values again

Today I learned that you essentially cannot concatenate (concat, ||) nullable columns properly in DB2/SQL.

To be honest, I should have know this of course.

I have a table that records money spent, with a date, text, account and a physical location, e.g. a town, district, ... indicating where the money was spent.

It is nullable because not all transactions need to have a place recorded.

For some statistical analysis I wanted to create one column with text and account and the location simply concatenated into one, like account||' '||text||' '||location.

Turns out, then the location is NULL the whole string will turn NULL

Which reminded me - painfully, after about 30min - that NULL is not a value. You cannot do anything with NULL.

So you have to cast it away to a default value, e.g. with coalesce(location,'dummylocation').


Wednesday, December 28, 2022

OxygenOS 13 missing per-app language

A couple of weeks ago I got the Android 13 / OxygenOS 13 update for my OnePlus 9, looking forward to the per-app language feature from Android 13.

Reason for that is, that I just like to run my devixes in English, but some local (i.e. Austrian or German) apps just have terrible translations, or I am just not in an "English context", i.e. when Banking or doing my taxes.

Some apps of course can set the language within the app, but some just take the system settings.

Android 13 allows to override this (with a tiny little help of the app, it only has to declare in the manifest which languages it actually has translations for).

But it appears OxygenOS13 failed to implement exactly that feature.


Sunday, August 28, 2022

First UFO sightings

So, Max finally did it. He found the HW to read our old floppy disks and got our 1985/86 software back and onto proper modern media ;) 

And then we both separately tried to get a good old DOS to run. My attempt was in a virtualbox on my PC... Tricky to get the program/files into that DOS box because you can't mount a folder from the host then (DOS doesnt have vbox extensions), nor do you have networking on it... so I had to dreate a disk image file, put the files on that, and mount it as disk 0 ("A:") to the DOS vm. And this worked.

Ladies and Gentlemen ... I give you... 


Please don't ask me what UFOS stood for... the U was most surely "Unterricht" (=education), but I can't remember wha tthe F would be for. I guess I need to try and find that in the sources.

Speaking of which, we did some wonderful stuff - and remember that was two 17y/o kids in high school working on 4.77MHz PCs with just 2 floppy disk drives, natively in x86 Assembler (Macro Assembler if that makes a difference to you, it doesn't to me, because I always considered the "marco" part a primitive pre-processor, not a different language) .

Core architecture was the base module (a .com file), that would load the various modules from disk when needed, and supply a bunch of common functions (a core library, if you will) as a  service interrupt. So when a module wanted to do some windowing/output stuff it would  - as was common practice under DOS - load a function code into the AH register (the AH part of the accu, ok) and call INT F0h, like you would do for a DOS or BIOS function.

The rest seems to be pretty awful, not only because of the lack of documentation.

The above-mentioned interrupt handler, utilized a jump table, i.e. use the function code in AH as an index into an array of function addresses to call those functions (pretty cool for 17y/o, right?) but I didn't check any boundaries... I probably thought I wouldn't need to, because only us two boys would ever call this interrupt... pretty stupid.  (And when I say I, I'm pretty sure that I wrote this piece of code at that time, and looking at the source, it look remarkably like my code)

Monday, August 15, 2022

Fun ahead

Not a lot happening here tech-wise these days.

Except: an upcoming "archaeological" adventure.

Max, my longest and dearest friend found a bunch of disks (yes, those: 5.25" and 3.5") from way back when. We were in high school together when the first PCs came out and started to get used in school administration. Obviously, there was a lack of software for exactly this back then. We had good ties to our school administrator (who happened to be our geometry teacher as well), and since the two of us made up about 50% of the school geeks (there were two others and of course all four of us where friends) he sometimes allowed us to use his "official" computer, an Olivetti (_that_ long ago), and also the only one sporting a 10MB (!!) hard disk.

So at one point, Max and I set out to write a piece of software that would help him in some administration tasks, namely creating and assigning the whole schools class schedule, making sure that all the boundary conditions were taken care of. Conditions like the (weighted) hours per teacher, or honouring their days off. Stuff like that. Not some fancy logic that would automatically take care of it, but supporting it. 

The fun part: this was all written under MS-DOS in 8086 Assembler (yes) and we even created a nice (character) windowing and menu framework for this.  At least I'm pretty sure we did.

So, Max happened to find the disks with the sources for it.

Now we need to get access to disk drives (3.5 and 5.25),  and connect them to a modern PC.I checked: I really don't have any. And then hopefully get some DOS running in a VM and see what will happen. 

Fingers crossed that any of this is still readable.

PS: I just might post some stories of that time here in the upcoming weeks, and of course the progress of our digital excavations.

Sunday, April 10, 2022

Brave New Post-Brexit World

So, last week I had my first (business) trip to the UK since the Kingdom in its infinite stupidity decided to leave the EU.

It's been a while - Jan 2019 to be precise. Not because of Brexit, but of course because of the COVID-19 pandemic, that kept everyone from travelling.

There were two major changes and experiences that sort-of relate to tech in a larger sense, so I want to report on them here.

Mobile Phone/Data and Payments


Let me start with the latter: Even when the UK was still part of the EU using any payment card (credit card like VISA, or debit card like the then maestro card that meanwhile has been turned into Mastercard) was more costly than in mainland Europe. No, I should be fair, this got nothing to do with them Brits living on an island of their own, but with them having their own currency. EU regulations didn't allow to charge for payments or withdrawals within the Eurozone[1], but they still could charge you for the currency conversion. So even before Brexit paying for a 1£ could potentially end up like 2-3€ on my account[2].

Back then, I already pondered getting a UK debit card, that I'd only need to charge once every blue moon, and thus limit the charges & fees.

This time I did. Some research amongst friends and colleagues led me to try Revolut. There are many similar other fintech startups with comparable offerings. I chose Revolut because people around me used it (and hence I hoped to piggyback on their experience) and it appears all have had the same startup issues in the last couple of years. Revolut it was.

I opened my account on a commuter train ride in & around Vienna[3], got an EU IBAN, and transferred some money from my regular (Austrian) checking account, created a "GBP" sub-account - or whatever you want to call it - and a virtual credit card. Thought I try my first trip without a physical one - and also I had only 1 week left, so chances it wouldn't arrive in time were high. Why bother at all, then.

Ah, yes, and I linked this card into Google Pay, to facilitate contactless payments from then phone.

And guess what? It worked like a charm. No need to run a tab at the pub, hence no need to receive this credit-checking looks from behind the bar. Just tap the phone, and that's it.

Since I started with only 10€ for a start, of course I immediately had to top up  the account from my checking account again, but that only took half a minute, without any charges...  - in the pub with the pint half empty alredy Life's good.

Mobile Phone/Data

Well what can I say. I'm an idiot, I guess. I knew that with Brexit the UK also got out of the EU roaming agreement. Previously, I used to ignore roaming in the UK. Since I only was there for a couple of days at a time, there wasn't even the slightest risk of me violating the fair use limitations, since most of my data volume was always used in Austria. And I knew that this was no longer in place. I knew that roaming charges (on data) again applied.

But I forgot how insufferably high they are. Just switching on my phone after landing at LHR, I immediately got 2 texts from my operator: the first informing me that I just used 40€ worth of roaming, and the other letting me know that they cut me off, because I reached the 50€ limit. And I hadn't even opened my seat-belt yet[4]. 

So I jumped on the public Wifi in the terminal, whatsapp'd the colleague who handles our phone contracts and packages and he was nice enough to immediately sign me up for the roaming package.

Crisis averted - for now. The 100MB packages costs 40€ a month...Seriously? The 250MB still 80€... not really a volume discount there... Still was ridiculous. While still happy that I had a solution for the time being - without needing to hop on any next available free wifi, I needed something else.

And it wouldn't be a burner phone, like a co-worker suggested. One better, I have a dual SIM Oneplus 9.

So, again with the help of some local recommendations, I decided to get a Three SIM, and top up as I needed. I was on the train from wonderful totally-non-boring Staines-upon-Thames into London already[5]. Arrived in Waterloo, strolled casually into the next WHSmith, only passed the SIM shelfs like 5 times, before a friendly assistant pointed to it, got a Three SIM for 0.99£ [6] , went to our wonderful London Office in London's Old Street - the area is affectionally called Silicon Roundabout, and I now know why - plugged the SIM into my phone and nothing.

For a moment, nothing happened. Then, after a second or so, nothing continued to happen.
The good old Hitchhiker

I checked the three homepage, where they confirmed, that once the SIM is plugged in and the phone switched on, I should receive a text after a while with my new phone number. Nothing.

Not even for half an hour. Tried several tricks, like switching off my Austrian A1 SIM. No. Switching off Wifi...No.
Well, let's leave that, I got work to do.. So I did. 

Then we popped out of the office for a quick bite and PLING... text from three arrived. Turned out there was no reception in the middle/core of the building where I sat... So while enjoying my sandwich I even more enjoyed to create an account, top up my Three SIM with 8GB for the month for 10£... Probably not the cheapest option in the world, could have had a cheaper per-GB plan, but do I even need 8GB a month, when I'm there at best 3-4 days a month? No I don't. So good for now.
Did you guess by now, how I paid the 10£? Right.

(And then texted my colleague in Vienna, to switch of the roaming package, no need to waste money next months as well)
So 8GB for 10£~~12€ vs  100kB for 1.49€  or 40EUR for 100MB... Again, not the cheapest option, but a bargain compared to roaming charges these days.

Tarifinfo UK: Lieber A1 Kunde, Sie nutzen jetzt Datenroaming. Wir verrechnen wie folgt: Daten 1,490/100 KB; MMS 0,990. Infos zu Ihrem Datenvolumen finden Sie auf und Mein A1 App. Preise in Euro inkl. USt., g├╝ltig nach Verbrauch etwaiger Freieinheiten, Roaminginfo +43664664666, Notruf 112. Ihr A1 Team      Tariff information UK: Dear A1 customer, you are now using data roaming. We charge as follows: Data 1,490/100 KB; mms 0.990. You can find information about your data volume on and My A1 App. Prices in euros including VAT, valid after any free units have been used, roaming info +43664664666, emergency call 112. Your A1 team


Why did I write that up?

  1. if as a EU citizen you plan to travel the UK, I wanted to give you some recommendations.
  2. I tried all of the above... Setup was really easy, and is for your if you consider yourself a non-tech-averse person.
  3. Everything worked, no fraudulent or fishy things or hidden charges found so far.
  4. I'm still annoyed by Brexit. Full stop.
  5. A point of ale appears to taste better when paid from a local account ;)


[1] or was it actually SEPA?

[2] honestly, I don't want to fact check this, but it felt like it ;)

[3] oh the enquiring "what-is-he-doing-now" look on my wife's face, when I first took a selfie on the platform and then two minutes later put my id card on the seat next to me to take pictures for identification ;)

[4] don't judge me.

[5] the 1 hour delay is a different story, but hey SWR trains at least come with Wifi.

[6] That's why I got the revolut account ;)   smart, right? Right?