Archives for: August 2005

08/30/05

Permalink 09:59:48 pm, Categories: Science, 93 words   English (US)

Down with the sickness

phlegm

Well I've been sick for the past few days. I think it's just a bad cold I got while travelling with little sleep. All of this medical technology and still no cure for the common cold.

Some phlegm advice:

Always check the phlegm color. If it's clear, white, or pale, the infection may still be viral, and antibiotics may not be necessary. If it's yellow, green, brown, or bloody, or if you are having fevers, chills, chest pains, or have other health problems, you might need antibiotics. Contact your health care delivery person.

08/28/05

Permalink 04:57:40 pm, Categories: Movies, 153 words   English (US)

Red Eye

Only Wes Craven could make a movie with a villain that wears a scarf and is still scary. This is just a fun movie, that's not afraid to make fun of itself. It keeps you on the edge of your seat, and seemed to me like a fast-paced Alfred Hitchcock flick.

The bad guy is the same dude who played the villain in Batman Begins. I thought he acted well in that movie as well as this one. I think he will be playing alot of psychopaths in the future. Wes Craven seems to like humiliating the villain when it's their turn to pay, almost to the point of absurdity. This gets the audience quite worked up, and cheering at the end.

A big difference from Nightmare on Elm Street et al, the woman hero in this really kicks some ass. It's interesting how women's roles have changed in horror and action movies.

08/27/05

Permalink 08:07:43 pm, Categories: Science, 120 words   English (US)

Vitamins come of age

Recently saw a Flintstones vitamins commercial that mentioned their product now contains choline. This is an interesting drug that is mentioned in the Smart Drugs book. I find it interesting that this had been added to childrens' vitamins. It is found naturally in various foods.

Choline has alot of good properties to it, but one side effect is taking it as a supplement can cause a fishy odor. So if your child starts smelling like tuna and he/she is taking Flintstones or something else with choline, might wanna reconsider. Granted you need a large dose, but children probably will need a smaller dose. What's strange is I don't even see the amount of choline ingredient on their web site.

08/26/05

Permalink 08:57:58 pm, Categories: Society, 6 words   English (US)

Moral hazards

Very interesting article on health insurance.

08/24/05

Permalink 09:32:46 pm, Categories: Society, 217 words   English (US)

CNN made me do it

So I'm hearing on the news about yet another court case where the defendant claims he killed because of too many hours playing Grand Theft Auto. Now there is some new game called Bully coming out (by Rockstar of course) that is reminiscent of Columbine.

How come no one claims in court that "Fox News made me do it" or "CNN made me do it"? I wonder if the news stations would even report such things. Honestly I'm finding network news more and more despicable. It's filled with bad actors, unbelievably happy about stupid news, and overly serious about bad news. It is just so stupid and fake how news anchors try to convey their emotions in a patronizing way. Everyone seems like lapdogs trying to gather attention from viewers, and it is just sickening to my stomach everytime I turn on the television. I'd like to see their IQ numbers scrolling across the bottom of the screen.

I know these anchors just want their paycheck and to go home. Whatever happened to real journalism? I'm wondering who are the Dan Rather's of today. Who is worthy of a day long remembrance by all news stations when he/she dies? Would you honestly give a shit if any of these CNN or other station's news achors died?

Permalink 08:16:21 pm, Categories: Medicine, 316 words   English (US)

A different college life

I have a very cool Anatomy & Physiology professor named Dr. Curless. He's an old burly guy with a good sense of humor. Here is a cool extra credit option on his syllabus:

If you complete a martial arts course this semester on or off campus and provide documented evidence, signed by the instructor that you did so, 10 points will be added to your overall sum of points before semester average is calculated.

If you complete a rigorous physical fitness course this semester, on or off campus, and provide documented evidence of such, 5 points will be added to our sum of points before the semester average is calculated

Basically he wants students to be in shape and be able to defend themselves. He gave an example of going to elementary school and seeing most kids looking like the Michelin man.

It's true, kids these days are out of shape, and eating crap. In fact one of his points on the syllabus on how to do good in the class: Eat well. He also said that you will do bad unless you form study groups. The reasoning is that there are alot of notes, and students will not be able to take all of them and their mind will wander occasionally. The purpose of study groups is to fill those holes in your notes. This is all very good advice. You get to meet cool people, and for me at least, the best way to learn something is to teach it.

As a computer science student, I did everything mostly on my own. I was a loner and got A's. The nature of computer studies is that you do most of the work alone. That's kinda sad in my opinion, and colleges should encourage more group work. When you get an IT job, it's rare you are working alone, so why not teach the courses that way?

08/23/05

Permalink 10:14:21 pm, Categories: Medicine, 19 words   English (US)

Professor Rating

A student pointed me to this useful site that provides ratings by students of professors for many major colleges.

Permalink 10:09:21 pm, Categories: Medicine, 107 words   English (US)

Back to school

Arrived back from CA Monday morning on the red eye flight. Had planned to go directly to school from there as it was the first day of the semester, but was too tired and missed 2 classes. Oh well, first day, can't be much going on.

Here are the courses I'm taking, as well as grades of my last semester. I did pretty good, but this semester will be alot tougher with more credits. FAU is extremely crowded, with alot of freshman (and freshwoman :).

They opened up a Starbucks on campus and man are they going to make alot of money. I even succumbed and bought a frappuccino.

Permalink 10:01:58 pm, Categories: Vacation, 234 words   English (US)

Going back to Cali

CA was great, the weather is cool (60-65 F). Build a city on a mountain and that's pretty much what San Fran looks like. I can't believe how steep the roads are. I remember walking outside in the morning and not noticing anyone jogging or anything which seemed wierd to me. But then after a few minutes of walking uphill, I realized why. That is extremely tiring.

Some roads are so steep, that buses aren't supposed to go on them or else they'll get stuck when the road becomes level again. Guess what, I saw a bus get stuck, and it was pretty hilarious. There is huge Chinatown and I didn't realize there were so many orientals in San Fran. Columbus and Broadway is the scene for night life and it was definitely cool to hang out there. There is always something to do and people to meet in the city. The lifestyle is so different from FL. People are so isolated here, but in big cities there is alot more social interaction and mostly friendly people which is very cool.

I met up with Prashant and a buddy of his, as well as hung out with some others attending the wedding. We had a great time going around the city. The wedding was also fun. It's the first Jewish wedding I've been to, and was definitely an interesting experience. We did alot of dancing.

08/19/05

Permalink 10:17:09 am, Categories: Vacation, 148 words   English (US)

Off to CA

I have a short vacation this weekend and am now sitting in the Fort Lauderdale airport waiting for a plane to San Francisco, CA. I'm going to attend a friend's wedding. Should be fun, and I heard the weather there is 65-70 F. This summer in FL is extremely hot, sometimes in the 100s! These summers are getting hotter and hotter. Maybe we need some more pollution to cool things down. Anyhow, I got so caught up in it I was originally packing shorts and t-shirts for CA. Luckily I checked the weather and then packed some warmer clothes.

I'll most likely catch up with Prashant there and will see what he is up to. I come back on Monday, and have to go straight from the airport to school. That's gonna be a loooong day :). I'm bringing some Melatonin pills to hopefully help adjust to the time shift.

08/18/05

Permalink 08:54:21 am, Categories: Linux, Work, 245 words   English (US)

Just when I thought I was out

... they pull me back in. That's a line from Godfather 3, which sucked. It's only line I like in the movie.

For the past few days I did a consulting gig. The task was to move a very busy site from one server to a load balancing setup with 2 servers. When I say busy, I mean about 280 requests per second... per SECOND! I am constantly amazed at what Linux and Apache can handle.

The site was generating about 2gigs of logfiles per day. Part of the task was to combine web statistics from both of the servers into one report. awstats was being used for log analysis, and it was taking on the order of 4-5 hours to process a day's log. Plus the database it creates itself was very big (about 200megs), and whenever someone would access the awstats CGI, it would take about a minute to load, killing the CPU in the process.

I setup the load balancer (hosted by rackspace), configured the web servers to mirror each other, and wrote a script to combine logs together for awstats with the logresolvemerge.pl tool. It seems to work pretty well, and analyzing 2 separate smaller logfiles is actually quite faster (1-2 hours). I also made awstats generate static pages instead of running as a CGI, which reduced load quite a bit. Apache has a pretty cool server status module (especially with the ExtendedStatus option), which shows in realtime how the server is doing, requests per second, etc.

Permalink 08:36:02 am, Categories: Society, 7 words   English (US)

Evolution of the smiley

How did we go from ':)' to this:

08/16/05

Permalink 10:05:32 pm, Categories: Fun, 14 words   English (US)

Maxwell's Hammer

I had no idea the Beatles made such a violent song. This is hilarious.

Permalink 09:50:58 pm, Categories: Science, 28 words   English (US)

Dancing Ear Cell

I found this really fascinating. It's a hair cell taken from a human ear, and it dances to music. Many of them put together is how we hear.

08/15/05

Permalink 10:09:29 pm, Categories: Science, Religion, 240 words   English (US)

Haploid Jesus

Humans are diploid, meaning that we have 2 sets of chromosomes, one from each parent. We also have haploid cells, such as sperm and ovum, which have only 1 set. The fusion is what creates a person.

In Biology class we learned about parthenogenesis, which is essentially self-fertilization in the female without requirement of a male. In fact the Greek roots of the word mean "virgin birth." When the teacher later asked what was parthenogenesis in a review, a student jokingly answered "immaculate conception."

Could Jesus have been born in such a way? Well for a child to be male, the Y chromosome must come from a male. If Mary was XX like most females, that wouldn't work. However, there is another scenario. There is the case of women like Jamie Lee Curtis, who are actually XY. That's normally reserved for males, but our teacher explained it as the Y chromosome pretty much being ignored by Jamie. But could there be self-fertilization in such a person?

Supposedly the answer is no. But maybe one day such a human will arise. It's not that far fetched, evolution can be surprising. Also, there are rumors that the Y chromosome, and men, are on their way out. Maybe we will become useless one day :).

Update: I had originally said XXY was Turner syndrome in a female, but that's incorrect. XXY is Klinefelter syndrome in a male. X (just one) is Turner syndrome in a female.

Permalink 09:43:09 pm, Categories: Science, 94 words   English (US)

Tapeworm Diet

My dad was telling me about people actually undergoing a tapeworm diet. Basically the idea is to ingest a tapeworm, and it will eat alot of the food you do, thereby letting you eat without gaining much weight. Of course the worm could take away nutrients that you really need. When the patient wants to get off the diet, he/she ingests a pill that kills the tapeworm.

If you want to see some horrible worm infections in humans, follow this link. Warning, I suggest you not click on that if you are squeamish.

08/14/05

Permalink 02:57:28 pm, Categories: Apple, 474 words   English (US)

From AVI to plasma to DVD

So I have all these AVI files of cool educational TV shows, and yesterday I wanted to be able to watch them on my plasma TV instead of my laptop. I used to be a big audiophile so I'm quite familiar with AV connections.

I have a Panasonic plasma that has a VGA input. I strolled to CompUSA and bought some connectors, and after some fiddling, am able to now watch movies played on my laptop on my TV. I'm very surprised at how clear it looks, and at 1024x768 the desktop is even usable. I now have a audio and VGA cable coming out of my TV system so either I or my brother can hookup our laptops. There is still alot of remote control fiddling to get the right input settings, but no matter how much technology there is, you will still have 3 remote controls.

Then I thought, ok this is cool. But what I'd also like to do is make DVDs out of these AVIs in order to play them on a regular DVD player. One example is the show Anatomy for Beginners. I really want people to see this, and even wanted to give it to my biology professor to show to students. It's a good preparation to make sure students really want to get into medicine :).

So began my foray into DVD burning on OS X. I thought it would be as simple as starting up this iDVD program on my dock that I've never started before. But of course it is never that easy. That program only lets you use Quicktime movies, I think. It didn't like my DivX AVIs that's for sure. I started searching around for free tools but the results I got were sort of like searching for Viagra: I got a shitload of useless results. Then I thought, maybe it'd be easier to do this on my Linux box. I searched the APT repositories for DVD creating tools but ended up needing countless dependencies for command line tools that would take me ages to learn.

Back to searching for OS X tools, and I came across ffmpegX, which claims to be a universal converter. After alot of fiddling, I was able to make DVD .VOB files, which were then converted to a .DMG file, and then burned with OS X's Disk Utility app. That process took about 3 hours for a 50minute show. When I went to play the DVD, the aspect ratio was changed from 16:9 to 4:3 for some reason. I'm sure that can be fixed, but shit, 3 hours for this process? Plus the app is all GUI, so it is not easy to script. Well I guess I could use Applescript.

Anyhow, it was an interesting experience, much more involved than I orginally expected. I don't think I will be making alot of DVDs :).

Permalink 02:10:25 pm, Categories: Programming, 404 words   English (US)

Spammer retaliation

Just a few hours after my post about my blog spam, I received what was pretty much an attack of 200 or so spam comments about online gambling. All of them were from different IPs, many cable modem IPs, so this tells me they are using bots of hijacked systems. All this for blog spam? And why do this on my blog? It's not like I get alot of hits. I'm flattered guys :).

So it was back to the drawing board. I'll describe my defenses because I'm more interested in being secure than obscure.

Since all the spam was from different IPs, I can't rely on that to identify the spammer. But I still liked my idea of using soundex functions to determine 'similar' spam. Now what I do is first compare the new comment coming in to all comments already in the database with a soundex match. If there is any comment that is similar already in the system, the new entry is rejected. This means that comments need to be essentially unique. Here is how to get a list of past comments and their number based on phonetic comparison if there are 5 or more matches:

SELECT soundex(comment_content) as a, count(*) as b
FROM $tablecomments WHERE soundex(comment_content) =
soundex('".$DB->escape($comment)."') GROUP BY a
HAVING b >= 5
ORDER BY b DESC

Actually my HAVING clause is currently using 1, which is essentially returning results for any non-unique entries, but I can increase that number later if needed. HAVING and WHERE are different functions. HAVING can apply to aliases, and after the GROUP BY is already done.

b2evolution allows for a URL field for comments. This is being utilized by spammers as well as the comment data field. So I've added another defense. If a URL is posted more than 5 times in the last 24 hours, I reject. That might restrict people from posting more than 5 comments a day, but I don't expect that much anyway.

Here's a select query that shows comment URLs that have been posted more than 5 times in the last 24 hours:

SELECT comment_author_url as a, count(*) as b
FROM $tablecomments
WHERE comment_author_url = ".$DB->quote($url)."
AND length(comment_author_url) > 0
AND comment_date >= (now() - INTERVAL 24 HOUR)
GROUP BY a HAVING b >= 5

Note the special MySQL INTERVAL notation for date computations. It's very useful.

Well, we will see how long these defenses last. Bring it on.

08/13/05

Permalink 09:30:50 am, Categories: Apple, 119 words   English (US)

Powerbook UFO

The one thing that has always annoyed me on my Powerbook is the sleep light. This is a pulsating light that comes on when the Powerbook is closed and sleeping. It looks as though it is breathing, and is quite cool. In fact I've seen other laptops trying to emulate this, some like the Dells doing a stepwise decrease and increase in intensity that just looks crappy compared to the Powerbook.

But this light is annoying as hell. In a dark room it is so bright that it lights up the whole room. I honestly have to cover the light when I sleep. I wish there was a way to control the intensity but there doesn't seem to be :(.

Permalink 08:07:48 am, Categories: Movies, 262 words   English (US)

Broken Flowers

I saw the latest Bill Murray movie Broken Flowers. From the previews it looked alot like Lost in Translation. I didn't understand what the hype was over that movie. I didn't think it was that great.

Ebert gives Broken Flowers 4 stars. I don't really agree. The film is a meditation, very slow and lets its scenes settle in your stomach. It worked for awhile, but then just got overdone. There are some very unique and funny scenes, but there is simply not enough to make this a great movie. Sometimes a movie just comes across as being pretentious, as if it is claiming to be worth more than it actually is. That's the way I felt about this movie. There are exceedingly long shots of boring details like cars driving. And the damn music, was cool at first, but they kept playing the same song over and over as if they couldn't afford to purchase rights to more music.

However, there are some hilarious scenes. The Winston character was very touching in how much he tried to help, and the suggestion he was a reincarnation of a loyal dog was interesting. I especially like the scene where Murray goes and visits an old girlfriend (played by Sharon Stone) who has a daughter named Lolita. Lolita walks around the house naked trying to entice him. Boy that would be a tough household to live in :).

Anyhow, you will either love it or hate it. It's supposed to be a thinking film, about philosophy and all that, but prepare to yawn a few times.

Permalink 12:06:16 am, Categories: Programming, 290 words   English (US)

Green eggs and blam

So I'm getting pounded by blog spam. I've had no time to attempt any coding to stop it due to school. Since my summer semester is over, I'll be trying a few hacks to reduce spam.

Seeing the spam I get, the comments all look the same, and they are just added to every one of my blog entries. So I thought, ok I'll just analyze the last comment that came from that IP. If it is the same length in characters, then I'll reject it. That was easy enough, since b2evolution is PHP and MySQL.

Then I noticed the MySQL soundex function. This does a phonetic algorithm to create a string. I thought why don't I use this to compare the new post to past posts.

I wanted to do most of it in MySQL since I hate PHP. That led me to figure out how to use variables to store data in MySQL. The following SQL statement would generate a soundex for the last comment posted and store it in the variable @sex :):

SET @sex=''
SELECT (@sex:=soundex(comment_content))
FROM $tablecomments
WHERE comment_author_IP = '$user_ip' ORDER BY
comment_date DESC LIMIT 1

Then I compare this sex variable with the new comment coming in:

SELECT @sex = soundex('".$DB->escape($comment)."')

If that returns 1, then the soundexes match. Not the greatest spam protection in the world, but hey at least it's something. I know that by writing this post the spammers can easily bypass this. Go ahead you bastards, it will give me something to work on.

Update: So it seems I have instigated a fight. I'm being bombarded with spam now, all from different IPs. I'll have to do a little security through obscurity now...

08/09/05

Permalink 10:31:43 pm, Categories: Society, 55 words   English (US)

Choking Game

I saw on CNN that children are now playing a choking game. Basically, the idea is to cut off blood supply to your brain for fun. I gotta hand it to the kids, they sure are coming up with new ideas. Can't we go back to the good old days of 13 year olds having orgies?

Viraj's Weblog

Donate to keep this site going!

Amount USD $

August 2005
Mon Tue Wed Thu Fri Sat Sun
<<  <   >  >>
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Search

Categories


Misc

Syndicate this blog XML

What is RSS?

powered by
b2evolution