Programming (Part 2)

I promised a part two so here it is…

The first post can be found here.

As previously mentioned, my previous self taught programming experience involved BASIC and whatever the TI-85 uses.  I had my first official taste of taught programming in College a couple of years after High School with C.  My Engineering degree required I take “Programming for Engineers” which was basically C programming to solve iterative math problems.  Most of the programs we did were by the book style involving arrays and graph style equations.  The book for the course was actually two books and we only got through maybe one of them since Engineers aren’t computer programmers.

This was fun but at the time I was rather busy with school so I didn’t to doo much beyond what was required for class.  A couple semesters later however was different.  I finished my Associates in 2.5 years meaning I finished in December.  I wanted to start the Bachelor’s track in the Fall since it makes all of the class schedules work out better so I had a semester to kill.  So in addition to working a whole bunch, I took two classes just for fun, Basic electronics and Computer Science 101.

CS101 was essentially C++ Programming for beginners.  There are some keys here.  I’ve had experience with C, which is very similar to C++, especially at this level of programming.  Also The TI-85 language is reasonably similar to C at this level of programming.  Basically, I’ve had a decent amount of experience at this.  The end result was that I excelled in this class, I did better than everyone else (most of which were actual Computer Science Majors).  The teacher also set up a side class for whomever wanted to attend learning some visual windows based elements.

The fun was in the larger assignments though.  Most of the quick assignments didn’t leave much room for creativity.  “Mr. Shopkeeper needs a program that will calculate 7% sales tax for his sales.  Make a program that takes the total bill in and outputs the total with tax” doesn’t leave much room for expansion.

The larger assignments were all simple games with variable elements that allowed for much more fun.  We also got more time to work on these, maybe a week or two.  I could easily code the basic assignment in a day leaving me, well, a week or two, to code “extras”.

This is where I created my first three “real games”.  Note the scare quotes.  Truth is, these are all rather buggy as evidenced by the fact that they don’t like unexpected input and are generally pretty crummy.

So I present to you, Tug of War, Pearl Diver, and Let’s Win at the Races.  All of these titles were given out by the class as was the basic premise of the game.

The parts that I added was anything graphical, even if it is ASCII graphics.  The requirement was only for a text based input and output.  Ok, yeah, it’s pretty simple, big deal.

I’ve done a few other projects that never got completed, the most ambitious was a PC based sequel to my previously mentioned Dragon Quest series.  This one was somewhat Zork like with a text based interface only it added a one on one random battle system like Final Fantasy and a level up system similar to Final Fantasy 2 where skills build as you use them and class is based on your skills.  I got as far as completing the map (without descriptions).  So you can wander around an empty world in it’s current state.  One day I hope to get back to it.

My other self taught programming project involves HTML, if you want to call it programming.  A better word is probably “coding”.  Back in 1998 when I first started building webpages I started in MS Frontpage.  I noticed there was a lot of flack for people who used Frontpage so I bought this big fat HTML book (HTML Complete, $20, great value).  So I taught myself basic coding of HTML.  These days I don’t use this skill as much since blogs make things much much easier but this skill does come in hand a lot when I’m trying to manually tweak my WordPress templates.

Programming is something I enjoy when I have time though my main complaint is always finding a decent free compiler.  The only free C++ complier I’ve ever found was by Borland and it is absolutely TERRIBLE for user friendlyness.  I plan to do some additional programming in the near future for fun it’s mostly a matter of finding time.  I’d love tog et into more visual element and make actual graphics and program that run in Windows.  Also there are quite a few more modern languages out there now.

Anyway, if I build anything new, you’ll be surely seeing it here.

Programming (Part 1)

Hey, it’s pointless personal trivia day!  Hooray.

Anyway, I’ve never taken up computer programming in any official “this is what I’m going to do for work” sort of level but it’s off and on been a background hobby of mine.  I’ve been considering getting back into it lately which has inspired this historical blog post.

The first programming language I ever learned any part of was BASIC.  This was around 1987-1988 when I was 7 or 8 years old.  I know this because, at the time, my dad had gone back to school to finish his degree in Computer Science and I learned a bit of Basic from him based on what he was learning at the time in college.  I never used it for anything super elaborate.  The most complicated piece of code I ever created involved a simple password that would then display a bunch of text or ask questions that would display different text based on the user’s response.  Simple “If Else” style programming.

This “If Else” method of programming is very simple but it’s a set up that can be used for a lot if managed properly.  It’s a method that would translate over tot he next segment of my programming years in High School.  Because I was in Advance Math, I was required to own a fancy TI-85 Graphic Calculator.  The most exciting thing any of us ever did on these calculators was to program little games and programs.

I had two major programming projects I created for the TI-85 and irritatingly, both have been completely lost to the throws of time.  I didn’t get a PC link cable until well after High School so I had no effective way to back up my hard work.  The first and main undertaking I ever had was a pair of games called “Dragon Quest”.

The name Dragon Quest was chosen in tribute to Dragon Warrior, before I knew Dragon Warrior was in fact also secretly called Dragon Quest in Japan.  The first game was a very simple RPG, all contained in one saved file.  You would exist at the town most of the game.  You could buy potions to heal in this town or stay at the inn to heal.  You also ha the option to “explore”.  Exploring would result in one of two encounters, a small dragon or a wizard.  Everything did a set amount of damage so the whole game was extremely predictable.  After 20 battles, exploring would result in an encounter with the “Dragon Lord” who was a much tougher dragon.

The battles were the shinning point in this game.  It took a ton of memory but the battles were all graphical.  You’d see a wizard, dragon, or Dragon Lord graphic on screen to indicate the type of encounter.  Your two attacks, slash and stab, would overlay a different graphic depending on which was used.  These were basic black and white images created in the calculator’s Graph Drawing function.

Many people liked this game in my High School and it was generally pretty distributed among people who had graphic calculators.

So I created a sequel.  The sequel dropped all graphics in the interest of saving memory.  However, this memory saving allowed for a TON more features.  The player could now learn 4 different spells over town, a fireball, healing, nuke and better healing.  You could also spend money from encounters on new weapons to do more damage.  All damage was now variable. The encounters were much more varied with two dozen types of enemies that would randomly show up.  Halfway through you’d be given the option to solve a series of riddles and fight the mighty White Dragon in order to earn the best Sword, Xcalubur.  Instead of 20 encounters the number was increased to 50.  There was also the addition of a menu driven system since I had figured out how to work this function.  Lastly, since 50 battles was a lot to make it through, the game featured a three file save system that would write everything to a file.

The next best feature, which was highly underlying and not visible to the player, was that the game was broken up into a series of modular files.  I had learned how to call one file within another.  This meant that the main game was in fact, nothing but a series of calls to other files.  It also meant one part could be much more easily tweaked as needed.

The most impressive part of all this really was that I’d never had any level of education in how the TI-85 was supposed to be programmed.  I had the manual, which described the available functions and commands, and the rest as all trial and error or luck.

I mentioned that I had created two major projects.  Dragon Quest was the first, the second was “Windows for the TI-85”.  At least that’s what I called it.  It wasn’t really very Windowsish.  Basically I created a menu based graphical icon based system for launching the programs on my Calculator.  Unfortunately the icons were part of a static background and the menus were all hard coded so it wasn’t portable to anyone else’s calculators.  It was more of an experiment than anything.

Next… Part 2: The HTML, C, and C++ Years….

Review – Kodak Easyshare Z710

My only previous Digital camera was a Kodak CZ7430. It was a nice, simple camera that served me well for about two years and 6000 photos. Unfortunately, it took more of a beating than it really should have and started flaking out on me.

Still, I’ve used several other Digital cameras from relatives and work.

Originally I wanted to upgrade to a Sony Alpha dSLR since it’s compatible with my film camera’s lenses. However that proved to be more cost prohibitive than expected. I also received this camera in the mean time as a family gift for Christmas.

I’ve been using this camera for about 3 weeks now and I will say I’m very satisfied with the results I’ve gotten. I most appreciate the 10x Zoom capabilities since I do a lot of photographing of small toys and action figures. This camera will produce a 3072 x 2304 pixel photograph with top notch quality all the way through.

It also works well for non-macro photos of course and the zoom is certainly useful for taking detailed photos of distant subjects.

In addition to photos this camera will record video with a maximum resolution of 640×480. While that isn’t huge, the quality on the video is passably usable for casual use. If you’re really wanting quality digital video I’d recommend a regular camcorder however. Also of note on the video, this camera eats through batteries pretty quickly while recording video. While the batteries I had on hand were not the best quality, They were dead after recording a half hour of video.

I do have a few gripes. The LCD image tends to be a bit grainy in live view mode, especially in the eyepiece view. I’d imagine this is to help conserve battery power but it can be a bit distracting when trying to judge the quality of the picture you’re about to take.

There is a lack of Anti-Shake built in for this camera so if you’re trying to take photos at a great distance or in low light without the flash you’ll want to invest in a tripod.

The lens cap doesn’t stay on well at all. It has these two squeeze clips holding it in place. It takes hardly any jarring to get it off and turning the camera on while the cap is attached will cause the cap to pop off.

The flash pops up automatically any time the camera is turned on. This is kind of annoying since you may not always want to use the flash. I find the easy way to remedy this is to simply hold the flash down with one finger.

Another minor complaint, compared to most point and shoot style cameras, this one is kind of large. My old CX7430 would fit into my jacket pocket easy, this one is a load in there (and these are big pockets). Still, it’s smaller than my Minolta film camera and likely smaller than the Sony Alpha I had been looking at.

So in conclusion, this is a really nice camera with a really nice zoom function for a decent price, but ti has a few convenience style issues going for it. Still, I’d recommend it.

More photos taken with this camera…

Review – PalmOne’s Life Drive

I like computers, a lot. For a long while I’ve liked the idea of a computer I could take anywhere. Something small and handheld, laptops are still too large and require frequent charging. I’m not sure when I picked up this idea, maybe it had something to do with that show Lain. The characters all seemed to carry these rather sophisticated hand held computers they would use to log onto the internet from anywhere.

Enter the PDA. Hey, look, that’s sort of like having a little computer… only… not.

32 meg of memory, 128 meg of memory, what the heck am I supposed to do with that? It’s black and white too, not to mention it won’t connect to the internet. It’s essentially a glorified address book. I don’t want a 200 dollar address book, I want a computer that fits in the palm of my hand.

And so that dream was put on the back burner until PDA technology managed to catch up with my needs.

Hey, what’s this new device? The iPod? Put out by Apple you say? What? Gigs of space to play MP3s? Why all those other MP3 players are limited in space. I could barely stick an hour and a half’s worth of music on that, I may as well use a CDR. But this iPod, now that’s capacity. All my favorite tunes will fit on that thing. It’s a bit pricey though. Do I want it? Do I not want it?

Enter the LifeDrive.

I found the LifeDrive originally while browsing on Amazon for Tablet PCs, PDAs, and Laptops. Ironically, the day before I had been talking to my dad about PDAs and he mentioned hearing about some sort of new large capacity device on the market. He couldn’t remember the name at the time I had been browsing Amazon.

So after learning of this device I headed out to find some user reviews and recommendations. There had to be a catch or a drawback. In the end it seemed there were only a few. Most reviews reported delays of 1-2 seconds when opening applications. Since I wasn’t exactly used to other “lightning quick” Palms, I decided that it wasn’t much of a concern. The other was the lack of a user changeable battery. Then again, the mechanically inclined could replace it with a third party battery if it should ever die.

After months of waiting and flip flopping, I decided to go ahead and purchase the device. Circuit City had them on sale for twenty five dollars less than the 500 dollar asking price, it wasn’t much, but it every little bit helped.

On a semi related note, I ended up purchasing from a Circuit City outside of my hometown. The clerk in Springfield was completely unhelpful offering only the advice that he “does not like the Palm OS at all”. It was pretty annoying.

I brought it home and after opening the package was disappointed to find that the device required charging for 4 hours before it would be ready to use. No big deal, a little more waiting wouldn’t hurt. Soon I would find out if I had spent my money well or if I’d just picked up a 500 dollar paper weight.

Now, I had considered at this point going on a sort of step by step log of my experiences with the Life Drive, but I’m thinking it might make for an easier read if I just touch on the highlights in detail.

We’ll start off with Solitaire. Why? Because it’s probably what I use the most, though I’ve lately ‘discovered’ that I can archive articles and such on it for later reading. Solitaire is pretty much the only worthwhile game included on this device; my primary complaint is that the engine used tends to generate impossible deals. According to the stats, I’ve played 304 games of Solitaire, though some of those were played by others, and of those 304 games I’ve had 24 wins. The longest loss streak is 54 games; the longest win streak is 2 games. It has some slightly irritating auto-play features that don’t help, though they can be partially turned off. Anyway, if you want to play Solitaire all the time, there are certainly cheaper alternatives.

Aside from Solitaire, I tend to use it for its music features secondarily. I’ve loaded quite a few MP3 files on it and regularly play tem while at work. It sounds decent enough coming out of the desktop speakers I’ve got though it also includes an internal speaker if you’re desperate. The included Pocket Tunes player is decent enough, though it could use a few more play list options. Specifically, I don’t see a way to append the play list on the fly. Also it comes with an annoying shortcut control option set to on by default which causes the player to pop up all the time while tying to use the writing pad.

Another nice feature is the contacts list. You can add all the necessary information about any number of people to your list of contacts. They can be broken down into categories for easier sorting. You can even add a small icon snapshot to each contact (i.e. a photo). This information comes up nicely organized. I do have some issues with the standard layout of the fields, and there isn’t a way to change them. Since I don’t use this primarily for business related activities, I don’t care much for having the business related information quite so accessible.

Speaking of organization, the more I use the calendar, the more I like it. It has a lot of nice features for quickly adding reoccurring events. On the monthly view it creates little color coded icons on each day. It automatically picks up birthdays out of your contacts list. It’s pretty neat.

What about word processing. You probably won’t be writing a novel on this device. The interface is slightly awkward. I imagine if you used it a lot one could become exceptional at it, but initially it’s rather clumsy. I’ve been primarily using the “writing” style input, that is, you write in a little box and it detects what letter you’ve written. I often end up with the wrong letter and have to backspace. I’ve given up spellchecking anything of any length on the device, I can do that more quickly once I dump it off onto the desktop. It’s great for jotting down ideas, not too good for the final draft. It does feature the ability to read and write Microsoft Word documents, though I had trouble opening at least one file. You can also use the memo feature to make short notes or lists if you’d like.

There is also a note pad sort of feature, sort of an electronic post it note if you will. I’ve found this feature isn’t nearly as nice as the standard memo feature and I’ve pretty much just used it to make little sketches and doodles. The functionality for this is iffy as well however.

One major feature I’ve not had too much experience with yet is the WiFi internet access. I spent maybe an hour once when I had access mostly surfing Google and trying to access my Livejournal. Google has a nice palm version that pops up automatically but Livejournal seems to have an excessive amount of formatting that doesn’t translate too well onto the Palm. I’ve also tried a few AvantGo sites as well as a local copy of my personal website that indicate the Palm has difficulties parsing some CSS code. Lameazoid hangs off the left side of the browser with no ability to scroll over.

The WiFi also eats battery power. Browsing for an hour will almost kill a full battery. I’ve recently discovered the third party AvantGo service that downloads local copies of websites for later browsing when Hotsync is enabled. It works pretty well so far and is certainly easier on the battery charge. It’s also a lot faster, the WiFi runs at almost modem speeds.

There’s one last large scale feature I’ve used to be covered, the Camera Companion. When you insert your SD memory stick from your camera into the Lifedrive, it will automatically copy off new media. This is infinitely useful while on the road. My 128 meg card has more or less increased in size exponentially. If I need more space I can dump everything off and delete files from the card with ease. It also has a lot of options for organizing photos into groups.

One major complaint I have however, the “new media copied” is based on files in the camera companion directory. Basically this means if you organize your photos onto the LD, then copy files again, previously copied files may show up again. I would prefer it keep track of the last file copied (sort of like my desktop PC does) and simply copy from that point on. Better yet, remember the date and time of the last backup and copy only newer files.

I suppose this would make a good bridge into the hardware itself. The SD card slides into a slot on the top of the Lifedrive. It is ejected out again when you press on it. The store demo featured a bank to fill this slot but I am pretty sure my Lifedrive didn’t come with one. This slot is located next to the power switch and the IR port. The power switch has two functions, slide it one way to turn it off, and it springs back to the middle “ready” position. Slide it the other way and it locks the LD into its current state. This keeps it from turning on by accident as well as allows you to keep say, a picture or text file up for an extended period (the device has a power saving timeout feature). There is also a small activity indicator light on top of the device.

The right side has no buttons or ports, though the stylus slides down into a slot on this side (from the top). The stylus is decent enough, the spring for it is actually in the stylus itself and allows the end to pop up allowing it to be pulled out easily. Down the left side you’ll find a shortcut button for the voice memo feature as well as the microphone for the device. I’ve had poor results in the performance of the voice recorder myself though it’s not a feature I really need. I was also trying to use it in the car while driving down the road. There is also a button on this side that switches the device from regular to wide (sideways) viewing. Along the base is a headphone jack, a small reset button that works well with the stylus, and the PC-LifeDrive interface plug. The power charger plus is also on the bottom and can be interfaced through the Hotsync cable for easy charging while hooked up to the Pc and (presumably) while in a cradle.

The face controls, the primary controls contain two major parts. There are 5 physical buttons and a direction “circle” located near the bottom and then there is the obvious touch screen. The Touch screen serves as the primary interface, though the buttons are extremely useful in assisting with regular operation. The 4 outside buttons have preset icons and shortcuts but they can be configured to run any application the user may desire. By default they will open Home/Favorites, the Photo Manager, the Directory structure, and Pocket Tunes. Personally this default set up works great for my purposes though I could see the calendar or memo feature possibly being useful on one of these buttons. He other physical button is the center surrounded by a directional control ring. This allows one to navigate and activate menus with ease.

The primary interface however is the touch screen. This can be used with your fingers is you’d like but the included stylus works much better. The Home menu and favorites menu serve as a launching point for most applications, they are fairly similar in design except the favorites menu uses larger icons and is limited to 24 shortcuts. I’d say chances are you can narrow down your list of programs to under 24 except the enormous capacity of this device’s micro-drive means you won’t really need to uninstall much. Basically you’re likely to easily accumulate a ton of useful apps. There is also a standard menu bar always present along the bottom edge of the screen for things such as WiFi, Bluetooth, activating the writing pad, etc.

It’s not quite Windows but the Palm OS is fairly similar and easy to use. It’s reasonably customizable too. You can change sounds (though I prefer to keep them off), there are several color schemes to choose from, you can even set the background image for several apps such as the tasks list and the favorites menu. One complaint though, the background images will not resize to fit the screen properly on their own.

I do not have any previous experience with Palm PDAs, but I can say I really enjoy the LifeDrive. The more I use it, the more and more uses I find for it. I imagine I’ll find it infinitely more useful once I get my home wireless network set up. Eventually I hope to use the LifeDrive as a remote to control multimedia throughout the home (music, TV etc), a task I understand it is fully capable of (with the right program set up). Anyway, if you’re looking for a handheld and can afford one, I highly recommend the LifeDrive.