Tuesday, April 24, 2012

No Dumping

Just got out of class, about 45 minutes late, actually.  Keenan has the best stories, I can't believe I haven't had him as a professor until now. I'm feeling a bit jipped about it, I'm about to graduate and I just got to take a class with arguably one of the most knowledgeable professors at DePaul who worked in the industry for many years and has more awesome and hilarious stories than you can shake a stick at.

This class is great.

On the other hand, we discussed the purpose and meaning of dump, and apparently I forgot to include sequencing numbers in my inter-leavened queue.  I actually did it in a way that was "not good" namely I had two very separate queues and I just popped things on/off the stack in each different one depending upon a third queues enumeration of the type.  It worked, but it was definitively not the best or most ideal system.  I re-hashed that tonight based on the examples that we covered in the beginning of the class to include a queue of special structs that held queue info and "do work" data.

Speaking of which, I have to go re-save my output.txt
Oops,

Later,

Kevin

Saturday, April 21, 2012

Bein' Brain Dead

Well I spent about the past hour on the latest project.

It should not have taken me that long.  The actual programming part of the assignment  took me about 20 minutes, maximum.  The worst part was I was stubborn and refused to adhere to professor Keenan's naming standards in our Test.cs, which means that I spend the majority of my time mindlessly changing specific names repeatedly just so the test code ran with the classes I already had.

I don't have any idea why I had my own names instead of sticking with what Professor Keenan's names. My brain is fried and for some reason it seemed like the logical choice...?

The assignment itself was really easy.  I don't quite get the whole process, the concept of data driven development is really pretty sweet, but the assignment itself felt very underwhelming.  The good news this is the last isolated programming assignment, next week we will get into more game-based programming assignments soon enough!

I look forward to that.

In the meantime, hooray for getting homework done ahead of time!

-Kevin

Wednesday, April 18, 2012

Success by the seat of my pants

Currently I am a very happy programmer.

And a happy man.

I finished the server code in an afternoon, which isn't anything to be proud of or ecstatic about, there are most likely hundreds upon thousands of programmers who could do more in less time.  However, I wasn't exactly inspired during the writing of the program, so I found it difficult to concentrate at many points during the coding.

But the main reason I'm so happy is because I was able to do this in one shot.  Often times when I being a program, I will complete a section of code that should work, only to find out that it not only doesn't work, it usually works in a way contrary to the specified purpose.  Iterative programming is the name of the game, however I tend to come up with a game plan and try to execute it in one sitting without having to test every little tiny bit.

I understand that this is how games and programs should be done.  Make one piece work, save, submit, and then make the next tiny change.  However there comes times in my coding where I get on "a roll" and I feel that if I stop I will lose momentum and steam.  I'm stubborn when it comes to things like this.  I could be a lot better at iterative development if I would give it all of my attention instead of splitting my coding time between "this should work onto the next topic without testing" and "get one thing working at a time"

But today, at least, it paid off.  I knew what the code was supposed to do, I was careful in my implementation, and when I went to run my program, it worked.  Not the first try, but on the third when I fixed a casting error.

I would say this is an unusual case because the program was so linear and inter-dependent it didn't really open itself up to iterative testing and development.

I know Professor Keenan would call bullshit, and I'm 99.99% sure he would be right.  Everything can be, and should be, tested piece by piece.

But every once and a while it's nice to have a bit of validation that I understand what I'm doing and when I don't make tiny errors that the core of my programs still work and work well.

The best part about all of this is, though, that I'm ahead on my homework.  I'll actually be able to relax this weekend.

Knock on wood.

-Kevin

Monday, April 9, 2012

Easy Peasy Lemon Squeezy?

Well, um, I'm not really sure what to say.  From what I had been hearing the last part of this assignment was supposed to be more difficult?  I guess having taken Comp Sci II I'm in better standing for serialization, or at least the application of it.  This entire assignment quite literally took me no more than about 30 minutes if you add the times together, mostly because I forgot to bring my notes on how the files were arranged, and I mistakenly started changing the order of both the constructors initialization lines AND the actual order of the constructor's passed parameters.  That was FUBAR.

That's the thing about programming, no matter how good you get, now matter how hard you focus and try, you are going to most definitely hit snags in your work.  After contacting my good friend David about my difficulties (at one point I couldn't even get my breakpoints to trigger?) I realized my mistakes, rectified them and quickly re-adjusted, and finished off strongly.

Now I kind of wished that Professor Keenan had given us something a little more challenging such as serializing dynamically allocated data structures?

Of course that's probably wisely saved for another stage in the class. As long as you understand the simple, small things,  you can understand the working of a more complex beast.  As long as you aren't thrown to the beast, first, you will always stand a very good chance.

So... how 'bout that weather?

-Kevin

Sunday, April 8, 2012

Serialization

Still working on the last serialization problem for the second homework assignment, the first three were pretty easy, pretty simple, I've done much the same in the previous computer systems II class that I've taken.  Unfortunately most of my time has been taken up with Calc II homework.  It's long, tedious, and the teacher for that class is not what I would have hoped for, it's hard to understand her and she makes a good number of mistakes, which isn't conducive to me learning anything.

For the serialization, it was all pretty simple, re-arranging classes to be well-aligned (no, this isn't some psychological or therapy session for classes)  and then passing these classes into character array buffers. The only tricky part is when the class contains pointers to other objects, which is when you have to start adding in whole other objects to your serialization/deserialization.  The worst is when you start dealing with other data structures such as arrays (simplest case) and then vectors, linked lists, and etc.  Don't even get me started about maps and dictionaries.  Luckily Professor Keenan hasn't given us anything as headache-inducing as trying to serialized a dictionary of information.  That wouldn't be fun to put together on the other side of the socket!

I will post more later, but for now I have to get back to this calculus work.  I wish I hadn't been forced into taking this class... a year after taking the first one.

Yikes.

-Kevin

Sunday, April 1, 2012

F1rst

Hey! Another blog! This one for networking of games.  This is going to be an exciting class, I can't wait!  Finally have Ed Keenan as a professor and I get to learn all about networking!  And add this to David and I's Xna engine!

The first lecture  I was scrambling to get all of the notes I could possibly manage to scribble down while he was talking.  It's old hat stuff to most people, but new to me, and the class finally wasn't being handled with kid gloves.  I've had too many classes whose skills and experiences were so mixed that the classes had no choice but to repeatedly go over the basics for some and leave others who wanted more information high and dry.  It's a necessity, I understand, I've had these conversations with a number of professors, but it doesn't make it any less fulfilling for me.  Now this is a class where I'm going to get in deep to things I don't know, I don't understand, and are quite frightening!  I can't wait.

Funny story, actually, I never wanted to be a programmer.  Never, I was adamant about being a Game Designer (Which I still am, that's my career goal!) One of the professors that arranged to meet with me during my tour of DePaul when I was still looking at schools was none other than Ed Keenan.  I highly doubt he remembers me from our meeting, it was only for an hour or so almost a year and a half ago.  But I remember him. He really impressed me with his description of the degree here at DePaul, and put a lot of confidence behind the program which instilled a lot of confidence in me.  If I remember correctly he laughed when I said I was applying for the Game Design track, he said I should take the programming concentration instead.

Well Professor Keenan, here I am.  Throw your worst at me, I want to be the best I can be, I'm willing to learn if you are willing to teach.

That story being told, this is really supposed to focus on my difficulties with the first assignment.  The only difficulty I'm having right now is getting Professor Keenan to accept me on the Google Group for our class..  I've emailed him once or twice, to no avail.  This blog will never get read if I can't get into the group and link it to my name, so that is a big issue right now.

As for the programming assignments, if you can call them that, I breezed through them with no problem.  In small projects I really enjoy working with pointers, even c-strings, they are fun to toy around with.  I'm crazy because I like pointers, I like having the control of C++, not relying on things such as garbage collectors and such.  C++ has it's downsides, of course, lack of intelisense in VS 2010 is one thing, not language-dependent but IDE-dependent.  And then there's the case in big projects managing your memory gets to be a daunting and confusing task.  Then there's the fact that new and delete/free seems to cost a pretty penny in terms of memory, more than you'd think at first, anyway.  It's no different in a managed language, it's just not a lighting-fast allocation and de-allocation as I would like to believe.  I hope somebody can teach me about memory pools in the near future.

Anyway, the C-string assignment was a walk through a very  short park, a very light slice of cake, or what will you.  Compiling and running spacewar was like shooting a particularly large catfish in a pitifully tiny barrel with an M-60 and several hundred rounds.  I've been working in XNA and VS2010 since I first got to DePaul.

It was just a "see if everybody's stuff works" homework assignment, so I'm not disappointed.  I look forward to the rest of this class!

-Kevin