Showing posts with label year 2. Show all posts
Showing posts with label year 2. Show all posts

Tuesday, May 18, 2010

Semester 4 Done ... Now What?

The semester is over.  Finally.  Most people in my class were, and still are, envious that I only had to take three classes this semester.  What they did not see was, after finishing school for the day, I still had to work for five or six hours.

Semeter 4 of 6, also known as year 2 of 3, is done.  In fall 2009, I took another C++ programming course, a Flash(Adobe Creative Suite 5 Design Premium Upgrade from CS4 [Mac]) and ActionScript class, intro to databases, and a math class.  This past winter, a class devoted to Linux and the BASH shell, a final C++ data structures class, and an SQL class.

Now what?  My first year in Computer Science were all intro classes.  Stuff that could be taught in a highschool prgramming class.  Year 2 is where we started actually learning things.  Case in point, from what I learned in Database 2, I was able to offer tips on how to improve some things at work.  From Data Structures, I can see how applications actually store and access data.

But, I am still stuck at my job for the summer at least.  Most jobs in the IT business require more years experience than I have, which would be zero, and most summer internships pay a lot less than what I earn in my current job.  On top of that, with little free time on my hands (more like none), getting contacts in the IT industry here in Montreal is hard.

So now what?  Update my C.V. to show I still have one more year of school left, and no IT experience.



Powered by ScribeFire.

Monday, April 19, 2010

It's Been a While

It's been a few months since I last posted something, something that no writer should ever do.  My last post on Jan. 20, 2010, described how I handle early morning classes.  In the mean time, I have lost all free time.  Once classes are finished for the day and my shift at work is done, the few hours I have at night leftover are spent with the girldfriend.

Weekends were usually lost to catching up on sleep, and finding time to head to Jay Peak whenever the conditions were decent.  All that to say I have been busy these last few months, adn to day is one of the few days where I have no assignments to work on.

One of my favourite classes is Operating Systems.  It of course started with a brief introduction to the Windows command line, with one assignment where we created a simple batch file.  Then we moved on to Linux.

All of us have used Linux before, but mostly just on a casual basis; trying it out and comparing to Windows or OSX.  I now have a new found respect and appreciation for Linux.

Sed, Grep, and Awk were the starting points of our Linux experience.  Which moved to shell scripting.  To date, our major scripting assignment was an archiving script, with very strict and precise rules.

The core of the script looked like:
  for i in $2/*
  do
     echo "cat > $i << '!EOF!'"
     cat $i
     echo "!EOF!"
  done


Simple enough.  The output of this script was sent to an archive file named in the parameter list.

The tricky part was catching the errors, such an empty source directory, or missing directories along the target file path.  All this to say, if (and probably when) I ever have write scripts, I hope it is in Linux, since its command line tools are simple and elegant, yet much more powerful than the command prompt on Windows.

What I wish was covered in more detail, was the boot process, and how to customize how Linux boots up, or how further customize the Linux shell (in our case, we were using Bash, which seems to be the defeault on most Linux/Unix systems).  We had ten minute description on Bash environment variables, but that was it.

Though I learned a lot about how powerful Linux is under the hood, it seemed like it was lacking.



Powered by ScribeFire.

Wednesday, January 20, 2010

DataStructures.NoCoffee = True

For the last five weeks, I was in the habit of sleeping in until noon everyday.  What seems like a blessing at the end of a semester quickly becomes severely annoying, especially when a scheduled lecture is at 8:30am in a computer lab that STRICTLY forbids coffee.

Now lets be honest here.  Computer science is interesting, but it is not the most thrilling experience in the world.  Enter Data Structures.  This will be the fourth C++ programming class that we are required to follow in CompSci at John Abbott College.

There are two sections for my class this semester, yet the college has decided to combine the two sections for this one class.  The idea is to have the same teacher, and therefore more consistency, for both groups.  Unfortunately there only thirty-two workstations in the lab, and thirty-four students.

On top of that possible inconvenience, the class runs three hours, from 8:30am to 11:30am, twice a week.  It starts with a lecture portion then moves onto a lab section.  8:30 in the morning is too early to be thinking about abstract data types and linked lists without caffeine entering the blood stream.

The first day was basic, a review of data types, functions, and other basic programming concepts.  The good news, the text (Starting Out with C++: From Control Structures through Objects (6th Edition)) from my first programming class is still valid, that will be a $70 book that was used in four classes.




Powered by ScribeFire.






Monday, January 18, 2010

Formerly Sleeping 'Till Noon

After a long Christmas break, the first day back at school is always the touhgest, plus it was made annoying by a unrelated things.  My last exam was on December 14, 2009, and today (January 18, 2010), after a five week break, I'm back at school.

John Abbott College, like other C.E.G.E.P.'s, have a ridiculously long Christmas break; five weeks long.  Just long enough that when classes start up again, waking up at noon has already become the norm.

To make a my return to a normal school routine a little more annoying, I found out that, because I only taking three classes, I had go meet with an academic counsellor.  The issue was that I was not taking enough courses to qualify as a full time student.  John Abbott's policy is that a minimum of 12 hours a week marks full time status, yet they also insist on four classes.   I had to meet with the counsellor to explain my case.  Since I also have bills to pay, I also need to work at least 30 hours a week, especially now after Christmas.  The annoying part is that there is no consistency for qualifying as full time; 12 hours or four classes, it depends who you talk to.  This lead to me signing a special contract to make the exception for me to take three classes, which add up to more than 12 hours a week, which full time anyway.

My first, only class, today, was Databases 2.  We have moved on from MS Access, and beginning with Oracle Databases.  Our main development software will be Oracle's SQL Developer, which luckily, also comes with a Mac version.

 Now that school is back in, there will be less time doing this:

Jay Peak Resort: January 3 2010

(p.s.  That's not me, it's just a great shot of my home hill:  Jay Peak, Jay Peak's Flickr Page)




Powered by ScribeFire.

Wednesday, December 16, 2009

Flash Final Project


I think I finaly realized the importance of planning a video game. If you have a look at my final project for my multimedia class, it looks like I did not plan it at all. The graphics are horrible, and in one spot the text is not displaying properly. Yet the logic is pretty good.

It's a blackjack (this is my favourite one) game that I created from scratch. Everything had to be completely original. I chose to inlcude card counting just to give an extra element that could make it more interesting. The orginal idea was to have a dealer, two computer controlled players, and a human controlled player.

I had a card class, a deck class, a player class, a dealer class, and basic game play all worked. Except, by the time the asignment was due, I did not have any graphics working, and all the information needed was being traced to the output window in Flash. I given an extra week to finish it, by the end of that extra week, I did have any working graphics. Which leads me to my question. Is it better to start a Flash project by making sure the animations work properly, then tackle the logic, or vice versa?

I was not even able to get a card added to the stage. Never mind he simple animation of moving it across the table to appropriate place, then have it flip to reveal the face value. I was able to get one or the other but never both. There was the flip as a motion tween o the symbol' timeline. I had intended to add a card as needed, basing each card on one symbol from the library. Then adding the necessary info for each card. Or would it have been better to create 52 (or in the case my original idea - 208) symbol's in the library; one for each card.

In the end, as you can see, it was visually a disaster. However there was enough logic behind the scenes to get at least a passing mark assignment.



Powered by ScribeFire.

Monday, October 19, 2009

Making Cars Go Bump in the Night


Finished another pleasant day at school, with one 3 hour canceled, leaving only one that started at 2:30pm.  It was kind of nice being able chill wth the ladylover and watch some Californication this morning instead.

Once at school, we continued to animate a car moving around the screen.  What I accomplished last week was keeping the car on the stage by cutting the speed to 0 when it hit the ed of the stage.  Now we are adding obstacles, which adds a new level of fun, both programming wise, and playwise.

It's pretty easy to moniter a hit between 2 objects, but each object is surronded by a an invisible box.  When Flash records a hit, it is when the two boxes overlap, but the eye, the objects are afair distance apart:


There is a trick out there to watch different coloured pixels overlap, that will take some research.

Another issue some people were having was removing a child from the stage.  We created the obstacle in an array of obstacles, but removing individual elements are turning oout to be a bit of a complicated pain.  Some more reasearch is required.

UPDATE:  Getting this error when I try to remove a child
                    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at DocClass/HitObject()

Here is what my code looks like:
for ( var count:int = 0; count < NUM_OBS; count++ ) {
                 if ( car_mc.hitTestObject( obsArray[count] ) )
                 {
                     trace("HIT!!  KABOOM!!" );
                     obsArray[count].scaleX /= 2;
                     obsArray[count].scaleY /= 2;
                     //obsArray[count].play();
                     car_mc.speed = 0;
                     trace(obsArray[count].scaleX + " " + obsArray[count].scaleY);
                     if ( obsArray[count].scaleX < 0.125 )
                         removeChild( obsArray[count] );
                 }
}

Keeping in mind I am trying to manage an array of obstacles for a simple car game.




Powered by ScribeFire.



Friday, October 16, 2009

Databases - Microsoft Access

Year 2 inlcudes an introduction databases.  We get to cover the exciting world of Microsoft Access and Visual Basic for Applications (VBA).  Last school year, we had an introduction to Visual Basic, and I figured that would translate well to VBA when used with Access.  I was wrong.

The basic concepts behind Access are failry simple.  Getting into VBA code is pretty annoying.   This goes back to my preference for C and C++ syntax.  VBA makes absolutely no sense to me.  It's a convoluted language that has too many wierd quirks to remember.  I especially do not like how VBA will automatically shift characters a couple of spaces; there is certain way I like to code, and VBA usually prevents me from doing this.

This is also another where there is no text.  Also frustrating as this makes studying at home a little more difficult; having to jump between two windows is annoying.  The teachers notes don't explain how things work behind the scenes in Access and VBA, so I don't truly understand what it is we are doing.  I like to be able to easily look up things, instead of endless Googling hoping someone has had the exact same issue as me.



Powered by ScribeFire.

Flash - My First Experience

Adobe Flash Pro CS4 [Mac]

 I have discovered that I am not an artist, or designer in any kind of way.  I can not draw.  Take a look:



That is probably the best car I have drawn on a computer, and only the second best one ever.

My Mutimedia & Internet class is based on Flash and ActionScript.  After a an introduction into basic animations such as Classic, Shape, and Motion Tweens, we have moved onto ActionScript 3.0.

I find the Flash platform a crappy development environment.  I do not have much experience with animation, and  I am new to the Flash environment, but there is something unrefined about the user experience and the workflow.  The compiler and debugger seem as though they were added as an after thought.  It would be nice if there was a more unified approach to developing with ActionScript;  compiling should be a step by it self, where error messages are reported by themselves.  As it is, errors are being reported once Preview Movie is Selected.

Even the teacher says Flash CS4 is not the greatest tool available, and is looking for alternate methods for developing with ActionScript.  Since Flash is a very closed piece of software, I do not think he will be too successul.

On th upside, my ugly can turn, acclerate, and has an emergency break.  What I am looking to add is a way get the car bounce slightly off a wall (the wall being the edge of the stage).  I am open to any suggestions.

Powered by ScribeFire.







Wednesday, September 30, 2009

Algorthims

Year 2 started out 5 weeks ago with an algorithms class. Luckily enough, it still uses C++, which I still find to be the most comfortable with.

The teacher is a hard ass, yet good. He is one of those teachers that will yell at the class for not being quick enough, or giving answers that he thinks are beneath us. At the same time, he is the most respectful and encouraging teacher; he can give a student hell in one breath, then in the next, heap raise on the same student for showing effort.

The first two assignments covered basics like flowcharting and array subscripts. The algorithms teacher is more concerned at this point, with us producing clean code; appropriate comments, and a readable, consistent style.

It is a class about thinking, and less about syntax.

He is a very old school programmer, using ideas from K & R. For example, right now we are doing an excercise in C-Strings, and passing 2-D arrays to functions. This is also bundled with an program that has different sorting algorithms.

An example of the code I wrote today:

#include <iostream>
#include <iomanip> //for setw function to format output
using namespace std;

const char title1[] = { "Unsorted Array Data" };
const char titleWt[] = { "Weights" };
const char titleName[] = { "Names" };

const int L_MAX = 100; //maximum number of name strings in array
const int N_MAX = 10; //maximum size of each name string
const int L_SIZE = 20; //number of actual name strings in array


// Function Prototypes -------------------------------------------------------------

void OutList( const char[], const char[] ,const char[], char[][N_MAX], int[] );

// ---------------------------------------------------------------------------------

int main()
{
//array of name strings
char names[L_MAX][N_MAX] = { "wendy", "ellen", "freddy", "tom", "susan",
"dick", "harry", "aloysius", "zelda", "sammy",
"mary", "hortense", "georgie", "ada", "daisy",
"paula", "alexander", "louis", "fiona", "bessie" };

//array of corresponding weights for those names
int wt[L_SIZE] = { 120, 115, 195, 235, 138, 177, 163, 150, 128, 142,
118, 134, 255, 140, 121, 108, 170, 225, 132, 148 };

OutList( title1, titleName, titleWt, names, wt ); // print raw data


return 0;
}

void OutList( const char title[],const char nameTitle[], const char wtTitle[], char name[][N_MAX], int wt[] )
{
// prints the unsorted array of names / weights

cout << title << endl << endl;
cout << left << setw(12) << nameTitle << left << setw(12) << wtTitle << endl << endl;

for ( int count = 0; count < L_SIZE; count++ )
cout << left << setw(12) << name[count] << left << setw(12) << wt[count] << endl;

system ( "pause" );

}

The function Outlist() is not my favourite I have ever written. There are too many arguments, it is too easy to get lost, which leads to debugging nughtmare. Three arguments should be the maximum. Thoughts on this?

What did me in with the last assignment, was not that my program did not work, in fact it worked perfectly, I did not comment my code properly. If any one has any suggestions on how I should comment code in a way tht would please an old school programmer, let me know.




Powered by ScribeFire.

Saturday, August 29, 2009

Semester 2 - User Interfaces

Class number 2 for my second semester was an inroduction to user interface design.

Again, this was not my favourite class, but I feel like I accomplished more than in Tech Support.

Based on Visual Basic, the teacher often referred to the class as VB, adn I don't remeber a thing from this class.  Visual Basic is annoying, I was getting used C++, and I found "if" statements much easier to understand in C++ than in VB, even though VB was intended to be simpler language to program with.  C++ required a lot more attention to detail, where as VB would finish statements for you.

Simple loops did not make sense to me.  In C++, we were taught understand how variables and arrays are stored in memory, then dealt with loops that would cycle through the array.  In VB, the connection between the variables we were creating and the loops we were using to process the data was not made.

The class was not made that interesting, and the teacher would lose his temper often enough that we had a hard time taking seriously when he got mad.  There was no text book for the class, yet I managed to find a Visual Basic 2008 text, which helped a lot.

On the upside, my tic-tac-toe game got 100%.

Powered by ScribeFire.