Ramen Junkie

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….

2008 Reading List

Alice's Adventures in Wonderland (Alice's Adventures in Wonderland, #1)

Alice’s Adventures in Wonderland (Alice’s Adventures in Wonderland, )

Lewis Carroll

Published: 1865 | Pages:132

Description:

Harry Potter and the Half-Blood Prince (Harry Potter, #6)

Harry Potter and the Half-Blood Prince (Harry Potter, #6)

J.K. Rowling

Published: 2005 | Pages:652

My Rating: 5/5

Description:

The Wonderful Wizard of Oz (Oz, #1)

The Wonderful Wizard of Oz (Oz, )

L. Frank Baum

Published: 1900 | Pages:154

My Rating: 3/5

Description: Come along, Toto, she said. We will go to the Emerald City and ask the Great Oz how to get back to Kansas again. Swept away from her home in Kansas by a tornado, Dorothy and her dog Toto find themselves stranded in the fantastical Land of Oz. As instructed by the Good Witch of the North and the Munchkins, Dorothy sets off on the yellow brick road to try and find her way to the Emerald City and the Wizard of Oz, who can help her get home. With her companions the Scarecrow, the Tin Woodman and the Cowardly Lion, Dorothy experiences an adventure full of friendship, magic and danger. A much-loved children’s classic, The Wizard of Oz continues to delight readers young and old with its enchanting tale of witches, flying monkeys and silver shoes.

2010: Odyssey Two

2010: Odyssey Two

Arthur C. Clarke

Published: 1982 | Pages:320

Description: 2001: A Space Odyssey first shocked, amazed, and delighted millions in the late 1960s, the novel was quickly recognized as a classic. Since then, its fame has grown steadily among the multitudes who have read the novel or seen the film based on it. Yet, along with almost universal acclaim, a host of questions has grown more insistent through the years:Who or what transformed Dave Bowman into the Star-Child? What purpose lay behind the transformation? What would become of the Star-Child?What alien purpose lay behind the monoliths on the Moon and out in space?What could drive HAL, a stable, intelligent computer, to kill the crew? Was HAL really insane? What happened to HAL and the spaceship Discovery after Dave Bowman disappeared?Would there be a sequel?Now all those questions and many more have been answered. In this stunning sequel to his international bestseller, Clarke has written what will truly be one of the great books of the ’80s. Cosmic in sweep, eloquent in its depiction of Man’s place in the Universe, and filled with the romance of space, this novel is a monumental achievement.

100 People Who Are Screwing Up America (And Al Franken Is #37)

100 People Who Are Screwing Up America (And Al Franken Is #37)

Bernard Goldberg

Published: 2005 | Pages:320

Description:

2001: A Space Odyssey

2001: A Space Odyssey

Arthur C. Clarke

Published: 1968 | Pages:297

Description: So great are the implications of this discovery that for the first time men are sent out deep into our solar system.But long before their destination is reached, things begin to go horribly, inexplicably wrong…One of the greatest-selling science fiction novels of our time, this classic book will grip you to the very end.

The Amber Spyglass (His Dark Materials, #3)

The Amber Spyglass (His Dark Materials, )

Philip Pullman

Published: 2000 | Pages:465

Description: But how can he go looking for Lord Asriel when Lyra is gone? Only with her help can he fathom the myriad plots and intrigues that beset him. The two great powers of the many worlds are lining up for war, and Will must find Lyra, for together they are on their way to battle, an inevitable journey that will even take them to the world of the dead…

The Subtle Knife (His Dark Materials, #2)

The Subtle Knife (His Dark Materials, )

Philip Pullman

Published: 1997 | Pages:326

Description: Each is searching—Lyra for the meaning of Dark Matter, Will for his missing father—but what they find instead is a deadly secret, a knife of untold power. And neither Lyra nor Will suspects how tightly their lives, their loves, and their destinies are bound together… until they are split apart.

Confessions of an Economic Hitman

Confessions of an Economic Hitman

John Perkins

Published: 2004 | Pages:303

My Rating: 4/5

Description: Perkins writes that his economic projections cooked the books Enron-style to convince foreign governments to accept billions of dollars of loans from the World Bank and other institutions to build dams, airports, electric grids, and other infrastructure he knew they couldn’t afford. The loans were given on condition that construction and engineering contracts went to U.S. companies. Often, the money would simply be transferred from one bank account in Washington, D.C., to another one in New York or San Francisco. The deals were smoothed over with bribes for foreign officials, but it was the taxpayers in the foreign countries who had to pay back the loans. When their governments couldn’t do so, as was often the case, the U.S. or its henchmen at the World Bank or International Monetary Fund would step in and essentially place the country in trusteeship, dictating everything from its spending budget to security agreements and even its United Nations votes. It was, Perkins writes, a clever way for the U.S. to expand its “empire” at the expense of Third World citizens.

Ghost Town at Sundown (Magic Tree House #10)

Ghost Town at Sundown (Magic Tree House #10)

Mary Pope Osborne

Published: 1997 | Pages:47

Description: Morgan le Fay has promised to make Jack and Annie masters of the tree house if they can solve four riddles. In Ghost Town at Sundown, the Magic Tree House whisks Jack and Annie back to a ghost town in the Wild West of the 1880s. There, they meet a mustang herder named Slim as they search for the answer to the second riddle. From the Trade Paperback edition.

Robinson Crusoe

Robinson Crusoe

Daniel Defoe

Published: 1719 | Pages:320

Description:

How to Succeed in Evil

How to Succeed in Evil

Patrick E. McLean

Published: 2006 | Pages:292

Description: How to Succeed in Evil is the story of Edwin Windsor, Evil Efficiency Consultant. He tries to help super-villains be more villainous–or at least more profitable and sensible about the business side of Evil. Along with his very proper and English secretary Agnes and his hench-lawyer Topper, he struggles to make the world of super-powered people make sense, but this is very difficult because while Edwin’s advice is excellent, all of his clients are too egomaniacal to listen. There is, it must be said, a bit of comedy in this work. Edwin struggles with a cast of characters, including Dr. Loeb, a trust fund child who desperately wants to be an Evil Genius but has none of the talent; Dr. Loeb’s hideous mother, Iphagenia whose evil scheme is to foment a second Southern Rebellion, beginning with Lower Alabama; and the Cromogoldon, a brute with a forehead villainous low and quite possibly the strongest creature on the planet. Inevitably, Edwin’s unique clientele lead him into direct conflict with the greatest superhero of them all, Excelsior, and so, the quiet, restrained intellectual is pitted against heroic force.

The Art of War

The Art of War

Sun Tzu

Published: -400 | Pages:273

Description:

Sir Cumference and the Dragon of Pi

Sir Cumference and the Dragon of Pi

Cindy Neuschwander

Published: 1999 | Pages:32

Description: This time the math adventure is centered around a potion that changes Sir Cumference into a fire-breathing dragon. Can Radius change him back? Join Radius on his quest through the castle to solve a riddle that will reveal the cure. It lies in discovering the magic number that is the same for all circles.Perfect for parent and teachers who are looking to make math fun and accessible for everyone.

Harry Potter and the Deathly Hallows (Harry Potter, #7)

Harry Potter and the Deathly Hallows (Harry Potter, #7)

J.K. Rowling

Published: 2007 | Pages:759

My Rating: 5/5

Description: In this final, seventh installment of the Harry Potter series, J.K. Rowling unveils in spectacular fashion the answers to the many questions that have been so eagerly awaited.

Animal Farm

Animal Farm

George Orwell

Published: 1945 | Pages:122

My Rating: 4/5

Description: When Animal Farm was first published, Stalinist Russia was seen as its target. Today it is devastatingly clear that wherever and whenever freedom is attacked, under whatever banner, the cutting clarity and savage comedy of George Orwell’s masterpiece have a meaning and message still ferociously fresh.

The Golden Compass (His Dark Materials, #1)

The Golden Compass (His Dark Materials, )

Philip Pullman

Published: 1995 | Pages:399

My Rating: 4/5

Description: Can one small girl make a difference in such great and terrible endeavors? This is Lyra: a savage, a schemer, a liar, and as fierce and true a champion as Roger or Asriel could want–but what Lyra doesn’t know is that to help one of them will be to betray the other.

The Hobbit (The Lord of the Rings, #0)

The Hobbit (The Lord of the Rings, #0)

J.R.R. Tolkien

Published: 1937 | Pages:366

My Rating: 4/5

Description: Written for J.R.R. Tolkien’s own children, The Hobbit met with instant critical acclaim when it was first published in 1937. Now recognized as a timeless classic, this introduction to the hobbit Bilbo Baggins, the wizard Gandalf, Gollum, and the spectacular world of Middle-earth recounts of the adventures of a reluctant hero, a powerful and dangerous ring, and the cruel dragon Smaug the Magnificent. The text in this 372-page paperback edition is based on that first published in Great Britain by Collins Modern Classics (1998), and includes a note on the text by Douglas A. Anderson (2001).