WEB DEVELOPMENT

Revitalising My Website

I have been a bit myopically focused on completing my new BIM framework for the past few years, to the exclusion of most other things. However, that seems to be how I get stuff done, and I _really_ needed to get that done. Ten man-years for a software project is actually quite a small one, but it still takes me ten years. Thus, it's pretty amazing now to be slowly coming out the other end of it. I also have a heap of half written posts about development stuff that I encountered over that time, so my New Year's resolution for 2025 is to revitalise my website, get some posts finished and demo apps released, and then respond to the absolute mountain of messages I have received in the interim.

Two New Christmas Apps

Christmas school holidays can be tough if you work from home, but I was able to get a couple of little projects done that I have had rolling around in my head for quite a while. The first allows you to create low-poly 3D trees of various levels of abstraction, and the second lets you view simple polyhedra and apply sequential geometric operations to generate higher-order shapes and forms.

Polyhedra Generator

This web app lets you generate a range of polyhedra – based on Platonic, Archimedean, Prism and Johnson Solids – and then interactively apply a sequence of mathematical operations on them to create more complex higher-order polyhedra. These include all the standard Conway and Hart operators as well as some additional 'extended' operations of my own.

Tree Generator

This web app lets you interactively generate both abstract and realistic procedural 3D trees for use with BIM and building performance analysis. Once generated, you can analyse dynamic shading effects as well as exporting them as geometry or generating the code required to create the same tree in a BIM model or with a script. It also serves as a visual test suite for stress testing my tree geometry generation code under lots of different conditions and configurations.

The Wonders of Duck Typing

Having immersed myself entirely in JavaScript for the past few years, going back to something like C# should have been a bit of relief. However, it mainly served to highlight just how inflexible and full of unnecessary overhead C# is, and just how much I love the flexibility and interoperability of JavaScript. This particular post details one of those ridiculous situations that languages like C# often create, with a relatively simple app containing at least 6 different classes/structures for storing 3D position data, many of them pretty much the same but entirely incompatible with each other.

Recent Service Interruption

As you may have noticed, my blog has had quite a few outages lately which hopefully have now been sorted out. However, after some long-running issues with the occasional html file simply disappearing, my web hosting service provider has recently upgraded their infrastructure and, in the process, blown up most of my other Drupal-based sites.

New Schedule Editor

I have finally finished my online annual hourly schedule editor, which took several iterations and quite some time to get working the way I wanted. It's of interest because hopefully its relatively easy to use and can read and write schedules in a range of different formats, including EnergyPlus (IDF and epJSON), OpenStudio (OSM), DIVA/DaySim (.OCC.CSV) and some other CSV layouts.

Why Educational Tools

A common question I get, both directly and indirectly, is why do I spend so much time on what seem to be pretty limited educational apps rather than doing a full-on building analysis tool that can handle real projects. I documented this at the start of a recent research paper , but figured that I should probably summarise my reasons here as well.

JSON Settings

Quite a few people have asked lately about the settings editor in my web apps and how to use it. Actually most of the questions were more along the lines of 'why on earth do you use JSON for storing settings in your apps, and what’s with that weird editor?'. Well I have one or two good reasons for both, which I shall endeavour to explain.

Two New Web Experiments

As part of adding support for scriptable tutorials, I had to create my own 3D vector font and annotation libraries. Both are intended to be highly dynamic and customisable so I wrote a couple of apps that interactively control their properties to thoroughly test them. As a bonus, these apps also serve as font and annotation designers, allowing you to do visual customisations and then copy/paste the code required to create that text or annotation in a script.

Moving From Drupal to Hugo

My content management system of choice is Drupal. It has served me pretty well and allowed me to do a lot of things I probably could never have done without it. However, it has become such an attention seeker these days; with security issues, module upgrades, heavy comment spam and database blowouts seemingly weekly events. Also, upgrading to the newest version is never as smooth as promised. Thus, instead of upgrading my blog to Drupal 8, I have dumped it entirely and moved to a completely static site using Hugo.

Understanding WebGL

My biggest issue with WebGL, and actually all non-immediate-mode OpenGL, is constantly fighting with the requirements of vertex buffers and attributes. I seem to be always looking for ways to minimise and optimise memory whereas vertex buffer objects always seem to want me to waste large amounts of it with duplicate attributes. However, reconciling that requirement in my own mind has actually given me a bit of insight into potentially alternate uses for the WebGL render pipeline.

Web Experiments

PerformativeDesign.com has gone into a short code-freeze for some external testing now so I have finally got a bit of time to catch my breath. As part of that work, I have had to do quite a few small experiments and proofs-of-concept, just as a way of seeing what was possible and then working out the best ways to do various things. Some of these were a bit interesting and often a lot of fun so I thought I'd polish up a few and make them available as a small taster of things to come, hopefully quite soon.

Interactive 3D in a Web Page

This page discusses the results of my experiments with Processing over the Christmas break. What is interesting about Processing is that it allows you to create fully interactive 3D applets embedded in a standard web page on any platform. For visualising and playing around with complex concepts, this offers something far more exciting than even Adobe Flash.

Stung by Drupal's Filter Caching, Again

When will I ever learn? I just lost another few hours of my life because - again - I didn't properly understand Drupal's filter cache system.

Hacking Drupal's 'Read more' Link

When displaying a list of node teasers, Drupal includes a 'Read more' item within a list of links at the bottom of each node. Other items in this list include links for adding comments, the number of page reads and other node-specific actions. For users not familiar with Drupal, this link can be easily missed as it is given the same significance as all the others, making it not particularly obvious that there is more information available.

Graph - Annual Temperatures (Google)

The graph is one of my experiments with Google's Visualisation API as a possible means of interactive web-based data presentation. It's an implementation of an annotated time line graph that Google originally developed for showing stock exchange data - used here to show annual hourly air temperature values. It has to process a whole year's worth of hourly temperature data for San Francisco, so it can take a little while for the graph to first appear.

Graph - Annual Temperatures (Java)

This is an experiment with the use of Java applets to provide highly interactive charts and graphs embedded within a web page. It is just an example so the data it shows is not hugely meaningful - in this case a set of annual hourly air temperature values. However, it is an opportunity to play with my primitive attempt at an interactive and intuitive date range control. This control sits at the bottom of the chart and provides a means for selecting a date range for the values shown.

Embedding Java Applets

Embedding Java applets in a web page should be pretty trivial, there is even an 'applet' HTML tag specifically for that purpose. However, it turns out this is now deprecated in favour of the new 'object' tag. As usual, this new tag is implemented differently by different browsers so it ends up being anything but trivial.

Browser Detection Methods

Whilst there may be many reasons for wanting to know which browser your web page is being viewed within, the main one I find is needing to tweak some CSS or embedded applet code to accommodate certain rendering inconsistencies. At first glance, this seems pretty easy with dynamically-generated pages as most server-side programming or scripting languages provide a way of doing this as the page is being assembled for delivery. However, for both static web pages and content that is likely to be cached by a content management system (CMS) it isn't so easy. This article therefore considers a range of available browser detection methods.