ACCU World of Code
-
ResOrg 2.0.10.31 adds support for Visual Studio 2022
ResOrg 2.0.10.31 has now been released. This a recommended maintenance update for ResOrg 2.0, and adds support for Visual Studio 2022 Preview: ResOrg 2.0.10.31 running within Visual Studio 2022 Preview 4.1 The following changes are included in this bu…
-
The Woes of Windows Smartscreen
Windows Smartscreen is a great idea, but if you develop downloadable software for Windows it can sometimes be incredibly frustrating. That has certainly been our experience this year, as Windows has displayed the following warning when running every bu…
-
The Woes of Windows Smartscreen
Windows Smartscreen is a great idea, but if you develop downloadable software for Windows it can sometimes be incredibly frustrating. That has certainly been our experience this year, as Windows has displayed the following warning when running every bu…
-
Transient Expand-Archive Failures
[I’m sure there is something else going on here but on the off-chance someone else is also observing this and also lost at least they’ll know they’re not alone.] We have a GitLab project pipeline that started out as a monolithic job but over the last …
-
Transient Expand-Archive Failures
[I’m sure there is something else going on here but on the off-chance someone else is also observing this and also lost at least they’ll know they’re not alone.] We have a GitLab project pipeline that started out as a monolithic job but over the last …
-
New Job at Element (Matrix)
I started a new job today at Element! It has been a long-standing ambition of mine to work in Free and Open Source software, and I am very excited to work for a company that is the main developer of a really important project: the Matrix communication …
-
Lose the Source Luke?
We were writing a new service to distribute financial pricing data around the trading floor as a companion to our new desktop pricing tool. The plugin architecture allowed us to write modular components that could tap into the event streams for various…
-
Lose the Source Luke?
We were writing a new service to distribute financial pricing data around the trading floor as a companion to our new desktop pricing tool. The plugin architecture allowed us to write modular components that could tap into the event streams for various…
-
Migrating from my trusty 2009 Mac Pro to a 2020 Mac Mini M1
I’ve been using a 2009 cheesegrater Mac Pro for quite a while now. I bought it used quite a while ago – around 2013 if I remember correctly – and it’s been serving as my main photo/video/general programming workhorse, although the latter ta…
-
Visual Lint 8.0.4.342 has been released
Visual Lint 8.0.4.342 has now been released. This a recommended maintenance update for Visual Lint 8.0 and includes the following changes: The Eclipse C/C++ project (.cproject) file reader now attempts to take into account buildTools.path and toolcha…
-
Visual Lint 8.0.4.342 has been released
Visual Lint 8.0.4.342 has now been released. This a recommended maintenance update for Visual Lint 8.0 and includes the following changes: The Eclipse C/C++ project (.cproject) file reader now attempts to take into account buildTools.path and toolcha…
-
The Case of the Curious Commit Message
I had taken a new contract at an investment bank and started working on a very mature codebase which was stored in ClearCase. As a long-time user [1] of version control systems one of the things that bugged me about the codebase were empty commit messa…
-
The Case of the Curious Commit Message
I had taken a new contract at an investment bank and started working on a very mature codebase which was stored in ClearCase. As a long-time user [1] of version control systems one of the things that bugged me about the codebase were empty commit messa…
-
Wrapping up the NZXT H1 recall saga
As I mentioned in my post from a few months ago, I had received the temporary fix in the form of the nylon screws and nuts from NZXT. At that point in time, NZXT’s customer support was not able to tell me when to expect the “real” fix…
-
What to cache when building Rust using Gitlab CI or similar
Update: caching $RUSTUP_HOME and $CARGO_HOME does not work for me – I removed them. When building your project with Gitlab CI or a similar build tool, you can end up spending a lot of time watching your build repeat the same steps over and over. This i…
-
Printing the version of a Maven project
To print a Maven project’s version number, try: mvn help:evaluate -Dexpression=project.version -q -DforceStdout -q suppresses all output(!) -DforceStdout unsuppresses the actual thing you asked to be printed. I will refrain from commenting on how diffi…
-
[fix dev diary] Week 6-7: Description and Issue ID
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 6-7: Description and Issue ID appeared first on Simplify C++!.
-
Automatically enabling multiple Emacs minor modes via a major mode hook
In Emacs, I usually end up enabling the same set of minor modes when I use one of my “writing modes”, namely modes like markdown-mode and org-mode. Enabling a single minor mode automatically is generally pretty easy via the appropriate mode…
-
isValid()? Establish invariants and avoid zombie objects
When classes have an “isValid” method or similar, the code using them often is less clear and harder to maintain. If possible, validity should be an invariant that can not […] The post isValid()? Establish invariants and avoid zombie …
-
[fix dev diary] Week 5: std::expected
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 5: std::expected appeared first on Simplify C++!.
-
TIL that org-mode has an exporter for ODT
I’m by no means an Emacs org-mode power user – in fact, anything but – but I do use org-mode a lot for note taking and also when I need an outliner to try and arrange ideas in a suitable manner. It excels at both, and usually does what I need inc…
-
[fix dev diary] Week 4: Closing in on core domain code
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 4: Closing in on core domain code appeared first on Simplify C++!.
-
Minimal example of a Maven pom for a mixed Kotlin and Java project
The Kotlin docs describe some things you need in your pom.xml to create a project that is a mix of Kotlin and Java code, but there is no complete example, so here is mine: pom.xml:<project> <modelVersion>4.0.0</modelVersion> <g…
-
Visual Lint 8.0.3.340 has been released
Visual Lint 8.0.3.340 has now been released. This a recommended maintenance update for Visual Lint 8.0, and includes the following changes: Visual Studio 2022 now appears as a supported project type in VisualLintGui and VisualLintConsole. Added a s…
-
Visual Lint 8.0.3.340 has been released
Visual Lint 8.0.3.340 has now been released. This a recommended maintenance update for Visual Lint 8.0, and includes the following changes: Visual Studio 2022 now appears as a supported project type in VisualLintGui and VisualLintConsole. Added a s…
-
[fix dev diary] Week 3: create command and application service
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 3: create command and application service appeared first on Simpli…
-
[fix dev diary] Week 2: Foundation of the CLI App
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 2: Foundation of the CLI App appeared first on Simplify C++!.
-
Importing/migrating from one peertube server to another
My Peertube server is shutting down, so I need to move my videos to another one. The official scripts don’t seem to cover this case very well, so here is what I did. My script fetches videos and their details and uploads them to the new server via the …
-
[fix dev diary] Week 1: Preparations
This is the start of my dev diary blog post series, where I document the minutiae of what I am doing for my toy project Fix. The diary can also […] The post [fix dev diary] Week 1: Preparations appeared first on Simplify C++!.
-
Old new Project: Fix
When I wrote about rebooting the blog, I also wrote I’d reboot my toy project “Fix”. Here is what Fix is about – this time. What is Fix? Fix is […] The post Old new Project: Fix appeared first on Simplify C++!.
-
Visual Studio 2022 Preview 2 and the v143 platform toolset
Visual Studio 2022 Preview 2 was released by Microsoft last week. One of the changes included in Preview 2 is the addition of the Visual Studio 2022 specific v143 platform toolset (Preview 1 used the v142 platform toolset from Visual Studio 2019). Sup…
-
Visual Studio 2022 Preview 2 and the v143 platform toolset
Visual Studio 2022 Preview 2 was released by Microsoft last week. One of the changes included in Preview 2 is the addition of the Visual Studio 2022 specific v143 platform toolset (Preview 1 used the v142 platform toolset from Visual Studio 2019). Sup…
-
Turning this particular server into a bit less of a pet
I’m in the middle of a server redo – right now, I’m setting up a replacement server for my trusty Dell T30, plus it was time to give this web server a new home. When I started the migration from my old WordPress site to the new static site,…
-
Visual Studio 2022 Preview 1 is now available
Ever since news broke in April of Microsoft’s plans for Visual Studio 2022 we have been waiting to get our hands on a preview build of the new version. The first public preview was finally released on 17th June, so naturally we have spent the past few …
-
Visual Studio 2022 Preview 1 is now available
Ever since news broke in April of Microsoft’s plans for Visual Studio 2022 we have been waiting to get our hands on a preview build of the new version. The first public preview was finally released on 17th June, so naturally we have spent the past few …
-
Why write an entire game (including Graphics) in a single, hand-coded JavaScript file?
My new game, Rightwaves, is out now! It’s a tribute to the great classic R-Type. The entire implementation, including all the graphics, is contained within a single ~5000-line JavaScript file. Why? This is a terrible idea Let me start by saying I do n…
-
Visual Lint 8.0.2.338 has been released
Visual Lint 8.0.2.338 has now been released. This a recommended maintenance update for Visual Lint 8.0, and includes the following changes: Updated the values of _MSC_VER and _MSC_FULL_VER in the PC-lint Plus compiler indirect file `co-rb-vs2019.lnt …
-
Visual Lint 8.0.2.338 has been released
Visual Lint 8.0.2.338 has now been released. This a recommended maintenance update for Visual Lint 8.0, and includes the following changes: Updated the values of _MSC_VER and _MSC_FULL_VER in the PC-lint Plus compiler indirect file `co-rb-vs2019.lnt …
-
Online Concurrency Workshop at C++ on Sea 2021
The restrictions brought upon us by COVID-19 are not over yet, and C++ on Sea is the latest conference that will be running as an online-only conference. I will be running my More Concurrent Thinking class as an online workshop for C++ on Sea on 30th J…
-
Matrix is the only (chat) game in town
On my phone and computer I use WhatsApp, Signal, Slack, Keybase, Discord, IRC, XMPP/Jabber and Element/Matrix. In addition, I occasionally use the messaging features of Mastodon, Twitter and even LinkedIn. I’ve never used Telegram, Line, WeChat, Sessio…
-
Writing Snake in Terraform Video
This was quite a challenge, and I nearly gave up, but I managed to write a Snake game in Terraform: Slides: artificialworlds.net/presentations/snake-terraform Source code: gitlab.com/andybalaam/snake Slides source code: gitlab.com/andybalaam/videos-sn…
-
Suspending the computer using Kupfer
I have recently started using Kupfer again as my application launcher in Ubuntu MATE, and I found it lacked the ability to suspend the computer. Here is the plugin I wrote to support this. To install it, quit Kupfer, create a directory in your home dir…
-
Uploading to PeerTube from the command line
PeerTube’s API documentation gives an example of how to upload a video, but it is missing a couple of important aspects, most notably how to provide multiple tags use form-encoded input, so my more complete script is below. Use it like this: # First, m…
-
vidmini – limit webcam resolution
Being fed up with the limited configurability of some of the more widely used software used for video conferencig, I have put together a small LD_PRELOAD-able shared library that limits the available resolutions a webcam reports. Have a look at the REA…
-
vidmini – limit webcam resolution
Being fed up with the limited configurability of some of the more widely used software used for video conferencig, I have put together a small LD_PRELOAD-able shared library that limits the available resolutions a webcam reports. Have a look at the REA…
-
Republishing Bartosz Milewski’s Category Theory lectures
Category Theory is an incredibly exciting and challenging area of Maths, that (among other things) can really help us understand what programming is on a fundamental level, and make us better programmers. By far the best explanation of Category Theory…
-
Visual Lint 8.0.1.337 has been released
Visual Lint 8.0.1.337 is a recommended maintenance update for Visual Lint 8.0. The following changes are included: If the Visual Studio plugin is selected for installation and the Visual Studio Debug Console (VsDebugConsole.exe) is running, the insta…
-
Visual Lint 8.0.1.337 has been released
Visual Lint 8.0.1.337 is a recommended maintenance update for Visual Lint 8.0. The following changes are included: If the Visual Studio plugin is selected for installation and the Visual Studio Debug Console (VsDebugConsole.exe) is running, the insta…
-
Python virtual environments with pyenv on Apple Silicon
Apple’s recent transition to the new architecture for its Mac computers has caused rather predictable problems for developers whose workflow depends on certain versions of pre-compiled libraries for x86 architecture. While the latest releases of Python come with a universal installer that allows to build universal binaries for M1 systems …
-
Python virtual environments with pyenv on Apple Silicon
Apple’s recent transition to the new architecture for its Mac computers has caused rather predictable problems for developers whose workflow depends on certain versions of pre-compiled libraries for x86 architecture. While the latest releases of Python come with a universal installer that allows to build universal binaries for M1 systems …
-
Using atomics for thread synchronization in C++
In my previous blog post I wrote about spin locks, and how compilers must not move the locking loop above a prior unlock. After thinking about this done more, I realised that is not something specific to locks — the same issue arises with any two…
-
Can non-overlapping spinlocks deadlock in C++?
There has been discussion on Twitter recently about whether or not the C++ memory model allows spinlocks to deadlock if they just use memory_order_acquire in lock and memory_order_release in unlock, due to compiler optimizations. The case in question i…
-
Announcing I-DUNNO 1.0 and web-i-dunno
It’s hard to believe it’s already a year since the release of RFC 8771 (The Internationalized Deliberately Unreadable Network NOtation), which for me at least made me think about IP addresses in a whole new way. So, it seems fitting for the anniversary…
-
Automatically filling in the UK COVID test results page with Selenium IDE
Lots of people are filling in the extremely detailed UK government COVID test result page twice every week. It asks you to fill in a very large list of details, most of which are the same every time, but it doesn’t remember what you typed last time. I …
-
Visual Lint 8.0 has been released
The first public build of Visual Lint 8.0 has just been uploaded to our website. As of today, Visual Lint 8.0 replaces Visual Lint 7.0 as the current supported Visual Lint version. As such Visual Lint 8.0 licences (as well as upgrades for Visual Lint 6…
-
Visual Lint 8.0 has been released
The first public build of Visual Lint 8.0 has just been uploaded to our website. As of today, Visual Lint 8.0 replaces Visual Lint 7.0 as the current supported Visual Lint version. As such Visual Lint 8.0 licences (as well as upgrades for Visual Lint 6…
-
Toggle window decorations on Linux GTK3 with Python3
The Internet is full of outdated Python code for doing things with windows, so here is what I got working today in a Python 3, GTK 3 environment. This script toggles the window decorations on the active window on and off. I have it bound to Ctrl+NumPad…
-
Ticket Maps
It has been an increasingly common scenario that I’ve encountered where you have some ID that’s monotonically increasing, such as a subscription or connection index, or user ID, and you need your C++ program to hold some data that’s associated with tha…
-
Questions about RFC 8771
During my work on RFC 8771 The Internationalized Deliberately Unreadable Network NOtation (I-DUNNO) I have come across a number of questions. I am documenting them here so I can send them to the authors and try to improve my understanding of the intent…
-
Announcing Rust I-DUNNO
At the ACCU Conference last week I learned about RFC 8771 The Internationalized Deliberately Unreadable Network NOtation (I-DUNNO) from Jim Hague, and thought it would be fun to knock up a Rust implementation. The project is here: gitlab.com/andybalaam…
-
Letter to my MP on Yemen
Sent via WriteToThem on Monday 1 March 2021. Dear Ben Spencer, Your experience on the front line in medicine means you are probably much more able than I to imagine the human impact of the situation in Yemen. On Sunday OCHA stated that 16 million peopl…
-
Visual Studio crashes when docking windows (TL;DR: it wasn’t us)
We’ve all done it. You prepare a new build, install it, start testing before releasing it and then…it crashes. The immediate thought is always “What have we done…?”. Exactly that happened to us recently when testing a Visual Lint build – all we did…
-
Visual Studio crashes when docking windows (TL;DR: it wasn’t us)
We’ve all done it. You prepare a new build, install it, start testing before releasing it and then…it crashes. The immediate thought is always “What have we done…?”. Exactly that happened to us recently when testing a Visual Lint build – all we did…
-
Making Smolpxl work on phones and tablets
I’ve added the first features intended to make Smolpxl games work well on touch interfaces like phones and tablets: I’ve added a button bar at the bottom (and moved the navigation buttons to the top). I’m looking for feedback on this: Does it work on…
-
Limiting the number of open sockets in a tokio-based TCP listener
I learned quite a bit today about how to think about concurrency in Rust. I was trying to use a Semaphore to limit how many open sockets my TCP listener allowed, and I had real trouble making it work. It either didn’t actually work, allowing any number…
-
Recommendation against the use of WhatsApp in your company
Here is the email I just sent to the organisation I volunteer for. Feel free to adapt and use in your context. Dear [organisation leaders], Much of the tech industry (e.g. [1]) is warning against the use of WhatsApp due to its policy of collecting and …
-
Streaming video with Owncast on a free Oracle Cloud computer
I just streamed about 40 minutes of me playing Trials Fusion using Owncast. Owncast is a self-hosted alternative to streaming services like Twitch and YouTube live. Normally, you would need to pay for a computer to self-host it on. Owncast suggest this…
-
Pinephone update
I got a Pinephone for Christmas! Here is quick summary of my experience with it. (Originally published on mastodon.) Update on the pinephone as promised. I love it, but I would definitely not recommend expecting to use it as your actual phone. I have …
-
Is your program a function or a service?
Maybe everyone knows this already, but for my own clarity, I think there are really two types of computer program: A function: something that you run, and get back a result. Example: a command-line tool like ls A service: something that sits around wa…
-
Shutdown order consistency: how Rust helps
Some Java code with bugs Here’s my main method (in Java). Can you guess the bug? Db db = new Db(); Monitoring monitoring = new Monitoring(); Monitoring mon2 = new Monitoring(); Billing billing = new Billing(db, monitoring); monitoring.setDb(db); runMa…
-
Edge computing providers
I’m looking into Edge computing at work. By Edge computing I mean running WASM programs in lots and lots of smallish computers in places near to actual people (rather than in huge cloud data centres). I think it’s cool because I love Rust, and Rust is …
-
Schema upgrades should be reversible (also other transformations, actually)
Are you writing schema upgrade code? Then I humbly suggest you take the time to write schema downgrade code too. “Why would I do that?” you might well ask, “I won’t ever need to downgrade.” Now, I imagine you’re expecting me to say you actually will ne…
-
Make levels for Rabbit Escape using the level editor!
You can make levels for Rabbit Escape!
-
Announcing Smolpxl Scores – a high score table for your game
It’s a very early beta for now, but I’m ready to announce Smolpxl Scores, which provides high-score tables for Free and Open Source games. Each game can have multiple high-score tables – for example, you might want one for each level. At the moment it’…
-
Dovecot not working after upgrade to Ubuntu 20.04.1 (dh key too small)
I upgraded to Ubuntu 20.04.1 and chose to keep my existing config files, and my mail server stopped working. In the log I saw: Nov 25 09:07:57 machine dovecot: imap-login: Error: Failed to initialize SSL server context: Can’t load DH parameters: error:…
-
Letter to my MP on the overseas aid budget.
Letter I sent to my MP today on the overseas aid budget. Let’s not be foolish. Dear Ben Spencer, Please use your influence to persuade the government to maintain our overseas aid budget commitment at 0.7% of national income. I believe that changing th…
-
Profile a Java unit test (very quickly, with no external tools)
I have a unit test that is running slowly, and I want a quick view of what is happening. I can get a nice overview of where the code spends its time by adding this to the JVM arguments: -agentlib:hprof=cpu=samples,lineno=y,depth=3,file=hprof.samples.tx…
-
Planning is Inevitable
Like most programmers I’ve generally tried to steer well clear of getting involved in management duties. The trouble is that as you get older I think this becomes harder and harder to avoid. Once you get the mechanics of programming under control you m…
-
Planning is Inevitable
Like most programmers I’ve generally tried to steer well clear of getting involved in management duties. The trouble is that as you get older I think this becomes harder and harder to avoid. Once you get the mechanics of programming under control you m…
-
Reality is not what is seems
is an excellent book by Carlo Rovelli (isbn 978-0-141-98321-9) As usual I’m going to quote from a few pages. It doesn’t describe where there is a particle but how the particle shows itself to others. It isn’t things that enter into relations…
-
Reality is not what is seems
is an excellent book by Carlo Rovelli (isbn 978-0-141-98321-9) As usual I’m going to quote from a few pages. It doesn’t describe where there is a particle but how the particle shows itself to others. It isn’t things that enter into relations…
-
Pair Programming Interviews
Let’s be honest, hiring people is hard and there are no perfect approaches. However it feels somewhat logical that if you’re hiring someone who will spend a significant amount of their time solving problems by writing software, then you should probably…
-
Pair Programming Interviews
Let’s be honest, hiring people is hard and there are no perfect approaches. However it feels somewhat logical that if you’re hiring someone who will spend a significant amount of their time solving problems by writing software, then you should probably…
-
Why a Free Software web games site?
Recently I’ve been having a lot of fun working on Smolpxl, which is a web site featuring some little retro web games that are all Free and Open Source Software. Here’s a sneak preview of the game I am working on: Why do this? Apart from the fact that …
-
Letter to Anneliese Dodds MP: Support for the Labour Left
Dear Anneliese Dodds MP, I have voted for you in the last two elections, as a proxy for my support for Jeremy Corbyn, though your attendance and performance at the hustings arranged by the Stop the War Coalition was a reason for my suppor…
-
The Ascent of Man
is an excellent book by Jacob Bronowski (isbn 0-7088-2035-2) As usual I’m going to quote from a few pages. Evolution is the climbing of a ladder from the simple to the complex by steps, each of which is stable in itself. The turning point to…
-
The Ascent of Man
is an excellent book by Jacob Bronowski (isbn 0-7088-2035-2) As usual I’m going to quote from a few pages. Evolution is the climbing of a ladder from the simple to the complex by steps, each of which is stable in itself. The turning point to…
-
Fast Hardware Hides Many Sins
Way back at the beginning of my professional programming career I worked for a small software house that wrote graphics software. Although it had a desktop publisher and line-art based graphics package in its suite it didn’t have a bitmap editor and so…
-
Fast Hardware Hides Many Sins
Way back at the beginning of my professional programming career I worked for a small software house that wrote graphics software. Although it had a desktop publisher and line-art based graphics package in its suite it didn’t have a bitmap editor and so…
-
TDD – Romanes Eunt Domus!
-
TDD – Romanes Eunt Domus!
-
What is Life?
is an excellent book by Paul Nurse (isbn 978-1-788451-40-6) As usual I’m going to quote from a few pages. Cells repair these mutations, but they are not completely successful. If they were, all individuals of a species would be identical and evo…
-
What is Life?
is an excellent book by Paul Nurse (isbn 978-1-788451-40-6) As usual I’m going to quote from a few pages. Cells repair these mutations, but they are not completely successful. If they were, all individuals of a species would be identical and evo…
-
Code your first game: Snake in JavaScript (on Raspberry Pi)
Welcome! We are going to code a whole snake game. It’s going to look like this: It doesn’t matter if you have never written any code before: I am going to try and explain everything from scratch. I’m going to assume you are using a Raspberry Pi. but y…
-
Sapiens. A Brief History of Human Kind
is an excellent book by Yuval Noah Harari (isbn 978-0-099-59008-8) As usual I’m going to quote from a few pages. Whereas chimpanzees spend five hours a day chewing raw food, a single hour suffices for people eating cooked food. Since long inte…
-
Sapiens. A Brief History of Human Kind
is an excellent book by Yuval Noah Harari (isbn 978-0-099-59008-8) As usual I’m going to quote from a few pages. Whereas chimpanzees spend five hours a day chewing raw food, a single hour suffices for people eating cooked food. Since long inte…
-
The Culture Code
is an excellent book by Daniel Coyle (isbn 978-1-847-94127-5) As usual I’m going to quote from a few pages. Much of the connection happens around the dinner table, as Popovich is obsessed with food and wine. One misconception about highly succ…
-
The Culture Code
is an excellent book by Daniel Coyle (isbn 978-1-847-94127-5) As usual I’m going to quote from a few pages. Much of the connection happens around the dinner table, as Popovich is obsessed with food and wine. One misconception about highly succ…
-
Play and create little retro games at Smolpxl
I love simple games: playing them and writing them. But, it can be overwhelming getting started in the complex ecosystems of modern technology. So, I am writing the Smolpxl library, which is some JavaScript code that makes it quite simple to write simp…
-
shareon.js.org now has a Share to Mastodon button
I was looking for the right way to make a “Share This”-style button for my tiny games site Smolpxl, and I found shareon which worked exactly the way I wanted (load the JavaScript and call a function to display the buttons, with no privacy concerns), an…