Saturday, January 31, 2009

How to use If() for Experts

I just had a really funny problem in Java:

String name1 = "something";
String name 2 = "somethingelse";
if(name1.equals(name2))
{
result = true;
}
if(result = true)System.out.println(true);

Guess the output (in the Java Console). It was: true
yes that's right: true

How could the output be true if the two Strings are so different. "something" is definitely not equal to "somethingelse". I even used .equal to compare the two Strings like I learned from previous mistakes.

Well after like an hour of searching I found my stupid mistake:
if(result = true)System.out.println(true);
The single equal sign assigned the value true to result.
I should have typed:
if(result == true)System.out.println(true);
To make it a comparison.

Don't ask me how Eclipse didn't catch that mistake...

Update

I finally finished the Exams and my reward is the next Semester =/.

Right before the Exams I got interested in Neuroscience. I kind of started thinking how easy it would be to simulate the brain if you would know how a neuron worked. You would just have to make many of them right? After watching this and this Goggle TechTalk I was really interested in the stuff. Unfortunately I had to study so I didn't have time to pursue the matter. However I did borrow some Psychology books from my schools Psychology guy.

I got pretty good semester and exam Grades, all of them above 90% except for French which was around 75% =(. Well I guess I can't complain since I never studied for anything except for the Exams. I'll just have to start studying =(.

After the Exams I got a 4 day break and I created a working model of a 100 neurons interacting together within a week (I think that's pretty good). Unfortunately the connections are random and static, something which I'm going to work on next. Also I'll have to implement some output and input 'neurons' so I can put the brain into a testing environment.

The negative aspect of me getting interested in Neuroscience is that I won't be able to work on my MMORPG as much. My excuse is that I probably won't have an entire day to work on it anyway. I will continue the work on my MMORPG as soon as I enter the next Holidays. I feel kind of bad about abandoning the MMORPG for now but I think Neuroscience is a lot more important to my career. I hate to make choices =(.

Since I don't have enough time to write more here's a List of things I have/want to do:
- Work on Brain (not mine)
- I'm developing a Twitter Application to save time
- I feel like making a Monster Hunter Portable 2G cheat which will make me start cooking in the middle of battle. Just to annoy my friends when we fight something important.
- Finish off an FTP Password Cracker
- Release some of my older Delphi Apps.
- Improve website and add more Social Networking Functionalities.
- Create a timeline of my life for various unexplainable reasons.

As you can see I have tons of things I want to do. Now I just have to fight my laziness and do them =).

Monday, January 5, 2009

Back to School

There are only two days left of the Christmas Holiday for me and unfortunately I still need to do some school work. This means that I probably won't have a free day for working on my MMORPG for a long time, hopefully I can get a free day next weekend but no promises. This time of the year is the time I hate most since I have exams and projects due soon after returning to school.

I calculated that I have about an hour of free time on a typical school day if I don't go to bed too late (little sleep = me be grumpy and dumb). I'm not sure what I'm going to do in that hour yet, maybe work on some small project or improve my website or something similar. I've always been interested in psychology and I'm currently reading an introduction (600 pages!), maybe I'll delve deeper into neuroscience (sounds interesting). Or maybe I'll just play Shogi (Japanese chess), I learned it in just half a day so there's probably room for improvement (learning some strategies etc.). I'll probably find something to do, lets just hope it's productive =).

side note: This reminds me, I wanted to make a list of a 100 negative words because my English teacher said I should learn new vocabulary and this was the first thing which came to my mind (go figure).