Archive for Web

Velocity 2011中国行随记

这次到北京参加Velocity中国大会,感觉很不错。记录下自己的感想和体会。

参加任何会议,对我来说最有意义的是和参会者的互动与交流:业界的新发展,某些技术的实战经验,网上和网下的资源,好书好网站的推荐等。很多灵感都是在谈话中通过思维火花的碰撞而产生。还有一部分干货是谈话者有意无意中透露出来。这就需要听者有开放的视野和耳朵,懂得聆听,不打断别人的话语(特别是在关键时刻),记下这些小金块:有用的工具啦,一些参数的设定啦,实战中碰到的问题和解决办案啦,提高工效的技巧啦,很有用的网站和论坛的帖子啦,等等。记下这些东西后,注意不要把它们遗忘,要跟踪和研究。因为趁热打铁,凭着这股子热乎劲儿才能把那转变成对自己和公司有用的东西,才能跳到更高的层次。有时参加大会后能收到一个这样的小金块就够本甚至有盈余。所以作为管理人员,在给下属买书和参加会议上,不要吝啬猴精。说到这里,如果你是个管理人员,你有没有拨出资金给员工买书?如果有,恭喜你,因为我感觉这是一个非常值得自豪的东西!那就再进一步,你有没有在搞好财务的同时让报销的流程更容易?你有没有在保证工效的同时给下属提供工作和生活上的方便?

在这同时,也要去回馈。懂得回馈,懂得提携和帮助同仁和后来人,才能获得人脉资源,并且自己也可以在其中得到灵感和启发。因为解释和分享一些东西的时候,也是自己学习的时候。当你把东西用口头语言表述出来给同仁的时候,这本身就是一个非常有效的思索过程。你能把事儿说圆吗?如果不能,为什么?是不是自己理解得还不够透彻?在这过程中,别人甚至你自己会突然意识到为什么没从这样或那样的层面和角度来研究和尝试这个东西呢?同仁和后进的提问也能产生很好的启发。另外,这也是我坚信的一点,让自己利益最大化的最好办法是不自私,不信你在生活和工作中试试看。自以为高明,自以为是牛人,自以为别人和大多数人比你低下,玩儿清高装逼的那一套,这种态度,只会带来坏处,不会有丝毫的好处。关于回馈和帮助提携他人,我写过一个纪念我的同仁Ken Henderson的文章,引用了他的一个aging champion syndrome(我觉得可以翻译成过气冠军症)的短文。他讲得非常透彻和精辟!英语爱好者不妨注意下,Ken写的东西很值得学习。

以上都是个人层面上的东西。提高到公司和企业的角度,也是同样的道理。现代的互联网公司需要一个开放和互动的平台。而作为公司来参与这个平台的构建并保持和发展其活力对公司本身大有益处:公司本身的人气、内部员工的士气、和在业界的口碑,并且在这个平台里也会有高质量的人力资源。

从互动、交流、开放、分享的角度来看这次Velocity会议,我感觉组织者做得非常成功。淘宝和淘宝的员工们和O’Reilly投入资金、时间、和人力资源来办Velocity是一个非常有意义且值得称道的事情。这种开放和互动的平台需要各种大小公司的参与,进而形成一个良性循环,这样我们就可以把事情做大、做活。水涨船高,众人拾柴火焰高,不就是这个道理吗?现在淘宝是这个活动领头人,但希望百度、腾讯、网易、新浪、华为、谷歌中国、雅虎中国、和微软中国等其它公司一起加入到这个行列来。

我在会上做了个基本的关于InnoDB状态的分享,并且也参加了几个演讲。英文主题演讲时,有中文的同声翻译。我看到有估计不到1/3的人用同声翻译的耳机。很遗憾,我没来得及试听一下。我倒是找到机会试听了下中译英的同声翻译,感觉效果并不太好。我很想听听大家对英译中的评价。

Steve Souders讲的一些工具和方法比较有意思。章文嵩的绿色计算也是亮点。我听了淘宝叔度和清无的基于nginx的Tengine的介绍。这个与我是个亮点,因为我感觉互联网服务器是一个不管大小公司都要有的东西,而Apache和lighthttpd好像都有点过气,其笨重和抗压的表现都不尽人意。而nginx和在其基础上提高的Tengine确实让我眼前一亮。我加入了Tengine的邮件列表,感到其人气,特别是在中文圈里,在慢慢上升,这是一个可喜的现象,我对其非常看好。

顺便加一句,淘宝的开源软件可以在这里找到。很多东西看起来都比较有意思,像这个tsar。淘宝的博客也很棒,我订阅了淘宝核心系统团队博客淘宝共享数据平台博客。另外很多淘宝员工的个人博客也很棒,特别是如果你也搞MySQL的话。像苏普的这个Perl脚本就很管用,而江枫的Flashcache介绍和讨论也会很有启发。stronghearted的博客褚霸的博客也非常好。

星期二晚上有机会和叔度、冯景辉长谈,海阔天空,保罗万象,聊得很开心。靠,叔度和景辉很牛逼幽默。从叔度那里,我不得不由衷地得出如下结论:山东人不简单啊,好得很!凌晨左右,多谢景辉,我们到创新工厂参观。我喜欢和欣赏李开复干出来的事和其影响力,能到创新工厂看看很不错。

另外豆瓣刘洪清的MapReduce分享也很有料。在会场外也和出版界及网上IT社区的一些编辑做了交流,很有意思。和苏普和江枫有了更深的关于MySQL的交流。

感谢苏普、淘穆公、江枫、和吴炳锡的邀请和盛情款待。星期天晚上刚坐了14个小时的飞机和堵了两个多小时的出租,疲惫不堪,没胃口享受云南真菌火锅的美味。但和Virident的Leon一起吃了非常美味的东北菜。谢谢Leon!和jackbillow还有hellodba的交流,听他们的环境和应用也很有意思。还认识了很多其他人,就不多说了,名字可是记不太清,因为大家有微薄的帐号,淘宝的还有武侠花名。

——

Velocity里谈到的东西大都和开源软件有关。我以前和国内的刘忠武一起做过关于数据库测试的开源软件,AnyDbTest。这个软件绝大部分是忠武老弟用C#写成。忠武是个很强悍的程序猿,C#,Java,Oracle,SQL Server,Python,Linux Shell脚本等都拿得起,放得下,想法周到、细致、全面,生猛异常!

——

我12月4日星期天下午到,北京城正被大雾和空气污染所覆盖。到大会期间,天气已经好转,一片晴朗。星期三那天,从旅馆11楼往下看,看到附近学校里有体育课在进行。当时看到年轻的学生们能在日光和蓝天下在学校的操场上跑步,感觉真好,那前两天的坏天气和疲乏所带来的阴郁感也一扫而光。周一中午一个人吃了海底捞,很不错。海底捞的服务态度那么好,希望也能给其他商家店面的客服方面带来正面连锁效应。周三晚上会议结束后有很短的时间,我顺着远大路往西走,到四环后右转往北走了走,看到遛狗的,摆地摊的,然后到路边的一个小馆要了个蒜苔炒肉盖饭和一小碟芹菜花生米,很不错。这么吃着,走着,看行人和小饭馆的顾客,读着我同胞的表情、动作和喜怒哀乐,聆听他/她们的标准和不太标准的普通话,猜测和想像他/她们的生活状况,很好。

吃北京咸菜也是亮点,那腌制的藕片和花生米,嚼起来脆生生的,特过瘾。我在王府井那个天主教堂的前面小广场上看到在晚上,人们在一起跳国标和恰恰恰,也很不错。星期天早上我逛到了东四清真寺,但那个地方谢绝参观,有点遗憾。在那天飞回美国之前,买了几本书回来看。

第一次坐高铁,感觉很不错,最高时速差不多310公路左右。以前北京到枣庄十来个小时的车程,现在两小时稍微多一点就搞定。虽然铁路还有问题,但总起来讲很牛啊!

Comments (2)

Getting rid of “Welcome to Internet Explorer 8″ screen

The lack of Vimperator function in Chrome, which exists in Firefox, prevents me from totally switching to it. Because I work in different environments in terms of different clients and operating systems, I have to use Internet Explorer sometimes.

And I found the “Welcome to Internet Explorer 8″ screen upon IE starting, if you have not followed Microsoft command to configure IE the first time you started, terribly irratitating. It has message like this in the window: “Internet Explorer 8 helps you use the Internet even faster than before. New features like search suggestions retrieve blah blah…”. Would you please respect the end user’s intelligence, get out of the way and leave him/her alone in peace, quite, and solitude? Sure, one can follow the wizard and set things up, but it feels like being violated. The ability to customize things is good, but not under your dictation.

Behold, there is a way! Come and follow my way, dear reader, for it leads to enlightenment and eternal happiness:

1. Start -> Run
2. gpedit.msc
3. Navigate to User Configuration -> Administrative Template -> Windows Components -> Internet Explorer -> Prevent performance of First Run Customize settings
4. Double click, then set it as Disabled.

Comments (2)

AWS Management Console is nice

If you want to play with Amazon cloud computing stuff, I think using AWS Management Console web interface is the best, easiest, and most intuitive approach, based on my experience so far.

My usage with Amazon Web Services has been only with EC2 up to this point. Prior to AWS Management Console, I had to set up Java, EC2 API tools, various path and environmental variables, certificates, keys, etc., etc.. It is a fairly convoluted process.

AWS Management Console is much easier, except for downloading PuTTY and PuTTYgen on Windows and tsclient on Linux, and a private key pair, everything else is handled inside the browser. Here are a few things I learned:

  • Once you are in, create a Key Pair. The web interface will prompt you to save it. Do so, because you will need it to start instances and, depending on what type of instances you start (Windows or Linux), you will need it for shell access (Linux) or for getting Windows administrator password for remote desktop access;
  • If you are working with Windows machine running Linux EC2 instances, get PuTTY and PuTTYgen. Follow instructions here to generate key that can be used by PuTTY. It worked for me. I got my private key pair file on Linux first, and then moved to Windows. It even worked with the ^M characters inside the file.
  • For security groups, I found the ones proposed by Amazon works fine. For instance, for a typical LAMP server, it proposes a webserver group where it opens up SSH port 22, MySQL port 3306, and HTTP port 80, which is normally what you want.

Good luck!

Comments (2)

WordPress 2.8, a step back

Update below
Reports in blogsphere about some WordPress blogs being hacked got me alarmed. So I decided to upgrade mine from whatever version it was at (2.3, perhaps, whatever the current version was a year ago) to 2.8, the latest, but certainly not the greatest.

The upgrade process wasn’t hard, just a bit tedious. After posting a new entry and it not showing up in Google Reader two days after the fact, I felt something was not right.

So I clicked the feed link directly, http://www.haidongji.com/feed, and got the error below:

Warning: include_once(/home/xxx/public_html/wp-includes/pomo/mo.php) [function.include-once]: failed to open stream: No such file or directory in /home/xxx/public_html/wp-settings.php on line 307

Warning: include_once() [function.include]: Failed opening ‘/home/xxx/public_html/wp-includes/pomo/mo.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/xxx/public_html/wp-settings.php on line 307

Fatal error: Class ‘Translations’ not found in /home/xxx/public_html/wp-includes/l10n.php on line 407

The strange thing is that I did have mo.php in the right place, under wp-include. So I went to Feedburner’s site, now part of Google, and it didn’t have anything useful there. My sixth sense told me there might be something fishy with the whole Google feed integration business, so I decided to restore the .htaccess file to the state prior to Feedburner integration, and see what happens. Lo, it worked! That was last night.

Today I saw the comment page link was broken. After clicking the recent comments link on the right side, there was a 404 page not found error. Once again, I invoked my psychic debugging skills and decided to revert .htaccess to the one generated by Feedburner a few years back, the one I ditched the previous night. Behold, it worked!

Now some additional gripe regarding WordPress 2.8: why do we need to make the dashboard admin page more complicated than necessary? The 2.8 dashboard looks busy and noisy, and it made it considerably harder to go to places I wanted to go. After finally locating the settings page I am after, I need to scroll all the way to the bottom to view it! Keep it simple, please.

Update: It turned out I claimed success too early. After I reverted to .htaccess from Feedburner, I noticed the feed was not refreshed with the latest entry. So I went back to the original .htaccess file, where comment page was broken. I googled around and realized the permalinks was the culprit. So I did chmod 666 .htaccess, went to my WordPress admin page, saved permalinks changes, then chmod 644 .htaccess, and now I am back in business.

Comments

WordPress sidebar sinking to the bottom issue in IE fixed

As I mentioned here, I’ve noticed recently that when viewing my site, a WordPress blogging page, in Internet Explorer (I tried IE 6), the sidebar actually appears at the bottom of the page. That was really annoying, because the main reason I redesigned the sidebar was to help people navigate: it has category, archive, blog roll, etc., and some are in drop-down menu to help a casual visitor moving around. Now if it is at the bottom, obviously it is not going to help much for browsing in IE.

So I set out to fix this issue. After around one hour of search tonight, I found the solution to my problem. So if you have a WordPress blog site and your sidebar appears at the bottom page in IE, instead of on the left or right side of the main entry, this may help you out:

1. Locate your css file and open it in a text editor. Find the one located under your WordPress theme folder. For example, I use the modified almost-spring theme. I went to that folder and looked for a file with css extension. Mine is called style.css;

2. Search for “html #content”. Make sure it has a line like this:

overflow: hidden;

within the curly brackets;

3. Search for “#sidebar”. Make sure it has a line like this:

overflow: hidden;

within the curly brackets;

4. It is really easy to debug. After you make the change, save the css file, and then refresh the page in IE to see if it helps or not. If not, take out the change you just put in. Good luck! And please let me know if there are still usability issues on this site, thanks!

Here is the relevant code snippet in my style sheet after the modification:

* html #content {
        overflow: hidden;
        /* So IE won't break things */
}
#sidebar {
        overflow: hidden;
        float: left;
        padding: 1.8em 20px 0 20px;
        width: 230px;
        font-size: 0.9em;
        voice-family: "\"}\"";
        voice-family: inherit;
        width: 190px;
}

Comments (1)

Consolidating Twitter feeds with Yahoo Pipes

I have been suffering from web addiction for a long time. So when Twitter first came out, I figured that would be the last thing I need. Plus, to really take advantage of Twitter, you’ve got to have a relatively fancy phone with a data plan. A decent phone costs anywhere between 150 and 400 dollars, and service plan runs around 80 dollars a month (about 1000 dollars a year). That’s a lot of money.

Off tangent (跑题): Regarding phones, I had high hopes for T-Mobile’s GPhone. But a few friends who have GPhones were a little disappointed. iPhone needs a competitor but it looks GPhone is not there yet. Now that I am running my own business, I am thinking about upgrading to a new phone with a service plan, so you Android people need to work harder to impress me.

Anyway, to get the latest happenings of people I am interested in, I go to Twitter every 2 months or so and just read through the messages. It is not very efficient.

I’ve heard of Yahoo Pipes before but never played with it. But after reading an O’Reilly book which recommended Yahoo Pipes, I thought: wouldn’t it be nice to consolidate the tweets I am interested in and deliver them in my Google Reader? So that’s what I did.

It is really simple to build a pipe. If you’ve worked with Sql Server DTS, it will look very familiar to you. The whole process is surprisingly simple yet powerful. You can even apply regular expression as filters.

Here is the key takeaway: when defining source, pick Fetch Site Feed. For instance, I am interested in 冯大辉‘s tweets, and I just put http://twitter.com/fenng as the address in Pipe. The beauty is that you can add more feeds and consolidate them in one pipe. I then published the pipe, subscribed it in my Google Reader. Because the tweet message is short, I can just eyeball through the subject line, save information if it is any interesting, and then click “Mark all as Read” button.

Comments (2)

Liked WP-SpamFree so far

During my to WordPress 2.6.2, I decided to use the default spam plug-in, Akismet.

After a few days of usage, there were still a few trackbacks slipped through, creating additional emails and work for me. So I wasn’t too satisfied and searched for an alternative spam plug-in.

I decided to try WP-SpamFree. So far it has been working great. In fact, I will remove Akismet now and let WP-SpamFree handles all my spamming needs.

Let me know if you have problems commenting, by writing an email at haidong.ji gmail.

Comments

Played with Google Chrome

Google Chrome Beta is available for download today. I played with it. I am not impressed at the moment and will not convert from Firefox. I may give it another whirl in a few months.

The strength of Firefox, in my view, is its many available extensions, which practically spoil and pamper me to the point that I do not feel comfortable in other browsers like IE, Safari, Opera, etc.. For example, I have Ad Block Plus. As a result, I hardly see any flashy, scrolling, popping advertisements on any sites, which is almost like a different reality as opposed to IE, Google Chrome, and Safari’s rendering. (Yes, I am aware that it is possible to block those ads in other browsers.)

Another extension that I won’t give up is Vimperator, which uses VI commands for browsing. Closing a tab is a simple press of the letter d. Searching and opening URL can be done with O, o, T, t commands and tab completion, so Google Chrome’s OmniBox didn’t impress me. I even have a little suspicion that Vimperator inspired the OmniBox idea.

This is not to say that Firefox is perfect, mind you. It still crashes once in a while for me, especially when attempting to connect to intranet sites while not on corporate network. But given all its advantages, I feel I can live with it.

It looks Google Chrome has API for extensions and customizations. So Chrome, give me some nice plug-ins, or at least some samples like Ad Block Plus and Vimperator. Then we can talk.

Comments (6)

Migrating from one RDBMS to another

Here is some of my thoughts on migrating MySQL to Sql Server. It came out of an email discussion. I’d love to hear your thoughts on migrating to a different database platform, not just MySQL to Sql Server.

I actually thought about writing a white paper or even a course on migrating from MySQL to Sql Server, but never got the time to do it. Sometimes a project doing similar things can serve as a launchpad for this endeavour, but that never came along, at least not yet. I am very interested in database interoperability field though. I’ve done MySQL and Oracle admin in the past and have published some MySQL and Oracle stuff in blogs. I have much better technical skills on Sql Server than any other RDBMS platforms, primarily because I’ve worked on it longer.

Here are some of my thoughts. I think most of it applies equally on migration from Oracle, DB2, Sybase, Postgresql, etc., to Sql Server, or the other way around. It might be slightly easier to migrate from Sybase to Sql Server, considering their common root.

1. It is not easy to migrate existing app, unless the app is a simple one. Even for that, there are enough quirks that can throw people off and cause enough frustration to derail the whole projects. I’ve seen that happening twice, having engaged in moving 2 apps from Sql Server to Oracle;

2. Therefore, the best way to migrating to a new database RDBMS, in my opinion, is to start from a new initiative, probably not big initially. When you start things from a clean slate, you don’t have the historical garbage to worry about. Furthermore, you will give the team enough time to learn the new platform, and prepare the team for future migration, if you choose to do so;

3. Having open-minded team members is crucial to a migration project’s success. Too often people have emotional attachments to the platform they are familiar with, possibly out of job security concerns and lack of general curiosity toward new things.

I generally adopt a platform agnostic attitude, and don’t get religious and too carried away on the platform I work on. Having said that, I think these are points that marketing people can spin for persuasion purposes:

1. MySQL has too many storage platforms: MyISAM, InnoDB, MaxDb, and the newly introduced Maria. This can be viewed as a plus, as it provides choice. The downside of it is that it causes confusion for end users;

2. MySQL’s support for relational model is fairly recent. For example, for a long time, MySQL didn’t support Stored Procedures, Views, Triggers, Foreign Keys, etc. One could argue that MySQL is not mature in this area since it is new for them, but I think it is difficult to find evidence to substantiate that claim. Also, running the risk of offending some people, I think the importance of relational model got overblown a bit;

3. Sql Server offers the CLR integration. This can be a great selling point;

4. Sql Server offers tight integration with Visual Studio, Windows network, and all other things Microsoft. This is a huge advantage.

5. Too many people find *nix environment intimidating. Although MySQL works on Windows, but the perception in the marketplace is MySQL works better on *nix.

As far as migrating MySQL to Sql Server in a hosting web environment, my honest opinion is Sql Server will be fighting an uphill battle, because MySQL excels in this arena, especially for small and medium-sized, or departmental organizations, with the proliferation of such LAMP app like blogs, wikies, discussion boards, etc. I believe Microsoft’s weapon of choice in this arena should be SharePoint. Given Microsoft’s clout, it is certainly a battle worth fighting.

Comments (5)

Internet connection problem when Symantec anti-virus software is not running

I noticed there were a lot of bloated Symantec anti-virus junk installed on a workstation I work with. So I disabled most of them in Windows services.

The next day I came back, I couldn’t connect to the web with my Firefox anymore, but could connect via Internet Explorer. In addition, connecting to remote Sql Server database servers was not successful either.

The thing wasted me at least one hour, and disrupted me from getting into the flow of things much of the day. Finally I figured out that Symantec AntiVirus service needs to be started, and all was happy.

In other news, things are really busy for us. My better half will finish her Ph.D in Life Science (microbiology) in a few weeks, and is looking for a job. If you have any leads, I’d appreciate it if you could pass that along to me.

Comments (3)

« Previous entries

Page optimized by WP Minify WordPress Plugin