New Page: Docs & Downloads

Monday, December 28, 2009 17:00
Posted in category: News>ForeverOdd.com

I decided a couple days ago that it was time to accumulate all my software releases into a central location where people can go to scan all the possibilities and download anything they would like to use.  It contains the name of the software package, a brief description of what it is with a link to the post(s) that tells more details, etc.  They are grouped into two tables sorted aplhabetically by name, then version.  The first table is for all the latest releases and the second for all previous releases.

This page will be updated whenever a new public release of my software programs comes to life.

The page can be accessed by clicking on the Docs & Downloads tab at the top of the website or here.

Card Deck Version 0.5

Monday, December 28, 2009 16:50

I got the urge to do some programming over the holidays and since one of my ideas was for a card game I thought I would create a deck of regular playing cards that could be used for playing any card game which uses a regular deck. Basically the deck includes all 52 cards plus 2 jokers, however how many jokers are active in the deck depends on how you initialize your deck of cards, with a integer between 0 and 2.

Since I was uncertain as to which game I would like to start with I decided to just do an individual package for the card deck which I the packaged into a jar file and can use that in a resource for my other applications. I have attached the jar file to this post for others wishinig to use this card deck for there own java applications. It contains six basic card back designs which can be used plus the acutal card faces.

Note that I have not actually tested this package yet, hence it is Version 0.5. If you happen to use this package and find bugs or updates you think might be nice, please let me know and I will do my best to implement those if I see fit. I am hoping to move on to creating my own card game using this package and thus will see how it works myself. I will update if I find anything.

Card Deck UML Diagram v 0.5

Card Deck UML Diagram v 0.5

You can view the documentation by accessing the documentation section and choosing Card Deck JavaDoc.

Download: Card Deck (jar)

Edit (Jan 3 @ 8:59PM): Updated the UML diagram to show parameters along with attribute & return types.

WP Page Layout & Text Updates

Sunday, December 27, 2009 0:43

If you were surfing my site today you may have noticed that the look and feel of the site was changing frequently.  This was in preperation for another page on my website.  Today I decided it was time to change the layout of my WP pages a bit to make more room.  Thus I took out the entire sidebar and doubled the width.  I had to photoshop the bottom and top borders to fit the new size, and thus update the CSS to accomidate the new images and formatting.  I then had to update the page template (page.php) file to point to the new CSS code I added.  I couldn’t just replace the old information with the same tag names as I still wanted the posts to keep the previous formating.

For quite some time now I have always wondered if the text on my site was to lite for comfortable reading.  Now I never had any complaints from readers, but then again, perhaps no one reads long enough to care or just didn’t want to take the time… lol.  Quite alright as this is all about being a learning experience for me.  I darkened the text, from my perspective, to make it easier to read.  I didn’t darken the text for the tabbed content as much as I feel it is a secondary section of my website.  Some may not agree, and if you would like that text to be darker please let me know. I also darkened the text (a shade between the previous too) for the undisplayed pages in the navigation across the top.

Download: green-dream 1.4

Maze Solver Game

Saturday, December 19, 2009 15:43

Essentially what the game consists of is you enter the size of your maze as an integer n (ie: 10) and then it generates a random maze of size nxn (ie: 10×10) which can be different for each nxn matrix you generate. Do to time restraints I wasn’t able to implement the A* search like I wanted to so I did it recursively. The downfall for this is that for a maze 29×29 or greater it may or may not work depending on how fast it finds the end point. This is because the stack is not big enough so you get a stack overflow error. Just the same it was an interesting project. Give it a try if you like.

Screenshots:

Freshly generated maze

Freshly generated maze

Solved maze.

Solved maze.

 

Note that since this is a school project nothing beyond the requirements was added (hence no About section or anything like that).

Windows (all): Maze (exe)
Linux (right click and open with Java): Maze (jar)
Mac users should be able to use the same as Linux.

Windows users can use the jar version too if they prefer. When downloading the jar version, make sure it has the extension .jar (ie: in windows may try to download as .zip, replace zip with jar).

Parsing XML

Saturday, December 19, 2009 14:34

For one of my classes a project was to write two programs, one of which uses the document object model (DOM) API to parse an XML file and one which uses the Simple API for XML (SAX) API.  The programs are just tiny and do not dod anything fancy.  Basically just breaks down the content of the XML files into the elements, attributes, and content then displaying them in a very primative GUI.

Note that since this is a school project nothing beyond the requirements was added (hence no About section or anything like that).

Windows (all): DOM XML (exe), SAX XML (exe)
Linux (right click and open with Java): DOM XML (jar), SAX XML (jar)
Mac users should be able to use the same as Linux.

Windows users can use the jar version too if they prefer. When downloading the jar version, make sure it has the extension .jar (ie: in windows may try to download as .zip, replace zip with jar).

Pathfinder: A path finding game.

Friday, October 30, 2009 17:56

Pathfinder is all about finding a path between point A and point B.  The GUI portion, provided for us, is sectioned off into a grid of ‘tiny’ squares where two are colored turquoise (set by programmer), in my case one on the mid left and the other on the mid right side of the grid.  You start by clicking on squares filling them in to create lines/walls to make obstacles between the start and finish point.  Then once you are done with that you click ‘Find Path’ and the program searches for a path, if one is not found then you see nothing, otherwise if the algorithm was able to find a path the GUI is updated to display the path using green squares.

The following are screen shots of the program:

Squares filled in before clicking find path.

Squares filled in before clicking find path.Clicked 'Find Path' and the shortest path is shown in green.

Clicked 'Find Path' and the shortest path is shown in green.

Clicked 'Find Path' and the shortest path is shown in green.

When I started this project I first read through all the code provided to us and then once I figured I had a grasp of the code I decided to just dive in and start coding and within three hours I had a semi-working program.  I started with implementing the equals method and hashCode method in the Location class, which thankfully never had to be changed throughout my journey of re-implementations.

My first implementation was using vectors, which ”worked” but was very slow do to the seek times in finding the proper way points while performing certain functions.  I left it running over night just to see if the one case would ever solve, and it just seemed to sit there.  The program never crashed and when I checked my CPU usage it had sky rocketed.  I then decided that a 2D array would provide a constant seek time.  At first glance this appeared to work flawlessly; that is, until you try to find a path where none exists, then you get a lovely null pointer exception and the program crashes as it tries to find a path outside of its bounds.  I figured now would be a good time to give a thorough read of the assignment and I was more formally introduced to classes HashMap and HashSet which made my life a dream.  When applying this concept to storing way points as open or closed the program worked flawlessly.  The variable declarations are as follows:


/** Stores open way points **/
private HashMap<Location,Waypoint> openHashMap;
/** Stores closed way points **/
private HashMap<Location,Waypoint> closedHashMap;

Note that since this is a school project nothing beyond the requirements was added (hence no About section or anything like that).

Windows (all): Pathfinder (exe)
Linux (right click and open with Java): Pathfinder (jar)
Mac users should be able to use the same as Linux.

Windows users can use the jar version too if they prefer.  When downloading the jar version, make sure it has the extension .jar (ie: in windows may try to download as .zip, replace zip with jar).

Card Game(s)

Sunday, October 11, 2009 22:41
Posted in category: Projects>Ideas

This idea came to me one day while I was sitting in my math class waiting for it to start.  I had arrived quite early so I cracked out my PDA and started playing solitaire.  Then I got to thinking, wouldn’t it be neat to create my own card game in which I could make it 1, 2, 3 or perhaps even 4 players, depending on the card game I choose to implement.

With a multiple player card game I would want to implement artificial intelligence (AI), so that the user can choose to play by themselves against the computer or with friends.  The only problem with multiple human players is how I would prevent one player from seeing the other player’s hands.  I would have to set up some sort of system that allows them to toggle between views displaying the hands and hope that they play honest.  For added complexity one could allow for LAN/Internet play, which is something I wouldn’t mind trying to do, but definitely would add a whole new level of complexity as I would have to develop my own protocol, most likely. Even with a one player card game there is underlying logic/AI involved but not to the same degree as they are typically more ‘basic’ games.

I broke down the card games I am considering into two categories, ones which are played just with cards and ones that require a board of some sort for game play.

Card only games: Card games with board:
  • Auction (a.k.a. 120)
  • Crazy Eights (and/or countdown)
  • Go Fish
  • Solitaire (but that’s done quite a bit already)
  • Cribbage
  • Dirty Marbles
  • Sequence

 A few thoughts on ‘implementation’, that is how I am conceptualizing I’d actually accomplish a card game.  Any game I choose would require a GUI environment for game play.  In the case of the AI, I may have to add an attribute that weights the cards importance, that is which one would be of higher importance to play if it is a legal move.  How I would model the logic behind some of the more ‘complex’ strategy based card games, I am unsure, but that is what doing these projects are about for me, learning something new.

One last thing I am going to mention in this post, which could potentially change as this is just initial thinking, is that if I wanted to allow users to switch between different designs in decks of cards

I have discovered online that there are downloadable decks of cards, under open licensing, which I could potentially use.  That would probably be ideal for me as graphic design is definitely one of my weaker areas.

Jay Leno Show + Kare 11 News

Monday, September 14, 2009 22:28
Posted in category: News>Tube Inspired

The following is my response to Kare 11’s question, “What did you think of Jay’s debut?”:

Being a young man, of 24 years, I didn’t get into watching Late Night with Jay Leno until his last couple of years.  Even then, being in school I never got to watch it as often as I would have liked.  I was very intrigued when I heard about Jay Leno’s new show and am hoping that it will be a success.  I love watching shows like the Tonight Show (now with Conan O’Brien) and Late Night (now with Jimmy Fallon), when I can stay up late enough (being an hour ahead) because of there lighter/comical take on the news in the monologue along with the typical comical interviews.
 
I’ll be the first to admit that I am not a fan of watching the news as it is typically to dry and I can always read about the news I am interested in, ie: Technology and Science, online.  Yes I can even find the videos too, if I so desire, when appropriate.  The only time I actually watched the news consistently, sad to say, is Sept. 11, 2001 and the days shortly there after.  I am also Canadian, so your particular news station doesn’t necessarily pertain to me as it is an American station.  That said though, because you will now be between the new Jay Leno show and the Tonight Show with Conan O’Brien I could see you potentially attracting viewers that don’t typically watch the news.
 
I do hope that Jay will be able to get fascinating people to interview and finds intriguing/comical bits to do on his shows beyond the first week and well into the future.
 
That’s my two cents, off the top of my head :)

Text Editor

Sunday, September 13, 2009 21:03
Posted in category: Projects>Ideas

Unfortunately this isn’t anything new, but I would like to create my own text editor, that can do the basics with some enhancements.  The following is what I am thinking of initially:

  •  open and saving files
  •  cut
  • copy
  • paste
  • undo
  • word wrap
  • font choices (maybe)
  • syntax highlighting (if I can figure out how to implement) for Java, C, HTML, PHP, XML
  • word count
  • current line
  • find and replace
  • refresh (since accessing remote location)

I would then be able to take this application and integrate it with other applications, such as my remote file manager idea, to allow users to open files with its own text editor to view and modify the contents.

Note that I may add/remove features when/if I decide to start the project as I come up with other features I would like to incorporate.

Sidebar Twitter Updates

Monday, September 7, 2009 20:43
Posted in category: News>ForeverOdd.com

I have had my twitter updates displaying to the sidebar of my site just about from the beginning.  Today I have officially removed those updates from my site.  They have stopped working and I have been thinking of removing them as it seems unnecessary and just adds clutter the page.  I do still like to my twitter updates from my About page and you can view my updates on Twitter by navigating to http://twitter.com/DevinRyan.