Sunday, May 25, 2008

Memory issues

I am using Firefox RC1. The rest is self-explanatory.

Right now I'm using Firefox in Safe Mode to post this, otherwise my computer will be jammed by all this memory overflow. I guess some of my add-ons might be causing the issue. Stay tuned.

Tuesday, May 20, 2008

Website thoughts

On second thought, I feel that my current website design is overly complicated... Look at this design. Yes, this is still my own website, hosted on MSU servers. Somehow I think this design looks a lot better, even though it's way simpler than what I currently use.

Now there's more than one compelling reason to switch to the simpler design: it's not just about the looks. I wanted to embed Custom Google Search into my own site, but it requires a width of 795px and above. The content side (the white side, not the yellowish side) of the design is fixed-width (unlike the simpler design) and short of 795px by quite some distance. Resizing the fixed-width design would be difficult, and also ruin the whole scale of the website since it makes the total width greater than 1000px, something that low-res monitors are gonna complain about. Now you might ask, "why can't you just remove the navigation pane to leave room for the Custom Google Search page? After all, it only affects your search.html." Good question. Precisely the problem. It only affects search.html, and my template is not that flexible.

Sigh, after all that designing, I might as well go for the simpler, more XHTML friendly version that I recently invented. It's probably less of a headache and much more compliant with standards. (Yes, I pride myself for following the rules of XHTML, if only it was easier...)

Friday, May 16, 2008

Center of mass problem

Yesterday and several days a ago, I worked on a problem on centers of mass. As always, it's a bit more technical than usual, but you might want a look at it. Here's the problem:
Consider a region R in some Euclidean space of arbitrary dimensions. Assume a Cartesian co-ordinate system is given, then position vector C of the center of mass of the region R is given by:
C = R r dm / R dm
where r is the position vector, dm is the infinitesimal mass element, and the integrals are integrated over the region R. [Definition 1]

Now I found a different way of defining center of mass from the xkcd blag: the centroid can be defined as the point such that the sum of the squares of the distances to each point is minimized.

Is this really true? I think so, as long as I make a few minor changes, so I decided to prove this myself (not so rigorously, but good enough to convince me).

(more on SciLearn)
P.S. Now that I'm doing math problems frequently on the web, I suddenly realized that I might want to use LaTeX sooner or later...

Thursday, May 15, 2008

Website update

Well, it's about time I started this. I was too busy enjoying the boredom...

So here's the brief version: I'm working on my website right now and I hope to have things ready ASAP ("as soon as I can" would be a better term, though). Now these are my current issues:
  1. The design is all set. No biggies, for now. I think I'll stick to what I have right now (the new design, that is) and I won't change that much or I'll be back to square one. I'm fine with the looks, although I'd say a little more borders might make things look less bare (you can always post suggestions in my comments here, or send a direct email)
  2. The home page is the only page that's decently written. I mean, honestly, I still haven't even written any other page except the home page, which is a good and a bad thing, since I get to tweak any final errors in the page before I actually start copying the layout everywhere and things get out of hand when I want to update them all (what a mouthful of a sentence). The downside is that I still have a lot more work to do.
  3. HTML and CSS Validators - your best and worst friend. They are extremely picky and will scream at anything that's out of place. Yes, I love my page to be XHTML Transitional-validated, but I hate it when I have to figure out ways to fix 20 or so errors. However, I did learn something useful: how to embed Flash objects without breaking the XHTML rules.
  4. JavaScript-haters: one of my prime concerns. My navigation is JavaScript-based, and I intend to implement more goodies with JavaScript. This means that those old-fashioned JavaScript-hating users are going to complain. "Sorry, I just can't do that. If you don't use JavaScript, and don't mind being barred from Gmail, Yahoo Mail, Google Reader, and other interactive services, then don't come to my website. You are not welcome." That's my rule.
  5. Internet Explorer: a web developer's bane, I call it. IE is interprets CSS so weirdly I rarely even use it for browsing. IE7 shows a marked improvement from IE6(which always acted in "quirks mode"). Nonetheless, I'll try to make my website IE7-compatible, but IE6 is out of the question. "Go get a new browser. It's good for you." That's my reply for any users who still grips to their precious IE6. (I get secretly annoyed whenever I see someone, with broadband, who still uses their 5-year old software even though it costs nothing to upgrade.)
For those really curious, here's the new temporary beta unstable homepage ("unstable" - a term that open-source software developers love to use). You can comment on it, but don't expect any of the links or content to work nicely.

Any comments? (Yes, I'm kinda begging for them.)

Tuesday, May 13, 2008

Time flies

(Beware of the excessive number of parentheses in this post; my chain of thought is a little messy.)

Oh yeah, time really flies. I still can't believe it's already Tuesday, exactly one week after my flight. I guess now it's time to start working and fine-tuning my schedule. (Say, anyone heard of the China earthquake that happened yesterday?)

Firstly, there are loads of things that I wanted to do and this is (supposedly) the perfect time to do them. One of these categories of things is programming - something I have semi-abandoned for like an eternity (a semester, to be exact). So this is one thing I have to catch up. My MJS Analyzer ("Mandelbrot & Julia Set Analyzer") is waaay out of date, and there have been no interesting projects recently.

Secondly, there's that wonder-like feeling that comes to me every time I see someone play pianos (or any musical instrument), especially when they are better than me (jealousy, perhaps? This is one emotion that has plagued me for eons). Now I have the urge to practice even more pieces, including K. 545 and Maple Leaf Rag. A few or no readers might realize I've mentioned Maple Leaf Rag some time ago, which I did manage to play well. But recently I realized that I was:
  1. playing only the simplified version (reduced 80% of the octaves to simpler notes);
  2. playing only the first 2 out of the actual 4 "chapters".
How "disappointing", now I got more work to do: learning how to play octaves with ease. It looks daunting, yet I still get a lot of fun out of it (as long as it's a piece that I enjoy). However, maybe it's more like those tiny bolts of energy that charged me into periods of rapid (music) learning every so often, so this furious piano practicing might not last long.

Okay, that's all for this post. My blog-posting mind just turn off suddenly, so I got nothing to write here.

Tuesday, May 6, 2008

Toxic day

What a day...

From May 5 to May 6, I traveled by air from East Lansing to Beijing, and I can say it wasn't pleasant. There was barely enough food for me to eat, so I was forced to actually buy overpriced food from the airports. Aside from that, I was also really tired of carrying bags all over the place and finding my way in the airport. (I had no idea what "Terminal X" meant until I actually asked someone in JFK airport, for example.)

Anyway, I came back to Beijing through an exhausting and uncomfortable flight, but the unpleasantness of the flight pales in comparison to what I saw back in Beijing. When I came back to my family apartment, the following things caught me:
  1. When did the air get so choking? (At the time of writing, my throat is highly irritated. Gas masks, anyone?)
  2. Why are people smoking in public places? (I have smoker-o-phobia and I avoid them at all costs - unless you are forced there of course)
  3. What are all those funny and revolting smells all around? (Smells like some kind of oily, tasteless pastry)
  4. What's with the unfriendly people? (Unfriendly is an understatement)
  5. Since when did we get such a wretched neighbor downstairs? (I think they are also irrational)
  6. When did the censorship problem become so noticeable? (I can't view my comics or use my secondary social network! [see below])
I omitted some things I also wanted to say, but I think I would rather not since 6 is enough reasons why I'm so eagerly waiting for Fall semester.

Here are the websites I have confirmed to be inaccessible (this list can get longer) [Updated May 8 2008]:
So far, this has only been my first day. I still have 3 or 4 more months to go...

Note: During certain periods, I may be unable to post anything because what I have just mentioned, so it's possible that I might be prevented from blogging for a significant while, although I can still write something for now.

Friday, May 2, 2008

Gmail & Firefox

Here's a tip for all the Firefox 3 beta users!

Okay, so I've been using Firefox 3 Beta 4 for quite some time now, and the crashes are more frequent than ever... The nice thing about Firefox 3 is that it's so much faster than Firefox 2, so that's why I'm still using it. (Besides, my Bookmarks always get messed up if I switch back to Firefox 2 - don't know why though).

So do you use Firefox 3 beta version to check you Gmail account? If so, you might have noticed that Gmail frequently causes Firefox 3 to crash. Eventually I learned a way to overcome this, at least most of the time so that it doesn't crash all the time.

This is how you should check Gmail next time:
  1. Open a new tab.
  2. Load Gmail in that tab.
  3. Now you can read your mail! (Okay, this is not the crucial part)
  4. The important part: When you are done, do not close that tab immediately.
  5. Instead, load a different web page in that same tab to override Gmail. For example, you can load http://google.com.
  6. Once the new page is loaded, you can finally close that tab.
I tried this so many times now, and it works most of the time. The reason why you shouldn't close the tab while Gmail is loaded is unclear, but it nearly always causes Firefox to crash, although it may not be immediate. If you close the Gmail tab immediately, Firefox will often crash right after when you try to do something else memory-intensive, say open another new tab or load another web page on some tab.

Tell me if this works for you (if you are a Firefox & Gmail user, that is).