Articles in the Uncategorized category

  1. I Resurrected My Dutch Movie Review Site From 2003

    Thu 09 June 2022

    Introduction

    Between 2003 and 2006, I ran a Dutch movie review site called moevie.nl.1 I built the site and wrote the reviews. It never made any money. It cost me money to host, and it cost me a lot of time writing reviews, but I remember enjoying writing reviews about films I liked.

    The gimmick of the site was that the reviews had two parts. The first part is spoiler-free, just giving a recommendation with some context to make up your own mind. The second part contained a reflection of the movie, which included spoilers.

    moevie

    Even back then, the site didn't win any design awards (from archive.org - click to enlarge)2

    I started building the site a few months after finishing college (IT) in 2002 as I felt inept and had little confidence. Building something tangible felt like a good way to build up and demonstrate skills. And I had something to say about movies.

    Although moevie.nl did not help me gain employment as far as I know, it was fun while it lasted. At some point, I didn't get much joy out of writing movie reviews and I let the site die.

    I did keep backups of the database the code and the pictures though. And now after 18+ years I decided to resurrect the site, including all (old) reviews.

    Why resurrect a dead website gone for 16+ years?

    Rebuilding the site was just a way to spend time, a small hobby project. Something to be bussy with. The second reason is some kind of misplaced nostalgia. I sometimes regret shutting down the site, wondering what could have been if I persevered.

    Losing and regaining the domain

    Back in 2006, my hosting provider (non-profit with just a few servers) abruptly stopped operating due to hardware failure 3 and I was forced to move my domain to another company. At that time, private citizens in The Netherlands could not register an .nl domain, only businesses could, so that was a bit of a hassle.

    Not long thereafter however, I decided to let the domain expire. It was quickly scooped up by 'domain resellers'. Years later I decided that I wanted moevie.nl back, but the sellers always asked insane amounts of money.

    In 2019, I visited moevie.nl on a whim. To my surprise it didn't resolve anymore, the domain was available! I quickly scooped it up, but I didn't do much with it for a long time, until now.

    Rebuilding the site

    I really wanted to preserve the aesthetic of moevie.nl as it was back then. Especially in the context of modern web design, it does stand out. As a sore thumb - but still - I had a goal.

    Having the code and database dump is one thing, but it doesn't tell you what it actually looked like in 2003-2006. I could have tried to get the old (PHP4) code working, but I just didn't feel like it.

    Instead, I chose to visit Archive.org and indeed, it captured old snapshots of my site back in 2006. So those were of great help. The screenshots at the top of this blog post are lifted from this page on archive.org. This snapshot was taken just before I decided to close the site.

    The challenge of mobile device screens

    To set the stage a bit: the rise and fall of moevie.nl happened a year before the iPhone was first announced. Smartphones from Blackberry were popular. I had a Palm VX PDA and later a HP Compaq PDA.

    Most people didn't have mobile data connections so as far as I know, the mobile web really wasn't a thing yet.

    So moevie.nl was primarily developed for the desktop. When I thought I was finished rebuilding the site, I quickly discovered that the site was unusable on my iPhone and way too small and finicky to use on my iPad.

    For somebody who has no experience with modern web development, it was quite a steep learning-curve discovering how to deal with the various screen sizes in CSS4.

    A very large part of the entire effort of rebuilding the site was spend on making the site workable on all different device sizes. Fortunately, iOS device simulators were of great help on that front.

    Technology

    I've recreated moevie.nl with Python and Django. For the database, I chose Postgresql, although that is total overkill, I could have used SQLite without any issues.

    I chose Django because I'm quite familiar with Python so that was a straight-forward choice. I selected Postgresql mostly just to regain some knowledge about it.

    Hosting

    I'm self-hosting moevie.nl on the same Raspbery Pi4 that is hosting this blog. This Raspberry Pi is powered by the sun.

    So moevie.nl is solar-powered during the day and battery-powered during the night.

    Closing words

    I'm not sure if I really want to start writing movie reviews again, knowing full well how much effort it takes. Also I'm not sure I have anything to say about movies anymore, but we'll see.

    The overall experience of rebuilding the site was frustrating at times due to the severe lack of experience and knowledge. Now that the site is done and working, even on mobile devices, that feels good.


    1. The name is based on the phonetic pronunciation in Dutch of the English word 'movie'. 

    2. sorry for the language but I could not find a better screenshot. 

    3. I was neglecting the site at that time due to losing motivation. 

    4. I admit I only tested with iOS devices so Android-based smartphones could experience issues. 

    Tagged as : web
  2. Cryptocurrencies Are Detrimental to Society

    Fri 27 March 2020

    Want to listen to this article?

    Introduction

    How would you explain the inner workings of bitcoin to a person in simple, understandable terms?

    twitterimage

    source

    This explanation seems perfect to me because it illustrates some seriously problematic aspects of cryptocurrencies in one simple sentence.

    It captures the unimaginable energy waste of mining cryptocurrencies. And it also captures the dark side of cryptocurrencies: facilitating crime.

    At this point cryptocurrency enthusiasts are rolling their eyes and sigh. This point has been made many times over. I know, I'm definitely not the first to criticise cryptocurrencies1 this way.

    I do have a simple challenge though:

    Can you please show me the benefit to society of cryptocurrencies?

    Please, don't come up with theoretical or future possibilities. Cryptocurrencies have existed for eleven years, they should have something to show for right now. After many hours of reading up on the topic, I have not been able to find any tangible benefits that would justify the effort and resources spend on them.

    The downsides of cryptocurrencies are an entirely different matter. They are very, very clear to me. But let's not go there directly. What fun would that be?

    The solution in search of a problem

    As I see it, cryptocurrencies are entangled in a desparate search for a problem to solve. They are the answer to a question nobody asked2.

    Many cryptocurrency advocates see the decentralised (distributed) nature of cryptocurrencies as a tangible benefit. Cryptocurrencies are most often not controlled by any government or single entity.

    Aside from whether this is true in practice3, they seem to imply that it's a bad thing that governments control their own currencies. Well, last time I checked governments control their currencies to keep them as stable as possible. Frankly, that actually sounds like exactly what I would want from a currency.

    Stability.

    You can call cryptocurrencies many things but 'stable' is definitely not one of them. Cryptocurrencies are highly volatile. In cryptocoin, a loaf of bread could suddenly cost twice as much as the day before.

    Although cryptocurrencies haven't seen any significant adoption as a payment method - due to their volatility - it has seen adoption in 'less stable countries' where it is basically the 'lesser of two evils'. I mean: you know things are bad if a volatile cryptocurrency is a safer option than the native currency of your country.

    The argument in the end boils down to: if your society is already in serious trouble, maybe cryptocurrencies could provide 'some benefit'. If the people involved have reliable access to internet. And internet access is most often controlled by the government.

    To my knowledge, cryptocurrency as a payment method has actually only seen true adoption within the world of dark markets such as Silk Road in wich bitcoin rose to prominence. Nonetheless, after eleven years, cryptocurrencies have no traction in the regular 'legitimate' markets as a real payment method.

    The reason why is obvious: existing payment methods are much easier to use and feel much safer. And the volatility of cryptocurrencies only compounds to the support of these conventional methods.

    If cryptocurrencies are a solution to anything at all they seem to be 'bad' solutions at best.

    Are cryptocurrencies in fact a Ponzi or Piramid scheme?

    It depends on the particular currency, but I think the case can be made for sure. I mean: why not both?

    Cryptocurrencies have no intrinsic value. They are only worth what people are willing to pay for them. So the cryptocurrency advocates needed to drum up demand, to create a market where previously none existed. This resulted in wild visions of the future, elaborate jargon-filled smokescreens that argue cryptocurrencies would take over the world. Get in quickly or you miss out!

    And so many people were afraid to miss out, creating an enormous cryptocurrency hype, starting in November of 2017, spilling into 2018 when the bubble burst. The end result? A few people got very rich and the vast majority lost money.

    It seems to me this all is a combination of a ponzi scheme with the component of active recruitment found in piramid schemes. The value of the currencies must come from somewhere, right?

    So please tell me how all of this benefits our society? Creating a handful of rich people at the expense of a lot of other people? Is that it?

    The graveyard of dead cryptocurrencies only shows how many people or startups try to get a piece of the action. And so many of them are outright scams. Are in fact all cryptocurrencies scams at their core?

    The downsides of cryptocurrencies

    I hope I have established that cryptocurrencies provide no tangible benefits to society. But the do have a lot of downsides. I observe the following:

    TopicRemark
    Trafficing of illegal goodsDrugs, weapons, childpornography, and so on.
    Trafficing of illegal servicesMurder for hire
    Tax evasion-
    Money laundering-
    RansomwareHold data hostage in encrypted form
    Polution / energy wastecrypto miners use a lot of electricity
    Lack of Securityseveral cryptocurrency exchanges have been hacked
    Crypto scamsNew cryptocoins are created just to scam people

    The easy retort to this table is: "'normal' currencies like the dollar or euro also facilitate almost all of those illegal things", which is true but it misses the larger point.

    Those regular currencies provide tremendous value to our societies. Our societies are build upon them and they facilitate almost everything we do. The topics listed in the table are just a possible negative side-effect for regular currencies. Their clear benefits outweighs such downsides.

    Cryptocurrencies don't seem to have any such upsides. They seem to be made to exclusively facilitate cryptocurrency speculation and crime.

    Cryptocurrencies facilitate crime

    I won't discuss all the topics in the previous table but I do want to highlight a few.

    Dark markets

    I think we all remember Silk Road, a now defunct darknet marketplace that allowed people to anonymously buy - amongst other things - drugs and guns4. Silk Road was the first large-scale application of bitcoin as a means of payment.

    Silk Road started out with just drugs, but guns soon followed. This deeply depraved world of dark markets are very much enabled by cryptocurrencies because the parties involved in a transaction are so hard to identify.

    Ransomware

    Ransomware seems to be almost exclusively enabled by digital currencies. Not explicitly just cryptocurrencies, but they do enable this type of crime because tracing the payments back to the criminal is so difficult.

    The damage caused by ransomware is so obviously devastating. You can have many opinions on the fact that many critical organisations such as hospitals or universities don't have their computer security under control.

    The real problem is that cryptocurrencies make these kinds of attacks on businesses and institutions very low-risk and highly profitable. In my own country a university was targeted by such an attack and allegedly they paid the ransom. The disruption to its services was substantial.

    Energy waste

    As cryptocurrencies rose in value, it started to become profitable to 'mine' them. It started out with regular computers, but soon, we could use videocards to accelerate cryptocurrency mining, which are very power hungry.

    Later on, FPGAs and ASICS were build to further accelerate mining performance. Entire companies spun up to build those miners and host them in large datacenters with cheap electricity. The scale of the operation is rather enormous.

    According to an article dating to July 2019, just bitcoin mining consumes more electricity than Switzerland. The article links to an online tool that tracks this power usage in real-time based on some estimates.

    mf

    Image source

    It's just mind boggling to me that so much energy is wasted, so much pressure is put on the environment, for absolutely no clear benefit at all.

    Closing words

    So in short, I think that cryptocurrencies provide nothing of value to society. They do however facilitate crime and contribute to climate change.

    Therefore, I would propose to shut them all down.

    The complex technology behind the cryptocurrencies attracted a lot of otherwise smart people and I think it's a sad thing to see their efforts going to waste or have a negative impact.

    People are not obliged to work on something valuable, but at least may I ask that they choose to work on something that won't harm our society?

    Link to hackernews, where this post was quickly flagged down. The few comments that exist don't seem to really provide any answers to the question I pose.


    1. I would definitely recommend reading this long-form-article by The New York Times. 

    2. Unless you want to embark on a path of criminal activity. 

    3. As mining is no longer profitable for the larger community, the miners become a small concentrated group of entities controlling the currency, making the currencies more centralised. Furthermore, the cryptocurrency exchanges where you can convert the cryptocurrency into regular money, are centralised institutions backed by for-profit companies. And those companies have to abide by the law. They are under the influence of the government. 

    4. If you want to know more about what happend to Silk Road and it's founder - 'the Dread Pirate Roberts', I would recommend the book 'American Kingpin' by Nick Bilton. (no affiliate links) 

    Tagged as : None
  3. FreeBSD 10.1 Unattended Install Over PXE & HTTP (No NFS)

    Fri 16 January 2015

    To gain some more experience with FreeBSD, I decided to make a PXE-based unattended installation of FreeBSD 10.1.

    My goal is to set something up similar to Debian/Ubuntu + preseeding or Redhat/CentOS + kickstart.

    Getting a PXE-based unattended installation of FreeBSD 10.1 was not easy and I was unable to automate a ZFS-based install using bsdinstall.

    I would expect someting like the netboot install

    Below, I've documented what I've done to do a basic installation of FreeBSD using only DHCP, TFTP, no NFS required.

    Overview of all the steps:

    1. have a working DHCP with PXE boot options
    2. have a working TFTP server
    3. customise your pxelinux boot menu
    4. install a FreeBSD box manually, or use an existing one
    5. download and install mfsbsd on the FreeBSD system
    6. download a FreeBSD release iso image on the FreeBSD system
    7. configure and customise your FreeBSD PXE boot image settings
    8. build the PXE boot image and copy it to your TFTP server
    9. PXE boot your system and boot the FreeBSD image

    Setting up a DHCP server + TFTP server

    Please take a look at another article I wrote on setting up PXE booting.

    Configuring the PXE boot menu

    Add these lines to your PXE Menu:

    LABEL FreeBSD10
    kernel memdisk
    append initrd=BSD/FreeBSD/10.1/mfsbsd-10.1-RC3-amd64.img harddisk raw
    

    Setup or gain access to a FreeBSD host

    You need to setup or gain access to a FreeBSD system, because the mfsbsd tool only works on FreeBSD. You will use this system to generate a FreeBSD PXE boot image.

    Installing mfsbsd

    First we download mfsbsd.

    fetch http://mfsbsd.vx.sk/release/mfsbsd-2.1.tar.gz
    tar xzf mfsbsd-2.1.tar.gz
    

    Then we get a FreeBSD ISO:

    fetch http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso
    

    Mount the ISO:

    mdconfig -a -t vnode -f /root/FreeBSD-10.1-RELEASE-amd64-disc1.iso
    mount_cd9660 /dev/md0 /cdrom/
    

    setup rc.local

    Enter the mfsbsd-2.1 directory. Put the following content in the conf/rc.local file.

    fetch http://<yourwebserver>/pxe/installerconfig -o /etc/installerconfig
    tail -n 7 /etc/rc.local > /tmp/start.sh
    chmod +x /tmp/start.sh
    /tmp/start.sh 
    exit 0
    
    #!/bin/csh
    setenv DISTRIBUTIONS "kernel.txz base.txz"
    setenv BSDINSTALL_DISTDIR /tmp
    setenv BSDINSTALL_DISTSITE
    ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.1-RELEASE
    
    bsdinstall distfetch 
    bsdinstall script /etc/installerconfig
    

    As you can see there is a script within a script that is executed separately by rc.local. That's a bit ugly but it does work.

    setup installerconfig (FreeBSD unattended install)

    The 'installerconfig' script is a script in a special format used by the bsdinstall tool to automate the installation. The top is used to control variables used during the unattended installation. The bottom is a script executed post-install chrooted on the new system.

    Put this in 'installerconfig'

    PARTITIONS=da0
    DISTRIBUTIONS="kernel.txz base.txz"
    BSDINSTALL_DISTDIR=/tmp
    BSDINSTALL_DISTSITE=ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.1-RELEASE
    
    #!/bin/sh
    echo "Installation complete, running in host system"
    echo "hostname=\"FreeBSD\"" >> /etc/rc.conf
    echo "autoboot_delay=\"5\"" >> /boot/loader.conf
    echo "sshd_enable=YES" >> /etc/rc.conf
    echo "Setup done" >> /tmp/log.txt
    echo "Setup done."
    poweroff
    

    As you can see, the post-install script enables SSH, sets the hostname and reduced the autoboot delay.

    Please note that I faced an issue where the bsdinstall program would not interpret the options set in the installerconfig script. This is why I exported them with 'setenv' in the rc.local script.

    With Debian preseeding or Redhat kickstarting, you can host the preseed or kickstart file on a webserver. Changing the PXE-based installation is just a matter of edditing the preseed or kickstart file on the webserver.

    Because it's not fun having to generate a new image every time your want to update your unattended installation, it's recommended to host the installerconfig file on a webserver, as if it is a preseed or kickstart file.

    This saves you from having to regenerate the PXE-boot image file every time.

    You can still put the installer config in the image itself. If you want a fixed 'installerconfig' file containing the bsdinstall instructions, put this file also in the 'conf' directory. Next, edit the Makefile. Search for this string:

    .for FILE in rc.conf ttys
    

    For me, it was at line 315. Change it to:

    .for FILE in rc.conf ttys installerconfig
    

    Building the PXE boot image

    Now everything is configured, we can generate the boot image with mfsbsd. Run 'make'. Then when it fails with this error:

    Creating image file ...
    /root/mfsbsd-2.1/tmp/mnt: write failed, filesystem is full
    *** Error code 1
    
    Stop.
    make: stopped in /root/mfsbsd-2.1
    

    just run 'make' again. In my experience, make worked the second time, consistently. I'm not sure why this happens.

    The end result of this whole process is a file like 'mfsbsd-se-10.1-RC3-amd64.img'.

    You can copy this image to the appropriate folder on your TFTP server. In my example it would be:

    /srv/tftp/BSD/FreeBSD/10.1/mfsbsd-10.1-RC3-amd64.img
    

    Test the PXE installation

    Boot a test machine from PXE and boot your custom generated image.

    Final words

    I'm a bit unhappy about how difficult it was to create an PXE-based unattended FreeBSD installation. The bsdinstall installation software seems buggy to me. However, it could be just me: that I have misunderstood how it al works. However, I can't seem to find any documentation on how to properly use the bsdinstall system for an unattended installation.

    If anyone has suggestions or ideas to implement an unattended bsdinstall script 'properly', with ZFS support, I'm all ears.

    This is the recipe I tried to use to get a root-on-zfs install:

    ZFSBOOT_POOL_NAME=TEST_ROOT
    ZFSBOOT_VDEV_TYPE=mirror
    ZFSBOOT_POOL_SIZE=10g
    ZFSBOOT_DISKS="da0 da1"
    ZFSBOOT_SWAP_SIZE=2g
    ZFSBOOT_CONFIRM_LAYOUT=1
    

    The installer would never recognise the second disk and the script would get stuck.

    I'm aware that mfsbsd has an option to use a custom root-on-zfs script, but I wanted to use the 'official' FreeBSD tools.

    Tagged as : PXE

Page 1 / 26