Saturday, September 13, 2008

Random Rant - Part 2

MS DOS was selling well, and after a few versions, it sparked the development of Windows. Windows 1.0 ~ 9x was basically a complicated graphical user interface that wraps around MS DOS, whose code base has been developed on for years and years and has grown significantly (20mb, omg!). It had a major flaw however - the inability to multitask. So, when progressing to Windows 3.0, MS had to add so many libraries for GUI and also for multitasking. The problem is... it was getting bigger and bigger, although a revolutionary piece of software, was in danger of becoming a piece of bloatware.

It was aforementioned (in part 1) that Microsoft practices extreme programming. While the library grew bigger and bigger, the implementation bugs in Windows API also piled up, and programmers were exploiting those bugs! Then, as MS wanted to fix things, they had to add new functions to the API, which is basically a copy of the old function, but without the bug. Then we found new bugs on the new supposedly bug-free version too! Then thus we have so many versions of the same thing circling around each successing version of Windows. This is definitely not a good thing.

Windows XP attempted to solve the problem of having a bloated and fragile codebase by taking out old out-dated stuff and package them into compatibility modes. It sounded good, but unfortunately Microsoft did not have the guts to do it thoroughly. XP was still a big codebase, and the one after - Vista, was many times bigger.

To be continued in Part 3

Sunday, September 7, 2008

Ramdom Rant - Part 1

After using Vista for a few months, scrupulously getting the computer to work the way I wanted, I have come to the conclusion on the overall rating on various aspects such as usability, aesthetics, and many others.

Vista, among the lines of Microsoft products, is considered mediocre on its usability. Due to many intriguingly difficult problems presented during the development cycle of six years, including botching (well not exactly) the product in the middle and restart from scratch, Vista came out as a rushed, buggy piece of bloatware.

Now, you might ask, what happened? How could Microsoft have made that unprecedented, humongous, blatant, seemingly outrageous mistake? Then you are too naive on how companies work. That failure is definitely inevitable; it will happen at some point, due to the way Microsoft development process roll-out.

Microsoft practices something called "Extreme Programming," and that tradition came from when Gates dropped out of Harvard and began working on MS-DOS (well, he bought the copyright of the horrible OS called DOS, and began improving and re-branding it). When there is only a small number of people in the development team, extreme programming is a very useful technique. It is in which people dive straight into the work with only some rough ideas on where to start and where to go, and then expanding on it. The development process is fast and the cost were trivial, and it, however, paved the way for the future of Windows in an unexpected way.

To be continued in part 2

Saturday, July 5, 2008

Tower Defence Games

There are many of them out there. One of the more difficult and also well polished one is Xeno Tactic (I still don't understand how to play xeno tactic 2, but 1 is fairly easy with a good learning curve). It also has been around for a long time.

It is best to play it here.

I've manage to get quite far (level 86) in the last mission, and I think I can beat it soon.
Here are a few tips I've found.

Maze: a good maze is crucial to the game, especially to avoid being overwhelmed in the very beginning as mission 6 crawlers start with quite a high health. Also, do not build any sam turrets or walls in the beginning, as you need the money for vulcans.

You will also need to have a double-ended maze to make the aliens go around in circles (selling 1 wall to open 1 end, and then block the other end with 1 wall). A good thing to do is to group old aliens with new ones especially when you get to 50's and it is especially important to keep bosses in the middle of the group, or else your sams will abandon the big blob and shoot only at the boss.

SAM Turrets: some people underestimate the full potential of these as they only do 256 damage at max, and a measly 8 damage unupgraded. However, no other turret (not even plasma or sonic) can match its damage when a group of 20+ monsters are crammed up in little space. You should have 2-3 when you get to level 50, and add more to keep income coming (4 to get to 70, and add a 5th one before 90).

DCA's: the whole game is about anti-air. Ground units will die eventually using the blocking method, but airs will just soar right through all your defences, and that is a huge limitation in the game. Maximize your air defence and save your lives until level 100 (you must lose a few lives in 93 and a lot in 100).

Plasma Turrets: when fully upgraded (BFG Tower), they are excellent boss killers. Get 1 BFG before level 32, and another one before level 48. That will take care of all bosses before level 60 in a fairly short time. They are also quite good against air. However, don't get more than 2, because, after the 60's, you will have like 40 bunched up, and plasma is no use against ground at that point.

Freeze turrets: they are crucial on the later levels where air units are just almost unbeatable (begin around level 40). Build them around DCA's and fully upgrade them to zero tower, or else they are no use. They can also freeze ground units, saving money on turning them.

Guide to DCA (and Zero Tower) building:
Level 7: 1 DCA (accompanied by 1 or 2 volcans in case of lopsided defence)
Level 14: 2 DCA2
Level 21: 2 DCA4 or 1 DCA5+1 DCA2
Level 28: 2 DCA5
Level 35: 1 THW + 1 DCA5 + 1 DCA3
Level 42: 2 THW + 1 DCA5
Level 49: (this is 2 air-boss) 3 THW + 2 Zero Tower
Level 51: (the 7-level pattern restarts) 4 THW + 2 Zero Tower
Level 58: (this is 2 air-boss) 5 THW + 3 Zero Tower
Level 65: 8 THW + 3 Zero Tower
Level 72: 11 THW + 5 Zero Tower
Level 79: 14 THW + 5 Zero Tower
Level 86: 17 THW + 6 Zero Tower

You should kill every single air unit up to this point and not lose any groundies, after level 88, sell all your SAM Turrets (you should have 4 or 5) and buy 3 more THW

Level 93: 20 THW + 6 Zero Tower (can lose 2-4 if 1 less)
Level 100: (ideally) 37 THW + 14 Zero Tower (you will lose 12+ here, with only 20 THW)

After all air passed, sell all DCA and buy 6 SAM Tower and 6 BFG.
When only the 2-million health slug boss is left, change everything to BFG.

PS: don't spend an unhealthy amount of time playing this game... just saying

Sunday, May 4, 2008

Stupid Gr 8 Advisor

Well, I can't really take it anymore...
She (you know who I direct to)'s been very very annoying lately.
Last night, just because some people are 5 minutes late, she spazz out, and then she said she would gate people for 3 weeks if 1 grade 8 activity is missed. Oh yeah, she really want people to be punctual, but she is LATE for 20 minutes (again) this morning and (again) afternoon and made us missed quite a few buses.

Talking about buses...
In downtown, Victoria, there is a place where you can catch 3 buses (14, 27, 28) at once back to the school, but then she forces us to wait for the freaking slow 14 for whatever reason (yeah, "bad downtown area, which is BS, 'cause she can't listen to what I was talking 'bout).

Wednesday, April 30, 2008

Firefox3 RC1

It's coming in 1 week or 2.
And after that, there will be RC2, and then the golden release!

Saturday, April 26, 2008

Shutting down computers

run -> command.com
shutdown -i
And then type in comment, timeout, etc.
You can shut down ANYBODY in the local network

Tuesday, April 22, 2008

HCE Class

Yeah, so we went to this teachingsexualhealth.ca website.
This is in the front page:



Lol.....

Monday, April 21, 2008

M$ Frontpage 2000

I to this day, still do not understand why the school teaches how to make website with it.
Frontpage provides horrible, non-standard compliant HTML code.
Its themes are really horrible too; crappy gif graphic and looser design.
It is based on IE5 and thus does NOT properly display CSS2.1 in the WYSIWYG editor.

In general, it sucks. Period.

Saturday, April 19, 2008

Snowing in April?

I am surprised too.
Here, in Victoria, B.C.?
I mean, it hardly even snows throughout the winter!
Ugh stupid global warming + extreme climates.

Thursday, April 17, 2008

Some boarder suspended

One of our fellow gr8 boarders got suspended for a few days.
Not much to say.
Reasons:
- theft
- major late homework in various subjects
- skipping classes (fake sickness and then lie to nurse)
- more

He will be coming back next Monday

Friday, April 11, 2008

Fibonacci Numbers

You know the sequence:
1, 1, 2, 3, 5, 8, 13, 21, 34, ...

Where each number is the sum of the 2 previous ones and the first 2 numbers are 1's.
So, I was curious if there is a formula for finding the nth Fibonacci number...
Here is what I found.

There is 1 rule that will guide you through the process (contact me if you want the prove)

if F(n) = a * F(n-1) + b * F(n-2)

and that c and d are 2 solutions to the quadratic equation x^2 = ax + b
then for any integer n, F(n) = r * c^n + s * d^n where r,s are real numbers

Applied to this case
(1 + √5)/2 and (1 - √5)/2 are solutions for x^2 = x + 1
so we have

F(n) = r * ((1 + √5)/2)^ n + s * ((1 + √5)/2)^n

since f(1) = f(2) = 1

r * (1 + √5)/2 + s * (1 -√5) / 2 = r * (3 + √5)/2 + s * (3 - √5)/2 = 1
r + s = 0 //subtract f(1) from f(2)
s = -r

r * (1 + √5)/2 - r * (1 - √5) / 2 = 1
r * (1 + √5 - 1 + √5)/2 = 1
r * √5 = 1
r = 1 / √5

Thus, the formula is:
F(n) = (1/√5)((1+√5)/2)^n - (1/√5)((1-√5)/2)^n

or to simplify things...

F(n) = (1/√5)(φ^n) - (1/√5)((1-φ)^n)
Where φ = Golden Ratio = (1+√5)/2

Tuesday, April 8, 2008

Smoking marijuana? Wtf?

So this is what happened.
During Monday after school, all the sudden, MY floor smelled like pod.
It was really shocking. We had a house meeting and we plan to expel the person that did it.
I mean, seriously, smoke marijuana IN the boarding house? WTF???

Some BS Technology Class

So, it was the so called "Media Awareness" website we go to.
Then, we played the whatever stupid game in there.

It tells you not to give out personal information in the internet.

Whilst this is true, it's perfectly fine to give out your name; there is probably about a few million people in the world with the exact same full name as you, thus untrackable.

AND if you are really concerned about privacy, give false information!

Scam sites won't attract too many users if they have a ton of security check to make sure the information is real; they must allow some fake users if they are to scam anybody in general.

Monday, April 7, 2008

Back to school

So, alright I'm back.
But, after getting used to the new laptop, the old school computers are like so slow for me.
Single core? That's just... pathetic (at least compared to those cheap quad core desktops...)
I hope the school upgrades the computers... it's just a little bit slow...
Also, I can't stand Office 2000... it's missing some features and obviously not forward compatible.
At least upgrade to 2003 for the

The good thing - I got Firefox 3.0! It's awesome with the new features.
Be sure to check it out!

Saturday, April 5, 2008

Apple Inc suing over New York City??



http://www.macobserver.com/article/2008/04/05.1.shtml
http://www.efluxmedia.com/news_NYC_Not_Entitled_To_An_Apple_Apple_Says_15989.html
http://cityroom.blogs.nytimes.com/2008/04/04/its-like-comparing-apples-to-apples/?hp

It seems like Steve Jobs are in the way of New York City's efforts to go green as they have some far fetched dispute over the seemingly completely different apple logos.

From the GreeNYC site, their logos looks quite different from Apples. There is an infinity symbol in it, and there isn't a bite. Also, Apple Inc's apple is a solid gray while GreeNYC's is hollow.

I don't really know what Apple is doing now... I mean suing for this little thing? And the chances of success? Zero. NYC might even bite back since it already has long term claims on apple (since like 1920).

Hmmm....

Friday, April 4, 2008

Selling class notes illegal?

http://blog.wired.com/27bstroke6/2008/04/prof-sues-note.html

Apparently from the above article, a professor in University of Florida is suing the company Einstein Notes for "repackaging notes as 'studykits' and then profiting from the other lazy students that don't go to classes" without permission. Some students in the class are "payed" for taking notes and thus the professor states it's a "illegal distribution of copyrighted material" and thus is "infringement of copyright laws"

Unlike previous cases, this professor actually copyrighted his lectures, and he recorded every one of them. So, it's much more viable for a law suit. BUT, lots of possibilities could open up if this law suit against Einstein Notes is successful. Companies like Cliff Notes have been in the business of providing commentaries and summaries of novels, which are supposed to be copyrighted - what if they get sued?

Thursday, April 3, 2008

The difference between FAT32 and NTFS

I have always wondered what's so different about NTFS file system. I mean, there is file encryption alright, but I don't really need it. It's unnecessary as I carry no sensitive data.

FAT32 is older, and thus has better backward compatibility, and thus I kept it for some time.
I finally found out the major difference - file size limit.

Oh yeah, you can have a 1000GB hard drive filled with files in FAT32 system.
However, there is one major limit. You CANNOT have a single file that is larger than 4GB.
I discovered this while *trying* to backup another hard drive and keep getting error in the same spot.

Right... so I point the backup to a NTFS drive and it worked.
Strange, right? But remember, FAT32 is more than 10 years old, and has limitations.
Unless you need backward compatibility, convert your drives to NTFS.

Wednesday, April 2, 2008

Unreliable Softwares

Well, since the sturdy Partition Magic 8.0 doesn't work in Windows Vista, I got another software for managing and partitioning hard drives last year. It's called Paragon Partition Manager.

However, it seems less robust than Partition Magic. I've already had failures and fatal errors with it, including some bugs appearing when moving large amount of data (which is required for partitioning drives).

For example, one time, during the "quick data moving" stage, after moving a ton of data, it stopped, render the system unresponsive. Another time, during the same quick data moving stage, it stopped near the end stating "security error" leaving a few MB of files invisible.

Softwares that do these kind of risky job should be stable and robust itself, not introducing failures in critical areas, almost corrupting the hard drive in the process.

Tuesday, April 1, 2008

Website Hits

So, you think if you stop updating the website/blog, nobody will visit, right??
Actually, I'm quite startled by the result myself.

I made a blog about a game in July 2006, and then I periodically post in it until April 2007. In total, 95 posts were made, and the blog got about 5000 hits. Then, I decided to stop posting, because I no longer played the game. I totally forgotten about the blog, until I visited it today.

Guess how many hits? 9036. I'm not kidding. The blog continued to get hits long after its last update. The number of hits per day increased in the past 4 months without any new posts!

And so... here is an advice if you are running any websites - never ever remove any page that has been exposed to the internet. Old information is useful information, and old pages get MORE views.

As for the number of hits to this site? About 2500 hits (since April 2007).

IE8 & FF3

Just recently, IE8 Beta 1 has been released. A rather quick progress I'd say, by Microsoft's standards. So, I and my friend downloaded it.

According to various sources, IE8 passes Acid2 test. However, really, it doesn't pass. Oh yeah, it rendered correctly, but there are some unnecessary scroll bars on the eyes.

And Acid3? Well, it did even worse than IE6 - a dismal 10/100.
Also, the interface looked almost exactly the same as IE7. In other words, rarely any updates.

As for FF3... I'm updating to the latest nightly builds everyday. They seem to do very well. FF3 passes Acid2, catching up to other browsers, and scored a 71/100 on Acid3. Also, there are lots of impressive UI (user interface) changes, such as when you type in the address bar, it will match any letters in the URL instead of just the first ones. Also, the new theme looks better than FF2 IMO. One thing: don't use nightly builds unless you can withstand crashes. The betas are more stable.

Safari and Opera betas scored 100/100 on Acid3, but they still have the performance issue on test26. Safari also hacked around some of the tests (like in test#71 about font rendering, they hard-coded the svg font used to make sure they antialias correctly) which kind of defeats the purpose of the test.

Monday, March 31, 2008

Some new stuff

Well, for the past 3 months, I've been working on a lot of things. Including some animations, some small games, and some web tools.

Anyways, I've cooked up a proxy for anybody that needs to get around school censoring system.
it's http://www.jjtchiu.com/go.php

I know it's not perfect, but it should work on 50%~60% of the websites.
I, however, will monitor the traffic. So don't go to illegal sites!

The next one is a new game. It's fairly small, but fun. It's called Nim.
Basically, there are some piles of stones. You can remove any number of stones from only 1 pile in each turn. The person that gets the last stone loses.

Play it here: http://jason.jjtchiu.com/flash/nim.html
See if you can beat the computer! Remember, if you make even ONE mistake, you will lose.

Sunday, March 30, 2008

Flash CS3

Just recently I got flash CS3. It has many exciting new features, but I'm having mixed feelings.

For one thing, ActionScript 3.0 is... urm... really different. I liked the way AS2 was - fast development, and easy to write. But then... when it comes to AS3.0, everything changed. So different,

The movieclip hierarchy is now a completely different package. For example, instead of createEmptyMovieClip(), you call "var my_mc = new MovieClip();" and then "myParent.addChild(my_mc);"

Event handling is also different. The ECMAScript-style "my_btn.onrelease = function()" is obsolete in AS3.0. You now have to create a function "function my_btn_release()" and then "my_btn.addEventListener(MouseEvent.CLICK, my_btn_release);" It's cumbersome and time consuming.

Also, lots of freedom and advantage of AS2 is now gone. Variable typing is necessary, and it is also necessary that no variable referenced is undefined.

The only major improvement is... performance, sometimes by 5 folds or even 10 folds. I consider it really good, but seriously, flash applets rarely need such high performance. I mean, it certainly opens up possibilities for things such as 3D rendering and bitmap manipulation. However, for most needs, AS2 will be faster to develope for small program complexities. *hope it doesn't become deprecated in the future*