Showing posts with label Horrible obscure tittle pun. Show all posts
Showing posts with label Horrible obscure tittle pun. Show all posts

Friday, July 29, 2011

Emptying the stack

A few days ago I did a look through my book collection. I didn't quite finish the stacks and while it may not be the most entertaining thing I'm finishing going through. Though it did seem you guys kept a lot of your old books so I don't feel so weird with my mini library anymore.

First of the left overs: Discrete Mathematics and it's applications by Kenneth H. Rosen. Fifth edition hard cover that ran me 99.60, they love these high priced math books. This one of my more hated books. Discrete mathematics was a class all CS students had to go through. What's so important about it? Learning that big numbers are a bad thing. It also has some proofs and logic along with other staples but the real reason was to tell you about big O notation. Looking through the table of contents I see some graphs, trees, Boolean algebra, and modeling computations but none of that came up in class as far as I know. I don't even know much of what I did in this class but I passed it somehow so that's the most I'm going to do for tying to remember.

Second here is : Operating System Concepts by Silberschatz Galvin Gagne. The seventh edition of the series, a hard bound book with a picture water color disnaurs on the cover with electronics running me $93.75.
I wasn't kidding
This is a wonderful story for me to tell. Operating Systems was always considered one of the best classes for students to take. All the stories were of our teacher we all knew finally took us through the nitty gritty of an operating system and we even got to make our own based on a Linux frame. Yes it was a class where we made our own, if primitive, OS. This was a subject that fascinated me even when I got to play with old languages that had register based variables such as BX. But I didn't get him, they had switched up the program by having an old school person who was a TA teach it. This seemed fine, this was a person who was actually in the business with IBM projects and a few other companies where it seemed fine. He was in the process of being intigrated into the school as the CS department only had 3 real professors in it, the rest were math guys who taught low level classes.

It sounded good at first but this old guy effectively had us do high school reports for how some theoretical systems operated. We didn't once touch code or did anything I can remember due to not actually doing anything. It felt like one of the biggest wastes of time in that class, the work I was the worst at memorizing things that are in reality related but do to just memorizing them and throwing them down on paper I can't see for the life of me how they weren't. This was not the worst of it though, this was a very well spoken older gentleman with opinions, and a class he could give his pearls of wisdom to. One of them being to learn how to shoot a gun because the government is going the wrong direction. On top of this how people should quit eating meat, watching TV, listening to radio, or engaging in any forms of entertainment besides seemingly going out to hike, exercise, or traditional family get together around the (vegetarian)BBQ he could do it in such a way you would feel like filth and the downfall of society for not already doing it. Being such an outstanding sounding and looking guy it was hard to avoid that unless you learned to tune it out, which with a professor wasn't something you should do. Now Profs often go about things outside of class but it's usually stories, he is the only one who told us how bad it is to do things.

Rarely did anyone complain as well, he was the professor. Only one student I know of that I worked on a project actually took up to attempting to argue the "violent video games make you bad people and you should feel bad" debate which became an argument of anecdotal evidence and both of them bringing up "studies" to disprove the other. Not the best of times in that class. I had to take one more class from him where it was mostly out of class working on a team with the rest for projects for an out of school project so it wasn't bad. I do hope he tones it down for future students, he knows his stuff but he's not there to be a life coach or a lifestyle preacher.

With that we're to the last book of: Fundamentals of Statistics by Michael Sullivan, III. Soft bound first edition book, came with a CD and was only $65 even. I believe that this is the only math book that I have that doesn't' include an edition and was the cheapest to boot. This is the only field of math I like. I was honestly surprised to find out how much I like it. I may have forgotten most of the advanced things I use but a lot of the principles I use when determining if things work in a game. I may actually give this book a reread sometime.

Wait it's not over, upon looking through the books I discovered my dirty little secret. I have books that weren't class related for classes I've never even taken. Prolog Minimanual, PL/I: Structured programing and problem solving, Data Structures in Java, C++ classes and database structures, Fortran77 Language and style, Introduction to pascal, Computing concepts with java essentials, and Compilers principles, techniques, and tools. A long list but not a single cent was spent on these. The funny story was I hung around CS professors offices so much I could catch them with these stacks of manuals and such that they were throwing out, and I would gladly take them off their hands. I think it went to the point that I was pointed from one professor to another to pick up an outdated book. The worst part is I have not cracked open a single one of these, one is actually still in shipping shrink wrap with the professors address on it.

This isn't even all my books but beyond revisiting this idea with the books I don't care about I think I'll call it done for now. So on a minor related thing, do you people out there have any classes you remember fondly and/or hate?

Wednesday, July 27, 2011

Variable Fighter : playing with snakes part 2

I feel in a programing mood today so I'll be continuing the playing with snakes post I made a few days ago. Last time we played with some input and output in the shell. Today we move onto some variables garnished with a little scope concept.

First thing first, if you hated algebra this is like that only you don't have to solve things. You get to say what x is and everything else bends to your will. Though if you name your variables x you are going to make anyone who reads your code cry. So first thing first there is a called typing for variables. Where a variable is of a certain type, such as a string or int we used before. In other languages you would need to declare variable types, for instance in C languages you would do things such as 'int your_int" or "string your_string". Once the type is declared it won't change, if you try to assign something else it'll cause an error.

Assigning is the basic point of a variable, just having a type there makes it sort of pointless. It's very simple and as I said before like Algebra but you get to say what x should be. You simply have your variable and put '=' after it followed by what you want the variable to be. It's horribly hard to for me to explain it, so I'll have you do it, and you'll see it.

So get IDLE up and running and type the next few things.

name = "bob"
age = 20
print name
print age

More lines of code than I've ever had you done yet. Before we did everything on one line, now it's over multiple lines. You assigned "bob" to name before you assigned 20 to age and yet when print was called with name after it bob was printed, same with the age variable. This has something to do with an idea called scope. Scope is where variables exist, and where they cease to exist, but I'll get more into that later. Next I'm going to show scope not working.

Please type the following

print date
date = "July 27, 2011"
print date

Didn't work out did it? We got the wonderful red error. Yet we were able to establish the we assigned a string to the date we were able to print it out. Before the point in time where we enter 'date = "July 27, 2011"' nothing exists for date. Nothing. Anything referencing to it before we put that line down it a horrible thing that will cause your program to fail. The only reason we were able to keep typing is because we are running everything in the IDLE shell. If this were actually run as a stand alone program through the standard python interpreter you would not get the second print date to fire off, it'd be dead at the first one. While not a hard concept it'll creep up to bite you sometimes.

Now onto the next thing. Variables are reusable, they don't disappear after you use them once. For instance lets show off name and age again in a worthwhile manner with a little string concatenation. Please do the following.

print "Hello my name is "+name+" and I am "+str(age)

Just like before the str method attempts to turn anything into a string as only strings can be concatenated together. Now lets move onto the next part. Variables are well variable, you can reassign what they contain at any moment. For instance the following.

name = "rick"
print "Hello my name is "+name+" and I am "+str(age)

Bob has magicaly become rick. Now that was fun, lets change his name to Ron.

age = "Ron"
print "Hello my name is "+name+" and I am "+str(age)
fun fact I did something out of order and this is hiding it

No that was not a typo. That was an example of python not caring about type when it comes to variables when it can attempt to process them. Any variable name is fair game to be changed to any other variable type. This can cause a lot of debug problems. Like if you think you correctly changed a variable but spelled it wrong, it just makes a new variable in scope instead of replacing the old one. It'll become a possible pain when I get to objects later but I think this is enough for right now.

Next time I'll introduce the concept of methods so we won't have to type, or copy paste, 'print "Hello my name is "+name+" and I am "+str(age)' so many times.

Monday, July 4, 2011

Battle Formulater Scribbles


Suddenly, out of nowhere a horrendous formula. Technically not even all of it but I'm not encapsulating it in another font 60 set of parentheses and multiplying it by "attack stage".

That Formula up there is from as near as I can tell is the Pokemon damage calculation equation. A bit of Googling lead me to a certain web page and I'll take the benefit of the doubt on it. Math oddly enough is not my strong suit so excuse the horrific display of that, I figured it looked neater than the typed in one line my source provides. Though why this formula? Well I'm getting into damage mechanics for Combat Tester and Pokemon formula always comes up when I think about damage.

First a little story. My first RPG was Pokemon, kids in middle school played it and I was interested so after some grade and favor trading with grandparents I got a game boy color and red. There starts me maxing out my hours in the time played. Many years later and a few scraped projects ago I look into how Pokemon worked as well as a few various combat systems I have played only to find some of the most hard to follow and mind boggling decisions in design to my eyes. They just seem like needless obscuration of what your stats actually do. I may have been raised on computer RPGs but I honestly prefer the simplicity of Pen and Paper resolution of damage for the most part.

Now onto the here and now. So after evaluating the damage system of purely being attack successes - defense successes I came to the conclusion that I paint myself into a design corner with that. Instead using a commonly done solution of dice+modifier-damage resistance to get that job done. Specific details as to how I'm getting the numbers and such would be a little long for a post topped with a monstrous formula so I'll wait until later to go into those details. While not as unique as I like it'll work for now, I'll work on it more to see if I can go anywhere with it. Though it does open a few combat options I like, namely reducing or increasing your attack compared to your final damage.


In other news I'm going to be shooting for getting/starting a blog up every day around 5 o'clock central. With the current unemployment going on I could use something besides my Tabletop game schedule to set something up for me.

Edit: Happy forth to those of you in the United States. It's too hot and I'm without transport to care or get to the festivities.