Saturday, March 29, 2008

The Toronto Earth Hour Failure: C3P0 says "We're Doomed"


Yesterday, March 29, 2008 between 8-9PM was earth hour. It was a total failure.

To start, two of Canada's biggest hockey teams were playing at that time, I suspect many eyes were glued to un-switched-off-sets to watch the hometown Leafs defeat their arch rival Canadiens.

I turned off my lights and went grocery shopping during the hour... because I live in a basement which has absolutely no source of light other than electricity I would have been bumping into things constantly if I didn't. What I saw when I walked through my neighbourhood is about 50% houses with lights on... all the stores at Dufferin and Steeles had their lights on and all the streetlights were lit while I walked past.

While I disagreed with the stated goal of Earth Hour (raising awareness my butt), the reason I participated was because I believe that earth hour was a test to see if humanity could collectively get its ass together and switch off for just 1 hour a year. I viewed the occurance as a sort of Prisoners Dilemma where if we would all switch off together our human race would be saved, if people don't come together and switch off... well then we're doomed.

If you did switch off you are in the worst position, not only are you doomed, but you didn't get to see the majority of the Leafs vs Habs.

Friday, March 28, 2008

Mass Moment of Inertia

the mass moment of inertia -> how hard it is to change the spin of an object.

Its not the shape that matters when spinning, its the mass that matters. If the mass is closer to the center of gravity it will spin easier because the mass isn't moving very much.

mass moment of inertia is a 2nd rank tensor. vector is rank 1 and a scalar is rank 0. We express as a 3x3 matrix.

Bunch of formula for normal objects.

moment of inertia = matrix * angular access

Thursday, March 27, 2008

Safari 100% on Acid3

My latest Safari trunk is at 100 on the acid3 tests (+8)
Firefox is still at 71 (0).

Wednesday, March 26, 2008

Use the Force

Impulse Force : a non-continuous force. Happens in an instantaneous amount of time... infinitely small.
Body Force: is a force which occurs on an object over a non-instantaneous amount of time

Thursday, March 20, 2008

DPS912 Semaphores; Shared Memory: Message Ques

Semaphores

Have to do with synchronizing processes (threads have their own method of synch)
Sometimes you have to serialize the access to shared resources
Unix semaphores are known as system V Semaphores (as opposed to BSD Semaphores which are used in threads)

"protect a critical section" - any section of code which could have a race condition.

See "Critical section example from Les' notes

P - V: P = wait for resource ... V = signal when finished with resource

Shared Memory

normally different processes have completely different memory areas... but doing IPC is expensive and hard.... thus shared memory.

shared memory is much like semaphores... shared memory should use semaphores to serialize and synchronize.

Message Queues

Efficient and easy method of sending messages to unrelated processes

Message Queues, Shared Memory, and Semaphores all work similarly.

Wednesday, March 19, 2008

DPS906 Lecture March 19

displacement = velocity * time (if there is no acceleration over time)
displacement = velocity * time + 1/2accel*time*time

what we are missing is a justification for the velocity. We do not have a reason for velocity right now.

Causes of Motion
Kinetics

Mass - amount of matter OR amount of resistance to change in motion.
- stationary things are in motion, with a velocity of 0.
Mass is a scalar... no direction
Additive... if a thing is made out of different parts, you can simply add them together to get the mass of the whole thing.

Centroid is the geometric center of a 3d object. The centroid is the center of mass for objects with uniform density.

For objects that do not have uniform density the center of mass must be calculated.

To find the center of mass for a non-uniform dense object...
- pick some point as a reference (it doesn't matter where),
- From that reference point, create vectors to each of the centers of mass of the components.
- center of mass of whole = (m1*v1 + m2v2) / m1+m2

Newtons Laws
1) Every object in a state of uniform motion tends to remain in that state of motion unless an external force is applied to it.
2) The relationship between an object's mass m, its acceleration a, and the applied force F is F = ma. Acceleration and force are vectors (as indicated by their symbols being displayed in slant bold font); in this law the direction of the force vector is the same as the direction of the acceleration vector.
3) For every action there is an equal and opposite reaction.

force = mass * acceleration something

Tuesday, March 18, 2008

New Acid3 Tests


GOOD NEWS EVERYONE!


I just reran the Acid3 tests on my own personal builds of webkit and firefox. Improvements in both Webkit and Mozilla:)


Safari-Trunk: 92 (+2)
Firefox-Trunk: 71 (+2)

Keep up the good work guys:)

UPDATE: Safari has just released v3.1 which has 75 tests passed (+36 from previous version!)

Saturday, March 15, 2008

Raising Awareness

I just read an article from theStar. about Earth Hour. On march 29th, 2008.

You know... Im not sure how I feel about this. The goal of Earth Hour is to "Raise Awareness of Global Warming"

I like the idea of the entire city going black for an hour... even if its just the spookyness factor, but Seriously, is there anyone unaware of global warming?

Why do we have so many events to raise awareness for things like cancer, global warming, heart failure... blah blah blah. Do we really need to 'raise awareness?' could we not do something better with our time?

So anyway yeah, I am really really tempted to go to this event and walk up to people and say "OMG are you SERIOUS... I've never heard of this global warming! WE have to get scientists to look into this!" "WHAT OJ KILLED HIS WIFE.... NO WAY! Im stunned, he was such a great running back."

SVN Timelapse FTW

Its 3am and I cannot sleep. I've been working for a few hours on my DPS912 code... the writing of a shell, and I think I am pretty much done. My post tonight isn't going to be about my code assignment though, this post is about SVN and SVN time-lapse.

I've been using svn to keep track of all my coding assignments this semester because I didn't want to go through the anguish of making code mistakes and not be able to revert myself to a previous working copy... something which happens to me a lot if I dont use a code repository. I've gotten pretty good at using svn on the command line now, but I've found a really nice little tool to use with SVN

The tool is called SVN Time Lapse, and is GPL v2, so it can be used by anyone. What SVN Time Lapse allows you to do is look through your code seeing the changes that have been made from revision to revision. Its akin to the amazing p4 diff that comes with perforce.

Here are some screenies


NOTE: the code browsed is from my assignment... please do not steal this code as it is not Open Source and I can get severely penalized if people take my code and use it for themselves.

Wednesday, March 12, 2008

FUCK OFF ITUNES!

I am now getting an error message 2ce a week when I start up iTunes. Its fixed by deleting a few files from my iTunes directory and re-importing all my stuff... BUT ITS BLOODY ANNOYING

FUCK OFF APPLE.... quit shipping me buggy versions of itunes.

<- NO IT WASN'T!

DPS906: Angular Motion

Spinning motion

Angular Displacement
- change in orientation, rather than a change in position.
- is a change in the rotation matrix
- DELTA-R = FINAL-R - INIT-R (^r=r-r0)

Angular Velocity
- Euler says you can describe angular motion as the rotation around a vector. This vector is a separate axis to X,Y,Z.
- The magnitude of the vector describes the speed of the spin

Tuesday, March 11, 2008

BTS830 Lecture

Previous methods of analysis have been based on timevalue of money. (very objective)

Cost benefit does some of the objective work, but also examines the subjective values.

Goes beyond ROI and helps decision makers consider the value-added benefits. Involves the estimateion and evalutiona of the net benefits associated with alternative courses of action

Sunday, March 9, 2008

Reply to the Moz Cause

Mark Paruzel talks about the recent acid3 tests in his latest blog entry. His entry prompted me to try out my various browsers on the acid3.

I looked at firefox 2.0.0.12 (latest release)
a trunk firefox build I do myself
Safari 3.0.4 (latest release)
a trunk Webkit build I do myself.

Firefox Release = 52 tests passed (same as AA report)
Safari Release = 39 tests passed (same as AA report) -- this explains Mark's bad experiences with Safari
Firefox Trunk =69 tests passed (same as AA report)
Safari Trunk = 90 test passed (same as AA report)

I cannot claim to how verifiable these tests are, I do not run Safari (either build) very much, so I haven't seen very many problems. The "Web Standards Project group" have been around for 10 years now though.

Both Firefox and Safari have meta bugs for Acid3 showing that these two development teams find it worth while to check against acid3.

Friday, March 7, 2008

DPS906 Note

Velocity = distance / time;
distance = velocity * time;
accel = velocity / time;

Thursday, March 6, 2008

Ghosts and the Creative Commons

Nine Inch Nails (NIN) has just released a new 4 disc album titled "Ghosts." All the tracks are copyright using the Creative Commons licence. Share and Share alike.

If you are unaware, NIN was one of the biggest (one man) bands of the 90s, releasing songs such as Closer, and Head like a Hole. NIN was damn popular back then. Trent Reznor, the main ingredient of NIN has continued to work on new projects this decade with varying success. NINs new albums all sell well and are loved by fans, but his songs are rarely played on the radio and dont usually make it into "top 20s" lists.

Though NIN rarely makes the charts... its music is definitely pop and is by no stretch of the imagination "underground."

NIN/Trent Reznor has recently left his record label, and Ghosts is the first released album post-interscope. Released under the Creative Commons license (go ahead... give your buddy all the tracks) Ghosts is a collection of NINstrumentals. Combining various mechanical sounding noises together with more traditional instruments such as pianos or plucked violins, NINstrumentals are some of Trents more haunting and touching tracks.

None of the tracks have lyrics, perfect for studying to.

Ghosts is good, dont get me wrong. But I feel as though I have already heard this album. The songs are all original, but it sounds to me like Trent & crew are recycling the mechanical sounds created for previous albums, reshaping them. My favourite tracks are 14,16, and 32.

Does anyone else think this of the new album?

Anyway the important thing of this whole ordeal is that it seems like Trent has made a fortune because of his new method of music distribution. The album ghosts is released in several 'value added' packages. Ranging from $300 where you get vinyl records, Blu-Ray disc for sampling, and a book, to .... well free of charge without any added bonuses (NIN website offers the first nine tracks of the album, but I'm sure you know someone on the interwebs who has bought the album and is willing to give it to you for free). Reports all over the internet say that the limited edition $300 package has completely sold out in 2 days (2500 total copies = $750,000).

Its good to see that the idea of moving away from record companies which have gouged the public for years with $20 CDs seems to work for Popular bands like NIN and Radiohead... Its even better to know that an album released under the Creative Commons has made so much money.