Posts Tagged 'learning'

Awareness

Notepad (software)

I love doing too many things. My interests cover such a wide gamut that I wonder if I’ll ever settle on a career path. But that’s not why I decided to write this blog post.

I’ve been writing JavaScript for a long time. It all started when a friend of mine showed me how you could make a webpage using nothing but Notepad in the late nineties. I was immediately hooked. But HTML was so limited (especially back then), and I wanted more. It began with copying (stealing) and modifying a simple mouseover script for making an image change when you hovered the mouse over it, and from there it exploded into rewriting Minesweeper (poorly), creating my own “encryption” software (ha ha, “encryption”), writing simple chat bots, making guessing games, and occasionally even making a website for one thing or another (with plenty of mouseover effects).

But I soon learned that programming could be so much more than what I was using it for. After a decade of believing that I could never learn object-oriented programming (the ideas just seemed too advanced for me), as recently as last year I learned that JavaScript handled everything in the code as an object and that it was an object-based (even object-oriented) language.

This opened up worlds of possibilities. I had heard many wonderful things about what one could do in an object-oriented environment. I was excited to dive in and try it.

My favorite hypothetical usage for objects in programming, and something I had never really grasped how to accomplish with JavaScript, was the idea of defining one object with its own behaviors and attributes and setting many of them loose in an environment in which they could interact. I immediately wanted to try something like this, but it proved too difficult for me at first.

So I applied my new knowledge about JavaScript objects in other projects. I was timid and unimaginative about it at first. Looking back at those early projects that incorporated custom objects I can’t help but imagine that I was afraid of these new blocks of code. It felt foreign, and my code was awkward (not that I’m doing much better now). Eventually the idea of objects clicked, and I was ready to try my idea again, but I didn’t realize it right away.

children_raidThen, last weekend, I was sitting on the couch with my family watching Chitty Chitty Bang Bang (written, apparently, by Ian Fleming, with a screenplay co-written, oddly enough, by Roald Dahl), and the idea seized hold of me again. It was the scene where the children raid the castle toward the end. They rushed the adults, and I pictured it from a bird’s eye view as dozens of little dots moving in and attacking other little dots.

Not an hour later I was writing code. I started by defining an Army object, then I wrote the Warrior object constructor. It was complex, with dozens of little stats to track, and several complicated functions for thinking, targeting, moving, attacking, defending, and more (nearly 300 lines of code just for the Warrior object). I wrote code to define the starting position boxes for the armies (bases, essentially), code to draw the objects as stylized DIVs on the page, and I wrote an HTML page with a basic framework to display it all. I’ve been learning to use the CANVAS element for drawing, but I wanted to stay away from it as this was going to be a project I could play around with at work where they still have us using IE8 and the CANVAS element isn’t recognized.

Surprisingly enough, when I first ran it (about five hours after I wrote the first line of code) everything worked (kind of) as expected. I had to rework the rendering code (I was trying to redraw everything each frame, and with hundreds of little HTML objects that initial approach was impractical). After fixing the rendering issue it ran smoothly and most of the behavior was exactly as I had imagined it.

bbsI’ve tweaked several of the systems since then, but the essential framework hasn’t changed. You can try it here if the link doesn’t get overloaded (who am I kidding – I couldn’t possibly generate enough traffic to take down a dropbox link). The one item I re-worked the most was the targeting code. In fact, I’m still not happy with a lot of things in this project, but there are even more things that I love about it.

First, it’s the very first time I’ve made something visual with what I would consider emergent behavior. I wrote a primitive chat bot (I cannot be held responsible for anything Jimmy says) once that had some pretty unpredictable responses (many layers of code analyzing your input and outputting based on more criteria than I could keep track of), but that “emergent” behavior wasn’t always contextually appropriate (Me: “Hi there! How are you?” Him: “You’re not being very nice.”). My little battle simulator behaves very much like a little battle. The winner is determined by a mixture of attributes (leadership scores, strength and number of warriors, amount of supplies available, location of base, etc.) and circumstantial happenings. I’m just as incapable of predicting the winner as anyone else, yet there is very little variation between the armies in the way of random number generation.

If you do check out the link, I apologize in advance for some of the Leader names. The idea of giving each army a leader is credited to my co-workers, but the names for those leaders were also their ideas. I made some slight modifications to a couple of the names, but one of them I left in a fairly inappropriate state simply because changing it would have taken away from the effect. Some of the names are not child friendly, just so you know.

The thing I’m least happy about with this is the targeting code. It’s limited, inefficient, and doesn’t accomplish all the goals I had for it. I realized yesterday that what I really wanted was a collision detecting framework. I imagined a centralized process being aware of everyone’s location and allowing any one of the Warrior objects to perform a simple query to get his nearest neighbors. I was unfamiliar with actual collision detection methods for software, and was pleased to learn that what I had devised wasn’t too far off from reality.

In my current system each individual on the screen has to scan every other army’s soldiers and rule out targets that are outside of his visual range. This takes a lot of processor time, and whenever anyone was selecting a target there was an awful performance drop (especially at the very beginning of the battle when nobody had selected a target yet). I did a couple of things to mitigate this: any time around half of the soldiers in the army’s array are dead it clears out the dead from the array, shortening the amount of time it takes enemies to scan for a new target (since they no longer have to process dead people); and I spread the search function out over several frames rather than attempting to do it all in one rendering cycle (I also learned how to make recursive or pseudo-recursive functions this year).

Obviously, with each and every dot doing his own collision detection and targeting it’s still pretty inefficient. I need a centralized collision detection system.

But now I have to learn how to implement something like that. I might implement it in my current project, but I think starting a new project would be better. I want to redo a lot more than the targeting. Perhaps version 2.0 will be rendered in the CANVAS element with animated graphics, explosions, terrains, etc. I wanted to incorporate tanks and other vehicles, other soldier types (archers?), goal oriented behavior (capture the flag), stealing supplies from enemies, communicating with each other when in proximity (“hey, watch your back”), and other behaviors that would require something like “sight” to be implemented. But most of all I want their movement and behavior to feel just a little more deliberate. As it is they inexplicably fail to engage each other sometimes, their movement isn’t very confident looking or smooth, and there are a lot of undesired artifacts that come from the fact that I’m still not all that great at writing code that does what I want it to.

rvwOne final, and related, note. A good friend of mine shared a post on Google+ recently (yes, some people actually use that – though I almost never use anything but Notepad++ lately) and she reminded me of one of the primary reasons I love programming. I used to want nothing more than to program robots. You can see the video from her post here.

In the video they mention a piece of software they created called Robot Virtual Worlds. It looks like something that should have been made twenty or thirty years ago for me! The other link from the conversation at right is for a website where you can register for their Robotics Summer of Learning. In conjunction with the Robotics Summer of Learning, it appears as though you get a limited (Summer only, I think) license for Robot Virtual Worlds when you buy(?) ROBOTC. I’m not going to pretend to know which version of ROBOTC you need (poking around on the site for a minute didn’t give any answers, but I plan to return on May 20th as they suggest on the website to find out more), but even just playing around with Robot Virtual Worlds for one summer could be super fun. I’d have to learn C, but how hard could that be? Right?

Happenings

It's like I found a magic lamp or something, and squandered my wishes...

Several long-time desires of mine have recently unfurled into something palpable. I wouldn’t say my dreams are coming true, but it’s close enough.

Where to start?

We’ll start with the most recent and work our way backward.

Hm. That’s tough. We’ll start at the… Well shoot. This is tougher than I thought.

Forget chronological order. Forget any order.

More photos can be seen at the link.

I recently completed the first draft of my real leather Link’s Adventure Pouch 3DS Case.

I can’t say I’m 100% satisfied with it (see my notes in the album I shared at the previous link), but I am looking forward to the second version. Each photo in the album has my notes on what I’ll do differently next time, but if you’re an expert who can tell me how to keep the darned surface of the leather from cracking, please leave a comment!

In addition to completing the leather pouch, I recently ended a 10 year search for something.

Yes. Ten years.

For the last ten years I’ve gotten this song stuck in my head. I knew it was from an upwards scrolling puzzle video game, and I knew that video game has Yoshi in it, and I knew that video game was on the Game Boy. I had asked around, I had search the Internet, I had spent years trying to figure this thing out.

Finally!

Then one day I ask someone, and they said, “Sure, I just played that game last week. It’s called Tetris Attack.”

Sure enough, he was right. The song that got stuck in my head all these years was Yoshi’s theme. I could finally hear the full song after only remembering one small phrase of it all these years!

Then I found the game used and bought it for my Game Boy Advance. It is a fun game.

So that’s a happy ending to that search. There are still a few memories I am trying to fill in, but that was the biggest, most frequently bothersome one.

Last of all (for this post) I finally got to see a real space shuttle. Sure, I had been to see Enterprise at the Smithsonian’s Udvar-Hazy Center, but Enterprise never flew in space. It was hardly a shell of a shuttle. It was the right size, and the right colors, but that’s about it. No real action. No battle scars.

But this last week OV-103 Discovery was flown out to replace Enterprise at the Udvar-Hazy Center, and on Saturday I took my daughter to see the shuttle.

This shuttle is COOL.

It was awesome.

And while I was there I got a new picture of myself in front of the shuttle for use on social networks. I liked the angle of the old photo better, but this one with a real shuttle is better since A) it’s a real shuttle, and B) I am wearing my super awesome hat.

Alright. That’s going to be it tonight. I didn’t need to write a blog post tonight, but I wanted to. I hope it was worth your time, because then it will have been worth my time.

Oh, and real quick: in related [to the shuttle] news, I am making slow progress in the design of my deep space exploration vehicle. I worked on the escape pods and their hangar bay today. Not done yet, but happy with the progress.

Related to escape pods-I recently read parts of an extraordinarily interesting article (I’ll read the whole thing later because it is relevant to my interests) and in that article the author notes that he doesn’t feel escape pods ever make sense for a deep space exploration vehicle.

The point he makes is that if you have to escape the vehicle quickly, it’s usually (in science fiction, at least) because the ship has a problem and the “reactor core” or something is going to blow up. He notes that leaving the comfort and life support systems of the larger ship makes little sense. You should just eject the core.

My system is designed to completely separate into its separate modules in the event of any mechanical emergency anywhere on the ship. Even each of the six main engines can act as emergency life boats, and so the dinky escape pods (which seat twenty adults) are not meant to be actual life boats. Everything separates after all the passengers are on the life boat engines or in the escape pods (which can dock with the engines if needed), and the computers on each module of the larger ship assess damages. Any module that is still usable docks back together and the escape pods and life boats all transfer the people back into the habitable parts of the ships. Even damaged modules attempt to repair themselves or salvage useful resources.

So emergencies would more or less be handled in a way that makes sense. You’re not permanently leaving the ship behind, but you aren’t sticking around to see if everything is going to explode either.

I think my system adequately addresses the author’s concerns, even though I didn’t read any of his remarks until after I had designed my system.

Because remember: Dream big or go home.

Learning Type Quiz

Image grabbed from here.

I was faced with a quiz that was to determine my learning style, and I was not happy with the quiz. So, I wrote an email to the people who expected me to take it for a class I am about to take. Here is the resulting email:

Today I completed the learning style quiz that you require on your website as a part of my A+ certification preparation. These quizzes are often designed to capture data from and categorize individuals who are somewhat ordinary, average or typical. I am aware that my brain is running an atypical neurological configuration, and as a result I am rarely satisfied with quizzes that attempt to identify broad truths about me, and the results are almost always a gross misrepresentation of the facts.

Having said that, I am hoping that this quiz will not heavily influence the way in which your team interacts with me, as it was extremely inaccurate for whatever type I may actually be (I have been told by some seasoned instructors that I may be a “Visual Spatial Learner,” but I cannot identify with all of the traits associated with that style).

Many of the questions in the quiz I took today did not have answers that were even remotely applicable to me, forcing me to choose the least incorrect answer (though I was more than a little displeased with several of these “least incorrect” options). Quite a few of the remaining questions had three options that were all equally applicable to me, forcing me to chose just one answer when the other two were also true.

Again, I just wanted to submit a statement on the record saying that I was unhappy with this particular learning style quiz and that my answers were, in most cases, not characteristic of my actual learning style. I do not mean this as an insult or complaint against you or your company, as I am sure this quiz is adequate for the vast majority of your students. Seldom do I encounter learning style or personality quizzes that do not contain a large number of frustratingly over simplified questions. However, this particular quiz was, by no fault of your own, so grossly inaccurate that I felt the need to communicate the issue, out of a desire to prevent you from accepting my answers to this quiz as factual.

Obviously I am not asking you to update or change your learning style quiz, due to the fact that a quiz that is comprehensive enough to satisfy fringe individuals such as myself would be overwhelming and unwieldy.

I simply feel that it is important that you do not blindly interact with me within the parameters of whatever learning style this quiz may have hap hazardously assigned to me.

Therefore, if you require more accurate information regarding the best methods of instructing me, you must contact me via email with your questions. I do not claim to know exactly how you can best instruct me, but I can adequately answer any questions you may have.

Finally, my guess is that this quiz is simply a formality that will not significantly impact our teacher-student relationship, and the writing of this email will have simply served as a hot air release mechanism on this fine Monday morning, easing my transition from a weekend centered on my family to a week bearing the unnecessarily cumbersome load imposed upon me by a clumsily designed militaristic training system.

Whatever the case, thank you for your attention on this matter. Have a wonderful week.

New Updates & Videos

Yesterday I shared something fun and wrote about a side project of mine and mentioned a few other updates all in one post.  If you haven’t read it yet, you probably should (use the link at the end of that last sentence).

Late last night I uploaded the videos I promised and I’ll embed them here.  One is long (nearly six minutes long) and the other is short but cute.  Also, there’s a great video about not being proud or showy…  The family web album also has new photos under Family Stuff.

Meet the Scan Toaster

Meet the "Scan Toaster"

First, though, a quick look at a product that isn’t for sale and we want it!  It uses innovations on existing technology to burn images and text onto bread.  It is only a working prototype for now, a finalist in a design competition.  Hopefully, if it wins, we’ll begin seeing them in stores before I get tired of eating toast.

Another great reason we’re tempted to hold our breath for this one has to do with Micah.  He loves toast, but doesn’t realize it.  Every time we give him toast he picks at it and takes forever to eat it.  We figure that if we had a toaster that could burn images and text onto the toast we could make it more interesting for him.  His toast could have “Eat Me” burnt right into the surface, or it could have a big picture of something he enjoys eating, like a doughnut or a cookie.  As you can see, the possibilities are endless, and even though we don’t seriously expect the gimmick would actually achieve anything for Micah, we like the idea.

Clicking on the image takes you to the article where I read about it, and clicking on the same image at that article takes you to yet another article with even more information and a diagram of how it works (for if you’re interested).

It sure is a nice looking little appliance though, isn’t it?

Sophie has begun trying to use simple sounds and words to communicate, but so far her efforts have been only sporadically successful.  She can say “dada” though it usually comes out “dadada” or “dadadadadadadada” and we discovered this morning that half the time she says it she is really referring to her mother.  When she gets upset she will often call out to her mother in no uncertain terms with “MA!” or “maaaam.”  This morning we spent a few minutes trying to set her straight that I am “dadadada” and my wife is “mam.”  I think we made some progress, but in the end she still went crawling off in mom’s direction chanting “dadadadada.”

When eating something she likes she will say “yum” and while playing with her big brother, Micah, she will call out “aiga,” which is close enough (and it tickles Micah to histeria).  Many times, when we ask her if she needs a new diaper, if she’s hungry or if she want’s to be picked up, she responds with a loud and enthusiastic “YEAH!”

She will also say “Hi” occasionally and “will you kindly cease all personal activity and pick me up before I make your life miserable.”  Well, it sounds something like that anyhow.  Sometimes her babblings do seem to make little phrases (like “I like that” or “I did that”), but I’m sure that’s just our imagination.

Even without words she is very expressive, as I am sure you will see in this video titled “Almost Six Minutes of Heaven” starring Sophie, Rochelle and Micah.

Sophie is also doing some serious practice for walking, pulling herself up and getting up on her feet.  The first time this happened we didn’t have the camera ready.  We rushed to get it going and in my hurry I forgot that only photos should be shot in portrait mode (with the camera turned on its side) – videos shot on their side are no fun to watch.  So, later she pulled herself up onto a short box and I got it recorded.  The box isn’t is tall as the other things she was pulling herself up onto, but you can see how good she’s getting at being on her feet.

The only problem is, she’s got pretty sweaty feet most of the time, and those don’t stick to wood floors very well.

Finally, a lesson in pride.  I was going to embed this video like the other ones, but it is hosted from a site whose embed code doesn’t work here as well as YouTube’s does.  If you need a good laugh and a reason not to show off, click here.  Parental guidance recommended, video contains an act of violence (but no blood or cursing) that may not be suitable for children who will not understand the context.

Our Family Mission

This is our family’s mission, as drafted over a year ago while seeking inspiration from God for our family.  No changes have been made in the entire year since these points were adopted, and when followed they bring great peace, order and love to our home.  Sure, we’re not perfect at doing all of these things all of the time, but we like that it is basic, easy to understand, and within all of our reach.

Our Family’s Mission

Our home is a house of prayer, a house of faith, a house of learning, a house of order, a house of God.

The mission will be accomplished by living the following rules and virtues:

  • Leave it like you found it, only better – if you open it, close it.
  • Only you can prevent household messes.
  • Use indoor voices.
  • Be kind.

Kindness

  • Love unfeigned; charity, caring for others’ welfare despite any wrongdoing.
  • Gentleness; soft, not treating others harshly.
  • Meekness; humility, uncomplaining, and teachable.

Gratitude

  • Acceptance; seeing others in eternal perspective, reflecting only the good you see in them, and judging with compassion and patience.
  • Use manners and be courteous.
  • Trust; lovingly allowing others to exercise their agency to choose right or wrong and to accept the consequences patiently.

Integrity

  • Responsibility; acknowledging and assuming your role in any situation including repenting for past wrongdoing.
  • Being honest, a personal commitment to righteousness, wisdom and learning.
  • Reverence; a deep respect and love for God, Jesus Christ, the Holy Ghost and all they have done and created for us.

Subscribe to Me

What I’m Reading

When I Post

May 2017
M T W T F S S
« Sep    
1234567
891011121314
15161718192021
22232425262728
293031  

RSS My Favorite Quotes

  • Quote #60
    "The greatest minds are capable of the greatest vices as well as the greatest virtues." - Rene Descartes
  • Quote #59
    "There is nothing noble in being superior to your fellow man; true nobility is being superior to your former self." - Ernest Hemingway
  • Quote #58
    "The fool doth think he is wise, but the wise man knows himself to be a fool." - William Shakespeare

I have had:

  • 50,258 page views (so far)

I’m a Twit