[{"content":" (Just a small one this time, already spent the evening fixing the outdated crap!)\nThe problem One of the worst things for my ADHD brain is the context switch between feature branches. They&rsquo;re loads of busy work, normally in Jira\/AzureDevops\/whatever to get the ticket name\/branchname sorted and it fuckin&rsquo;wrecks my brain.\nI usually end up with all my changes floating, uncommitted, in main, awaiting me to find the branch name I need to move them over in a checkout. That, or buried in a stash when I just wanna code.\nThe solution Just make a damn branch. Deal with my changes locally. git branch -m &lt;old-branch-name&gt; &lt;new-branch-name&gt; git push (--set-remote-upstream is needed if you don&rsquo;t have push.autoSetRemote enabled) Relax. Yeah, I know. It&rsquo;s not actually that revolutionary, but having my changes in local branches that I can manage properly is nice, and I can put off the dreaded branch faff later to merge time.\nThe usual flow of &ldquo;make branch -&gt; checkout -&gt; work&rdquo; just adds far too much inertia to the process. So, enjoy, I guess.\n","permalink":"https:\/\/tduffinntu.github.io\/posts\/adhd-coding\/renaming-git-branches\/","summary":"<blockquote>\n<p>(Just a small one this time, already spent the evening fixing the outdated crap!)<\/p>\n<\/blockquote>\n<h2 id=\"the-problem\">The problem<\/h2>\n<p>One of the worst things for my ADHD brain is the context switch between feature branches. They&rsquo;re loads of busy work, normally in Jira\/AzureDevops\/whatever to get the ticket name\/branchname sorted and it fuckin&rsquo;<em>wrecks<\/em> my brain.<\/p>\n<p>I usually end up with all my changes floating, uncommitted, in <code>main<\/code>, awaiting me to find the branch name I need to move them over in a checkout. That, or buried in a stash when I just wanna <em>code<\/em>.<\/p>","title":"ADHD tip of the week: Renaming git branches"},{"content":"VESVET And ISRG As part of my 2nd year &ldquo;Serious Games&rdquo; Module, I produced a game in Unity\/C# called &ldquo;WordJump&rdquo;.\nThis project was submitted to the Interactive Systems Research Group and was eventually featured in their joint research report on how Serious Games can add value to Vocational and Educational Training (VET), in joint partnership with Erasmus+ nations.\nVESVET is an EC Erasmus+ KA2 project with the aim to foster vocational education and training (VET) students\u2019 employability, by enhancing entrepreneurship, competence development and validation.\nThe project aims to improve professional entrepreneurial competences by means of a good professional orientation and of the internationalisation of the professional experience.\n&ndash; VESVET project brief\nThe following serious games have been created by students at The Nottingham Trent University as part of their Computer Studies and Digital Media Technology courses. In the module Serious Games, the students have a project brief where they work with the research team to create a game that can be of added value to a research project. This page showcases the very best of the games developed by the students from both the 2020 and 2021 cohorts.\n&ndash; ISRG Report\nProject WordJump is heavily inspired by both Duolingo and Doodlejump. The basic gameplay loop of rising up the screen is intuitive and fun, whilst regular learning elements become a change to utilise how play is one of the most effective vehicles for learning.\nIn order to support the game&rsquo;s adoption into a classroom environment, the topics for revising are stored in a simple CSV file - You only need to add a few lines of CSV to change the subject entierly! These become the basis of the questions for revision, with LINQ used to deserialise and process the file to set the game&rsquo;s initial state.\nOn top of that, I utilised i18n plugins in Unity to allow for extension into other languages; in line with the goal of promoting the project&rsquo;s goals internationally. The game currently supports English \ud83c\uddec\ud83c\udde7, Deustch \ud83c\udde9\ud83c\uddea, and Cymraeg \ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f.\nIn this game the player must jump up the platforms without falling off. Collecting coins opens questions which can be set using a simple text file that must be linked prior to playing the game. This makes the game highly versatile \u2013 meaning that a teacher can include any question set produced in a simple format as detailed here. The game shows a question and selects four answers \u2013 the correct one and three others randomly from the answers list.\n&ndash; ISRG Description\nRead more https:\/\/www.ntu.ac.uk\/research\/groups-and-centres\/groups\/interactive-systems-research-group\nhttps:\/\/github.com\/TDuffinNTU\/wordJump-Serious-Games-Project\nhttps:\/\/web.archive.org\/web\/20210603104212\/https:\/\/isrg.org.uk\/vesvet-added-value-games\/\n","permalink":"https:\/\/tduffinntu.github.io\/posts\/vesvet\/","summary":"<h2 id=\"vesvet-and-isrg\">VESVET And ISRG<\/h2>\n<p>As part of my 2nd year &ldquo;Serious Games&rdquo; Module, I produced a game in Unity\/C# called &ldquo;WordJump&rdquo;.<\/p>\n<p>This project was submitted to the <a href=\"https:\/\/www.ntu.ac.uk\/research\/groups-and-centres\/groups\/interactive-systems-research-group\">Interactive Systems Research Group<\/a> and was eventually featured in their joint research report on how Serious Games can add value to Vocational and Educational Training (VET), in joint partnership with Erasmus+ nations.<\/p>\n<blockquote>\n<p><em>VESVET is an EC Erasmus+ KA2 project with the aim to foster vocational education and training (VET) students\u2019 employability, by enhancing entrepreneurship, competence development and validation.<\/em><\/p>","title":"VESVET Project Highlights - WordJump"},{"content":"The Problem I&rsquo;m pretty new to TrueNAS SCALE, and I&rsquo;m even more new to docker and ZFS. As such, it was a total pain to get Nextcloud running because it has more explicit requirements than other docker containers I&rsquo;ve used so far.\nYour mileage may vary and it may not be the best\/safest\/most elegant approach, but it appears to work:\nOrganising your datasets All of the datasets created should use the Generic dataset preset. Create a Dataset called nextcloud. We&rsquo;re going to use this to orgnise our child datasets but it won&rsquo;t actually do anything by itself.\nNext, the nextcloud dataset and create three child datasets:\nappdata - This will store your config and customisation data. userdata - This is where your user&rsquo;s files are stored. I later enabled an SMB share here to transfer user backups (more on this later!). postgres - This is where postgres database info will live. You&rsquo;ll end up with something like this: Applying your permissions Select the appdata dataset, and then &ldquo;Edit Permissions&rdquo; on the side panel.\nSet the owner user and group to www-data, and ensure you&rsquo;ve checked &ldquo;Apply User&rdquo; and &ldquo;Apply Data&rdquo; or these changes won&rsquo;t apply even if you do save!\nEnsure the access modes are set to allow read, write, and execute for the User. Group and Other can be given read and execute, and not Write. Don&rsquo;t forget to save!\nFor userdata this is identical, but I did set ACLs to give my SMB user total access to the dataset afterwards to allow file transfers. You can ignore this for first-time users.\nThe main difference is with postgres, which needs different permissions to function.\nUse the owner user and group netdata for this (numerically these are 999 and 997 respectively if you&rsquo;re having troubl finding them). Only the owner needs RWX access here.\nWith that, you&rsquo;ve got the annoying part over with!\nInstalling Nextcloud This installation assumes you&rsquo;re using the default TrueNAS app. If you want to use docker compose, you probably don&rsquo;t need this tutorial!\nPick an Admin username alongside a decent Admin Password. The password can be modified via the web UI later, but modifying the form when editing the container will do nothing after initial setup!\nSet Host to your NAS&rsquo; lan ip (for now). For me this was 192.168.0.47. If you later set up a DNS name and reverse proxy, you should change this to reflect that host name (eg. nextcloud.myhost.net).\nWhen setting a Redis Password and Database Password, note that these cannot be changed easily after setup.\nEnabling Imaginary is optional, but recommended for better performance when generating preview images. Note that you can&rsquo;t use this with server side encryption! :(\nPersonally, I slightly increased the PHP and cache memory limits from their defaults but realistically these are probably fine at their default values.\nEnable Cron, it&rsquo;ll save you headaches later!\nIn the Network Configuration section do not select a certificate, at best set it to No certificate, but you can leave it untouched. You can use nginx proxy manager or other service to apply your certificates later!\nIn Storage Configuration: Select appdata, userdata, and postgres in their respective sections as host paths.\nFrom here, you should be able to spin up your container!\nPost-install setup Importing users You should now be able to work out the rest, but for my case I wanted to transfer my existing (2) users and their data. This was going to be a royal pain in the arse until I discovered user_migration.\nThis nextcloud is pretty simple. You add it to your old and new server instances, then you can either:\na. Log in as each user and enter into Personal Settings &gt; Data migration.\nb. Use occ user:export in your server&rsquo;s CLI.\nBoth of which will start a background job to pack up your user&rsquo;s files and metadata into one big tarball that can be rsync&rsquo;d between your machines super easily.\nFrom there, it&rsquo;s as simple as running the import job from inside each user&rsquo;s profile on the new instance (assuming the user.nextcloud_export file is moved into their user&rsquo;s username\/files directory), or you can use occ user:import which will create a new user if they don&rsquo;t already exist.\nExpect this to take a long time, it&rsquo;s going to unrar, process, and log each file which also involves re-writing them to disk - on spinning rust this will can take over an hour for larger exports!\nYou might get some errors in the nextcloud log, but try not to worry as some of them will be due to Nextcloud file processing beating the database into a fine pulp. In my experience of a 50GB+ user import, it didn&rsquo;t result in lost data (but I&rsquo;d still recommend you manually verify before deleting your old users!).\nOther steps and further reading Whilst imports was a big one, I did a lot of other stuff to remove warnings, improve reporting, and hopefully performance &amp; security.\nUse nginx proxy manager to enable SSL and a nice domain name for my instance. You&rsquo;ll need to add your domain to trusted_proxies inside Nextcloud&rsquo;s config. Add my maintenance window and phone region to the nextcloud config. These weren&rsquo;t set up in docker annoyingly. Enabled cron. I missed this on my initial setup so I had to set it here. I noticed that even with it enabled, cronjobs weren&rsquo;t firing so I had to add docker exec -u www-data ix-nextcloud-nextcloud-1 php \/var\/www\/html\/cron.php via TrueNAS&rsquo; cron settings (System &gt; Advanced Settings &gt; Cron Jobs): Added SMTP support using gmail&rsquo;s app passwords. Addressed other errors and warnings in the nextcloud admin interface. Most of these are easily fixed and googled duckduckgo&rsquo;d if you need help! ","permalink":"https:\/\/tduffinntu.github.io\/posts\/nextcloud-truenas-scale\/","summary":"<h1 id=\"the-problem\">The Problem<\/h1>\n<p>I&rsquo;m pretty new to TrueNAS SCALE, and I&rsquo;m even more new to docker and ZFS. As such, it was a total pain to get Nextcloud running because it has more explicit requirements than other docker containers I&rsquo;ve used so far.<\/p>\n<p>Your mileage may vary and it may not be the best\/safest\/most elegant approach, but it appears to work:<\/p>\n<hr>\n<h2 id=\"organising-your-datasets\">Organising your datasets<\/h2>\n<p>All of the datasets created should use the Generic dataset preset.\nCreate a Dataset called <code>nextcloud<\/code>. We&rsquo;re going to use this to orgnise our child datasets but it won&rsquo;t actually do anything by itself.<\/p>","title":"Setting Nextcloud on TrueNAS SCALE"},{"content":"About Project Retrospectives Welcome to my first, of hopefully many, project retrospectives. I plan to go over all of my favourite projects from university and talk about the work I did for them in a little more detail than I did when I mass-uploaded my projects to github sometime in 2021!\nThe Project [Github Link]\nComing toward the end of 2019, I had already spent a few months working with Autodesk 3DS Max as part of my 3D Modeling module. We had to create a bunch of 3D models and document them on posters, showcasing our workflow and modelling skills.\nUnfortunately, coming back to this project years later I&rsquo;ve discoverred that the download link for the models themselves is dead :(, something I&rsquo;ll have to address in the future (maybe a second attempt? in Blender..?)\nThe Models The vague theme I had at the time was &ldquo;plants&rdquo;. I enjoyed the seminars I had with making some ferns which inspired the rest of the models I developed going forward.\nOrganic models are much easier to design, especially since their forms and dimensions can vary - This gave me a lot of freedom to play about with meshes as I picked up the basics.\nModel 1, Bamboo pots This was a no-brainer for me. It&rsquo;s a simple shape and incredibly easy to UV Unwrap and texture. I didn&rsquo;t really use too much source imagery here which is probably a source for improvement: Real bamboo actually has some leaves, too!\nA fun detail here is the sections of the bamboo, subtly modelled to be wider than the rest of the stalk. Some Normal mapping helped with the effect.\nModel 2, Fern and Plant Pot Like I said before, the seminars working through a similar model was the inspiration for this series.\nI used alpha masking to turn my leaf texture into a convincingly complex shape despite being relatively simple to model.\nModel 3, Fence Set Being part of my game design course, I wanted to consider how I could use my modelling skills to build 3D environments to be decorated with my other assets.\nI think these could&rsquo;ve come out looking a lot nicer, though; they&rsquo;re one of my less convincing models.\nModel 4, Tree Stump This model was incredibly fun to produce. The jagged forms and subtle texture and normal-mapping makes this model fit naturally into complex 3D environments or as a backdrop for other props.\nThis piece was also a demonstration of my study of PBR materials, and the compositional process of applying one to a model in 3DS Max.\nModel 5, Rusty Shovel This was by far my most complex model, from the complex geometry (far higher than my other models) to the combination of 3 different surfaces into a single PBR Material.\nI&rsquo;m proud with how this came out, especially with how difficult I remember extruding the cylindrical shaft of the shovel into the flat head, which required carefully controlling the thickness of the model to avoid it looking unnaturally thin or thick across the blade.\nThe unwrapping workflow in 3DS was quite intuitive once you understood the principle, so even this complex topology wasn&rsquo;t too bad to texture - Though I think I could&rsquo;ve still tweaked things further!\nConclusion I think a lot about how different my career and life would be if I was given the opportunity to explore my creative side more often, especially in a digital space which has always fascinated me.\nI&rsquo;m quite proud of how well these came out all these years later - Part of me still wants to explore remodelling these in Blender and releasing them as game assets for others to enjoy.\n","permalink":"https:\/\/tduffinntu.github.io\/posts\/project-3ds\/","summary":"<h1 id=\"about-project-retrospectives\">About <em>Project Retrospectives<\/em><\/h1>\n<p>Welcome to my first, of hopefully many, project retrospectives. I plan to go over all of my favourite projects from university and talk about the work I did for them in a little more detail than I did when I mass-uploaded my projects to github sometime in 2021!<\/p>\n<h2 id=\"the-project\">The Project<\/h2>\n<p><a href=\"https:\/\/github.com\/TDuffinNTU\/2nd-Year-3DS-Max-Portfolio?tab=readme-ov-file\">[Github Link]<\/a><\/p>\n<p>Coming toward the end of 2019, I had already spent a few months working with Autodesk 3DS Max as part of my 3D Modeling module. We had to create a bunch of 3D models and document them on posters, showcasing our workflow and modelling skills.<\/p>","title":"Project Retrospective - 3D Modeling at NTU"},{"content":"I&rsquo;ve probably tried making my own website a dozen times in the past. Maybe more. I&rsquo;ve probably tried every possible technology in some shape or form over the years&hellip;\nPowerPoint Good god. Powerpoint. ICT GCSE as a weird time, and I&rsquo;m convinced this was just so our teacher didn&rsquo;t have to bother teaching us how to make a .txt document into .html\nWordpress I actually did have a fun time hacking together some fancy javascript to make this map working, but as you can see from the screenshot, I never got it to look&hellip; not shit, the moment you try and make the layout responsive.\nYou do not want to look at the rest of the code. It&rsquo;s cursed. Along with the rest of Wordpress honestly.\nWix Buggier, more sluggish and less configurable than wordpress, all while contributing to Genocide. What more could you want?\nJavascript frameworks (yuck) I don&rsquo;t think I ever got anything decent working here lmao. Because what you want when you&rsquo;re trying to make a blog is a gigabyte of NPM packages and hours sifting through boilerplate just to fail to get the example project running!\nStraight up rawdogging it What&rsquo;s the absolute opposite of overengineered Javascript frameworks? Overengineering your own javascript framework!\nBlazor I had a lot of fun with this, but I cannot in good conscience let anyone knowingly use C#. I can&rsquo;t, I won&rsquo;t.\nFlutter I like Flutter, I would even say I love Flutter, but it&rsquo;s just not a website or blogging platform, at least without far too much tinkering.\nEnter Hugo I quite literally searched &ldquo;static site generation&rdquo; and picked the first one that I thought was cool. I&rsquo;m a big fan of only needing markdown for everything, and how quickly I was able to get it working on github pages.\nI found PaperMod which made the setup process even better &ndash; I&rsquo;ve already got cross-site search and a beautiful default theme, all without having to bother with much beyong some YAML configuration.\nDespite spending a lot of my time complaining about the customisability of Wordpress, Wix, etc., I don&rsquo;t think I actually mind having no control over my theming &ndash; I just don&rsquo;t like having no control, or having to pick between a bunch of insanely ugly themes. Hugo themes are beautiful, and being atop of Hugo means you can dive in and muck around with the HTML and CSS if you want &ndash; but you don&rsquo;t need to.\nEven better is the setup &ndash; I installed the Snap package\nsudo snap install hugo\nCreated a new hugo project\nhugo new site quickstart &amp;&amp; cd quickstart &amp;&amp; git init\nAdded the papermod theme (some recommend using Golang&rsquo;s modules, some just install it manually with git)\ngit submodule add --depth=1 ... themes\/papermod\nAdded a new article\nhugo new content\/posts\/my-first-post.md\nAnd now I can host it with\nhugo server -D (-D for showing drafts)\nThere&rsquo;s something so nice with how straightforward things are with Hugo &ndash; because the workflow was designed for people who want to make websites, not tacking together a dozen different general-purpose technologies in the hopes of making a website by chance.\nIt&rsquo;s got its limitations, like how I can&rsquo;t bulk-update post templates, but you don&rsquo;t need that for the most part. We&rsquo;ll see.\nGood job, Hugo! pat pat\n","permalink":"https:\/\/tduffinntu.github.io\/posts\/getting-started-with-hugo\/","summary":"<p>I&rsquo;ve probably tried making my own website a dozen times in the past. Maybe more. I&rsquo;ve probably tried every possible technology in some shape or form over the years&hellip;<\/p>\n<h3 id=\"powerpoint\">PowerPoint<\/h3>\n<p>Good god. Powerpoint. ICT GCSE as a weird time, and I&rsquo;m convinced this was just so our teacher didn&rsquo;t have to bother teaching us how to make a .txt document into .html<\/p>\n<h3 id=\"wordpress\">Wordpress<\/h3>\n<p><img alt=\"wordpress\" loading=\"lazy\" src=\"\/posts\/getting-started-with-hugo\/images\/wordpress.png\"><\/p>\n<p>I actually did have a fun time hacking together some fancy javascript to make this map working, but  as you can see from the screenshot, I never got it to look&hellip; not shit, the moment you try and make the layout responsive.<\/p>","title":"Getting Started With Hugo"},{"content":"Wahoo! Finally, I&rsquo;ve decided to do Something with this darned github.io instance.\nI&rsquo;m using Hugo, since I honestly don&rsquo;t need anything other than markdown and static site stuff anyway. Hopefully this&rsquo;ll become a useful resource for myself and others as time goes on. I need a place to document cool stuff I do, and how I approach certain problems I never find the answer to online :^)\n","permalink":"https:\/\/tduffinntu.github.io\/posts\/my-first-post\/","summary":"<h2 id=\"wahoo\">Wahoo!<\/h2>\n<p>Finally, I&rsquo;ve decided to do <em>Something<\/em> with this darned github.io instance.<\/p>\n<p>I&rsquo;m using Hugo, since I honestly don&rsquo;t need anything other than markdown and static site stuff anyway.\nHopefully this&rsquo;ll become a useful resource for myself and others as time goes on. I need a place to document cool stuff I do, and how I approach certain problems I never find the answer to online :^)<\/p>","title":"My First Post"}]