Author Archives: thiscouldbebetter

An Image Combiner in JavaScript

The JavaScript code below, when run, presents an interface that allows the user to upload a collection of image files, and then display and download all those images as a single combined image incorporating the original images in a grid.

Posted in Uncategorized | 3 Comments

Hello World in TypeScript with Classes in a Web Browser

Follow the steps below to create and compile a simple TypeScript program that, when run by opening the hosting .html in a web browser, simply displays the message “Hello, world!” in an alert dialog. These instructions use the “tsc” TypeScript … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

A Directory Tree Sizer in C#

The C# code below, when run, calculates the size of a given directory and all its subdirectories.

Posted in Uncategorized | Tagged , , , , | Leave a comment

A Toy Bug Tracker in JavaScript

The JavaScript code below implements a rudimentary bug tracker, or, perhaps more accurately, a task tracker. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript. It’s not … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Exploring the ZIP File Format in JavaScript

The JavaScript program below, when run, prompts the user to upload a file in .ZIP format. Then the file is parsed and its internal structure is displayed as text in the JSON format. Note that this code does not actually … Continue reading

Posted in Uncategorized | Tagged , , , , | 3 Comments

Another RPG Combat Engine in JavaScript

The code below implements a rudimentary turn-based combat engine for a Japanese-style role-playing game in JavaScript. I have partially implemented a similar engine in a previous post, but I recently tried to update it and found it very difficult. I … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

A Text-Based SVG Editor in JavaScript

The JavaScript program below, when run, will present an interface that allows a user to edit a vector image in SVG format as text, and view the changes to the rendered image as they are made. To see it in … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment

An HTTP Echo Server in C# Using HttpListener

The C# code below implements a rudimentary HTTP server that simply echoes whatever is sent to it back to the client.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

A Function Argument Type Validator in JavaScript

The JavaScript code below implements simple type checking on function arguments. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript, with the debugging console open so the … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

A CSV Compressor in JavaScript

Below is a simple program that can remove repeated values from a CSV, thus making the file smaller. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript. … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment