One of my friends (bwilliam) pointed out to me this webpage "Python vs PHP, Python runs slower?" It intrigued me since I already did something similar to this before here. It has been said that Python is faster than PHP, but why in this case, is Python clearly slower than PHP? I was hoping that the user comments on that page would have an answer, but most people just posted a better implementation of finding prime numbers. So I took a little bit of time out of my hectic schedule to find the cause.
Here are the two scripts written by Teifion in PHP and Python:
PHP:
<?php
$primeNumbers =
array();
$output =
”;
for ($i = 2; $i < 100000; $i++)
{
$divisible = false;
foreach ($primeNumbers as $number)
{
if ($i % $number == 0)
{
$divisible = true;
}
}
if ($divisible == false)
{
$primeNumbers[] = $i;
$output .= $i;
}
}
echo $output;
?>
Read more . . .
Filed under Web Development by A.K.
I have to preface with this, I am a programmer, not a carpenter. Anyway, let’s move on to the meaty part shall we? This summer, I was building my girlfriend a computer, then the problem of the case came up. I wanted it to be somewhat small, nice, and cheap. There were several nice, small cases that costed $70! There was no way I’m going to spend that much money given the financial situation that I am in. I decided to look around the house and I had this really old computer that was given to me a few years back. I don’t know it’s actual age, but it was struggling to run the OS that it had on there, Windows 98 SE. If any of you can determine the age, let me know, here’s what it looks like stripped.

Read more . . .
Filed under My computers by A.K.
This is one busy semester for me. The end is in sight since I only have one semester left and I’ll join the rest of the workforce, hopefully some time in January 2009. What exactly has been going on with me? Let me break down what I have to do each week,
- Five classes: they add up to 15 credits. Including homework, I think I spend about 30 hours a week total dealing with just school stuff.
Read more . . .
I am now the "prestigious" undergraduate TA for our Data Structures class. When I took this class (at another school), I had to do it in Java. Now that I am teaching it, it is in C++, and sad to say, my C++ isn’t the best in the world. As a TA, I have to teach a lab section that is 3 hours long. The lab may or may not cover the same material in class, so I have to spend time to prepare for the lab sections in case they have any questions that I am unsure about.
Read more . . .
I first heard about Chrome this morning from a friend whose wife works with Google on this Chrome project. Indeed, I went to the website right away to check it out and I was blown away by what I read about it. If you want to read more about it, I recommend the Google Chrome comic strip that they put out on their website. I must warn you, unless you are into development stuff, the comic is pretty darn boring.
Read more . . .
Filed under Software by A.K.
So, I have the dell E22FP along with my M1330. In the first few days/weeks, the monitor was working fine. Then, I noticed that it was flickering when viewed from a slight angle. At first, I thought this was a problem with the LCD. My first inclination was to complain to Dell. However, being that I am a lazy person, I never did that :), but then I realized that when my M1330 plugs into other LCD monitors, the flicker also appears. When I try to boost the refresh rate up past 70Hz, the flickering disappears.
Read more . . .
Filed under My computers, Rants by A.K.
I have been doing a lot of home repairs/improvements lately, thus not having time to update this blog. Then I had to move back to the Moscow/Pullman area to finish up my schooling in CS. I only have one semester left, and this will be a hard semester. I will be taking 5 classes with two part time jobs, full load indeed. I may take up tutoring again this semester. I thoroughly enjoy tutoring other people, I find that it reinforces the information in my head quite well.
Read more . . .
As stated by this news article published by this press release at University of California, Berkley. Researchers have found that the performance between girls and boys in math are now equal! The reason they believe this is the case is that girls take more math classes earlier in today’s society. This leads to no difference in the comprehension of math problems between girls and boys.
I found this research very misleading. The first 3/4 of the article talks about the changes in our school system or how "women took fewer advanced courses in mathematics than men" in previous decades. However, in a few paragraphs of this article, they did mention one thing that I find very important for the analysis of this research. Read more . . .
Filed under Rants by A.K.
DOWNLOAD
I’ve finally gotten version 2.0 stable enough for a release, maybe it should be a 2.0b1? I have completely rewritten and restructure the code so that it wouldn’t crash (as often), especially among those players with long, arcane directories for their War2. However, if your directory is long enough, it may still cause such a crash. Additionally, since the program is better structured now, you also benefit with having a smaller executable. Although, it’s not like 10kb means that much anyway :). One thing I should have made clear previously, this is for the latest English version of War2 only! Read more . . .
Filed under Software by A.K.
I’ve finally made some fixes for War2Observe and is now available for download HERE. If there are any serious bugs, please let me know immediately so I can fix it. These are changes that I’ve made to this version of War2Observe:
- The selected player’s color is now displayed on the left side of the menu
- The barrack’s HP is now shown while training units
- Ogre-mage is now shown in the barracks Read more . . .
Filed under Software by A.K.