devstruggle

Well, duh: Project 1

Something immensely important that has been somehow transparently staring me in the face is the fact that here in my little web journal, I wield the power of make-believe. Quite literally, as right here in the browser, I could make real any software project of my choosing via the power of Javascript and the HTML5 Canvas element. I suppose I should be fair to myself by qualifying that while this reality has only just occured to me, such a creative option is only available now that I have learned, somewhat, how to use Canvas. Without going too far into it, I attempted a project that was (is?) to be a network simulator, much like Cisco's Packet Tracer though browser- based. I sort of staggered along with this project, still propelled by the giddy momentum of my experience with edX's CS50, researching the Canvas API, solving problem after problem, triumphantly piling hack on top of hack until I had a not entirely crude user interface that allows you to add devices to a drag and drop capable network topology on screen. Though a proud moment, the unplanned, very ad-hoc nature of the code made further extension insufferable, begging significant refactoring to begin adding actual network simulation functionality and I abandoned the project (see its source code). A large part of the decision to move on to something else was the realization that I really liked Javascript and found the Canvas API rather enjoyable to work with. I later attempted to implement a command-line only version of the network simulator with only Javascript and a basic webpage, focusing on good design. This effort was much more successful (source code), and served to solidify my affinity for JS. For some reason, I really enjoy having to think through class design in ES5 (yes, ES5) with its strange inheritance structure and prototype-chaining, which I must admit I still don't even partially understand in many ways.

The previous in mind, I find myself here armed with enough JS to be dangerous and a desire to create. As I've expressed in my earliest posts, I have an infatuation with the idea of emulating old computer systems, building imaginary systems around emulations of vintage processors, even just creating emulations of integrated circuits with the goal of understanding how certain logic chips work. As a (I hope) straight-forward example, I've been fantasizing about building an emulation of a 7 segment display and a driver for it. With that said, I have no clue how one works or what a 'driver' really is, only that I've seen them on vintage equipment, and via some online searches have come to associate the term 'driver' with them. (WORK IN PROGRESS)

11/10/2019 8:17PM



The idea of the seven segement display emulator really stuck with me so today I decided I'd had enough and forced myself to try and make it real. The result is a rudimentary seven segment display written in Javascript, and I must say I'm actually pretty pleased at having been able to pull off even this most basic implementation of it. The full code is here on my Github. The README file there describes the development process. I've embedded it below to play around with. It only accepts a single character from the hexadecimal range, capital letters only. The plan is to further extend it, completing full emulation of the circuit required to run it, with the BCD encoding/decoding chip doing the driving. I will do the other aspects as separate projects as they extend into other topics such as logic gates. I have to admit, this is pretty exciting, it's the most momentum I've had yet on the path to building an emulator of a vintage system. This and the next couple of projects are intended as warmups to that ultimate goal.

ENTER CHARACTER (A-F,0-9):

initial post: wednesday, 10/23/2019 @ 7:03PM