| Simon's profileSimon's SpaceBlogLists | Help |
|
3/14/2007 [Simon's Space] To recruit a bossLife was like a box of chocolates. You never know what you're gonna get.(Forrest Gump) And this time, it's really special. It doesn't happen to everyone, in a manner of speaking, I'm recruiting my boss. Below is part of the mail from my CTO: Simon, I'd like to start looking for a technical director for the Beijing office. .... So here is what I'd like to have happen: 1. Candidates: The person should have the following abilities: 1. Technical experience: have created web sites using our technologies (i.e., Hibernate, Spring, Tapestry, etc.). They should have as broad a background on web technologies 2. Recent Experience : led a development team in building web sites based on this technology focused on consumer space 3. US experience: worked in the US and understands US corporate culture 4. Fluent in English : needs a good working knowledge of English. 5. Education: comes from a good schools with a BS and hopefully a MS in Computer Science 2. Position: The person will be the manager for all the developers in the Beijing office and will report directly to me. CTO Further more, my CTO mentioned the candidate should be from really good school. I didn't ask the criteria, but according to requirements 3. An IVY degree will be a strong plus. It's not easy to find such a candidate, so I will take some responsibilities for the time being. This will be another interesting experience. P.S. This is a translated version from my Chinese blog, but I can't help posting it here for it's too interesting. -- Posted By Simon Li to Simon's Space at 3/14/2007 06:16:00 PM 1/25/2007 [Simon's Space] I'm not kiddingThis morning, I asked my wife:"It's Wednesday, isn't it?" "No, it is Thursday. You hear that? IT, IS, THURSDAY." We looked at each other, and laughed. This is a little secret between us. Last Friday morning, my wife said to me:"Tomorrow is weekend, do you have any plan?" "But it's Thursday, let's discuss it tomorrow." I said. My wife smiled and said nothing. And that night, I looked into calender by chance and found it WAS Friday, actually I'd made a mistake! "Why didn't you correct me this morning?" I asked my wife. "I'd thought you were just kidding." "Oh my, have you ever remember me kidding on you?" But the result was, I had to go office last Saturday to stop a running software. I don't know why I always make such mistake these weeks, maybe a sign of I'm lost in my work. Anyway, the Spring Festival is coming! I'm not kidding. -- Posted By Simon Li to Simon's Space at 1/25/2007 12:39:00 PM 12/31/2006 [Simon's Space] Happy endingI noticed that in Dec I posted only 1 blog entry, and the title reads "I hate ...". Well, I'm not getting lazier, nor do I have any complaint for my life. Yes, I'm much busier than last year. But I enjoyed my job and learned a lot. The most important thing is, when I went home late at night, as I looked at the face of my sleeping angel, nothing bothered me at all. So, I just write to end this year with a happy ending, and everyone loves happy ending, isn't it? And wish you all a very happy new year! -- Posted By Simon Li to Simon's Space at 12/31/2006 07:14:00 PM 12/4/2006 [Simon's Space] I hate the Lunar CalenderI called my parents recently. I felt my mom was not happy. She refused to tell why until I asked it the second time. "Do you still remember what the date was yesterday?" Oh my, it's my father's birthday! I always remembered my parents birthday and called them. But one thing troubles me a little bit is they use Chinese lunar calenders. It changes every year for solar calendar. I can do nothing but keep saying sorry. What can I say else? Just because I don't have a lunar calender? In fact, I've set an alert on my cell phone. But either it didn't work, or I didn't noticed it. I'm sorry, father. I love you. Tags: calender family -- Posted By Simon Li to Simon's Space at 12/04/2006 06:17:00 PM 11/20/2006 [Simon's Space] Virtual hosting provider out of ChinaThis month, I helped a website to change its hosting service provider.
China is a fast growing market for virtual hosting, foreign hosting Sure there are risks to choose a foreign host provider. As the rumor tells, When choosing the host, price, hardware, security, service are most We selected 4 candidates and let the users poll on them: Although it's a small community, the site has a lot of users from all over I heard www.dreamhost.com is good but they give very poor result. www.hostgator.com allow its customer to store adult material, which might The website has been running on bluehost for about 20 days. The service is Tags: vhosting, virtural hosting, bluehost, ipower, dreamhost, hostgator 11/8/2006 [Simon's Space] Election dayVery interesting, it's Election Day in US, and here in Beijing, I saw a call for vote on the bulletin board under my condo. Unfortuantely, blogspot is totally blocked here. Blogspot is blocked some time ago, but I could logon blogger.com and post in blind at that time. Today, every blogger.com is blocked here. Well, At least I can still post by email. Tags: election -- Posted By Simon Li to Simon's Space at 11/08/2006 06:18:00 PM 10/28/2006 [Simon's Space] Blogspot is blocked again (here)Seems that Blogspot is blocked by GFW again. What a shame! There always are risks of HTTP error 500 ("Page Cannot be Displayed") when visiting server out of China main land. I reopened live space RSS, but I will still use Blogspot as my main blog host. I consider google GR (goverment relationship) as a failure. But I'm not sure what I'm expecting from this company. Tag: google blogspot -- Posted By Simon Li to Simon's Space at 10/28/2006 11:44:00 PM 10/21/2006 [Simon's Space] Browser compatiblityI've worked on some web projects in last centry. One big headache is the browser compatiblity. Netscape and IE are very different in many ways. To implement a cool look and ensure it won't be broken on both browsers is very difficult at that time. Now I'm working on a web project again. I find little has changed. Netscape has fade away, but I have to face IE, Firefox, Safari, and other browsers. For instance, it's easy to put a table on page. but our artist wants a solid border around each row, and some space betwen each rows. It's far more difficult than I had thought. And we want the table to have a fixed header and scrollable body. I found a good example on http://www.imaputz.com/cssStuff/bigFourVersion.html But here is a trick, if we don't declare the html as xhtml in DOCTYPE, it doesn't work for IE.I never believed a comment like &lg!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...> would affect the CSS behavior! The good news is I learned a lot of CSS tricks last week. -- Posted By Simon Li to Simon's Space at 10/21/2006 10:45:00 PM 9/22/2006 [Simon's Space] Live Space Backup ToolI decided to release a draft version of Live Space Tool. It can backup all you MS Live Space blogs. Please click here to the download page, and click download button. A Readme file is included. ======== License ======== Apache 2.0, included in the download. ======== How to run ======== Unzip and double click livebackup.bat. ======== Price ======== You don't need to pay for this, it's a draft, so it's free. But if you want me to do the backup for you, send me an email and pay me a little money. The price is the lower one between 2 dollar and the price of your breakfast yesterday. Yes, it's free for those who don't eat breakfast! In any case, your comments on this blog entry is appreciated. Tag: live space tool -- Posted by Simon Li to Simon's Space at 9/22/2006 11:04:00 AM [NOTICE]: My RSS feed will changed to FeedBurnerI'm always curious about who has subscribed to my blog, but Live Space only provides limited statistics. So I registered on FeedBurner. If you have subscribed to my blog by a RSS reader, please change my feed to: http://feeds.feedburner.com/simon-space The MS feed will be closed in one week. Sorry for the inconvenience. For my Chinese friends, I have a post on what's RSS feed and how to use it. Tag: RSS 9/20/2006 [Simon's Space] Sorry, but I'm not a spam makerSomething wired happened while I was backuping my posts to blogspot. I turned on email publishing on blogspot so when an email is received it will be automatically posted. But I found that after I had send a lot of email, the posts were not published directly, instead they were saved as draft. Even worse, I have to face the "robot challenging" (To input a string when publish, the string is randomly generated as a picture.). I feel blogspot set a threshold for spam blocking. If somebody post more than 100 (?) posts within 24 hours. The email publishing rule will be changed. So I won't share my tool now, because it can't set the correct post time, it may be rejected by blogspot, and it's not fully automated. If any coder interested in this tool, please check out the following reference. MetaWeblog API for MSN Spaces http://msdn.microsoft.com/live/gettingstarted/spacesstart/ Apache XML-RPC http://ws.apache.org/xmlrpc/ Jakarta Commons Email http://jakarta.apache.org/commons/ Using the Blogger Data API http://code.google.com/apis/gdata/blogger.html Using the Java Client Library http://code.google.com/apis/gdata/client-java.html Sorry, but I'm not a spam maker Tag: Google blogspot spam -- Posted by Simon Li to Simon's Space at 9/20/2006 10:53:00 AM 9/19/2006 [Simon's Space] Backup Live Space Blog to BlogspotIf you are a regular reader of my blog. You may have know I'm a coder that believe coding can both make a living and make my life easier. It happens again this month. I decided to publish my blog on blogspot from this month. I found I can simply post blog on blogspot and post a copy on Live Space via email publishing. But what about my old posts? Can I backup them to blogspot as well? That's also possible, Both Live Space and blogspot support MetaWeblog API and email publishing. So I need to write a tool to retrieve all my post from Live Space and post them to blogspot. The first question is program language, I want to use javascript so I can share this tool by a web page! But I didn't find an easy way to send email via javascript and I finally turned to java. C# is a good choice but I feel java runtime has a better availability than .Net runtime. The 2nd problem is get full entry list from Live Space. MS only provides the latest 20 blogs but fortunately, the blog id is very regular so I can try all possible ids. The 3rd problem is how to post on blogspot, I can use email publish or Google Data API. I tried both and chose email solution because the API solution need Google account info. I believe it's more friendly. The last problem is after the post is backup on blogspot, could it display the same create time as the original version on Live Space. I failed on this point. Seems that Google Blogger Data API has a bug here. So I append the timestamp on the beginning of each post. When Google fixed its bug, I can easily change them in batch. I don't bother to backup the comments. I will write another blog on this tool for more detail. BTW, Wish MS won't close the door to me for this blog. Tag: MS Live Space Google blogspot MetaWeblog -- Posted by Simon Li to Simon's Space at 9/19/2006 12:27:00 PM 9/11/2006 [Simon's Space] Crazy jobCall me a slow learner, but I never learn anything without trying it in some reallife project. That's why I'm very happy with my current job. It's crazy but below are what I've learned during the past 2 months: SVN: It's yet another source control tool for me after SourceSafe, ClearCase(UpperCase), and Peforce. I was curious about CVS and here SVN is! (it's a replacement of CVS.) Ant: Now I'm an advanced ant user that able to write custom tasks. Action Script and Flex: It's powerful for amazing GUI. I must confess I was shocked because I've taken years to learn Java AWT, Swing and SWT. JMeter and The Grinder: web load test has been a mystery to me for a long time. Python: I've tried to learn python for at least 3 times. But this time I can practice something more than "Hello World". Dojo: This is what I've been looking for. A browser transparent toolkit for web client. Seems that I'm not that slow, when it's still interesting to me. Tag: crazy -- Posted by Simon Li to Simon's Space at 9/11/2006 12:58:00 PM 9/5/2006 Notes for "MS Live Space hack"odie commented on 2006/9/4: what is handle="+O+" and how do you find what it is for other blogsand what is &item="+N+" and how do you find what it is for other blogs Here is some explanation to my last post. To delete an trackback in live space, we can use a template URL (in a single line): script:document.cookie="DeleteHandle=HANDLE_ID;path=/;domain=YOUR_DOMAIN;";window.navigate("http://YOUR_DOMAIN/DeleteBlogItem.aspx?handle=HANDLE_ID&item=trackback&delete=true&domain=live.com&ru=myspace"); Just replace HANDLE_ID and YOUR_DOMAIN in above line and copy it in address bar and press enter. In my case: HANDLE_ID = cns!512FA623748C31AB!527 YOUR_DOMAIN = thesimonspace.spaces.live.com Back to odie's question, "handle" is used as unique id in blog. Each blog entry, comments, or trackback have their own unique handle. And "item" is used as a type id for different blog objects, for a blog entry it's "entry", for a comment it's "comment", and for a trackback it's "trackback". handle ="+O+" and item="+N+" are evaluated when you click the delete icon. Actually, when you click on the delete icon, a javascript DeleteItem(item, handle) will be called. I only need to delete spam trackbacks so item is always "trackback", and I get the value for handle by view the source of the web page, search "onclick="DeleteItem('trackback'" and I will find the ids as the 2nd param. It's possible to make this automatic. For instance, write an application embeds IE browser component. so it can parse the web page and get all information. But in my case it doesn't worth the effort. Tag: Live Space hack javascript -- Posted by Simon Li to Simon's Space at 9/05/2006 10:47:00 AM 8/16/2006 MS Live Space hackThat's ironic, MS products are well-known for easy to use, but one thing I hate MS Live Space is it's very difficult to delete spams. I open trackback privilege for anyone, so here come the spams. I think MS do a good job on blocking spam. But I still got 15 spam trackbacks yesterday. In live space home page, MS only display the latest 5 trackbacks, I have to delete them one by one, and I have to confirm my deletion each time. MS Live Space is slow here in China, so it's a great challenge for my patience. My friends think I'm a patient man. Eh, I hope I were. But yesterday, I decided to do some hack. MS provides MSN Spaces MetaWeblog API (http://msdn.microsoft.com/live/gettingstarted/spacesstart/default.aspx) to edit blog by code. I've found it very powerful but unfortunately there is no API to delete trackback. I have to find another way. Let's back to source, it's easy to found each time I confirm deletion, the job is done by another URL. The URL is generated as: window.location.protocol+"//"+window.location.hostname+"/DeleteBlogItem.aspx?handle="+O+"&item="+N+"&delete=true&domain="+document.domain To be frank, I'm not a javascript expert. It took me some time to figure out the value of window.location.protocol, window.location.hostname etc. Guess how I did that? It's a silly way so I would just say that del.icio.us can be used as a variable viewer! Anyway, let's say my Live Space is thesimonspace.spaces.live.com and the trackback I want to delete is cns!512FA623748C31AB!527, the job is done by: http://thesimonspace.spaces.live.com/DeleteBlogItem.aspx?handle=cns!512FA623748C31AB!527&item=trackback&delete=true&domain=live.com&ru=myspace But it doesn't work! I review the javascript again and realized I need to set some information in cookie. Finally, the following code deleted trackback cns!512FA623748C31AB!527 successfully! document.cookie="DeleteHandle=cns!512FA623748C31AB!527;path=/;domain=thesimonspace.spaces.live.com;"; window.navigate("http://thesimonspace.spaces.live.com/DeleteBlogItem.aspx?handle=cns!512FA623748C31AB!527&item=trackback&delete=true&domain=live.com&ru=myspace"); I think FireFox don't support window.navigate(), but how could a FireFox lover loves MS Live Space?Anyone want to write a plugin to do it automatically? Tag: Live Space hack javascript -- Posted by Simon Li to Simon's Space at 8/16/2006 01:18:00 PM 8/11/2006 When Live Space not stable and Blogspot is backThe upgrade from MS Space to Live Space is a big step. We can see great ambition behind that. However, as far as now, it's not welcomed by most Chinese blogger because of the HUGE banner ads and new look. Personally I feel the new template is great, but the catch is, if you are unlucky and something is broken in your setting. (I guess mostly a missing css file.) The look is really really terrible. I read a lot of complain posts and some of them are considering switching BSP. Update: It works! My blogspot url is: http://simon-space.blogspot.com/
Please check THIS post on blogspot. 8/9/2006 Java SE 5 annotation: finally I found it useful!Java introduced a lot of new features in Java SE 5. I like the generic, autoboxing/unboxing, and almost all of them. But I never figured out how annotation could be useful.
Until very recently.
I want to write a code generator. In short, I have some existing classes, and I want the code generator to write wrapper for some of them and expose some of their methods. After I evaluated the complexity, I found I need to write a Java compiler by myself. That's too expensive.
Why should I reinvent the wheel? After some research, I found annotation was very useful for this case.
I'm not writing a guide here, we can find one on http://weblogs.java.net/blog/emcmanus/archive/2006/06/using_annotatio.html
Basically it includes several steps:
1. Define my annotation. 2. Annotate on desired class and method. 3. Write my own annotation processor factory (extends AnnotationProcessorFactory from Sun). 4. Run apt tool included in Java SE 5, passing in my annotation processor factory and scan my source folder. It's very convenient and powerful.
Even I don't write my annotation factory. I found the standard @Override and @Deprecated annotation are very useful. They can help eliminate typos and name confliction.
There is always something new and exciting, that's why I'm a happy coder.
Tag: java annotation apt 8/4/2006 Who is reading?Microsoft adCenter labs provide a free Demographics Prediction service:
Given a URL, it will return the gender and age prediction of the reader. I take my blog for test and here is the result:
Gender: Male-oriented, with the following confidence:
M:0.58 F:0.42 Age: 18~24 Oriented with following distribution Gender: Male-oriented, with the following confidence:
M:0.59 F:0.41 Age: 18~24 Oriented with following distribution: I'm happy with this result, my reader are mostly young people!
To verify this result, I take some more tests.
Gender: Male-oriented, with the following confidence:
M:0.56 F:0.44 Age: <18 Oriented with following distribution: URL: http://www.google.com/ Gender: Male-oriented, with the following confidence:
M:0.59 F:0.41 Age: 25~34 Oriented with following distribution It seems that the result is supported by 3rd part data.
But when I test a very hot Chinese blog, the result againsts my estimation.
Gender: Male-oriented, with the following confidence:
M:0.62 F:0.38 Age: 35~49 Oriented with following distribution The blogger, although accused by somebody as a liar. There are tons of young guys mad for him.
I don't believe it's old man oriented. So I also doubt the result for my blog.
Overall, MS provides a cool service, but there is still a lot of space for MS to improve.
Does Google provide similar service?
Tag: MS ad 8/1/2006 First decisionMy baby girl made her first big decision last night. She chose one first name for herself.
It's not easy to name a baby. With help from my friends and classical Chinese literature, I finally came up with several proposals. But it's really hard to make the final decision.
I think it's important to let my baby involved. So I wrote a simple java application. It will display all candidates quickly and repeatedly. I put her left foot on keyboard. My baby "think" a while and kicked. Alas! The name scrolling stopped and she picked her name by herself!
I hope she will be pride of this when she grows up.
Tag: baby code 7/20/2006 Out of blogI might slow down updating my English blog as I'm busy these days.
But I will try to update my Chinese blog as often.
Tag: oob |
|
|