Notepad.exe in HTML5 and JavaScript

On the morning of 10 October, I tired of working on my capstone and had finished contributing a patch to an open-source project, I decided I needed a small, fun, project to quickly create as a change of pace. A few minutes later, either inspirational or pure randomness stuck: recreate Windows Notepad.

Continue reading “Notepad.exe in HTML5 and JavaScript”


Creating Tic-tac-toe in JavaScript (and why I enjoyed it)

Tic-tac-toe is one of the simplest games around, yet it can be tricky to win. The concept of Tic-tac-toe is super simple: you have a 3×3 grid, and each player takes turns writing their respective symbol, either an X or O, in a square. The first person to get three Xs or Os in a row, be it horizontally, vertically, or diagonally, wins. Even a three-year old can play Tic-tac-toe. I remember as a small child on long road trips I played Tic-tac-toe. However, this almost ridiculously simple game has some interesting hidden logic. In order to be good at Tic-tac-toe, you have to analyze the entire board every time it is your turn, calculating the best possible move for you to win but also trying to predict your opponent’s next move and try to block it, and if all else fails make the game end in a tie. This logic can be rather complicated at times, despite the tiny playing field and few move combinations. Even though I am very a very analytical and technical thinker, I somehow loose to rioforce nearly every time we play Tic-tac-toe. It is both amusing and confusing, to be honest. 😛

Continue reading “Creating Tic-tac-toe in JavaScript (and why I enjoyed it)”

JS – Randomly generate a Boolean value

Boolean values and logic, named after George Bool, the creator of such, work rather simply. If an expression results in a true statement, perform a certain series of events; otherwise, perform a different series of events. Boolean logic is such a key part of programming that practically every programming language, even ones you might not consider to be programming languages such as MySQL, has Boolean logic implemented and available for you to use. However, Boolean data types are not standard across implementations. Some use true and false, along with the variation True and False, while others use 0 and 1 for false and true, respectively (this actually corresponds with the binary number system computers use).

As already explained, Boolean logic and data types make code much simpler. Yet they are not only used for decision-making. They can also be used to represent a value. Say you are writing a program that checks if how many laptops in your store inventory have built-in number (num) pads. You can use a Boolean value to flag each laptop item as having a numpad, true, or not, false. Then in your code, you simply check that valve and perform the appropriate action.

Now what if you wanted to write some code that generated hypothetical laptops, and one of the laptop properties was if it had a numpad or not. You would probably create laptop objects containing the laptop’s features, or properties.

Continue reading “JS – Randomly generate a Boolean value”

LR2 Track Selector and LR Track Selector v2.0

A long time ago in a place not far from here, a certain triangle wrote a program to randomly select tracks from the game LEGO® Racers for the player to race. Soon thereafter, a friend asked for an equivalent version for LEGO® Racers 2. The request was acknowledged, and work so began. However, due to confusing logic and a lack of programming skills needed to carry out such a task, development was halted, and the request was never fulfilled.

One year later, the unfinished program was referenced, and after reviewing the state of the code, it was decided that the know-how required to complete it was now available. A mere two hours later, the program had been finished, and the promise made had been kept.

Continue reading “LR2 Track Selector and LR Track Selector v2.0″

Adventures in Website Design && Development – 7/6/14

As a practicing and learning Website designer && developer, I come across many Website creation related tools, examples, demonstrations, and concepts. When possible, I try to use these elements in my own work. Adventures in Website Design && Development documents my many findings and passes them along to you. In this way, we both are on an adventure to become better website designers and developers.

We are finally getting back to the more traditional AWD&&D format with this edition. I have come across lots of pickinic baskets full of delicious goodies in the last month and a half since I started doing more teachy editions, and I am way too eager to jump right in to give a quick summary, so let’s get right to it!

Continue reading Adventures in Website Design && Development – 7/6/14″