APIs, Games, and Apps

×

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _menu_load_objects() (line 579 of /home1/jeanno/public_html/jeanneius/includes/menu.inc).

APIs, Games, and Apps

I've been trying to come up with ways to beef up my website by integrating the rest of the stuff I do online - mainly so that I don't have to write more than one blog. Many of you probably already know that I have a Google Blogger site called "Disaster Magnet" that I started many years ago to chronicle my life as a doomed triathlete. It grew into a place to write about more than just my athletic triumphs and failures. I used it to post daily drawings, chronicle my travels, post music gig reviews with photos and video (my other passion), and rave about work as well as complain about work woes.

Now that I have a website, I want to continue posting as the Disaster Magnet (because, let's face it, the moniker fits), but I don't want readers - all ten of them - to have to go to two different places to read my posts. Enter the Google Blogger API -- using the API, I was able to embed my latest posts right here on my site. Unfortunately, the branding isn't there, but you can still get the full blogger experience by embedded links to the blog. After all, why should I reinvent the wheel?

Speaking of reinventing the wheel, I've added another little (embarrassing) fun thing to this site. It's nothing new. In fact, it's almost 20 years old. It's the first thing I ever did with JavaScript - it's actually the thing I did to learn JavaScript.

Learning a programming language is mostly a matter of syntax for a computer programmer. However, becoming proficient in a programming language requires more than just learning the syntax, as new languages have been invented to tackle things that old ones couldn't do. JavaScript is good at manipulating client side (i.e., browser) images and text, and years ago - before we had jQuery (a JavaScript function library) and finer control over page layout - I gave myself a project in order to really learn it. I built a browser-version of one of my favorite analog games - I just found out that it's called the Triangle Peg Game (which is kind of what I always called it) - that could be found on the tables at Friendly's and Cracker Barrel restaurants. It's traditionally made with a triangular block of wood and golf tees, but I found a buyable version at Office Playground:

As it turns out, I now realize I created a much more complex version with two extra rows of pegs. But I know it's winnable because I have won it.

My version of this game has very low-tech graphics - I used the original images from 20 years ago - but I updated the script to use jQuery, which allows much less code than the original version. The code for this game also used logic from my husband's master's thesis in engineering which involved building a triangular grid structure. A few days ago, I reminded him of that, but he seemed to have forgotten all the questions and explanations that went along with my development of the grid logic. I assume there's a much easier way to do it now, but feel free to play with it and and laugh at my graphics.

Now I'm trying to come up with useful JavaScript browser apps that I can build for artists. The first one I may tackle is mostly self-serving: a mat-sizing calculator that allows you to enter different dimensions - such as artwork size and frame size - and it will spew out how big to cut the mat window. It seems simple enough, but it's one of the most maddening things - if I sell you my artwork with a mat and/or frame, it's very likely you'll find pencil-written calculations hidden on the flip side of the mat cut-out.

Hopefully, others don't have the same problems and there are more useful things to build for artists.