Saturday, September 26, 2009

Personality disorder test

I don't know what this is for or where this is from, but I've seen a friend taking this, so I think I might give it a try...

DisorderRating
Paranoid Personality Disorder:Low
Schizoid Personality Disorder:Moderate
Schizotypal Personality Disorder:Moderate
Antisocial Personality Disorder:Low
Borderline Personality Disorder:Moderate
Histrionic Personality Disorder:Moderate
Narcissistic Personality Disorder:Moderate
Avoidant Personality Disorder:Very High
Dependent Personality Disorder:High
Obsessive-Compulsive Disorder:Low

-- Take the Personality Disorder Test --
-- Personality Disorder Info --

Avoidant personality disorder? Hmm...

Clicking the link, there is some explanation:

"Avoidant personality disorder is characterized by extreme social anxiety. People with this disorder often feel inadequate, avoid social situations, and seek out jobs with little contact with others. Avoidants are fearful of being rejected and worry about embarassing themselves in front of others. They exaggerate the potential difficulties of new situations to rationalize avoiding them. Often, they will create fantasy worlds to substitute for the real one. Unlike schizoid personality disorder, avoidants yearn for social relations yet feel they are unable to obtain them. They are frequently depressed and have low self-confidence."

and symptoms:
  • Social inhibition; retreating from others in anticipation of rejection
  • Preoccupation with being rejected or criticized in social situations
  • Fear of embarrassment results in avoidance of new activities
  • Poor self-image; feelings of social ineptitude
  • Desire for improved social relations
  • Appear to others as self-involved and unfriendly
  • Creation of elaborate fantasy lives


And about depedent personality disorder

"Dependent personality disorder is characterized by a need to be taken care of. People with this disorder tend to cling to people and fear losing them. They may become suicidal when a break-up is imminent. They tend to let others make important decisions for them and often jump from relationship to relationship. Dependents often remain in abusive relationships. Over-sensitivity to disapproval is common. Dependents often feel helpless and depressed."

Symptoms:
  • Difficulty making decisions
  • Feelings of helplessness when alone
  • Suicidal thoughts upon rejection
  • Submissiveness
  • Deeply hurt by mild criticism or disapproval
  • Unable to meet ordinary demands of life
It's pretty accurate and not just some random psychological texts. Maybe I do need some help. Let me try the recommended books in the links first.

Thursday, August 20, 2009

Some advice to computer programming

Computer is more and more important nowadays. Even if you're not doing work directly related to computers, it's still useful to have the tool ready. It speeds up a lot of things. Before you dig into programming, these are a few general things that I wish I had known when I started learning how to program, and I want to share with you.

The real challenge (and fun) of programming is to think about how to distribute resources between different parts, and how to "speak" an algorithm in a comprehensive way to both computers and humans.

Efficient programming is an interplay between development cost, execution cost (how long the program runs) and maintainance cost. It's not good for any of them to be too time-consuming, especially maintainance, which is usually overlooked in classes that teach you how to program. For new programmers, they will probably be struggling with making the code work. But once you go past this barrier, usually what you will find is a lot of little tricks that are either cool-looking or those that make execution cost a bit lower, while leaving the code hard to read. This is one big trap for inexperienced programmers. Unless you are writing programs that have a tight time budget or memory budget, it's usually a good idea to exchange a little bit of execution efficiency for readability and easiness for maintainace. Take C++ for example, there is this code fragment

int x = 10; // x and y are two integers
int y = 35;
x ^= y ^= x ^= y; // "^" is xor operator

The last line is nothing but swapping the content of the two variables. If somebody hasn't seen this trick, it will be hard to understand what is going on. And imagine several hundred lines of this kind of stuff. After a few months even the programmer himself will have a hard time understanding the code.

Adopt a coding style and stick to it. This includes the format/spacing of the code, choice of variable names, remember to release memory, etc. Avoid incomprehensive variable names. Make the variable names speak for itself. The size of the source code might differ a bit, but it's already 21st century. A few kb is nothing, and it doesn't make any difference once the code compiles. But it makes your code a lot easier to read. Sticking to a coding style can also decrease your debugging time.

Use comments to document what you wrote. It might take some time to write the comments, but it will ultimately save a lot of time in code maintainance. One good strategy is, before actual coding, write down the flow of algorithm in comments, for example a list of things to do in the order of execution. Then fill the code in between comments. It's usually more efficient this way as you don't have to keep all the details of the algorithm in your memory.

Spend most of the time thinking about what to do rather than going into coding directly. Write a short summary of programming plan if needed. Most of the time, the inefficiency of coding comes from not knowing exactly what to do. It's also more error-prone if you're not completely sure what you are doing. For example, you can start by thinking about what the big parts in the algorithm are. How should one present the idea in terms of code? Then you can try to think how to break the process down to simple pieces. There are usually some parts that are used again and again, and it's good to have them as a separated function. A pretty nice way I found is to write a function for each major part of the code. Then in the main function it might look like the following. (Don't care too much about the syntax if you don't know C++, but just get a feel of how one could approach programming.)

int main()   // program starts here
{
   ReadData(....);   // Calls a function that reads in data

   Initialize(....);   // Calls a function that does initialization
   while(CheckIfDone(....) == false)   // if not done....
      DoOneIteration(....);   // do one more iteration

   PrintResults(....);

   CleanUp(....);   // clean-up the memory
   return 0;   // end the program
}

This way you won't get a "spaghetti" code which has everything in it in a long stream of codes. It's pretty self-explanatory too. And note the empty lines between codes of different functionality. It's an example of the coding style that makes things easier to maintain. Of course you still need to implement the functions, but it's much better to focus on one thing at a time.

Learn some basic algorithms, and familiarize yourself with some basic graph theory. And think a lot. There is a good website (http://train.usaco.org/usacogate) that helps you develop basic algorithmic knowledge. It will be some solid hands-on experience. The reality is cruel. A good algorithm can run a lot faster than mediocre algorithms. It could easily be thousands times or more. The more you know, the more efficient you can command the computers to work.

Be familiar with the tools that are available. This includes the standard libraries that comes with the compiler for example. It's not only a problem with rewriting codes that are already there, the point is that the tool you use determines how you will think about a problem.

I hope this helps, even if you don't get everything rightaway. I won't say that these are the exact guidelines, but they are certainly things for you to think about. There is some chance that you will work on a larger-scale project, and these kind of things will start to really pay off. It's good to have the habit of better-quality coding. And before you know it, you'll like programming instead of cursing all the time why your code is not working.

--FHead, 2009 Aug. 20 at Geneva, Switzerland


Tuesday, August 18, 2009

Rather depressed lately....

Data-taking phase of the experiment has ended, and now it's all analysis. Which means that I have to sit in front of the computer the whole time. It's fine by itself, but over time it can be annoying if one continues to do so continually.

The progress....is not so good in my opinion. A lot of work has been put in coordination in software (nothing to do with physics in this part), and it took way longer than it really should. Now finally the real analysis starts rolling, and I got some preliminary result. Only preliminary. And it's been more than 3 weeks.

A bigger problem is probably that I don't know how much work is okay. I keep advancing, but I don't know whether my progress is considered, by other, slacking off or not. And since most of the work are groundwork to setup for analysis, I don't really have anything big yet. It makes me nervous.

Another thing is that we don't have a clear analysis plan. I was told that the plan was forming, but then, now, after three weeks, all I got is some suggestions of the things that might be interesting to look at. I feel like I'm walking in the dark. I can't really see where to go, yet I try to find something useful. And lately I've been feeling burned down, so exhausted that after work the only thing I want to do is get some rest and do literally nothing.

So, the things I wanted to do over the summer in my free time have been stalled for a while. I can't just waste time here, but really, I feel like I'm kidnapped and don't really have a choice. And I got an email just now, "FHead can give a short update on very interesting analysis". Sigh. I want a break. And please let me accumulate more stuff before making me give a presentation.

On top of all that, the relatively simple environment gives me a good amount of time facing myself. There is a big portion of solitude in everyday life. Working, eating, sleeping, and repeat. The busy work doesn't make it better. I hope it did, but instead it just makes me feel more lonely. Just like the old days when I just started undergraduate study. There are things that you think are gone already, but in these moments when you are all by yourself, they will come back and haunt you.

Maybe I should just take a couple of days off and go travel somewhere. There are tons of places I wanted to visit. Really, I can't just waste time burning myself with work and work alone.

Sunday, July 26, 2009

One episode of life at CERN, random scribbles

Day 1

I'm at the CERN main site. Never been to the Prevessin site before. Looking at the map, it appears to be not far away. Let's walk. 30 Minutes later, I'm still not there. Did I walk in the wrong direction? Let me return to the main site and look at the map one more time.


Day 2

Tatiana is drilling holes to make the structure to hold the motherboards. Halil and I are working on the power cable. It seems that the cable is too short, so we have to make longer ones. Tom and Paul are testing the motherboard. Some key functions of the motherboard do not work. They are trying to fix the problem. Not too much luck. It's late already. Let's go home and resume tomorrow.


Day 5

Luckily the problem is fixed. There are more problems, but we don't have time. We do some quick tests until midnight. Now let's move to the experiment site and install the system.

It's four in the morning and the installation almost finished. Time to go home.


Day 7

We've taken some data the previous day. For some reason the data plots don't look quite right. Let's look at the data more closely.....and.....oh no. We've got a problem. There is a serious bug in the data unpacking code. Fixed it. Resume data taking.


Day 8

Our names are on the shift table for some reason. Who signed us up? Well, it's us who will be taking data, so I guess it's fair. The only problem is that the shift is from midnight to 8 in the morning. Hmm. No sleep tonight then.


Day 8 midnight

The new settings of the electronics worked miraculously. We don't know exactly why it worked suddenly, but since it works right now, let's don't take risk to reinitialize the system again. I have to stay awake. Guu! More coffee. At around 4am, Chris kindly let us two go back to sleep, and he'll try to grab the other two students for the next several hours. Zzz....


Day 9

There isn't really much to do today. Data taking is done. All we have to do is to disconnect part of the system. In the evening there's the Hardronic festival. It's so geeky. One have to buy baryons (tickets) to get food. Played some frisbee. Had some beer. Had a way-too-spicy sandwich. It's not good at all. I'm very sleepy for some reason. Let's sleep all day tomorrow.

Tuesday, July 14, 2009

CERN Saint-genis hostel


It's a nice place, by first sight. After a few days, I started to notice a lot of inconveniences.

















SeverityItem
LightNo vending machines around the building
LightBugs at night.
Light30-minute walk to CERN
LightCan't eat or store food in room, only in kitchen
MediumNo elevator. Moving in/out is a pain.
MediumNo cable internet, wireless connection extremely unstable
MediumHot, no air conditioning
MediumNo noise after 10 pm, ie. no shower, no laundry, etc.
MediumNo lid on toilet. No seat either.
MediumReception opening hours is short.
SevereNo trash can anywhere in public area in the building. This includes kitchen, toilet, etc. (ps. One has to take the trash out of the building immediately after cooking.) (ps2. I live in 4-th floor)
SevereWashing machine is expensive!
LethalSingle washing machine (and dryer) shared by 80 people. (This, combined with the 10pm thing.....)


C'est la vie.


(ps. the internet connection almost make me lose this article. Good thing that I copied the text to gedit as I type)

Monday, July 13, 2009

First couple of days in Geneva~

So, this second time I got on the flight without too much trouble...but there are still some. First in the line comes the flight to Zürich. It was an 11 to 12 hour flight. I couldn't possibly sleep for that long, so entertainment is important. Luckily, every seat in the plane is equipped with a small screen where we can watch movie, play video games, et cetera. The good thing about it is that the starting time of the movie is not fixed; it's not broadcasted from some place, so we can enjoy the movies any time we want. The unlucky side of it is that shortly after I sit down, the screen fell out from the back of the seat. I believe that it's not supposed to happen. Then it got a quick fix:


after a while, the fix got upgraded so that I can watch a movie:


The upgraded version was not tight enough, and it fell out again later:


as a result I only managed to watch the first half of a French movie (called "the other one")....

The second flight got delayed for some non-obvious reasons, and it was more than half an hour late. And so I missed the opening time of the reception of the hostel I'm going to live in. By two minutes. Oops. "They're closing 5 minutes earlier anyways," I was told by Chris from the same group, who kindly came to the airport and picked me up, "it's France." As a temporary solution, I was placed in the USCMS house, where they have an empty sofa and some empty-looking rooms. "Wait until the evening and see if anyone is using the rooms." If not, I can sneak in and sleep on one of the beds. I don't like to be surprised at midnight so I slept on the sofa in the end.

The next day, I got an email from my advisor. "You cannot do that." The waiting list is huge and if I didn't show up on time (the day before), chances are that my room will be given to somebody else. Meow! After a while (walking back and forth), I finally checked in with the guard at CERN, and got the room key. It's a pretty nice room:


though it would be better if they have cable internet access.... There are more to come in a later post about the hostel. Settled with housing stuff, now it's time to do some (boring) paperwork and to take some radiation safety courses~ And hopefully I can start doing research early next week.

(written on Sunday with no network connection)

Tuesday, July 07, 2009

And so the dust settles....

I am traveling to Geneva in the summer. Here are a list of FAQ for reference.

Q: Why are you cleaning the room?
A: I'll be in Geneva for more than two months, and I don't want to pay rent here.

Q: It's not a big deal.
A: Yes it is. It is a big project and very time-consuming. I have way too many things accumulated over the course of 5 years in the USA. If I pack everything into 18'' cube boxes, it can be well over 25 boxes. I can't just put everything in the boxes since that is essentially just postponing the packing to a later date. I have to deal with it sooner or later.

Q: Oh no.
A: Luckily I finished my second qualification exam last year, so I had some free time to take care of them. Human-powered sorting is hard. I really hoped that I had a robot to take care of everything. The room is small, so I spent a lot of time playing Freecell Solitaire to help learning how to pile things up while sorting through my stuff.

Q: Is that why it took this long?
A: Let's move to the next question.

Q: Why are you still on campus? Aren't you supposed to be gone by Monday?
A: I was supposed to go from here to Montreal, and then from there to Geneva. Unfortunately I didn't realize that I needed a transit visa, even though I just stayed in the airport for a few hours. They say that it depends on the airport. Some airport (like the one in Toronto if I'm not mistaken) allows traveler to move on without needing a transit visa. This is my first time to apply for a transit visa, and it just didn't dawn on me that I would need one. I certainly didn't apply for a visa in Japan numerous times in the past.

Q: So you can't board the plane. What happened afterward?
A: I went back to campus from the airport, and did a lot of things all in one day. The flight was early in the morning, so I didn't sleep the night before. I really don't know how I can stay awake the whole time. Let me provide the list of things I did.

  1. Went to housing office to move check-out time to a later date. If I failed to do this early enough in the morning, my room will be cleaned and locked since officially I have checked out already.
  2. Check the website for estimated processing time for the visa if I'm going to get one. 1 to 28 days. What.....
  3. Went on to notify people in the lab. Explained what happened and searched for alternative plane ticket. It's expensive!
  4. Another person came, so I explained again. She tried to see if I can still get on the same flight in another date, and it looked possible. The only problem is that I need to get the visa. Through phone call we can't really get any information, so I have to go to the consulate in person. She provided me a plead-for-help letter.
  5. I went to the consulate. It's not as far as the Swiss consulate, but it's still around downtown area, and therefore took more than one hour just to get there. The visa section was closed, but the gentleman over there said that I can get the visa the same day I submitted it. Woo-hoo~ I also got a checklist for visa application.
  6. Now I just need the plane ticket so I hurried back to campus.
  7. It's almost 5pm, nobody will be around after that time. From the checklist I need to go to the international students office to get a signature. Done.
  8. It's closer to 5pm than before! I hurried to the lab and found out that the lady in charge of booking plane tickets has left already. Oops. I'd have to wait until Tuesday.
That was the day before dinner. It was crazy.

Q: So you went to sleep early in the evening?
A: Not really. After dinner with friends, I'm studying with a friend for her qualification exam on Tuesday until late in the evening. Afterwards I was preparing the visa application forms.

Q: Do you get a visa today (Tuesday)?
A: I was going to apply for it, so I went to the lab and tried to book the ticket with the lady. Unfortunately I can't postpone the original flight, so we have to find another flight. And as a result I don't need the transit visa anymore. I should've slept more the night before.

Q: That would cost a lot of money.
A: Thanks to Betty, who told the airline company some kind of sob story and we got most of our money back. Incredible. If it was me who was negotiating, I probably would end up losing the money. Well, it's a flight ticket where you didn't board. I wasn't expecting that we can get back anything at all.

Q: What's next?
A: So the new flight is on Thursday, before when I have to somehow decrease the weight of my luggage. It's currently overweight by 5 kg or so. But, finally, I can sit back and take a rest....