Wednesday, December 15, 2010

Exam Week

So this is it....the final hurdle.....

1 down, 3 to go...

Edit: Super long delay, all done! Went pretty well.

Tuesday, November 16, 2010

C3DL Build System - 0.2 Release

Well, today is the day to drop the second release version of the build system for the C3DL library. In this new version I've updated the build system to allow users to decide whether or not they want to include the debugging utilities when they download the library.

Now I've been having some permission issues with matrix, so the actual web interface may or may not work...
You can give it a try in my test box over here C3DL Build System Tester.

All the source code and library files can be found in my github repo over here: Github Repo
*In the coming days I plan to move the system into the main C3DL repo at Cathy's request*

Looking forward to 0.3 Release, I'm planning to allow for more customization in regards to which parts of the library you can include / exclude. More on this as it develops!

Tuesday, November 9, 2010

Spawning a google map from a web page

I looked through some of the google maps API tutorials and found this bit of sample code that you can change around and modify to suit your needs. I've also made it so you can make a map pop up when you click on an object on your web page. Check out my mini demo here:

Google Maps Demo

And if you want to delve deeper into the API check out their docs here:
Google Maps API Tutorial

Crash course in HTML5 Video

Thought this might be helpful for anyone looking to hop into HTML5 video quickly

HTML5 Video

Tuesday, November 2, 2010

Sorting Algorithm Animations

Just a cool little site I found while studying for DSA

Sorting Animations

Dreaded ^M problem

Just making a quick post for myself in case I encounter this problem in the future

vi -b myfile.sh
:1,$s/^M//g

Quick info: when moving files from windows to unix you may end up getting funny character information in the file. In order to see these characters in vi, we've got to use the -b switch. The second command listed above will automatically find those symbols and remove them.

**The ^M is actually [ctrl]+v and [ctrl]+M**
Source and more information

Thursday, October 21, 2010

C3DL Build System - 0.1 Released!

First of you can find the system at my github repo --------> Here
The project homepage can be found ----> Here

For this release, the build system incorporates two modes. One which downloads a full, human readable version of the C3DL library, and a minimized version which has had all the comments and white space removed for the sake of size.

If you want to test this system out for yourself, go to the git hub repo and download the system. Open up the web page contained within the download and choose to download the full or minimized version.

*Note this system is designed to be used on a linux system, so either host it on a linux server or run it local through your favourite distro*

**Also don't forget to set the permissions for the c3dlbuildbot or else you'll just end up with an error message!**

Update: Minimized version to be added in upcoming patch due to time constraints

Updating Local repos from Github

I had Steven contribute a web interface to my C3DL build bot the other day, so I had to get my git to update to the new changes on Github.

I'll make this a short post, I had a bit of trouble getting my local repo to update.

I tried using
- git fetch - This basically just ran but I saw no results, and nothing actually changed so not totally sure what happened.
- git push - This gave me an error message when I tried running it just like so:

So, finally I figured out my dilemma, if you've only created one repo it *should* be named "origin". To be sure use the command
git remote -v - This will give you a listing of all the current remote repos stored by Git, and their symbolic names in the first column that you can use.

So in my case by updating my push command, it ended up becoming
git pull origin master - Which to decipher means, I'm pulling from my origin remote repo and merging it with my local master branch, if you're using multiple branches here is where you would change master to whichever branch you're working on.

So much for short post ufta.

Tuesday, October 19, 2010

Bash troubles and their solutions

First off I have not had to do bash scripting since first semester in ULI101, because of this I remembered approximately 0.01217% of how to bash script!

So after a lot of googling, I finally feel fairly comfortable working with bash again. I'll list the issues that came up in case anyone else is perusing this and comes upon them.

1 - I've gotten super used to programming languages, therefore I forgot that shell scripting is essentially just calling command after command. So something like sending a string of text into a file isn't as simple as

"This is a string of text" > thisisafile

In order to do something simple like this we have to use a command like echo

echo "This is a string of text now not generating errors!" > stillafile

2 - Similar to my first issue, I was stuck firmly in a programming frame of mind, and was repeatedly attempting to read in a bunch of test files into arrays so that I could merge them together and send them off into a new merged file. Although you can do this, it makes much more sense to just cat everything together and call it a day

cat file1 file2 > muchsimplerthanreadingstuffin

3 - White space fun! Alright, not really fun, bash is a pretty grumpy gus about white space, take this example:

if [ "$variable" = "this works" ]
then
     #do something
fi

if ["$variable" = "this doesn't"]
then
    #do nothing because you'll get an error message!
fi

4 - The error messages are not very helpful at all, for instance the error I continued to get for was command not found.


After figuring out all of these little inconveniences, I'm feeling pretty confident about shell scripting again.

First reactions to using Github

I'll start off -- my git repo for the C3DL build system can be found here C3DL Build Bot.

So far, I've only gotten the library files all set up, and a preliminary building system that isn't quite ready to go yet, but regardless the idea and template for what it should look like is starting to take shape.

Dave was adamant about the complexity of using Git, but I actually found it fairly easy and logical to use. So much so that I'm considering moving all projects I end coming up with onto my Git account just so I can access them anywhere and easily get help from others.

Now that I've gotten my two mid-term exams for the week over, work on this build system should start ramping up quickly, keep an eye out here or keep tabs on my github repo.

Monday, October 18, 2010

Holy smokes! Canvas TD

My highschool CS days consisted almost entirely of playing the flash version of tower defence in class.

Canvas Tower Defence

And now here it is in canvasical(??) glory!

Sunday, October 17, 2010

Getting Github off the Ground

So, I needed to get my github repo up and running, which for the most part went super smoothly, I only had one minor hiccup where I missed adding my publickey to my github account so I couldn't connect to the repo in order to push my first readme file.

If anyone has a problem, and gets the error "publickey denied", go ahead and check out this link

Publickey Setup

It'll walk you through generating your publickey on git and then adding it to your account on github

Thursday, October 14, 2010

OSD600 Project Changed

After my initial meeting with Cathy, it was decided that it would be better for me to work on a build system for the C3DL library rather then work on re factoring the library itself.

Essentially, what I will now have to do is create a system that will be able to interact with a web interface  and allow users to select which parts of the library they want to include, and combine them into one single file available for download on demand.

For the 0.1 release, I'm going to have to offer two choices to users, one being the full library with everything included, and a simplified version with only the core stuff left in.

Wednesday, October 6, 2010

Javascript tutorial

Hey there, while I was browsing Reddit today I found this link to a pretty comphrensive looking tutorial from Mozilla on javascript, you can check it out below if you're looking for a guide.

Javascript Tutorial

Wednesday, September 29, 2010

OSD600 Project Chosen! - C3DL Refactoring it is!

For my project this semester, I've decided to go with the refactoring of the C3DL library core. From what I understand about the library, whenever you include it, EVERYTHING in the library is included, which most of the time will include a bunch of features a developer may not want or need. So for this project the idea is to basically, shape the library into modules so that developers can pick and choose what they want to include in their projects. The main page for the C3DL library can be found here. As for why I've chosen this project, it was one of the initial projects I saw that piqued my interest, and I'm very interested in getting into game programming, and the C3DL library allows you to do that within browsers utilizing javascript and HTML5.

As far as keeping up with what I'm doing for this project, I'll be making frequent posts here on my blog and you can also check out the project page directly. I'll do my best to keep all major announcements pertaining to the project available as soon as I get to them, most likely through my blog and immediately after on the project page.

My plans for the 0.1, 0.2, and 0.3 releases I'm not totally sure yet, I will have to speak to my contacts for this project to get a better understanding of what exactly I will be doing and how far I'll be digging into the library. When I know a little more about the project, I'll update this post with more definitive stages to look toward.

The major languages I'm going to have to become more familiar with are Javascript, HTML5, and WebGL. I've already done a bit of javascript, so I think a brief refresher will help out there, as for HTML5 and WebGL I'll have to pick those up, but what I've seen so far from HTML5 I'm excited to explore them.

From past and current courses I already know Cathy. I have yet to speak with her, however I'll speak to her tomorrow about the project and see what she has to say on it and where I can begin.

As far as collaboration and contributing, as I've mentioned already I'm not 100% sure of what exactly will need to be done, but if you are interested in getting involved on this project, you can contact me directly through email. From the project list I saw while choosing this project there were a few other C3DL related projects going on. It would probably be beneficial to communicate with the people working on those projects as we might have some advice that will help each other out.

What I'm most worried / concerned about is jumping into a project where I don't know what's fully going on, but I am confident that I can get up to speed quickly once I have set some goals in place and know where I am heading to. It'll also be helpful to have some contacts I can get in touch with if I get lost during the project.

That's all I've got to say on that now, hopefully I'll keep these --> ლ(゚д゚ლ) to a minimum during the project!

Friday, September 24, 2010

Bug submitting with Bugzilla!

So I've just finished submitting the two fairly major bugs I encountered while doing my initial performance testing on the Chrome Experiments.

The first bug that I found was in the physicSketch experiment, which basically allows you to draw whatever shapes you can think of and then uses forces of gravity to drop and move depending on what other objects are in the scene. You can check out the status of this bug here.

The second bug I found only seems to appear on my laptop, as when I tried it out on my desktop it disappeared. Basically the window would get very jerky whenever you would try to re-size it. The experiment is a fairly entertaining kaleidscope effect, and you can keep up to date on the status of this bug here.

Tuesday, September 21, 2010

Performance testing with firefox and chrome

So last week, we got our first taste of contributing to Mozilla, by doing some beginner performance tests on The Chrome Experiments. For the most part it seems as Firefox and Chrome are performing pretty comparably, with the exception of a few isolated experiment bugs (which you can read from my results in the Mozilla link above).

I think one of the more impressive experiments I got the chance to play around with was the Amiga Workbench Emulator, which is essentially a full javascript re-work of the Amiga operating system, you can open programs, change fonts, windows etc... All within your browser. Pretty neat!

What sucked about it is that it seemed to internally "crash" while loading the "operating system" on Firefox and I was not able to see how well it ran. It did however load up on Chrome, so if you want to check this particular experiment out, chrome is your only choice at the moment.

Tuesday, September 14, 2010

Fibonacci & Factorial Windows Calculator

So, an idea came to me as I was sitting in DSA class thinking about the introduction to windows programming I got during the first week of GAM666. So I thought it might be an interesting mini-project if I were to combine the two ideas being discussed and create a calculator in visual studio that would use different algorithms from DSA and display them in a more visually appealing fashion.

To start off I simply drafted a quick resource dialog box in visual studio so I could figure out what I was working with and how it should look:



Once the easy part was out of the way, I decided to take steps at a time first getting buttons to properly update the label field, which is where I ran into my first issue. I was able to set text into the edit control easily enough, it was appending and maintaining the number that was causing issues, until I found this support article, that helped me immensely. The following code is how I solved this issue:

            index = GetWindowTextLength(editBox);
            if (index != 0)
            {
                SendMessage(editBox, EM_SETSEL, (WPARAM)index, (LPARAM)index);
                SendMessage(editBox, EM_REPLACESEL, 0, (LPARAM)((LPSTR) L"0"));
            }
            else
                SetDlgItemInt(hwnd, ID_NUMFLD, 0, TRUE);

Once the number is put in and the user clicks on either the fibonacci or the factorial button, I use GetDlgItemInt to retrieve the UINT from the edit control.

Friday, September 10, 2010

Hello World

Hello, I'm Andrew, and this is my first time blogging. I'll be using this to keep track of various projects I'm working on other than what I'm doing in OSD600, so hopefully there should be plenty of posts coming soon!