<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><atom:link href="https://danrh.net" rel="self" type="application/rss+xml"/><title>danrh</title><link>https://danrh.net</link><description>(λ () 'danrh)</description><lastBuildDate>Tue, 30 Jan 2024 14:16:34 -0500</lastBuildDate><generator>clj-rss</generator><item><guid>https://danrh.net/posts/2024-01-30-only-print-primary-output-to-stdout/</guid><link>https://danrh.net/posts/2024-01-30-only-print-primary-output-to-stdout/</link><title>stdout is only for a program's main output</title><description>Only for the main output.</description><pubDate>Tue, 30 Jan 2024 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2023-12-11-js-never-use-classes/</guid><link>https://danrh.net/posts/2023-12-11-js-never-use-classes/</link><title>The biggest reason I never use classes in JavaScript</title><description>JavaScript methods that use this in reference to the class they belong to will break if the method is assigned to another value or passed into another function as a function object.This is because the value of this is dependent on the object that the method is a member of at the time of calling.</description><pubDate>Mon, 11 Dec 2023 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2023-10-14-production-ready-code/</guid><link>https://danrh.net/posts/2023-10-14-production-ready-code/</link><title>Writing Production Ready Code</title><description>Is your code too clear and simple? Is it too obvious what it does? Did you write it in a way that is too easy to understand?If so, you need to make it Production Ready. If you aren't using Factories, Generic Higher Order Functions, or DependencyInversionDeinverterWrapperBeanSingletonProducers, you really need to up your game.</description><pubDate>Sat, 14 Oct 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-10-07-disproportionately-satisfying/</guid><link>https://danrh.net/posts/2023-10-07-disproportionately-satisfying/</link><title>Disproportionately Satisfying Programs</title><description>I find some little programs/scripts/snippets disproportionately satisfying to write/use. The best programs are ones that I never intend to share with anyone else.The following program is one I wrote recently that falls into this category. All it does is convert lines of CSS into React inline styles, and it took only a few minutes to write.</description><pubDate>Sat, 07 Oct 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-09-24-fizzbuzz/</guid><link>https://danrh.net/posts/2023-09-24-fizzbuzz/</link><title>What does your FizzBuzz say about you?</title><description>A classic problemAt the interview for my first job, I was asked to write a FizzBuzz. A FizzBuzz is a program that prints a series of numbers, unless a number is divisible by 3, in which case it prints Fizz, or divisible by 5, in which case it prints Buzz. For any numbers divisible by both, it should print FizzBuzz.</description><pubDate>Sun, 24 Sep 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/industrial/knowd/2023-09-17-knowd/</guid><link>https://danrh.net/posts/industrial/knowd/2023-09-17-knowd/</link><title>Knowd</title><description>Development of an AI-powered browser-based application for knowledge extraction and organisationAn early peek:</description><pubDate>Sun, 17 Sep 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-06-11-little-red-flags/</guid><link>https://danrh.net/posts/2023-06-11-little-red-flags/</link><title>Little Red Flags</title><description>Obvious issues can betray the presence of subtler onesRecently, I stayed in an Airbnb. At this Airbnb, the shower's hot and cold were reversed. Initially confusing, but once I realised this I could use the shower with no issues.</description><pubDate>Sun, 11 Jun 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-05-28-bash-http-server-with-netcat/</guid><link>https://danrh.net/posts/2023-05-28-bash-http-server-with-netcat/</link><title>A sh HTTP Server, using Netcat</title><description>This kind of thing should not be used in any serious production application. For a start, there is a risk of shell injection attacks.But I would bet that multiple S&amp;P 500 companies use something like this, somewhere deep in the bowels of their systems.</description><pubDate>Sun, 28 May 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-05-26-forth/</guid><link>https://danrh.net/posts/2023-05-26-forth/</link><title>Adventures in Forth/Stack Languages, part 1</title><description>Over the last week I have been playing with a Forth-like language that I have implemented (separately) in JavaScript and C.I have embedded the JavaScript version below, and both versions are available on Codeberg: https://codeberg.org/DanielRHolland/forth-style-stack-lang.</description><pubDate>Fri, 26 May 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-05-11-game-of-life-hs/</guid><link>https://danrh.net/posts/2023-05-11-game-of-life-hs/</link><title>Throwback Thursday: Haskell Game of Life</title><description>Almost two years ago now, at a Mycs company party, I was chatting with some other devs when I confessed to having never implemented a "Game of Life". To remedy this, I wrote one in Haskell (iirc I actually started this at the party itself).</description><pubDate>Thu, 11 May 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-05-08-languages-that-changed-how-i-think/</guid><link>https://danrh.net/posts/2023-05-08-languages-that-changed-how-i-think/</link><title>Programming Languages that changed how I think</title><description>This is, in some sense, a part 2 to Software Engineering Books and Resources that I have found interesting. In fact, this list was originally going to be included with that one, but it got too long (especially with the notes), and so I split it out. Some of the notes may get trimmed/edited/fleshed-out at a later date, and I might add more languages.I have intentionally excluded from this list some of my favourite languages, some of the most popular languages, and some of the best languages for building great products, simply on the grounds that I don't feel that they sufficiently changed the way that I think.</description><pubDate>Mon, 08 May 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/industrial/processboard/2023-05-05-processboard/</guid><link>https://danrh.net/posts/industrial/processboard/2023-05-05-processboard/</link><title>Processboard</title><description>Software Development, DevOps, &amp; Infrastructure Design for a SaaS startup. Mainly using JavaScript &amp; PostgreSQL, on Linux.</description><pubDate>Fri, 05 May 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-04-23-classes-in-scheme/</guid><link>https://danrh.net/posts/2023-04-23-classes-in-scheme/</link><title>Creating Objects using Closures</title><description>You don't need Java (or C++, or an "OOP" language) to create objects and classes!What are objects and classes?For this post, consider objects to be instances of encapsulated state with associated methods, and classes to be the general definitions of a type of object.</description><pubDate>Sun, 23 Apr 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-04-17-a-reading-list/</guid><link>https://danrh.net/posts/2023-04-17-a-reading-list/</link><title>Software Engineering Books and Resources that I have found interesting</title><description>I'm not really sure this is really "blog post" kind of content, as I intend to come back later and amend/add to it. When I have met people looking to get into Software Engineering, or students of Computer Science, I have been asked for recommendations for things to do/read/watch. This post lists some of the things that I have found interesting, and that I have recommended to others. This list is incomplete.If you have any recommendations for me, let me know, I'll check them out, and I might even add them to the list.</description><pubDate>Mon, 17 Apr 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-04-16-459-times/</guid><link>https://danrh.net/posts/2023-04-16-459-times/</link><title>459 times</title><description>If you have a 99% chance of failure, for a given task, then if you attempt it 459 times, your chance of success will be over 99%.It gets better than this - after only 69 attempts, your chance of success is already greater than 50%.</description><pubDate>Sun, 16 Apr 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-04-15-scheme-mini-microblogging-platform/</guid><link>https://danrh.net/posts/2023-04-15-scheme-mini-microblogging-platform/</link><title>Building a Mini Social Network in one file of Scheme - Part 1</title><description>I have been messing about with Chicken Scheme, building a little microblogging-style app, with a twist: users can vote for a purge of the whole site's content! I thought it would be fun to see how far I can get with one file of Scheme and without any JavaScript. I have put a favicon and some css in separate files, but really these could both be embedded in the Scheme file aswell - but that would be taking it a bit too far.If you skim the Scheme below, several issues will become obvious to you. Perhaps most saliently, the USP feature is not actually fully implemented - users can vote to purge the server, but the purge action itself has not been added. Secondly, the users and passwords are simply hardcoded into an association list. I've dumped the code below, and at some point I will tidy up a few of the loose ends, make the GitHub repo public, and perhaps write further about it.</description><pubDate>Sat, 15 Apr 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-04-14-tech-stack/</guid><link>https://danrh.net/posts/2023-04-14-tech-stack/</link><title>Software Engineers don't have a tech stack - their projects do</title><description>I would rather discuss solving problems than just talk about "Stacks" in isolationIt's great to have favourites, and to be enthusiastic about specific tools - I do too, this is an important part of being a tech-nerd/hacker/programmer. But "Tech Stack" isn't an attribute of the person, it's an attribute of the project.</description><pubDate>Fri, 14 Apr 2023 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2023-02-01-calling-a-c-library-from-chicken/</guid><link>https://danrh.net/posts/2023-02-01-calling-a-c-library-from-chicken/</link><title>Calling a C Library for QR Generation from Chicken Scheme</title><description>I wanted to create a QR code from within Chicken Scheme, but I couldn't find an existing Scheme library or chicken Scheme egg online that would let me do this. Fortunately, Chicken Scheme is pretty easy to integrate with existing C code.The first thing I did was I wrote a Hello World in Scheme and another Hello World in C, and checked that I could get both of these to run (using the chicken compiler and GCC).</description><pubDate>Wed, 01 Feb 2023 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2022-12-14-generating-email-addresses/</guid><link>https://danrh.net/posts/2022-12-14-generating-email-addresses/</link><title>Generating New Email Addresses for new services</title><description>I wrote a little script recently to generate new email addresses using the CloudFlare API.By doing this, I can create loads of email addresses really quickly and set up disposable ones for new services or categories of services. The script either randomly generates an identifier, or will use a value provided as input.</description><pubDate>Wed, 14 Dec 2022 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2022-08-14-with-nvm/</guid><link>https://danrh.net/posts/2022-08-14-with-nvm/</link><title>A very simple way to use NVM without sourcing it in your rc (+ works with fish)</title><description>I mainly use fish, and NVM does not work with fish out-of-the-box.Even if I happen to be using zsh/sh/ksh/bash, I don't want to be loading NVM when I start a new shell, when I am only using it on occasion.</description><pubDate>Sun, 14 Aug 2022 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2022-03-29-autoreload-scripts/</guid><link>https://danrh.net/posts/2022-03-29-autoreload-scripts/</link><title>Unix Shell Scripting</title><description>While building a simple HTTP Server in Racket, I wanted to automatically restart the server when I changed the source file.To achieve this, I wrote a simple shell script.</description><pubDate>Tue, 29 Mar 2022 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2022-02-28-racket-web-server-reading-path/</guid><link>https://danrh.net/posts/2022-02-28-racket-web-server-reading-path/</link><title>Racket HTTP Server 2 - Reading the Path</title><description>Previously, I wrote a simple HTTP server in Racket. The next step I will take with this project is to figure out how to extract the HTTP method and path from the request.The handle method's first argument, in, is an input port, from which the request can be read. We can read the first line from the request using the read-line function:</description><pubDate>Mon, 28 Feb 2022 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2022-02-23-nginx-ssl/</guid><link>https://danrh.net/posts/2022-02-23-nginx-ssl/</link><title>Adding TLS/SSL to a web service with Nginx</title><description>As I previously mentioned, it is almost always better to use a battle-hardened old favourite for security software, rather than to roll your own.With Nginx, you can add SSL/TLS support in front of your web server, using tried and tested software.</description><pubDate>Wed, 23 Feb 2022 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2022-02-21-template-haskell-data-loading/</guid><link>https://danrh.net/posts/2022-02-21-template-haskell-data-loading/</link><title>Using Template Haskell to bundle data into an executable at compile time</title><description>Often, a program will rely on static data - lookup tables, files to serve, initial values for internal data structures, and so on. Template Haskell can be used to load files, and execute code, at compile time.This is a very gentle introduction to the otherwise often intimidating world of Template Haskell. For the sake of simplicity, I am keeping a narrow focus: loading a file, and then manipulating the data from that file, both at compile time.</description><pubDate>Mon, 21 Feb 2022 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2022-02-06-racket-web-server/</guid><link>https://danrh.net/posts/2022-02-06-racket-web-server/</link><title>Racket HTTP Server</title><description>When I start playing with a new language, I like to have a look at how I could build a simple HTTP server in that language.Racket's racket/tcp library provides us with functions for managing TCP connections. Using this, we can implement a server.</description><pubDate>Sun, 06 Feb 2022 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/industrial/mycs/2021-10-16-logistics-optimisation/</guid><link>https://danrh.net/posts/industrial/mycs/2021-10-16-logistics-optimisation/</link><title>Mycs - Logistics Optimisation - Declarative Constraint Programming</title><description>Using Constraint Programming / MiniZinc for Manufacturing OptimisationUsed Declarative Constraint Programming (with MiniZinc) to optimise the assignment of Purchase Orders to Manufacturers, increasing Supply Chain cost-efficiency while also introducing checks and safeguards. Built a RESTful API wrapper in Go to allow the constraint solver to be accessed over the network.</description><pubDate>Sat, 16 Oct 2021 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/2021-05-01-haskell-feistel-cipher/</guid><link>https://danrh.net/posts/2021-05-01-haskell-feistel-cipher/</link><title>Implementing a Feistel Cipher in Haskell</title><description>I was reading about Feistel Ciphers, and thought it would be fun to implement a toy one. I have shared it below.Wikipedia Feistel Cipher ArticleGithub Gist: Haskell Feistel Cipher</description><pubDate>Sat, 01 May 2021 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/industrial/mycs/2021-03-14-refunds/</guid><link>https://danrh.net/posts/industrial/mycs/2021-03-14-refunds/</link><title>Mycs - New Refunds Processing System</title><description>Development of a New Refunds Processing SystemBuilt a new Refunds Tracking and Processing System for Mycs GmbH, a major European Retailer of Custom Furniture.</description><pubDate>Sun, 14 Mar 2021 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2021-03-08-haskell-actor-model/</guid><link>https://danrh.net/posts/2021-03-08-haskell-actor-model/</link><title>Erlang-Style Actor Model in Haskell</title><description>An Erlang-Style Actor Model implemented in Haskell Example Usage </description><pubDate>Mon, 08 Mar 2021 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2020-12-14-removeandroidappsadb/</guid><link>https://danrh.net/posts/2020-12-14-removeandroidappsadb/</link><title>Remove unwanted pre-installed android apps without root</title><description>Note: Unfortunately, this does not remove absolutely all traces of the software (/malware!). But, it does remove them completely from view, and reduces the amount of disk space they consume. I am not aware of any better solution without rooting the device. If you are aware of a better solution, please get in touch!</description><pubDate>Mon, 14 Dec 2020 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/2020-12-14-openpyxl/</guid><link>https://danrh.net/posts/2020-12-14-openpyxl/</link><title>Manipulate Spreadsheets in Python using openpyxl</title><description>PrerequisitesIf you don't have pip, install that first.
Then install openpyxl using pip: run pip install openpyxl</description><pubDate>Mon, 14 Dec 2020 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/uni/2020-06-30-fyp/</guid><link>https://danrh.net/posts/uni/2020-06-30-fyp/</link><title>BSc Final Year Project - Producing Accurate Questions by both Generating and Assessing Questions using Neural Networks  </title><description>The following is a trimmed-down re-edit of the report I wrote for my Final Year Project, completed for my Bachelor's Degree in Computer Science from Nottingham Trent University.</description><pubDate>Tue, 30 Jun 2020 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/uni/2020-06-30-ase2/</guid><link>https://danrh.net/posts/uni/2020-06-30-ase2/</link><title>Advanced Software Engineering - Functional Test-Driven Development with Haskell</title><description>The following report was originally submitted as coursework for the Advanced Software Engineering module of my Bachelor's Degree in Computer Science.</description><pubDate>Tue, 30 Jun 2020 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/uni/2020-06-30-scc/</guid><link>https://danrh.net/posts/uni/2020-06-30-scc/</link><title>Service-Centric and Cloud Computing - Shares Web Service Project - Scala/Go/Angular</title><description>The following is taken from a report I wrote for the Service-Centric and Cloud Computing module of my Bachelor's Degree. It describes a system built for the coursework of that module. The system's purpose was to simulate the trading of shares, and to log the shares owned by different users. The software was written to a specification which detailed the purpose of the system, but not specifics of implementation, which was left relatively open-ended. As such, I chose to use Scala/Scalatra/Slick, Go, and Angular - largely because I wanted to learn more about each of these.</description><pubDate>Tue, 30 Jun 2020 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/uni/2020-03-01-aad/</guid><link>https://danrh.net/posts/uni/2020-03-01-aad/</link><title>Group Project - Advanced Analysis and Design </title><description>I worked with five other students to develop a storage management system for the NTU stores. First we had to figure out the requirements and specify the system. To better understand the problem, we had a site visit to the stores and carried out field research. This was followed by brainstorming, role playing, and process analysis. We wrote a Requirements Specification. In this we stated the purpose of the project, researched existing solutions, examined the user characteristics, and interviewed potential users of the software. We described the assumptions that we were making, set the scope and constraints, and created a glossary of terms. We then created lists of Functional and Non-Functional Requirements (which continued to change throughout the project). The FRs and NFRs were all rated as either must, should, could, or won't.</description><pubDate>Sun, 01 Mar 2020 00:00:00 -0500</pubDate></item><item><guid>https://danrh.net/posts/industrial/exel/2019-09-01-exelapc/</guid><link>https://danrh.net/posts/industrial/exel/2019-09-01-exelapc/</link><title>Exel Computer Systems Plc - Advanced Product Configurator</title><description>Product Configurator for the EFACS E/8 ERP suite</description><pubDate>Sun, 01 Sep 2019 00:00:00 -0400</pubDate></item><item><guid>https://danrh.net/posts/industrial/exel/2019-09-01-exelfsm/</guid><link>https://danrh.net/posts/industrial/exel/2019-09-01-exelfsm/</link><title>Exel Computer Systems Plc - Eagle Field Service Enhancements</title><description>Mobile Field Service Application ExtensionThe Eagle Field Service System</description><pubDate>Sun, 01 Sep 2019 00:00:00 -0400</pubDate></item></channel></rss>