Tech in the 603, The Granite State Hacker

I Taught My Kids How To Hack

My family and I enjoy gaming together… and I mean, really… together. We’re geeks. Our favorite “family time” game is World of Warcraft… nothing says quality family time like developing character abilities and gear together, working out optimal ability usage (“rotation”) and team interaction, in preparation to mob up & go kill demons and monsters.   It’s cheaper than a night at the movies, generally, and often more thought-inducing. (“For the Alliance!   For Azeroth!”)

Other games pop up from time to time.   Recently the kids started playing some Steam title…  some cute little 8-bit thing.  One thing that was unique about it was that, unlike almost everything out there, this game was entirely local…  it’s a true single player game.

As they got into the finer points of this new game, they started to agonize over its limitations. It’s no Kobayashi Maru, but it’s designed to engage users and drag out their engagement over long periods of time.

Now I get that games have their points and lessons to learn, and it’s generally best to let kids work through and past them naturally.   These guys are like most kids nowadays, solid gamer geeks, familiar with the gamut of games across phone, PC and Xbox, among others.   They’ve been there.  Done that.  When they tell me they’re bored, I tell them to go outside and play, and they look at me as if I have two heads.

In today’s modern computing technology, “apps” (which most games qualify as being) are too secure and/or too distributed to consider operating outside of the original intent of the program.  The save-file of the game is either stored in a “sandbox” that’s fully isolated from the user…  OR the “save file” is not even stored on the device, it’s actually downloaded as needed from some cloud-based host somewhere in the inter-webs.

This game is just like dozens of others they’ve worked through “naturally”…  I found myself thinking they might benefit from thinking outside the box a bit.   Given this is a classic “low-tech” local PC game, no other players would be impacted, and… there’s access to the file system.

Frankly, it was easier than I expected.  Initially, we started scanning the registry for clues, and found a silly ROT13 encoded string related to it that we decoded together, but not what we wanted. Eventually, we stepped back to the flat simplest solution. We found the game save files in c:\users\{userid}\AppData\Roaming\{Game}\  (how convenient!).   Opening the files within that folder, we found good old NOTEPAD.EXE did the trick…  the save file was an XML document, but that made for a nice, easy to grok (and search) structure…  within minutes we’d multiplied their in-game gold amounts by 1000x (by just tacking a few 0’s on the end of their configured amount).

The full game save file was a long list of name-value pairs that were easy to identify.  They could have easily added to their on-hand materials counts or any number of other hacks that would have been beneficial.  In this case, everything they needed in game could be acquired with gold, so it didn’t make sense to dig much deeper.

Cheating?   Well…  Yes.   And they definitely took advantage. 

My two kids are into game design, and often say they want to build games when they grow up.  This was an interesting opportunity to show them in concrete terms that data is data, and they can think much further outside the box than the average kid…  this is especially important for them to understand the mechanics of app (and game) construction and architecture, peeling back the illusion of the game world. 

In mechanical terms, it’s not much different than cracking the hood on a car and showing them how to beef up the engine.

What say you?  Do the ends justify the means?

Tech in the 603, The Granite State Hacker

Tribute to the TI 80-something Graphing Calculators

Rummaging thru a box of stuff in storage, I ran across my old Texas Instruments TI-85 calculator.  I had to stop and fiddle it for a moment. I grabbed some AAA batteries, only to discover that the CR1616 backup had given up… the calculator operates like new, as in factor reset… but sadly, that means a game program I wrote for it 20 years ago was finally gone forever.

Back in the early 90’s, Exeter Area High School had an advanced math course that required a TI-81 calculator. I gladly used the course as an excuse to get my hands on this relatively expensive (near $100 in 1990 dollars) but amazing piece of hardware at the time.

In short order, I added its programming language to the list of languages I had already taught myself.  I loved using trigonometric functions to create pictures. I used to program it to do my trig and pre-calc homework for me. (In retrospect, my attempt at “cheating” was a hack that I learned more from than any lecture or textbook ever would teach me… you see, in order to program the calculator to do advanced math for me, I had to thoroughly understand it, myself.)

My own TI-85, which I upgraded to
for calculus at UNH. It’s a bit dusty today.
It cost about $100 when I
purchased it in the early 90’s.

The TI-8x calculators were my “gateway drug” to my love of mobile development.  I was already developing software for PCs, but I loved the challenges imposed by yet more limited footprints and hardware capabilities. 

I kept my TI with me to the point that my sister nicknamed it a “porta-geek”…  (There was even a girl who stole it from me, thinking to wound me for the fact that I wasn’t interested in dating her. It had no effect; I obliviously assumed I’d misplaced it in my own absent-mindedness. The story came out several years later, after I’d purchased a replacement.)

The term “porta-geek” is a term I still whimsically apply on occasion to my current daily driver mobile device, my Lumia 950XL running Windows 10.  My sister’s jibe didn’t phase me, either.

By coincidence, I was also in Target’s electronics department today. I was surprised to notice that they still had several 20+ year old TI-80-somethings…  but rather than the price being lower, the prices are actually higher.

A selection of same-generation TI calculators at Target today (3/20/2016).  Notice the TI-80-somethings still going for about $100+.

I can’t really say why 20+ year old calculators should still cost more than they originally did…  clearly normal technology market forces are not in effect for them.  My spidey-sense for socialistic-driven monopoly tingles.  I’m not the only one to have noticed the… discrepancy… over the past couple decades.  ( https://www.quora.com/Why-does-a-TI-83+-calculator-cost-the-same-as-it-did-12-years-ago )

That said, they were, and are great devices.

I’d love to see a Windows 10 emulator app made out of them….  maybe some day I’ll find enough spare time…  🙂

Tech in the 603, The Granite State Hacker

Cobbler’s Shoes

Happy New Year! I hope you enjoyed the holidays!
 
I took time off for the holidays… not as much as I’d have liked to, but enough to enjoy it.

What’d I do?

The cobbler finally got a chance to tend to his own shoes, at least infrastructure wise.

A few years ago, I caught that MS was giving away a license to Windows System Center Core, and I realized I had enough retired hardware to cobble together a hobby-level host. I then did a Physical->Virtual on my small network of Windows 2003 based servers that I ran the NHSPUG website from.

The setup was nice, actually… all three virtual machines ran with room to spare on what was originally an old client-class PC. With dynamic RAM turned on and all three VMs cranking, they occasionally managed to consume nearly a third of the host’s 8GB of RAM.

Having recently had opportunity to get a hold of platform MSDN licensing, I upgraded my entire home network infrastructure by two platform generations across the board.

Seriously… Windows Server 2003 ->  2012 R2 64, SQL 2005 -> 2014, SharePoint WSS3 -> SharePoint Foundation 2013.

Almost all of it was build, replace, rip… build new VMs, integrate them into the domain, migrate data & config as needed, then shut down the systems they replace. The fun one was SharePoint WSS 3.0 upgrading to Foundation 2013. I had to bounce the content databases off a spare 2010 farm I had left over from a project at work. It was nice that it was possible to do that, given that the 2010 farm was a different domain. It’s amazing how much you can get done in short order when you are a one-man IT shop… the communications overhead savings alone is unreal.

The hard part is that newer software in the 64bit range uses much more system resources, so I have extended hosting not just to my System Center, but also to two Windows 8.1 Pro systems running Hyper-V, just to spread out the necessary load and provide some critical system redundancy.

With that, only obvious thing externally is that the Granite State NH SharePoint Users Group website ( http://www.granitestatesharepoint.org ) is now SharePoint 2013 based.

Internally, things generally seem a touch faster, smoother… maybe that’s just psychological, but I notice the difference, even if my wife & kids think it just functions as always, as expected.

I guess the irony in this is that my hobby infrastructure backlog is knocked down a few more notches than I thought I would ever get to… (yes, I took time off from work, and, to chill, I did some of what I do at work.) now my hobby development backlog has new possibilities and subsequently grown substantially.

One of the first things I’ve got to take care of is the few services the SharePoint upgrade has caused… the NHSPUG site still has some cosmetic issues I want to sort out. My Windows Phone apps that integrated with the WSS3 site are now broken, and I have some jiggering to do with my dev environment before I can even diagnose them. That doesn’t even cover some of the things I want to do with the NHWPAD group and my hobby/portfolio projects (e.g. Jimmy Sudoku).

Tech in the 603, The Granite State Hacker

Candy Crush Saga Would Fail on Windows Phone

Several sites including pocketgamer.fr and WMPowerUser are reporting that King has decided to not bring it’s popular Candy Crush Saga game to the Windows Phone ecosystem.  (It’s “on hold indefinitely”.)  I suspect Disney and Mojang have much more to do with this than Windows Phone’s market share.

Most sites reporting King’s changed stance cite poor growth of the Windows Phone ecosystem as the reason for putting Candy Crush for Windows Phone on hold.  I don’t believe them.

The news, of late, ironically, has been loudly about two things.  1)  after a lull while Nokia was absorbed by Microsoft, Windows Phone has significantly improved its market share in the past quarter or so.  2)  Microsoft bought Mojang.

The more likely reason:  (and I would love for King to prove me wrong, but…) I’m reasonably certain that if King released Candy Crush Saga for Windows Phone right now, it would fail… and I bet they know that.

I speculate that King has been holding their Candy Crush Saga app hostage from the Windows Phone ecosystem for some time, possibly hoping Microsoft would buy King in… a Mojang/Minecraft-like multi-billion dollar play. 

Clearly, Microsoft buying Mojang was a smart choice, since Minecraft has almost become a gaming platform of its own. There is a Minecraft community and ecosystem with many vendors producing products and supporting it for their own continued success.  I suspect that for those vendors, Microsoft buying Mojang will multiply Minecraft’s ecosystem success;  the ecosystem will be more broadly and more consistently available to more players.

King, on the other hand, is a one-hit wonder who’s core titles are fading as all titles do.

Candy Crush Saga’s fading brand isn’t the reason the title would fail on Windows Phone, however.  

The reason Candy Crush Saga would fail on Windows Phone is because Windows Phone has developed its own ecosystem, and King’s niche in that ecosystem has been filled by an even bigger fish…  namely Disney. 

Yes, Candy Crush Saga would have to compete with the likes of titles such as Frozen Free Fall and Maleficent Free Fall, which are both magnificent implementations of switch/match games that even I have burned some measurable amounts of time and real cash in.

To me, the message is clear.  King has made its bed. How embarrassing would it be for King to release it’s flagship titles to Windows Phone only to be shrugged off by the Windows Phone app market for the effort?  Especially after trying to leverage its brand to strong-arm Windows Phone.  Frankly, a failure like that could put King’s position in the iPhone and Android ecosystems at risk… which would bring potential value down in the eyes of, say, Apple or Google.

I suspect there are other app publishers facing similar choices.  Perhaps they have likewise made their beds. I believe the Windows Unified platform is the platform that successful iPhone and Android publishers can’t afford to fail on.  Such publishers have two choices 1) get in before a competitor fills their niche, (and succeed), or 2) watch and miss out while realizing in ever more clear hindsight over next decade that Windows Unified was the opportunity they wish they hadn’t written off.

[Edit:  1/8/2015 – So King has published Candy Crush Saga to Windows Phone 8, now, and I’m very pleased to see it… it’s one less reason for folks to avoid the Windows Phone platform deciding to make the switch or not.   Will the Windows Phone edition be successful?   By many measures of an app on a platform, it already is.   Will it be the success it was on other platforms in reasonable comparison?   That remains to be seen, and I still think my analysis is correct, but I think that King still held out for Microsoft to offer up some form of subsidy…  I notice that Microsoft has been shelling out for ads for Minecraft, and in those same ad spaces are lots of ads for Candy Crush, as well.]

Tech in the 603, The Granite State Hacker

Jimmy Sudoku 5, Orange Edition


Please don’t think of it as a hundred dollar app.  Think of it as a free app with the option to support an important cause.

Sometimes when things get “comfortable”, it becomes necessary to shake things up.

Such is the case with my hobby/charity project, Jimmy Sudoku.  

Previously, Jimmy Sudoku had two listings in the Windows Phone app marketplace… one as a free international listing, and once as a paid, US-only listing.  Both were the same exact binaries.

I’ve deprecated the paid US listing, and, in its place set up the single remaining international listing as free trial with the option to buy.  

Expecting to raise more awareness for the cause than direct proceeds, I’ve set the price to… something that will raise eyebrows.   This will take effect as soon as the WP App Marketplace approves the change.

There is no functional difference between the free trial and the paid mode… the app does not even check to see if you bought it, at this point.

Again, 100% of the proceeds from Jimmy Sudoku 5 purchases will continue to go to #NoKidHungry…  again, the app itself is free.  If you choose to pay what I’m asking, the proceeds will be donated. 

If you decide to go directly to the charity and donate to them, I’ve still accomplished what I’m hoping to do with the app.

http://www.windowsphone.com/en-us/store/app/jimmy-sudoku-5/92251d32-ad5f-44e6-8f5c-43e834c5c28c
Tech in the 603, The Granite State Hacker

If the iPhone is “The Turn”, It’s Not “The Prestige”.

A week ago this past Saturday, I presented at SharePoint Saturday New Hampshire on the topic of integrating Windows Phone with SharePoint in custom apps  I got sidetracked for a moment or two… chatting about why I see Windows Phone as being a viable platform.   So far, it’s been rough.  As an anecdote, everyone I know who has a Windows Phone bought a copy of my charity-bound “Jimmy Sudoku” app.  Sadly, the contribution to the charity from it is… not what I hoped. 

Still, I think the cool-aid was worth sharing…   To be fair, all the people I know who have a Windows Phone are relatively outspoken fans of it… and that includes a number of folks you’d never suspect of being “Smart Phone” users.

Anyway, a few days before SPSNH, I ran across a relatively insightful article on TechCrunch (I’ll post the link at the end).  It opens by quoting the opening dialogue of Christopher Nolan’s 2006 film, “The Prestige”:

“Every great magic trick consists of three parts or acts. The first part is called “The Pledge”. The magician shows you something ordinary: a deck of cards, a bird or a man. He shows you this object. Perhaps he asks you to inspect it to see if it is indeed real, unaltered, normal. But of course…it probably isn’t. The second act is called “The Turn”. The magician takes the ordinary something and makes it do something extraordinary. Now you’re looking for the secret… but you won’t find it, because of course you’re not really looking. You don’t really want to know. You want to be fooled. But you wouldn’t clap yet. Because making something disappear isn’t enough; you have to bring it back. That’s why every magic trick has a third act, the hardest part, the part we call “The Prestige”.

The TechCrunch’s MG Siegler makes a great point.:  Apple’s iPhone magic is in “The Turn”.   Apple has taken an “ordinary” item, the smart phone, and turned it into something “magic”. 

Indeed, I agree, it is magic, and everything that goes with it.

MG’s article was a commentary of the iPhone 5, and it captured the sentiment I’ve been hearing over & over again about it.   The Apple’s iPhone is starting to run a bit shy of manna.  (Update 9 Feb 2013:  Slashdot, Woz says iPhone Features are Behind. )

It shouldn’t be a surprise though…  we’ve seen it all before, in fact…  we saw it first with the Mac.  It struck again to a lesser extent with the iMac, and dug in big for the iPhone.  There’s a lot to be said for the brand of magic that Apple has wielded over the past several decades, and many would argue that Steve Jobs was the one who brought focus to that magic.

Admiration aside…  If Apple’s past and present magic is in “The Turn”, (and we agree that the iPhone is a hard-won magic trick)  it follows that, within the market, there must have been “The Pledge” and “The Prestige” as well.  That’s when I started to get excited… it seems pretty clear to me where “The Prestige” is, but I’ll get back to that. 

So what of “The Pledge”?   MG’s article points to Samsung as a weak imitator.  Maybe it is (by it’s association with Android), maybe it isn’t…  I guess the courts, and maybe even the public, are done deciding this.   In any case, Samsung never represented the promise of “The Pledge”; it only ever wanted to join in on Apple’s magic.  It’s not “The Prestige” either.

The role of “The Pledge” has been played before, as well, in popular technology of days gone by.  In the early PC wars, this role was played by a small number of makers.  The most memorable of them were the Commodores and TRS-80’s.   This cadre of early PC makers had one thing in common…  the average hobbyist (aka geek) could make them do magic in fits and starts, causing loyalty that ran deep (just ask the Amiga fans), but they didn’t have much, if any, magic for the popular user.  

I would argue, despite the fact that Google’s Android came at about the same time, late 2007, Android represents the promise of this magic…   “The Pledge”…  a Phone, integrated with a pocket computer, that anyone could have a satisfying user experience with.  Open, available, and accessible, it would be… it was everything a “Smart Phone” should be, and it appealed to exactly the market that Smart Phones were made for in 2007.  Despite its fits and starts of magic and a fierce geek following, it, like the Amiga (in its day), is still too immature to be the enduring solution.  Any time I mention the idea that the Android might fade into the realm of the Amiga, the geeks in the room threaten to get belligerent.    I remember getting the same way over my TRS-80 CoCo.

Between issues with platform versions & compatibility, components that don’t integrate well, visually or functionally, and malware/spyware, Android is excellent if you’re a technical person who’s not intimidated by compilers and is savvy enough to avoid spyware & malware… but that’s not what the popular user will go for in the long haul.  (Update 9 Feb 2013:  Slashdot, Fragmentation Leads to Android Insecurities)

So what does it take to become “The Prestige”?  It takes that maturity… the ability to allow the average user to make magic with it, affordably, easily… commonly, and, well, normally…  on some level, it restores normalcy, ushering in commoditization of the magic that once was so amazing.

If you take into account that Microsoft was the successor of the IBM compatible legacy, it starts to become clear that Microsoft holds the title to a long history of taking Apple’s “magic”, and refining it into maturity.

In some ways, it’s a bit sad:  iPhone’s manna is indeed running out…  there’s a little less magic in the world…  
…or is there?  This magic will soon be in the hands of friends and family who are just starting to get the itch for a mobile device that can play Fruit Ninja and Angry Birds on.  All those late adopters who wanted maturity, affordability, reliability, and ease of use over “magic”, but now they get both.  When they get their Windows Phone /  Surface RT / Windows 8 device, they’ll get to see magic that geeks and power users have been using for years now…  and that’s the hardest part  “The Prestige”, putting “smartphone”/tablet power and flexibility in the hands of every cell phone user.

As promised, MG Seigler’s article on TechCrunch:
http://techcrunch.com/2012/09/13/the-iphone-5-event/


(Update 1/9/2013 clarified PoV a bit on Android)
(Update 2/9/2013, linked back to Slashdot on various posts that supporting my position)
Tech in the 603, The Granite State Hacker

Hobby Project Supporting #NoKidHungry Now Has Free Edition

I’m please to say my hobby project, a Windows Phone app I call “Jimmy Sudoku” is now available both for free or for purchase. 

The two SKUs in the Windows Phone App Marketplace are identical.  

The free version is available in almost all markets around the world (including the US). 

The paid version is only available in the US and 100% of the proceeds continue to support #NoKidHungry.

Link to Free SKU

Link to #NoKidHungry SKU

Please…  Enjoy!  🙂

Tech in the 603, The Granite State Hacker

Windows Phone Live Tiles… What’s happening right now?

The first thing you see when you see a Windows Phone is the start display.  In fact, it’s so distinct, that it becomes the most identifiable feature of a Windows Phone at a distance.  Typically, the start display is populated with a number of application icons…  only on Windows Phone (and Metro) they’re all square or rectangles and are called Tiles.  

On second glance, you start to notice that many of these tiles have some form of light animation to them, typically communicating basic information.  The Tiles that open messaging apps indicate the number of new messages, for example.

When I first started playing with my Windows Phone, the live tiles seemed like a nifty gimmick… important for messaging features, but not really useful for anything else.

As I’ve dug in on app development for Windows Phone, I’ve come to see the Live Tiles as a really under-leveraged feature, communicating with users on a level that previously couldn’t be achieved.  They’re terribly simple, but terribly engaging.  I now see that they are the addictive component of Facebook’s classic “What’s on your mind?” status updates… statuses provided by the apps on your phone. 

In some cases, this literally translates to status update from your friends, since Tiles can be put on your start display for any contact.  (Since contacts are linked via the People Hub to their Facebook, Twitter, and Linked In…  voila!  one tile gets status updates for that individual covering all the bases.)

What’s really cool is that, like I said before, getting status updates is not limited to contacts.  I’ve got apps that have live tiles that… display current weather conditions including radar maps.  …show stock quotes & notifications.  …display photos from various sources.  … even shows your XBox avatar fully animated.

I’m in the process of adding a new feature to my hobby project, Jimmy Sudoku, to make use of live tiles to show the progress of the “current” puzzle.  

A new hobby project I’m working on has to do with the Granite State (NH) SharePoint Users Group that I am a principal organizer of.   This app will eventually be a hub for group information, offering member users easy access to schedules, speaker info, weather delay notifications, registration info, and even Power Point presentation slides.   Interestingly enough, a key feature will be to provide a live tile which will poll a webservice to get updates… the live tile will then let the user know they have important information to review, thus engaging the user.  (Sure, push technology’s available, but in this case, polling will be sufficient.)

The uses for this being able to re-engage a user after they’ve “quit” the application itself are significant.   I can easily imagine a time when the marketing significance of them makes building Windows Phone apps far more attractive to companies than iPhone or Droid apps.  Even if companies aren’t trying to hock a specific product…  imagine corporate “investor information” apps, for example, that provide easily accessible information about a company… but most importantly, providing “status updates” to investors to re-engage interest.

I’ll admit, at some level, this reminds me of electronic kids toys that attempt to re-engage kids in play after the kid has put it down and walked away by flashing a few lights & making a little noise.  There’s reasons those kids toys do that, though, and anyone paying attention with a mind for marketing will get what they are.

This is another Non-App for Windows Phone… one of the many cool features built into the device in an accessible, but non-cluttering way… and another reason I keep seeing Windows Phone as the IBM Compatible of smart phones.

So the above is why you want Live Tiles…   Here’s a code snippet that illustrates how:

using Microsoft.Phone.Shell;

… 

public static void UpdateAppTile(JimmySudoku4.Puzzles.SudokuState state)

{
    ShellTile appTile = ShellTile.ActiveTiles.First();

    if (appTile != null)
    {
        StandardTileData data;
        if (state.GetElapsedTime().Ticks == 0)
        {
            data = new StandardTileData()
                {
                    BackContent = “Game Complete”,
                    BackTitle = “Try again!”, Count = 0
                };
        }
        else
        {
            int completeCellCount =
                state.MasterList.Where(c => c.Value != 0).Count();
            int percent = (int)((decimal)((decimal)completeCellCount / (decimal)81)
                * (decimal)100);
            if (percent < 100)
            {

                data = new StandardTileData()
                    {
                      BackContent =
                            string.Format(“Elapsed Time:\n{0:hh:mm:ss}”,
                                 state.GetElapsedTime()),
                        BackTitle = string.Format(“{0}% complete”, percent)
                    };
            }
            else
            {
                data = new StandardTileData()
                    {
                        BackContent = string.Format(“Completion Time:\n{0:hh:mm:ss}”,
                            state.GetElapsedTime()),
                        BackTitle = “You Won!”
                    };
            }
        }

        appTile.Update(data);
    }
}

Tech in the 603, The Granite State Hacker

Project to Help Feed Starved Kids – Jimmy Sudoku v4

UPDATE Feb 6, 2014:  http://granitestatehacker.kataire.com/2014/02/jimmy-sudoku-5-orange-edition.html

Click here to view in the Windows Phone App Marketplace.  (the app is ‘free’ with the $5 donation via purchase.  All proceeds go to #NoKidHungry.)

I’ve had a lot of fun learning the quirks of Silverlight for WP7 devices, and after playing with some of the other WP7 Sudoku’s out there, I’m very glad to have Sudoku done my way on my phone again. 🙂  I’m even more psyched that I can share my app with others, as it’s now Certified by Microsoft and available on the Windows Phone App Marketplace!

I have to admit… there’s a lot of competition out there for Sudoku’s on WP7 devices, and probably not a huge demand… I realize that for as much fun as I had polishing this app,  probably the best way to find its value is to “give it away”.  

Scan this Tag with your Windows Phone to find Jimmy Sudoku
Scan this Tag
with your phone to find
Jimmy Sudoku
in the
Windows Phone
App Marketplace

So my family & I considered some options and decided on a national organization that helps feed under-fed/malnourished children here in the US. I thought it was a fitting thing… building software is my strength, and this is a way I can share it.   I also can think back to some exceptionally lean times when I was a kid… memories I’d love to help avert for others if any way possible.  So, yes, all proceeds from paid downloads will be donated to that cause.

I finally had a chance to re-do the old .NET 2.5 Compact Framework-based app as a Silverlight 4 app for Windows Phone. I’ve been toying with this release for months (since November 2011, actually… I pulled down Visual Studio Express 2010 for Windows Phones around then, anyway).  

In case you’re wondering… I asked the charity if it was ok to use their name and maybe a logo or something, but out of respect for their other national-market beneficiaries who have already done this, I would have to also guarantee a sizable donation.  100% is the best I can do, but that’s not necessarily a sizable donation, so I can’t use any trademarked IP, which, as I understand it, includes their name.  (I’m glad I asked.  🙂    While I can’t do this now, I’m hoping that if I play by the rules and manage to make a decent contribution with it, that I’ll earn the privilege and kick the project up a notch.  (In the meantime, I wonder if the twitter hashtag #NoKidHungry counts…. )

You can also click here on just about any device to get to the Marketplace site.


Finally, please visit the Facebook Page, and feel free to Like and/or Share posts to help spread the word!  🙂

Anything you can do to help is appreciated!

Tech in the 603, The Granite State Hacker

Choen the counterBot

I’m pretty excited… both my kids seem interested in computers and what you can do with them. My daughter, especially, is very interested in learning bits and pieces about programming. My son is interested, but not so much in the nuts & bolts of programming. He is interested in numbers and performance, though. They’re both young, though… he’s in 1st grade, and she’s in 2nd.

She’s expressed some interest in programming before. Last time we talked about application design… she got extremely ambitious and drew about twenty pages of “designs” (hand-drawn mock-ups of screens) for games that she wanted to create. (Essentially knock-offs of games she’s played on favorite websites like PBS Kids and Pixie Hollow.)

More recently, she was using my computer, and discovered that when she’s logged into my computer on her account, she has access to Visual Studio Express. When she asked what it was, I told her it was tools to write programs, and she just lit up. Immediately, she wanted to start working on a simple UI that mimics a math program she uses at school.

I started to realize, however, that she needs to learn more of the basics before we dive into a full fledged user interface. I started to think about some of the earliest programs I learned to write.

Back when I was in 4th grade, I got my hands on an Apple II, and one of the first programs I learned to write on it was a program that accepted two numbers (start and finish) and simply scrolled out a count between them.

Nowadays, we have object oriented programming, and C#, but I wanted to try to keep it simple and understandable for her. I decided that we would create a “counter-bot” class, and we would create an instance of it named whatever she wanted it to be named (She decided on Choen (pronounced more like Cohen)).

Today, we got the basics of the counterBot class written, and wrote a short program to create an instance of it, initialize it, and start counting, sending the numbers out to the screen. A countBot has beginAt, finishAt, countBy properties, and Start, Count, GetCurrentNumber and isFinished commands.

Here’s the code:
counterBot.cs:
——————————————————–


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Choen_the_counterBot
{
class counterBot
{
public int beginAt;
public int finishAt;
public int countBy = 1;
private int currentNumber;

public void Start()
{
currentNumber = beginAt;
}

public int GetCurrentNumber()
{
return currentNumber;
}

public void Count()
{
currentNumber = currentNumber + countBy;
}

public bool isFinished()
{
bool result=false;
if (currentNumber > finishAt)
{
result = true;
}
return result;
}

}
}

——————————————————–

and here’s the console Main method in program.cs:
——————————————————–


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Choen_the_counterBot
{
class Program
{
static void Main(string[] args)
{
counterBot Choen = new counterBot();
Choen.beginAt = 0;
Choen.finishAt = 2000000;

Choen.Start();
DateTime startTime = DateTime.Now;

while (!Choen.isFinished())
{
Console.WriteLine(Choen.GetCurrentNumber());
Choen.Count();
}

Console.WriteLine("Finished counting from "
+ Choen.beginAt.ToString()
+ " to "
+ Choen.finishAt.ToString()
+ " by "
+ Choen.countBy
+ "'s in "
+ (DateTime.Now - startTime)
.Seconds.ToString()
+ " seconds!");

Console.ReadKey();
}
}
}

——————————————————–

I got a bit fancy and added the timer code to see how long it took. Together, my son, daughter, and I watched Choen the counterBot count out various scenarios, and got as ambitious as watching it count from zero to two million. In order to get my son’s interest, I added the timer to see how long it took. We discovered that my computer can count from zero to two million, “out loud” (showing the numbers on the screen) in 52 seconds. If we hid the console writes, it could do it in less than a second.

Next time we play with it, we’ll write a graphic UI (a windows form) and hook Choen the counter bot up to it.