Battles in Kallisor

It’s not easy fighting monsters. And in this case, we’re talking about code bugs.

I’ve been working on a JavaScript coding curriculum for my seventh graders. Because of limited time with them, I really hit them hard with a lot of code concepts and just moved on. Most are picking up the basics, which has been great. Some excel because they’re more interested or they’ve done some JavaScript before, so while they’re working on some of my code samples, it allows me to help the ones who are struggling.

I’ve had a good time with it, even though it’s been a ton of work. I mentioned last time that I was working on a WinForms RPG based on Dariak’s childhood, complete with quests and so forth. That was all being done in C# and making use of the easy-to-use UI of Windows Forms. It’s a lot of drag-and-drop formatting and that makes the visual setup so much easier than making a nice-looking HTML page.

But we have Chrome Books at school so there’s no Windows. Worse than that, there’s no Visual Studio, which is an amazing IDE (think: word processor for coding). To work with my students, the coding all has to be done via the web. I found this awesome coding site,, which has IDEs for multiple languages. It really helps with setting up and testing code.

The problem with JavaScript is that it’s a behind-the-scenes language. It runs all the logic, but it doesn’t display things well at all. That requires HTML and CSS. Altogether, that’s three languages needed to present one thing. It’s a bit overwhelming. I’m only showing my students JavaScript for now because of time.

But I want to show them that it can also hook up to the web, so I made a miniature battle program that is similar to the one I was making in the larger game venture. There are no magic spells or special skills and the only item you have access to is a healing herb. I also need to work on the battle algorithm (a lot). But for what I want the students to see and play with for now, this is perfect.

If you want to check out the JavaScript only version, you can look at it here. And if you want to see the 2.0 HTML version, this is it. You do not need to log in to try it. You can X out the login screen. To run the code, find the triangular button in the left window pane. You can also drag the window divider to make a window bigger or smaller.

Please let me know if you try it and you find any bugs. I need to squash those, just as Dariak is squashing rodia!

Reinventing the Wheel

I can’t seem to help myself. Whenever I need something new, I tend to create it from scratch instead of looking around and using something that already exists. I’m always reinventing the wheel, even though there are so many great wheels already out there.

I do this with teaching all the time. If I need a new worksheet, I don’t search the internet for one. I create a new one. And I try to change it up and ask different questions from those I’ve used before and I try to mix up the format. Too often, when I’m searching for worksheets, I find it takes forever to narrow down the search to something I like and then it often asks for things that I don’t feel are relevant. In the time it takes to do all the searching, I can usually just make a new one.

I’ve done it with writing too. Some scenes or chapters need more work than simple tweaks and I find it’s better for me to hold on to the essence of what I want to say and start over, writing a new scene. Trying to rework a scene is much more tedious and makes it feel like I pulled all the limbs off a stuffed animal and sewed them back on in different places. It may make for a cuter teddy bear sometimes, but why not just grab some new fabric, thread, and stuffing and start it over fresh?

Right now, I’m engaged in a massive teaching project. For the first time ever, I’m trying to teach my kids coding. I’m not an expert on higher architecture, but I always loved programming the Commodore 64 and now that I’m married to a genius in the field, I’ve got the coding bug. I wrote a C# applet to calculate heat equations and even included an option to dream up random questions for students to solve. I also created an applet that will determine an atom’s ground state electron configuration, though I needed Kevin’s help with getting it to draw the Bohr models. He was also instrumental for helping me change them over from C# to JavaScript and HTML. 

I still want to create a Factor Label converter but I don’t understand the breadth-first search Kevin had showed me a few months ago and I haven’t taken the time to try to figure it out. Granted, that’s a way upper-level coding strategy, so I won’t need that for what I’m planning to teach, but I intend to spend some time this summer figuring it out.

But with all the experience I do have, I recreated a Disney Wii game, Guilty Party, in C# and got all the logic to work correctly in figuring out culprits and doling out clues, etc. I have also started crafting an old style RPG to tell Dariak’s teenage story. That’s been on hiatus because of wedding planning and getting ready for my teaching of coding.

And this gets me back to where I was headed in the first place. There are plenty of sites and tutorials and options out there for teaching coding. There are plenty of languages to choose from too. I had to narrow it down, and I’ve decided to go with JavaScript because of its link to HTML. I believe I can get the students to do some cool things with it.

But I need reference material. Yes, of course, I should teach them how to find the information online. And I will. But that’s after getting them started. That’s after showing them the basic concepts. And so I’ve been working on a slideshow for the past two months, editing and updating it as I read through it and adjusting the flow of which topics to cover when. 

I also want to have a basic note sheet they can keep nearby for reference. Something that reminds them of proper syntax for typing the code itself and for using various common statements and keywords. The majority of my searches have shown me great websites for upper level programmers and great resources if you know what you’re looking for. 

So I’m doing it again. The type of worksheet I’m looking for may be out there, but I haven’t found it yet, so it feels more worth my time just creating it myself.

Maybe I just like wheels?

C# – A Class of Its Own

As many people know, after the hard push to make Red Jade available to everyone, I’m on a bit of a writing hiatus. My current endeavor has been coding. Yep, I’m learning once again how to be a computer programmer.

Commodore 64When I was a little tyke, my brother was in a computer class in school learning concepts in programming on a Commodore 64. The programs used BASIC language and on a car trip up to Massachusetts to visit our grandparents, my brother pulled out a notebook in the back of the station wagon and he showed me what he had been learning.

It didn’t take me long before I was enamored with IF/THEN statements, FOR/NEXT loops, and PRINT and INPUT commands to name just a few. I wanted to learn more so I practiced. And we got books and magazines and I learned more. In third grade I was troubleshooting computers in school (in particular this one printer, but it sounds so much more exciting saying it the other way). In fourth grade I was pretty comfortable making sprites and in fifth grade I showed the life cycle of a caterpillar using those sprites and moving them onscreen.

For home I made programs to celebrate holidays and one to keep track of bowling scores for the family, which was really hard on the C64 because file reading and writing was very particular. In seventh grade my science teacher hired me to write a program for her to keep a record of the track team’s times. And in high school, my computer teacher watched what I did with Mad Libs to ensure no words broke off a screen line and he started giving me other things to work on, like making tessellations and a banking app so he could easily calculate compound interest.

You might have thought I would have become a computer programmer. But even though I loved it, it had never occurred to me to program much in college. Well, there was that one class I took on fractals and I dove back into my roots in QBasic which was similar enough to my skill set for me to pick up. Other languages were way too foreign for me and the burgeoning chaos of life at the time kept me from learning more.

Scroll ahead a few (ahem) years and I’m all interested again. Kevin is a software engineer with two impressive programs out in Apple’s App Store. He has picked up a few new languages in the time I’ve known him from Xamarin to Swift to F#. It was motivation for me to try my hand at learning C#.

I’ve tried it before, actually. It hasn’t worked. I just couldn’t understand the different syntax, which is the least of all the things that are different. But I wanted to give it another try. Kevin got me a book, Head First C#. It’s a different kind of book than I’m used to but it helped me get through some of the stumbling blocks. I am almost halfway through the book with a lot more to do but I decided it was time to take what I knew and work on a project of my own. (Or two.)

Inspired by Disney’s Wii game Guilty Party (2010), I wanted to create a similar game that had you find clues that let you narrow down and eliminate a list of suspects until you find the guilty party. It’s a crazy ambitious project, I know. But at first I just wanted to work out the logic of how to deal with checking a clue (“the culprit is tall”) against a set of suspects and remove people who were short.

Catch the CulpritWell it grew from there because I can’t ever be simple. Soon I created a map in a Windows Forms Application, numerous clues, a whole user interface and so on. It’s a big undertaking that deserves its own post with more detail. On September 15, I made a note to myself with the idea of a suspect class but I had no idea how to work with it. Well now I have a fully functioning program.

I did have Kevin do a code review with me. We spent a whole Saturday afternoon on it and it was great. Here’s this master programmer looking over my code and then looking at me, not quite believing I had actually created it. And overall the code was pretty clean! He tidied a bunch of things so I could see other ways of doing things and he helped me with a few roadblocks I had (and others I’ve gotten into since).

So now I’m turning it over to you. This link will give you access to the game. Be aware though that it is an .exe file and your firewall may not let you download it. Also it will not run on iOS so save yourself the aggravation. You need a PC to try it and I guess it may work on an Android. I haven’t quite worked out every bug so if you try it and find any please tell me what you were doing and what happened. 🙂 If you have other ideas, tell me those too!

Heat Equation CalculatorA bit simpler, today I made an applet to calculate heat equations. I teach them to my honors classes and I thought an applet like this would help them to practice. They can make up their own numbers and the check their work. It still needs bug testing too but I think I ironed out most of the issues. It also must be run on a PC.

So that’s what I’ve been up to. I do miss my characters and the worlds I love so I’ll get back there!