Monday, March 31, 2008

masteringMaya: The Fundamentals - Rigging

As some of you may know, I've been working on rigging different parts of Project 2. I finished rigging the ship a while ago (with the exception of the Tractor Beam, that comes later) and moved on to the Rigging the Alien lessons. I just finished creating the joints of the Alien's body. There are fluxors to add, but the basic skeleton is done (not that it's any complicated ;) ).

With tonights progress in MM:TF, I crossed the 35 hour mark.

Project Calendar - First Algorithm Element

One of the hardest thing to figure out in any logic-involved project is where to start. Redundantly enough, you have to go "logically".

Since the first "big" prototype is to generate a month, the very first algorithm to create (or start in this case) is the actual Calendar-Table Generation. The 7x5 7x6 table.

To be as simple as possible for the first algorithm and prototype, we're going to predefine a month that starts on a Sunday. January 2006 started on a Sunday and is 31 days.

The algorithm is not going to have any calculation for dynamic generation. Today, I'm strictly putting down the basic algorithm for generating a 7x6 table, putting in the date, and stopping at 31.

Later, I will be using Structured English Pseudocode Standard. The reason is that it's easy to write, easy to decypher when coding, and easy to read and understand for anyone, even those that never programmed before. That's why I use this instead of other standards that gets too close to real programming. Not everyone can read code. (Also, I learned Structured French Pseudocode when I was in college, so there you go...)

But for now, I'm not going to go deep in the Pseudocode. We have to figure out the logic behind some elements here and there to even come up with a basic Pseudocode.

The first challenge I'm coming accross while working the algorithm is the weekly increment, without even thinking of the offsets yet. I know that I'm going to have two loops, one inside the other. The first to create the rows, and the other to create the columns inside the current row. The two loop indexes can be used to figure out a position.
Calendar-Table

*Note: I'm using 1 for the starting column index for now. I think that's how I'll add the offset, but that's in the future. I will change it to 0+1 (see equation) if I need to in due time.

If you check a calendar for January 2006 and look at Monday the 9th, you are on the second column of the second row (row index 1). The preceding row, you had 2 on the same column because there are 7 days in a week. To figure out the day of any position on the table without any offsets, you just follow this simple equation (in Structured English Pseudocode):

currentDay ← columnIndex + (rowIndex * 7)

Validation:
On the calendar, the 5th falls on the first Thursday, the 18th falls on the third Wednesday, and the 21st on the third Saturday. With the grid above, let's fill in the equation:

5 ← 5 + (0 * 7)
18 ← 4 + (2 * 7)
21 ← 7 + (2 * 7)

It works! And there you have it. The first logic challenge I came across while working the algorithm solved and validated.

Friday, March 28, 2008

What are you Playing this Weekend?

A new segment I want to do every week to get my readers to participate. Essentially, just tell me what you are playing this weekend in a comment to this post.

I'm going to be putting time in [PS3] Ratchet & Clank Future: Tools of Destruction (I need to unlock a few things) and in [NDS] Animal Crossing: Wild World. I may put time to in [PS3] Unreal Tournament 3 to try out the Map Pack that came out yesterday.

So, what are YOU playing this weekend ;) ?

Thursday, March 27, 2008

(PHP/mySQL) Project Calendar - Introduction

As some of you might have read in one of my previous posts, I have a project in mind as a (heavy) PHP refresher. This is the first Blog Entry about this project.

I dusted off one of my college books. This is a major programming project and I wanted needed a refresher on analysis and algorithm (Pseudo-Coding). Here are the 6 steps of any major programming project:
  1. Definition of the goals/Analysis of the problem
  2. Design of the algorithm
  3. Validation of the algorithm
  4. Coding
  5. Debug
  6. (optional) Documentation

Source: Introduction à la programmation - Algorithmes et ANSI/ISO C++
Michel Michaud



Let's get step 1 completed.

Goals: A PHP calendar generator linked to a database for date-related information (scheduler).

Two "views" will be developped. "Single-month view" and "year view". Single-month view is redundant to the Year-view but essential for prototyping the final view (Year-view)

Single-month view will accept a month and year from the user (dropdown, textbox, or both - undefined at this point). The page (PHP) will then dynamically generate a one-month calendar with the input. All the calculations (first day of month, days per month, etc.) will be handled by code to allow greater flexibility and easier portability (from PHP to another language).

Once the prototype is complete, design and development on Year-view can begin. Year-view will accept a year from the user (like the prototype, the entry type is undefined at this point). With this input, the page will dynamically generate a 3 by 4 grid of 12 monthly calendars.

(optional) If 3 by 4 is big on screen, a 2 by 6 grid may be chosen instead. Per-user selection based on the user's screen resolution may be added.

Once the calendar is working, a database will be designed and implemented to the system. The database will store date-specific information. By clicking on a date on the calendar, the user will be taken to a screen (page) where the user can view, add, edit, or delete entries (appointements).

There you have it, I have defined what I want this project to be.

Monday, March 24, 2008

Various Updates

Just a quick posts updating you guys on what I'm up to.

I finally uploaded new photos on my Flickr account. It was kind of dead for the last seven or eight months. It was about time that I added stuff there. Some of the pics were taken months ago, but I didn't take the time to upload them. You can check out my Flickr account to check the new photos.

I also, unfortunately for masteringMaya and learning PHP/mySQL, got my hands again on Animal Crossing: Wild World. Regardless of how addicting it is, I put the game down today to do a bunch of stuff (Flickr, this update, later I'm continuing MM:TF). Just to give you an idea, tomorrow I'm getting Nookington's after only a week.

I also figured out a nice little project I could start in PHP and later integrate mySQL functionality as a refresher: A dynamic calendar generator system. I want to first come up with a generic Pseudo-Code that could work in most programming languages to generate the calendar and calculate various elements (days offset, days in a month, etc) without the use of PHP's date functions. I will use PHP's date functions when I create it, thought. I would later add a schedule functionality through mySQL. This is going to be a very nice refresher on a language I started learning a year ago and haven't touched in eight months.

That's about all. Still no news of what's going to happen to me at work. Fear not, I will update you guys as soon as I know anything new.

Wednesday, March 12, 2008

Insecurity

Yesterday, our Provincial Health Minister announced a restructuration of the Regional Health Authorities (RHA)—from eight individual RHA's to two working in tandem with two support agencies. Without going into details, it basically means that my career at the ACADIE-BATHURST Health Authority could, or not, come to an end.

I could stay here, I could be asked to move to one of the other agencies, I could have a new tasks, or could downright lose my job. I know that our Provincial Health Minister, Michael Murphy said that he wanted to have minimum impact on the employees (Clinical and Non-Clinical), but there's still going to be some damage.

Regardless, I'm taking every day as usual until we get news on what's going to happen to each individual Non-Clinicl position. This is going to take a few months. This is putting me in an uncomfortable position. Good or bad, I'd feel better if I had news now. Being kept in the dark, not knowing what's going to happen is, as one of my coworkers puts it, "chinese-torture". Even if I learn that I'm losing my job, at least then I can take steps to 1) find a new job or 2) go back to college (unlikely).

But, I'm still take every day as positive as I can. I have to put some things on hold. Such as the Python TD (previously known as Xtreme 101) course. I want to focus on Maya and learn PHP/mySQL on my own time. I was learning it at the office in downtimes, between projects, but I haven't my localhost in months. I want to be proficient with PHP as it could be what I need to 1) keep my job (extra proficiency) or 2) get a job elsewhere. I have two books to help me through PHP/mySQL and 3DBuzz's Web Design bundle.

That's pretty much it. Don't expect MM:TF updates as frequent as they were. My priority is to assure myself a future, regardless if it's here or outside the country. :)

Special Thanks to: James Stevenson, Billy Parmenter, Paul Haile, Cory Rewell, Steven Wann, Jens Charles Jakobsen, Aleksi Rokka, and Brad Fawaz for your incredible support in the last two days (and beyond).

Tuesday, March 4, 2008

Slow Progress

I just wanted to update you guys on why I haven't updated my blog. In short: I've been busy at work and lazy at home. But, I'm coming back into the groove of things. I'm dedicating two evenings a week on masteringMaya: The Fundamentals (MM:TF) and one on the upcoming Python Xtreme 101 class on 3DBuzz.com.

My evenings are going to look like in college. By structuring/dedicating my evenings, it's going to give me the incentive to persevere. Don't get persevere wrong. I love modeling and programming, but I work full-time in front of a computer monitor. When I get home from a hard day, I don't necessarly want to get in front of a monitor for a few hours.

I did it before. I've had long days at work and came home to MM:TF. It's not so bad, but everything seems harder when you're exhausted after a hard day's work.

I really need to start programming again, and the Python Xtreme 101 class timing is perfect. My goal is to eventually juggle masteringMaya: Advanced Modelling and XNA Xtreme (101). I like programming and I would love to learn more, especially game programming. Volume 1 and 2 looks exactly like what I want to do. But for now, focusing on MM:TF, Python will do the job :) !

As you may have noticed, I added a little widget on the right side to better display my progress in the various 3DBuzz training that I'm (and going) into.