The Website of David Tsai
Why orange? Redemption. We march on. For L.

Software Written by Me

I’m probably pretty good at programming. To test my skills out, I have created several applications, including a program to automatically shut down, hibernate, or suspend my computer in Microsoft Visual C++ 2010 Express and this entire website, including the content management system, in HTML, PHP, CSS, Javascript, and SQL. Read about some of my other projects:

Assisting Math Classes Everywhere (a little bit)

The Circle Area Visualizer was inspired by a math lesson: One day, my math teacher demonstrated for us how the area formula for a circle was derived. On the board, he drew a circle, divided it up into sectors, and then drew several more diagrams that showed the gradual rearrangement of the individual sectors into a shape that resembled a parallelogram. He continued to explain how the height of the “parallelogram” was the radius of the circle and that the base of the “parallelogram” was half the circumference of the circle. Substituting those values into the area formula of a parallelogram and simplifying it, we ended up with the area formula of a circle.

Going home, I decided that it would be fun to write a program for the computer that dynamically animates the sectors’ rearrangement into a pseudo-parallelogram, which is what I began calling the strange shape from that point. Besides, a few years earlier, someone else had created something on the computer that the math teacher still uses in a lesson today. Perhaps, another dynamic computer tool would also last with my math teacher.

After finishing my homework, I opened Adobe Flash and began creating this dynamic circle area visualizer in ActionScript 2.0. While it was loading, which does take a few minutes on my computer, I thought about the programmatic structure of the application. At this point, I still wasn’t creating flowcharts for my programs, but I still managed to keep track of the entire program in my head. After working for about four hours total, the Circle Area Visualizer, Version 1.0, was complete. (It is not available for download.)

The following day, I brought the program with me on removable media to math class. The teacher was quite impressed. Watching the program run on a classroom computer and turn a sliced-up circle into a pseudo-parallelogram, however, several areas of improvement jumped out at me. Going home that day, I revised the Circle Area Visualizer, mainly adding the pseudo-parallelogram base slope maintenance and the sectors’ anti-collision features. This brought the program to Version 1.1.

The next version was simply a user interface update. I moved a few elements around and changed the sliders so that they changed colors when you hovered your cursor or held the mouse button down on them. The program has been sitting at Version 1.2 since.

Hexadecimal ASCII

I was having a conversation with comments on Facebook when, for some reason, I brought the hexadecimal ASCII encodings that you sometimes see in URLs as the two-character combinations following the percent signs up. After doing this manually for about 20 characters, I decided that I was going to write a program to do it for me. After all, I could write a program much more quickly than I could convert plain text to ASCII, which is done character-by-character. Also very quickly, I decided that PHP was the language for this project. In a few minutes, I had written an HTML interface and PHP computation engine. Since then, I have AJAX-ified the combination. A copy of the program is now on my website. Go try it now!

QWERTY Keyboard Offset

Following my interest in ciphers, one message that I sent was to be encoded with an offset cipher. Instead of using the alphabet to offset characters, I realized that I could also offset characters on the keyboard, which gave me more character choices than the alphabet, anyway.

Like the Hexadecimal ASCII Character Encoder and Decoder, the QWERTY Keyboard Offset Script also employed an HTML interface with AJAX and a PHP engine that ran on the server. Technically, the PHP script doesn’t return an XML document; it returns plain text. Does that make it “AJAT”?

The keyboard configuration data in the program is based on the layout of my own keyboard. I do realize that your keyboard might not have the same layout, but my program will always decipher its own ciphers correctly.

Complicating a Simple Game

In my fourth grade year, my father first introduced me to Grand Tic-Tac-Toe, which is a Tic-Tac-Toe game where there are nine Tic-Tac-Toe grids placed inside the cells of a big Tic-Tac-Toe grid. The object of the game is to make a Three-in-a-Row on the big grid. To place your X or O, (depending on which player you were,) in a cell on the big grid, you had to get a Three-in-a-Row on the corresponding small grid. The game was fun for me, and I started playing it against other kids at school.

Four years later, I noticed an offshoot of the game circulating my peers. This variant of the game also forced you, on your turn, to place your X or O in the small grid in the cell on the big grid that corresponded to the cell on the small grid in which the last X or O was placed. The game was also now called Ultimate Tic-Tac-Toe. Apparently, some kids from fourth grade had taken Grand Tic-Tac-Toe and added a few more rules to it to keep themselves more busy.

I watched many games of Ultimate Tic-Tac-Toe played on various pieces of paper, including paper from notebooks, the backs of homework sheets, paper in notebooks, random scraps, napkins, and some unidentifiable sheet of paper. I even played one game of it myself. Finally, one day, three classmates came to me and asked me whether I could create a computer version of Ultimate Tic-Tac-Toe. Internally, I was a bit surprised that they had to ask me whether I could create a computer version of anything, but I simply told them that it would be easy. That’s how our “company” formed. Being the only one out of the four of us who could do any real programming, I borrowed their brains to do the dirty thinking that didn’t require any knowledge of programming. The system actually works quite well. Go test this game with us.

This Page