Author Archives: zo0ok

Dungeon Master lost in Forgotten Realms

This post could also have been called:

  • Forgotten Realms suck!
  • I hate Forgotten Realms
  • When and where should i set my Forgotten Realms campaign?

First, if you are new to D&D, starting with 5e, buying adventures, you will be alright! Everything is taken care of for you, just go with the flow.

Background

I played D&D 30 years ago. About 25 years ago I played AD&D 2e in Forgotten Realms. Now I am picking up D&D again, this time 5e, and I still have my Forgotten Realms 2e stuff. I create my own campaign and my own adventures so I just thought I needed to pick a date (year) and a place in Forgotten Realms and get started. Well, the internet is an amazing resource for a Dungeon Master, but the confusion is also so much bigger!

Why use Forgotten Realms at all?

I own some content for Forgotten Realms, maps and books. That is better than nothing (at least I want to think so). Drawing maps take time. And inventing deities is not my piece of cake. However, I realised that not even maps or deities are constant in Forgotten Realms, and I was confused.

The Short Version

Wizards of the Coast (who makes D&D), want the world (Forgotten Realms) to match the rules of their game. Fair enough! So when the rules change, the world changes, quite dramatically (!).

Dates of the Campaing Books/Sets for each [A]D&D version (I just copied this from somewhere, the important thing right now is not the details):

  • AD&D 1e: 1358.
  • AD&D 2e: 1368 (after Time of Troubles 1358)
  • D&D 3e: 1372
  • D&D 4e: 1479 (after Spellplague 1385)
  • D&D 5e: 1491 (after Second Sundering 1480)

These events (Time of Troubles, Spellplague, Second Sundering) are not minor or ordinary events. Thy are the kind of earth-shattering events that I’d prefer to have 2000-3000 years back (like the First Sundering).

I am not an expert (not even a novice) on Forgotten Realms Lore, but the idea here is that major changes and events happened in Forgotten Realms to match the rules of 2e, 4e and 5e. And, to simplify things a little, 5e mostly reset things to 2e (and the Spellplague was a mistake).

An example of a rules-change is the race Dragonborn, introduced in 4e and “justified” via the events of Spellplague. WotC could have pretended Dragonsborns always existed and that they were just never mentioned and there were never any rules for them. But WotC choose to create an event that explained why there were Dragonborns in 4e, but not before (and many other things).

How to get a grasp of the Lore?

I recommend the youtube series Forgotten Realms Lore by Jorphdan. Watch the first 20 episodes (!) and you will feel a lot more comfortable about a lot of things!

When to set a 5e campaign

Here are some options I came up with for when to set a 5e campaign in Forgotten Realms

  1. In the 2e-3e-era, like 1368-1375. If you dont have 2e-3e resources this probably makes little sense. And you will need to deal with cases where the rules don’t match the Lore (are there Dragonborns, and where do they come from)?
  2. In 1491 as is intended. The possible problem is that you have 100+ years of history that is very confusing and complex. Your PCs and NPCSs will have so many weird (recent) memories. This is not optimal with 2e Forgotten Realms resources.
  3. In 1491 as intended, pretending the Spellplague and the Sundering never happened. Both 2e,3e and 5e resources should be quite useful, as long as you have a basic understanding of what you are leaving out.
  4. Later, like 1550-1600, when the Second Sundering has faded from recent memory and things have stabilized (if you like that, as a DM). This is not optimal with any official Forgotten Realms resources.
  5. Any other time that you find particularly interesting!
  6. Use Alternative Forgotten Realms, for a more low level setting.
  7. Just use the maps, and cherry-pick only things that you specifically need.

I think I myself will choose (1), since I have 2e resources. But it is not very easy either, becuase for example the article on Moonshae in the Wiki says: “This article is incomplete.It is missing 1e and 2e information, including a whole sourcebook worth of pre-Spellplague lore.

Conclusion

Forgotten Realms is a double edged resource. And the events from 1350 to 1480 (just before 5e takes place) are extreme enough that it would be better if they were serveral thousand years apart, and several thousand years ago.

Still, I think the Youtube videos I linked to help to get you onboard, and if you make a few decisions that work for your campaing, you should be quite fine. Remember that there is nothing wrong in changing whatever you want!

Buying Dungeons & Dragons?

I used to play a lot of roleplaying games, that was 20 years ago. I just decided to start it again, and I realised there are so many options of Dungeons and Dragons that I was not aware of.

I will sammarize what I would have wanted to know when I decided to start over.

These are different versions of Dungeons & Dragons that you may have, find used or consider buying:

  • D&D 5e (5th edition)
    • Starter Set
    • Good old books (Core Rulebook Gift Set)
    • Digital edition
  • D&D 4e
  • D&D 3.5e
  • D&D 3e
  • Advanced D&D 2e
  • Advanced D&D
  • D&D

And then there is Pathfinder.

To be clear, to play casually, occationally, with a few friends or your children, any version will work! If you have what is needed to play (usually Players Handbook, Dungeon Masters Guide and Monster Manual, or a starter set) you can have great fun for many hours!

If you and your friends/family are new to roleplaying and D&D, I guess getting the Starter Set is excellent!

However, it may be more complicated. I have the original D&D, and AD&D 2e that we played very much. And then I bought 3.0, which I never played. To play casually with a small group of friends, I ended up buying the 5e Core Rulebook Gift Set. So there are two questions to ask

  1. Why did I not get a digital verson?
  2. Why, if all versions are fine for casual play, did I not use one of the three versions I already owned?

D&D 5e Digital Version

The answer to the first question is that I was not aware of it (the digital version on dndbeyond.com, and perhaps other sites/services), I am old and stupid enough to make the mistake of not even considering that a digital option was available. I don’t regret getting the physical Gift Box. But I think it is good to be aware of the digital option.

DNDBeyond offers the core books for about USD 30 each in a digital version (marginally cheaper than a print). You can then add a Master subscription for USD 6/month. As DM, create a Campaign: Your players can now sign up for free, join your campaign and they can create their Characters online. You can print, share, level up and the entire thing is very nice. DNDBeyond is available for free, but if you dont pay

  • USD 30 for Players Handbook, you cant use many Feats, Backgrounds (and possibly other things) from Players Handbook. And its not like you can just easily type it in yourself, it is really missing in dropdowns.
  • USD 6/month, your players will need their own DNDBeyond digital edition of Players Handook.

It is fine not to use DNDBeyond! But it is not quite fine that your players start using it, and they like it (first), but then there is major confusion. It is not quite fine to pay for the game twice, if that was not what you wanted to do in the first place.

The background is that DNDBeyond is not Wizards of the Coast (who makes D&D), it is another company, who licenses stuff from WotC. So you don’t get a voucher or a code or anthing with your books. I wish I knew this before I got the books!

Good Old Versions

I realised that as a DM I will spend many hours preparing sessions with my players. And playing together is quality time with friends and it should be good. I simply decided that 5e was the best version of D&D, and that I can afford it.

When it comes to the old rejected versions, I found that:

D&D (first edition, red/blue boxes) is a very old game with some aspects I really did not like when giving it a second thought. Halflings can only progress to level 8, end of it. And the basic (1-3) and expert (4-14) was not particularly practical when starting over. My stuff was in bad shape too. And the books where not beautifully illustrated as later editions.

AD&D 2nd edition is an excellent game, but for some reason, after many years, I bought third edition. One thing that is not good with 2nd edition (and older) is that spellcasters are very weak in the beginning (like 1 spell per day). See my list below of things I like with 5e. It is arguably a more refined and well-designed game than 2e.

D&D 3rd edition received bad feedback and was quite soon updated to 3.5, which was a bugfix. I own no Dungeon Master Screen and when I looked for one online it was (almost) half the price of the entire 5.0 giftbox. It really fealt a bit awkward to start buying stuff for (the hated) 3.0. The good thing with 3.0/3.5 was that it was quite complex, detailed and allowed for customization. This was also its downfall: too much customization lead to too much imbalance (I have read). If I owned the Dungeon Masters Screen of 3.0, I might actually just have sticked with it, and never learnt or bothered about why it sucked. I think if you want a very epic campaign (much magic, powerful Characters) and you like complexity (a step towards Rolemaster), 3e (or 4e/Pathfinder) is perhaps the best for you.

A&D 4e and Pathfinder are games I did not own, so it made no sense to buy them instead of 5e.

D&D 5e

To me it seems D&D 5e is a good balance between AD&D 2e and D&D 3/3.5.

  • I like that spellcasters have Cantrips and more spells from the beginning (compared to 2e)
  • I like the idea of simple/martial weapons, and small, medium, light, versatile, finesse weapons, and I understand why this was made less complex than in 3.5
  • I like the advantage/disadvantage concept
  • I like that all spells are written for “any class”, and that just the spell lists are different (so the spells are effecively reused)
  • I like the way sorcerors, wizards and warlocks adminstrate their spells differently, and that players can choose “their style”
  • I like that armors and weapons are not so “forbidden” for the wrong class (proficiency is smart)
  • I like that saving throws are simplified to be based on ability (not the arbitrary poison, petrification and so on in older versions)
  • I like that all classes level equally fast (at the same XP levels)
  • I like backgrounds and feats (missing in 2e, and too much in 3e)
  • I like that skills are simpified – and made more relevant – compared to 2e (and that the list is short)
  • The concept with Short and Long rests, and that many things depend on it, is very smart (although, you can argue whether they should be longer, but that is easily up to you as DM)

My players like 5e too! And they like DNDBeyond. Perhaps we will pay to use it one day. But I guess… as DM I have unlimited power when it comes to the world, monsters, NPCs and even the rules. But when it comes to DNDBeyond – I have no power there.

Method to assign abilities in D&D

A key part or creating a character in any roleplaying game is to roll (buy or assign) abilities (or stats, or whatever they are called). In D&D there are 6 of them, and the basic idea is that you roll 3d6 for each and get 6 values in the range [3,18].

Abilities follow the Character forever so they do matter. Even if you are not into Character optimization, it is often more fun if your Character does not suck and if there is a level field.

Rolling

There are different ways to roll 3d6 in a way that it gives decent results. D&D 5e suggests rolling 4 dice ignoring the worst (and it is a good method). The problem with rolling is that given any method there are better and worse outcomes. And there are outcomes that are more or less suitable for a given class (or type of Character). In the end, if the player is not happy he may just decide to start over, and nobody wants unhappy players before the game even starts.

Buying / assigning

In order to avoid endless rerolls, and that some Characters genuinely and forever are better or worse from day 1, there are many ways to buy/assign stats. D&D 5e suggests two methods, both allowing abilities in the range [8,15]. To me, that is a bit dull.

I have seen other games or methods where characters end up with 18,18,18,5,3,3 and such stats. That is quite ridiculous.

Proposed Method

I suggest you assign values from a given standard range, and then apply “buffs” to them (5, or at your DMs choice).

Standard value   7    9   11   12   14   16
Modifier        -2   -1    0   +1   +2   +3
Buff            ---- +2 ----   ----- +1 ------

What this means is that 1 buff (of 5) can raise the one of the low values (7,9,11) two steps, which gives it a better modifier. However, to get a better modifier with one of the higher values you need two buffs. Also, getting 18 is possible, but only for one single ability.

I think it is reasonable that Characters can have som bad abilities and some strong abilities, and this enables modifiers from -2 to +4.

Compared averages

Different methods have different averages.

   3d6                     10.5
   4d6 (ignore worst)      12.2
   2d6+6                   13.0
   D&D 5e standard range   12.0
   Proposed Method        ~12.7  (12.5 with 4 buffs)

How to (not) set up a RPi V3 server

A few months ago I set up a server running Archlinux on a RPi V3 using a 2.5′ USB drive for root. It is now dead.

One day I innocently did “pacman -Suy” as usual, and it didn’t restart. After that it was very unstable for days until it – the RPi V3 itself – appears broken. That is, I get very random errors, like different kernel panics, trying to boot it. I let a friend try to boot LibreELEC on it (his power, SD-card, TV) and it displayed the 4-color-splash-screen and the little lightning indicating power problem.

There are different ways to connect a USB HDD to a RPi.

  1. Let the RPi power the USB drive.
    (it works sometimes, you can try max_usb_current=1 in config.txt)
  2. Connect the USB drive to a “usb extra power cable” (google it) to take the load off the RPi
  3. Connect the USB drive to a USB hub that has external power
    (optionally, also power the RPi from the same USB hub)

With my unfortunate broken RPi V3, I used method (1) for a hard drive rated at 1.0A (the USB<->SATA-chip probably consumes some power as well). I did use a proper original RPi power supply though, but I believe I somehow stressed some component of the RPi V3 continously taking more than 1.0A from a single USB port.

Findings using USB hub to power RPi + HDD

I have an old USB Hub with a 2.0A rated power supply. I now use it as the only power source for a RPi + USB HDD (The USB Hub and RPi are connected both ways in a loop).

  • RPi V2 + 1.0A 1TB HDD: frequent under-voltage warnings
  • RPi V1 + 0.6A 320GB HDD: works perfectly

So, that particular USB Hub will drive my RPi V1, and I will find another solution for the RPi V2.

Conclusion

I have written several articles about using RPi as a server.

My sober and responsible conclusion must be: don’t (use Raspberry Pi for production Linux servers). It is simply not worth it. First it is not so cheap as you think when you have bought all cables, adapters, cases and chargers. Second, your time my not be for free. Third, performance is bad. Forth, stability is limited and don’t expect very long service time.

The cheapest NUC setup is a more rational choice.

I also believe a QNAP or Synology with virtualisation technology could be a better choice than running (multiple) RPi.

Nevertheless, I never learn, and I am now replacing my broken RPi V3 with two old Raspberry Pi (V1 + V2). I mostly use them for Syncthing and backup, I guess two is better than one, and I have unused USB Harddrives.

Archlinux vs Raspbian

I have come to like Archlinux for RPi. However, the frequent and relatively large upgrades that come with a rolling distribution feels somewhat unoptimal for a low-performance system living on an SD-card.

This time, I am back with Raspbian, because

  1. Raspbian is now based on Debian 10 (buster) right from start (I believe the Debian 9 release of Raspbian was kind of late)
  2. There is simple minimal Raspbian Buster Lite image suitable for servers or headless systems
  3. Creating an empty file named “ssh” in /boot before starting the first time lets you ssh into the brand new raspbian system, so you can easily install with neither keyboard/display or serial

I simply have nothing to complain about with Raspbian anymore.

Dark Mode?

With macOS Mojave Apple introduced Dark Mode. Some applictions support it. I was mildly sceptical, thinking it was just some kind of fashion statement.

But there is an argument that goes like: “if I am going to stare into a lamp all day, I want as much of it to be as dark as possible”. It makes some sense. You would not want to stare into a lamp in the first place, why then let your display default to white everywhere?

There is also an explanation to why we ended up here: designers are educated for printed designs, which is usually on white paper, thus they prefer white background for computers as well, for aesthetic reasons. Everyone is not a designer, but we all mimic good design.

And you probably know that back the old days computer displays were black with green text. So it is plausible that people who want to make computers more modern and appealing prefer white displays, while people who are more nerdy or old fashioned like darkness.

What I have written so far may seem logical. But it does not matter. What matters is (from the perspective of a programmer):

  1. What is truly more ergonomical, to you?
  2. Is it enough to stick with either light or dark mode? Or should you switch depending on your surrounding environment?
  3. Can you get a consistent good dark mode experience, otherwise it is mostly annoying and better avoided entirely?
  4. How to design your product so it appeals to your customers?

Switching your OS to a dark mode is easy. If you are using XCode, Photoshop or some other product that supports dark mode, that is also easy. Terminal applications (frequently used by programmers) are highly customizable and has often never left dark mode in the first place.

How about the browser? Well, not the browser itself, but the web pages and web applications it delivers to you. Well, for Firefox and Chrome there is a plugin called “Dark Reader”. It works reasonably well for me. Read the FAQ/manual when you install it!

A problem is that when my eyes are used to bright content, a dark page with white text is no problem. But when I am used to a dark display and suddenly the entire display turns white for some reason, it is unpleasant.

As a developer I can of course wonder: how do we want web pages to be built so they work nicely both in light and dark mode?

  1. Each web page has a dark mode (will never happen)?
  2. Web pages should follow good light mode practices, so they look good when using a dark mode extension?
  3. Should any web pages be coded dark?

And as a developer, if my OS/Desktop, development tools, terminal and web browser is set to dark mode… what about the web application I am currently developing? I can’t possibly write CSS and whenever I refresh the result is passed through a black-box-dark-mode filter, that would be a very awkward development experience. So whenever I switch to the (web) application I am developing, the display will turn annoyingly white.

On Contrast

I had the idea that high contrast is easier on the eye. But I realise it is not. Absolutely white text on absolutely black background is quite hard on my eyes. However, ligth grey text on dark grey background is quite comfortable. Apple Terminal comes with a few different (color) profiles. Many of them are surprisingly colorful. I imagine I don’t want the cognitive input that colors give me, it distracts my mind, but perhaps I am wrong about it.

Xcode findings

As I start experimenting with Xcode I realise that it is a tricky beast.

Xcode 10.2.1

I realised Xcode 10.2.1 used 100%+ CPU. I fixed that by reinstalling it completely.

Reainstalling Xcode I had managed to mess upp the simulators.
Error: Unable to boot device because it cannot be located on disk
Solution: Run in Terminal: xcrun simctl erase all

Xcode 7.3.1

Xcode 7.3.1 Fails to start on macOS 10.14.5.

A first iOS app with Xcode 10.2.1

Ten years too late I decided to look into iOS development. It is too late, because the Klondyke era of becoming a millionaire on simple apps is probably over. On the other hand Swift has arrived and reached version 5 so it should be a good time to get started.

What I have is

  • Mac OS 10.14.5
  • Xcode 10.2.1
  • iPhone 6s, iOS 12.2 to deploy to
  • iPad 3, iOS 9.3.5 (obsolete by Apple standard)
  • 20 years of programming experience
  • Very limited experience with Swift 5
  • No experience with Xcode, Objective-C or macOS development

I am mostly a backend-programmer, who have to do HTML/CSS/JavaScript as well. Xcode is creepy. I have thought about a few appoaches

  1. Buying a book (but a challenge to find a book with relevant complexity, mix of tutorial/reference, for Xcode 10 / Swift 5)
  2. Apples obsolete tutorial (but I was put off by the fact that it is written for Swift 3)
  3. Just playing around with Xcode (just kidding – that is too scary)
  4. Some online course, like Udemy (but it is not my way)
  5. A simple trumpet tutorial

I went for (5). It was good, because in a few hours it took me all the way from starting Xcode to running something on my iPhone.

Building for the simulator and running works. And I managed to deploy to my iPhone (it is actually quite self explanatory: connect the iPhone, select it as destination in Xcode, and later in the iPhone under settings -> general -> device management you allow the app to run).

The short version is that it all went well! But…

Obsolete iPad 3

I failed to build for my obsolete iPad 3. What happens is that all is fine, and then I come to this screen:

I type my password, and immediately it (building/signing) “Failed with exit code 1”. I can imagine two options right away

  1. I need a real developer license (not Personal Team) to do this
  2. I need an older version of Xcode to build for 9.3
    (and in that case I might need to use older project format, and perhaps not even Swift 5, I don’t know)
  3. I got some indication that with a Personal (free) developer license I can only deploy to a single test device, that would perhaps not include old devices

It actually only builds for Deployment target 12.2, no older versions in the list.

Update: Page 60 of the free Apple Book “App Development With Swift” tells clearly that a free account only supports a single device. So it is clearly a waste of time to ignore that restriction and try to deploy to my iPad.

Xcode

I have spent a few hours with this now. I wrote 4 lines of code. I have ctrl-clicked on things, dragged-and-dropped-things, added properties to things, added resources, opened panels and used shortcuts. If you are used to things like Visual Studio it will probably feel somewhat familiar. But for me, who mostly use Vim, it is very scary.

Update: Xcode turned out to use 100%+ CPU constantly. I completely removed it and reinstalled it, and it seemed to help.

Computer Requirements / Performance

I did these experiments on a MacBook Pro 6,2 (that officially does not support macOS 10.14). It has an SSD drive and 8GB or RAM. Building takes almost 10 seconds, but starting the simulator and loading the app takes almost a minute. The computer clearly gets warm. Neither Xcode nor the simulator consumes much memory (Activity Monitory says about 200Mb each). Obviously, if you run the simulator much in your daily work, a faster CPU is worth it.

I think my 1440×900 display may be the biggest problem if I want to do anything real thought.

Conclusion

I have mixed feelings, it could be worse and better. I clearly need to find a way to be quickly guided through building different types of apps. I think I need a few days being guided through Xcode until both Xcode and the different project artifacts feel somewhat natural.

I have a simple app I want to build for myself, but right now it feels much to intimidating.

I found that Apple has released a free online book (available in their Books application) called App Development with Swift. That seems to be a good option.

Whisky Head to Head

Based on my notes below I have ranked the whiskies I have tasted:

  1. Deanston 18
  2. Old Pulteney 18
  3. Balcones
  4. Andalusia Tripled Destilled
  5. Deanston Virgin Oak
  6. Glenmorangie 10
  7. Makers Mark
  8. Motörhead
  9. Jameson Black Barrel
  10. Johnny Walker White Walker
  11. Storm

Peated

Usually peated whiskies win on raw power compared to unpeated whiskies. However, that does not mean that a peated whisky is generally preferable on a given occation. But I made a separate list.

  1. Caol Ila 12
  2. Kilchoman Machir Bay
  3. Longrow (moderately peated)
  4. Hven Tychos Star
  5. Mackmyra Svensk Rök
  6. Jura Superstition (slightly peated)

Background and Idea

The idea is to drink two different whiskies and make a few comments. I usually do this alone, in the evening, with two small drams, a glas of water and some salty snacks (like crisps).

To me the way I experience a whisky can change from time to time. Not the least, it depends on what I have eaten and drunk before I taste the whisky. I find it very hard to drink one whisky one day, and another the next day, and compare them. I also find it hard to try many whiskies, because my senses quickly change. So two whiskies, head to head, should be the most fair way I can compare and rate whisky.

It is not my intention to rate value-for-money. I will mostly try standard whiskies that are produced and available, and expected to have somewhat consistent quality. I think it is more interesting to find good affordable available whiskies, than to seek the ultimate bottle from a lost distillery. Occasionally I will however try a more unique, rare and expensive bottle, to see how it compares.

General Findings

I am beginning to identify categories that work for me:

  • Standard
  • Sweet
  • Peat

Notes

Deanston 18 vs Old Pulteney 18: Color very similar, Old Pulteney somewhat darker. On the nose Old Pulteney is more pleasant; sweeter and richer. Deanston is dryer and slightly more chemical. Old Pulteney tastes perfectly balanced with a clear (but not overwhelming) hint of its Spanish oak casks, nice after taste. Deanston also very nicely balanced, with (to my taste) a more dry traditional single malt character. Both are very stable representatives of 18 year old Scotch single malt, but neither is very brave. If I have to choose I prefer the Deanston, I find it more interesting.

Jameson Black Barrel vs White Walker: Jameson has a deep sweet characteristic scent while White Walker is more subtle, a bit chemical to me. Taste impressions are quite the same; White Walker has a quite thin, somewhat sweet taste (perhaps the best I can say is that its not too bad considering its a blend). Jameson tastes caramel, very good, but a bit too much of something. I prefer Jameson, even without considering it is both cheaper an generally available. The reason I tried these two is that I found White Walker ice cold quite nice. I froze another blend (J&B) and it was not at all as good, and not as sweet. So I thought perhaps White Walker had a sweetness like Jameson Black Barrel, but it wasn’t so. I will try Black Barrel frozen some day (since White Walker is limited edition).

Glenmorangie 10 vs Storm: Both rather pale color, and light fruity on the nose. The Storm may actually have a slightly richer aroma. Glenmorangie tastes excellent in its light simplicity, although some bitterness remains. Storm is heavier, more flavour, less fruity, a bit chemical and more bitterness: I lack a defined character. After a while, I clearly prefer Glenmorangie, despite it is lighter (usually a more heavy whisky wins head to head, is my experience). Later, Glenmorange remains flawless in its simplicity, while there is something unpleasant about Storm.

Makers Mark vs Motörhead: Unsurprisingly they are both nice dark amber in color, very similar. Makers Mark has a much sweeter (raisin, vanilla) aroma while Motörhead is much more subtle. Same is true for the taste; Makers Mark has a fine Bourbon flavour also after drinking the drier and lighter Motörhead. They are both good. For those who like Bourbon Makers Mark is clearly the winner. Motörhead is still a good oakflavoured whisky, perhaps too sweet and Bourbon-like to those who don’t like that. Considering price, or not, I must say Makers Mark is the better whisk(e)y. Although, there are situations when I could prefer Motörhead.

Caol Ila 12 vs Kilchoman Machir Bay: As I expected quite similar color and aroma. Kilchoman slightly paler. On the nose they are clearly different, but I have a hard time putting words on it. Caol Ila is heavier, more oily. Starting tasting Kilchoman is like a sparkling firework in the mouth, very good. Caol Ila is, even when it comes to flavour heavier, more oily and more smooth. Sometimes I love heavily peated whisky and sometimes I think it is too much. This time I like them both. Ultimately, Caol Ila comes out slightly better for being richer and more smooth, but it is very close.

Kilchoman Machir Bay vs Longrow (no age): Longrow is clearly a bit darker in color, while Kilchoman is clearly is more peaty on the nose. Longrow needs water and has a balanced, somewhat dry, bitter and pale flavour (not so salty though). Kilchoman is richer in flavour and has an Islay and island character not present in Longrow (despite it is a bit peated). These two whiskies are a bit too different to compare head to head, and neither of them really benefit from being compared to each other (they both smell funny, a bit like soap, after a while). While (the young) Longrow is very good and perhaps more easy to enjoy, head to head Kilchoman is much more interesting.

Deanston Virgin Oak vs Glenmorangie 10: Deanston is a bit more amber colored while Glenmorangie is not that pale. Glenmorangie is light, almost like a wine on the nose, Deanston has a distinct oak and dried fruit aroma. These impressions are well reflected in a first tasting round. Deaston is a bit more rough and raw and Glenmorangie remains subtle and sophisticated. Both are rather young single malts in the lower price segment, both are very good, but lack perfection. I do prefer Deanston.

Jura Superstition vs Longrow: The Jura is more golden in color but quite similar. Both have a pleasant aroma, Longrow more peaty. Tasting both head to head is a clear win to Longrow: the Jura is hardly pleasant and Longrow is quite perfect.

Andalusia Triple Destilled vs Glenmorangie 10: The Texan is much darker in color, but to the nose they are very similar: Andalusia a bit more raisins perhaps, and Glenmorangie slightly lighter. The difference in taste is more significant: Andalusia focuses on the sweet oak flavour which is not bad at all (but a bit simple), while Glenmorangie has wider palette of flavours (but a little bitter). I realise that Andalusia, being triple destilled, should be compared to an Irish whisky rathern than Scotch. Head to head, Andalusia is the more pleasant whisky.

Hven Tychos Star vs Mackmyra Svensk Rök: two Swedish peated (well, at least smoky) whiskies. Hven has a somewhat darker color. They smell rather different. Mackmyra has a very clear dry smoke smell, like burnt, almost fire, and not much else. First impression of Hven is that it has a more traditional peat aroma, but after a while I don’t know; it smells sweet. Starting to taste Macmyra it is surprisingly good – not very much flavour (just like its color and aroma) but not bad. I immediately add water. Hven has a much richer flavour, also surprisingly good and balanced. Mackmyra softens with some water but there is not much to discover. I prefer Hven, but it was more even than I thought, and I had lower expectations and was surprised.

Andalusia Triple Destilled vs Balcones: Both from Texas, pretty amber in color, Balcones even more so (but perhaps because it is stronger at 53%). Andalusia has a deep fruity aroma, very similar to Balcones it seems. Both need water, and they turn out to be very similar, for a while indistinguishable. Somewhat to my surpise I find Balcones to taste better (there are some unpleasant notes in Andalusia after a while, and head to head).

Simple Mobile First Design

If you build a web site today you need to think about the experience on mobiles, tablets and desktops with different screen sizes. This is not very easy. In this article I have applications (SPAs) in mind rather than sites/pages.

If you are a real, ambitious, skilled designer with a significant budget, there is nothing stopping you from doing it right. Responsive design is dead, because most often you have no choice, so it is just design.

However, you may not have that budget, skill, time and ambition, but you still need to think about vastly different screen sizes. Or perhaps you just need to build a simple native-app-like website.

Two separate implementations

In many cases I would argue that it makes sense to simply make a separate site for mobile and desktop. There are many arguments but I will give one: use cases are often very different. A desktop app is often opened, kept open for a long time, and much data may be presented and analysed on screen, in memory. A mobile app is often opened shortly, to accomplish a single task, and then closed. This means that you probably want to manage state, data and workflow very differently as well.

Bootstrap (or similar)

There are frameworks (like Bootstrap) and technologies like Flexbox to allow you to build a responsive app. Before using those, I think you should ask yourself a question.

How do you want to take advantage of more screen space?

Think of regular desktop applications (Word, Photoshop, Visual Studio) or your operating system: when you have more screen available you can have more stuff next to each other. You can have more windows and more panels at the same time. Mostly. Also, but less so, small things get larger (when they benefit from it). It helps to be able to see an entire A4 page when you work with Word. But when you have an Excel sheet with 4 used columns, those don’t use your entire screen just because they can.

Bootstrap tends to create larger space between elements, and larger elements where it is not needed (dropdown <select>, input fields). I say tends to, because if you are good and very careful, you can probably do a better job than I can. But it is not automatic and it is not trivial, to make it good

What I mean is that if my calendar/table looks gorgeous when it is 400px wide, what good does it make to make it larger if the screen gets larger? So I think a better approach to responsiveness is to say that my calendar/table takes 400px. If I have more space available, I can show something else as well.

Mobile Screen Sizes

To complicate things further, mobile phones have different screen sizes, different screen resolutions, and then there are hi-resolution screens that have different virtual and physical resolutions.

So you have your table that looks good on a “standard” mobile with 320px width. What do you want to do if the user has a better/larger screen?

  1. make it look exactly the same (just better/larger)?
  2. reactively change the way your app looks and works?

If you are opting for (2), I need to wonder why, really?

I argue that if you pick (1) you can make development, testing, documentation and support easier. And your users will have a more consistent experience. At the expense that those with a large mobile may not get the most out of it when using your app.

I propose a simple Mobile First Responsive design

What I propose is not for everyone and everywhere. It may suck for your product and project. That is fine, there are different needs.

I propose a Mobile First (Semi-)Responsive design:

  1. Pick a width (320px is fine).
  2. Design all parts, all pages, all controllers of your app for that width.
  3. On mobile, set the viewport to your width for consistent behaviour on all mobiles.
  4. Optionally, on desktop (and possibly tablets), allow pages to open next to each other rather than on top of (and hiding) each other to make some use of more screen when available.

Seems crazy? Please check out my Proof of Concept and decide for yourself! It is only a PoC. It is not a framework, not a working app, not demonstrating Vue best practices, and it is not very pretty. Under Settings (click ?) you can check/change between Desktop, Tablet and Mobile mode (there is a crude auto-discover mechanism in place but it is not perfect). You can obviously try it with “Responsive Design Mode” in your browser and that should work quite fine (except some elements don’t render correctly).

Implementation Details

First, I set (despite this is not normally a recommended thing to do):

<meta id="viewport" name="viewport" content="width=320">

Later I use JavaScript to change this to 640 on a tablet, to allow two columns. Desktops should ignore it.

Second, I use a header div fixed at the top, a footer div fixed at the bottom, and the rest of the page has corresponding margins (top/bottom).

.app_headers {
   position: fixed;
   top: 0;
   left: 0;
 }
 .app_header {
   float: left;
   height: 30px;
   width: 320px;
 }
 .app_footers {
   position: fixed;
   bottom: 0;
   left: 0;
 }
 .app_footer {
   float: left;
   height: 14px;
   width: 320px;
 }
 .app_pages {
   clear: both;
 }
 .app_page {
   margin-top: 30px;
   margin-bottom: 12px;
   width: 320px;
   float: left;
 }

In mobile mode I just add one app_header, app_footer and app_page (div with class). But for Tablets and Desktops I can add more of them (equally many) as the user navigates deeper into the app. It is basically:

<div class="app_headers">
  <div class="app_header">
    Content of first header (to the left)
  </div>
  <div class="app_header">
    Content of second header (to the right)
  </div>
</div>
<div class="app_pages">
  <div class="app_page">
    Content of first page (to the left)
  </div>
  <div class="app_page">
    Content of second page (to the right)
  </div>
</div>
<div class="app_footers">
  <div class="app_footer">
    Content of first footer (to the left)
  </div>
  <div class="app_footer">
    Content of second footer (to the right)
  </div>
</div>

I use little JavaScript to not add too many pages side-by-side should the display/window not be large enough.

It is a good idea to reset margins, paddings and borders to 0 on common items.

I also found that you need a font size of 16px on iPhone, otherwise the Apple mobile Safari browser will immediately zoom when user edits <input> and <select>.

Most effort when I wrote my Proof of Concept was

  1. Getting the HTML/CSS right and as simple as possible (I am simply not good enough with HTML/CSS to just get it right)
  2. Implementing a “router” that supports this behaviour

Being able to scroll the different pages separately would be possible, a bit more complicated, and perhaps not so desirable.

Conclusions

Exploiting the viewport you can build a web app that works fine on different mobiles, and where the issue with different screen sizes and screen resolution is quite much out of your way.

The site will truly be mobile-first, but with the side-by-side-strategy presented, your users can take advantage of larger screens on non-mobiles as well.

This way, you can build a responsive app, with quite little need for testing on different devices as the app grows. You just need to keep 320px in mind, and have a clear idea about navigating your site.

First look at Swift

Apple invented the Swift programming language to make application programming for iOS and macOS a better experience. If you are new to all this (as I am), I guess there are three approaches (depending on your background):

  1. Learn with the Swift Playground App for iOS
  2. Find a book/guide/tutorial to build actual iOS apps (learning Swift along the way)
  3. Use tools that you are used to, solving problems you are familiar with, using Swift (a programmers’ approach)

I decided to just write some Swift code. There is a cool web page called Rosettacode.org with implementations of different “problems” in different languages. I started looking at Swift code there to see if I could learn anything, and decided I could to better. (Admittedly, that is quite arrogant: I have never written a line of Swift code before, and now contribute Swift code)

I started looking at the problem Caesar Encryption and solved it for Swift. The full code comes below (in case someone changes it on Rosettacode)

I have a C/C#/Java/JavaScript background. This is what I find most notable about Swift.

Backward declaration of variables, arguments and function return types. Type comes after the name (with colon in between).

Named parameters to function, unless you prepend an _ to the name.

Closures can be written (quite just) like in JavaScript. (see charRotateWithKey in the caesar function)

Wrapping/optional: a normal variable, after it is declared must have a valid value. The language ensures this for you. Look at the first line in the function charRotate below: the ! means that if the parameter c does not have an ascii value the program will terminate right there. Look at the line starting with guard in main. The language guarantees that key is a valid integer after the guard, otherwise the function (program) must exit. I am far from an expert on this, find a better source! But you can’t do what you do in C/C#/Java/JavaScript – just hope it goes well, and if it does not catch an exception or deal with it afterwards.

ARC rather than garbage collection or explicit memory management. This matters not in my program, but it is worth mentioning. I first thought Swift and Rust were very similar and that it is more or less an incident that they are different languages, but I don’t really think so anymore.

The swift command can be used not only to compile a source file. It can be used to set up a swift project (directory), run tests, run the REPL (read-eval-print-loop) and more things. This seems quite nice, but I will write no more of it here.

My program below demonstrates type conversions, command arguments, usage of map and closures, string and ascii low level operations and output.

I think Swift is a quite fine language that I would be happy to use. I notice that the language has evolved quite much over the few years it has exited. So when you find things on the web or stackoverflow, you might not find current best practices.

func usage(_ e:String) {
   print("error: \(e)")
   print("./caeser -e 19 a-secret-string")
   print("./caeser -d 19 tskxvjxlskljafz")
 }
  
 func charIsValid(_ c:Character) -> Bool {
   return c.isASCII && ( c.isLowercase || 45 == c.asciiValue ) // '-' = 45
 }
  
 func charRotate(_ c:Character, _ by:Int) -> Character {
   var cv:UInt8! = c.asciiValue
   if 45 == cv { cv = 96 }  // if '-', set it to 'a'-1
   cv += UInt8(by)
   if 122 < cv { cv -= 27 } // if larget than 'z', reduce by 27
   if 96 == cv { cv = 45 }  // restore '-'
   return Character(UnicodeScalar(cv))
 }
  
 func caesar(_ enc:Bool, _ key:Int, _ word:String) -> String {
   let r = enc ? key : 27 - key
   func charRotateWithKey(_ c:Character) -> Character {
     return charRotate(c,r)
   }
   return String(word.map(charRotateWithKey))
 }
  
 func main() {
   var encrypt = true
  
   if 4 != CommandLine.arguments.count {
     return usage("caesar expects exactly three arguments")
   }
  
   switch ( CommandLine.arguments[1] ) {
   case "-e":
     encrypt = true
   case "-d":
     encrypt = false
   default:
     return usage("first argument must be -e (encrypt) or -d (decrypt)")
   }
  
   guard let key = Int(CommandLine.arguments[2]) else {
     return usage("second argument not a number (must be in range 0-26)")
   }
  
   if key < 0 || 26 < key {
     return usage("second argument not in range 0-26")
   }
  
   if !CommandLine.arguments[3].allSatisfy(charIsValid) {
     return usage("third argument must only be lowercase ascii characters, or -")
   }
  
   let ans = caesar(encrypt,key,CommandLine.arguments[3])
   print("\(ans)")
 }
  
 func test() {
   if ( Character("a") != charRotate(Character("a"),0) ) {
     print("Test Fail 1")
   }
   if ( Character("-") != charRotate(Character("-"),0) ) {
     print("Test Fail 2")
   }
   if ( Character("-") != charRotate(Character("z"),1) ) {
     print("Test Fail 3")
   }
   if ( Character("z") != charRotate(Character("-"),26)) {
     print("Test Fail 4")
   }
   if ( "ihgmkzma" != caesar(true,8,"a-zecret") ) {
     print("Test Fail 5")
   }
   if ( "a-zecret" != caesar(false,8,"ihgmkzma") ) {
     print("Test Fail 6")
   }
 }
  
 test()
 main()