<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Development on ShrimpWorks</title><link>/categories/development/</link><description>Recent content in Development on ShrimpWorks</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sat, 09 Jul 2022 00:00:00 +0000</lastBuildDate><atom:link href="/categories/development/feed.xml" rel="self" type="application/rss+xml"/><item><title>MQTT Implementation in UnrealScript</title><link>/2022/07/09/mqtt-implementation-in-unrealscript/</link><pubDate>Sat, 09 Jul 2022 00:00:00 +0000</pubDate><guid>/2022/07/09/mqtt-implementation-in-unrealscript/</guid><description>&lt;p&gt;TLDR; There&amp;rsquo;s now an
&lt;a href="https://github.com/shrimpza/unrealscript-mqtt-client"&gt;MQTT Client implementation written in UnrealScript&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been doing &lt;a href="https://github.com/shrimpza/monsterhunt"&gt;a bit of stuff in UnrealScript recently&lt;/a&gt;,
and reacquainting myself with it.&lt;/p&gt;
&lt;p&gt;Something I&amp;rsquo;ve always been aware of, but have never really looked at in much
detail, is that it has an actual &lt;a href="https://unrealarchive.org/unrealscript/#ut99v469b/IpDrv/TcpLink"&gt;TCP client&lt;/a&gt;
you can extend to implement whatever remote communications protocol you&amp;rsquo;d like.&lt;/p&gt;
&lt;p&gt;For whatever reason MQTT popped up as my candidate to play with, with the
thought that you&amp;rsquo;d be able to publish in-game events to some topics and build
interesting things with (the first thing that came to mind was a match stats
collection service which doesn&amp;rsquo;t rely on the traditional process of log
scraping), in addition to allowing in-game functionality to respond to incoming
events by way of topic subscriptions. And being something targeted at
supporting very simple IoT devices, the protocol should be fairly easy to work
with.&lt;/p&gt;</description></item><item><title>Use Java's built-in HTTP Server for Mocking</title><link>/2020/11/06/use-javas-built-in-http-server-for-mocking/</link><pubDate>Fri, 06 Nov 2020 00:00:00 +0000</pubDate><guid>/2020/11/06/use-javas-built-in-http-server-for-mocking/</guid><description>&lt;p&gt;Frequently while implementing HTTP API or other HTTP clients, you want to be
able to test your client implementation against an actual HTTP service,
which helps validate that your headers are set correctly, body is serialised
appropriately, and responses are parsed as expected.&lt;/p&gt;
&lt;p&gt;This can be done through the use of various additional libraries and mocking
frameworks, however I&amp;rsquo;d argue that for most use cases, something that can
simply validate and respond to an HTTP request is more than enough.&lt;/p&gt;</description></item><item><title>Run Your Java Services with SystemD</title><link>/2020/09/01/run-your-java-services-with-systemd/</link><pubDate>Tue, 01 Sep 2020 00:00:00 +0000</pubDate><guid>/2020/09/01/run-your-java-services-with-systemd/</guid><description>&lt;p&gt;There&amp;rsquo;s a strong tendency to want to run everything in Docker these days,
especially if you&amp;rsquo;re trying to run something as an always-on service, since
passing &lt;code&gt;--restart=always&lt;/code&gt; to your &lt;code&gt;run&lt;/code&gt; invocation or Docker Compose
configuration ensures that running containers start back up after reboots or
failures, and seems to involve a little less &amp;ldquo;black magic&amp;rdquo; than actually
configuring software to run as services directly on a host.&lt;/p&gt;
&lt;p&gt;The downside to this is the approach is that running a service in a container
leads to significantly longer startup times, more memory and CPU overhead, lost
logs, and in my opinion offer a false sense of security and isolation since
most images are still configured to run as root, and more often than not large
swathes of the host filesystem are mounted as volumes to achieve simple tasks.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s also a belief that your software will magically run anywhere - but if
you&amp;rsquo;re writing Java (or any JVM language) code - that&amp;rsquo;s one of Java&amp;rsquo;s biggest
selling points - it already has its own VM your code is running in, no most
platforms!&lt;/p&gt;
&lt;p&gt;Therefore, let&amp;rsquo;s see how easy it actually is to configure our software to run
as a standard system service, providing us with the ability to run it as a
separate restricted user, complete with standard logging configuration, and
give us control over via standard &lt;code&gt;service myservice start|status|restart|stop&lt;/code&gt;
commands.&lt;/p&gt;</description></item><item><title>Simple Java Value Objects</title><link>/2019/08/11/simple-java-value-objects/</link><pubDate>Sun, 11 Aug 2019 00:00:00 +0000</pubDate><guid>/2019/08/11/simple-java-value-objects/</guid><description>&lt;p&gt;It&amp;rsquo;s a really simple thing, but I&amp;rsquo;ve been using this simple &amp;ldquo;pattern&amp;rdquo; for
defining simple value objects for years, and it has served me well.&lt;/p&gt;
&lt;p&gt;While there&amp;rsquo;s nothing particularly special about this style, I still see a
significant amount of Java code needlessly following the
&lt;a href="https://en.wikipedia.org/wiki/JavaBeans"&gt;JavaBeans&lt;/a&gt; style, when
using these objects as Beans in the strict sense is not actually desired,
intended, or required, and simply makes code needlessly verbose and leaves
objects implemented as Beans open to abuse due to leaving their internal state
open for mutation.&lt;/p&gt;</description></item><item><title>Unreal Archive</title><link>/2019/03/16/unreal-archive/</link><pubDate>Sat, 16 Mar 2019 00:00:00 +0000</pubDate><guid>/2019/03/16/unreal-archive/</guid><description>&lt;img src="/2019/03/16/unreal-archive/2019-03-16-unreal-archive.png" alt="Unreal Archive"class="image-right" /&gt;
 


&lt;p&gt;Over the past several months, I&amp;rsquo;ve been working on a project to provide a
place to catalogue and preserve the vast amounts of user-created content the
Unreal and Unreal Tournament community has been creating over the past 20+
years.&lt;/p&gt;
&lt;p&gt;This has resulted in the &lt;a href="https://unrealarchive.org/"&gt;Unreal Archive&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While it may seem a silly cause to invest so much time (and money) into, this
stuff directly influenced the lives of myself and thousands of others. I would
certainly not be in the profession I&amp;rsquo;m in, driving my car, living in my house,
if not for the direct influence of working on Unreal Tournament maps, mods and
community, and personal websites.&lt;/p&gt;</description></item><item><title>UTStatsDB</title><link>/2018/06/17/utstatsdb/</link><pubDate>Sun, 17 Jun 2018 00:00:00 +0000</pubDate><guid>/2018/06/17/utstatsdb/</guid><description>&lt;a href="/2018/06/17/utstatsdb/2018-06-17-utstatsdb.png"&gt;
		&lt;img src="/2018/06/17/utstatsdb/2018-06-17-utstatsdb_hu_ef54bfbf68e8e7d1.jpg" class="image-center" /&gt;
	&lt;/a&gt;


&lt;p&gt;UTStatsDB is a player and match statistics system for Unreal Tournament 99,
2003, 2004 and 3, which parses match logs generated by each game (sometimes
requiring additional server-side mutators), and makes stats for each game
available through a website.&lt;/p&gt;
&lt;p&gt;The stats are also aggregated by player, map and server, allowing you to browse
and analyse quite a number of in-depth stats for each.&lt;/p&gt;
&lt;p&gt;The project was developed and maintained by Patrick Contreras and Paul Gallier
between 2002 and around 2009, where the &lt;a href="http://www.utstatsdb.com"&gt;original project&lt;/a&gt;
seems to have been abandoned some time after the release of UT3. (&lt;em&gt;addendum: by
some coincidence, after 9 years of inactivity, the original author did create a
release a few days after my revival/release&lt;/em&gt;) Locating downloads (the download
page is/was not working) or the source (their SCM system seems to require auth
or is simply gone) was quite troublesome.&lt;/p&gt;</description></item><item><title>Aurial, HTML5 Subsonic Music Player</title><link>/2017/05/29/aurial-html5-subsonic-music-player/</link><pubDate>Mon, 29 May 2017 00:00:00 +0000</pubDate><guid>/2017/05/29/aurial-html5-subsonic-music-player/</guid><description>&lt;img src="/2017/05/29/aurial-html5-subsonic-music-player/2017-05-29-aurial.png" class="image-left" /&gt;
 


&lt;p&gt;I have finally decided to &lt;a href="https://github.com/shrimpza/aurial/releases"&gt;release version 1.0&lt;/a&gt; of &lt;a href="https://github.com/shrimpza/aurial"&gt;Aurial&lt;/a&gt;, my implementation of a music player/client for the &lt;a href="http://subsonic.org/"&gt;Subsonic&lt;/a&gt; music server.&lt;/p&gt;
&lt;p&gt;I started this around two years ago, some time after switching my primary desktop from Windows to Linux, and I really missed &lt;a href="https://www.foobar2000.org/"&gt;foobar2000&lt;/a&gt; - it has been my primary music player ever since. Unfortunately I have an irrational aversion to using Wine to run Windows applications, and none of the native music players on Linux felt good to me. As I already ran a Subsonic music server, I thought I&amp;rsquo;d just make use of that.&lt;/p&gt;</description></item><item><title>Client-Side Processing of Images with JavaScript Before Uploading</title><link>/2017/03/07/client-side-processing-of-images-with-javascript-before-uploading/</link><pubDate>Tue, 07 Mar 2017 00:00:00 +0000</pubDate><guid>/2017/03/07/client-side-processing-of-images-with-javascript-before-uploading/</guid><description>&lt;p&gt;The title&amp;rsquo;s quite silly unfortunately, but I was recently doing some experimentation with uploading images to &lt;a href="https://couchdb.apache.org/"&gt;CouchDB&lt;/a&gt; directly from a browser. I needed to scale the images before storage, and since I was talking directly to the CouchDB service without any kind of in-between API services or server-side scripts, needed a way to achieve this purely on the client.&lt;/p&gt;
&lt;p&gt;Thanks to modern APIs available in browsers, combined with a Canvas, it&amp;rsquo;s actually reasonably simple to process a user-selected image prior to uploading it to the server without the need for any third-party libraries or scripts.&lt;/p&gt;</description></item><item><title>Out of Eve 3.0 released</title><link>/2016/05/07/out-of-eve-3.0-released/</link><pubDate>Sat, 07 May 2016 00:00:00 +0000</pubDate><guid>/2016/05/07/out-of-eve-3.0-released/</guid><description>&lt;img src="/2016/05/07/out-of-eve-3.0-released/title.png" class="image-center" /&gt;
 


&lt;p&gt;After almost exactly two years since the last release of Out of Eve,
&lt;a href="https://github.com/shrimpza/outofeve/releases/tag/outofeve-3.0-citadel"&gt;here is version 3.0.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As may be noted from the release note, the main goal of this release is to
catch everything up with the current state of EVE, it&amp;rsquo;s API, and the static
data dump.&lt;/p&gt;
&lt;p&gt;Along the way some new stuff was also added an improved, like the new menu
system which allows access to all your characters, so there&amp;rsquo;s no need to switch
between them and then view detail pages, and the introduction of &lt;code&gt;memcached&lt;/code&gt;
caching, which stores and retrieves entities loaded from the static database
dump, reducing page load times and database accesses (a single page load may
result in hundreds of individual MySQL queries).&lt;/p&gt;</description></item><item><title>Lightweight Lightbox</title><link>/2016/03/29/lightweight-lightbox/</link><pubDate>Tue, 29 Mar 2016 00:00:00 +0000</pubDate><guid>/2016/03/29/lightweight-lightbox/</guid><description>&lt;p&gt;It seems surprisingly difficult to find a simple &lt;a href="https://en.wikipedia.org/wiki/Lightbox_%28JavaScript%29"&gt;lightbox&lt;/a&gt;
implementation which doesn&amp;rsquo;t rely on jQuery. I wanted something simple for this
site, but did not want to have to re-do any HTML, so came up with a basic
JavaScript and CSS solution.&lt;/p&gt;
&lt;p&gt;This also turned out to be a useful lesson in &amp;ldquo;modern&amp;rdquo; jQuery-less DOM
manipulation. I found &lt;a href="http://tutorialzine.com/2014/06/10-tips-for-writing-javascript-without-jquery/"&gt;10 Tips for Writing JavaScript without jQuery&lt;/a&gt;
quite useful in this regard.&lt;/p&gt;
&lt;p&gt;For the Lightbox/pop-up itself, the &lt;a href="http://codepen.io/gschier/pen/HCoqh"&gt;Pure CSS Lightbox&lt;/a&gt;
by &lt;a href="http://schier.co/"&gt;Gregory Schier&lt;/a&gt; served as an excellent reference and
starting point.&lt;/p&gt;</description></item></channel></rss>