Search


Meta

Creative


Support


Leesoft

Feed™

Recent Comments

Photos

Sep
30

Start To Learn Some Flex Stuff

Posted by » admin
61 hits

Today I am going to start to learn something about the flex. To be a programmer, a interesting thing is that no matter how old you are, you have to learn new things and update your knowledge. I am always try to do two things. One is to learn more basic knowledge of the programing, like to learn LISP. The other thing is to be more fashion, like to learn Ruby and Flex.

First I try to install the flex builder linux version on my ubuntu. But it is pity, which is the reason that I hate Adobe, that the flex builder linux version doesn’t work very well. But I really don’t want to use too much of M$, simply because I love freedom. I will write another post to say why I leave Microsoft.  So I have made a big decision. I have to install a virtualbox on my Ubuntu so that I can use the flex builder. OK ,I am not a NiuBi man. I still think a good IDE can help me with learning a new stuff. And after I really understand flex. I will try to use emacs to work on that.

I hate Adobe for not supporting Linux very well. But flex technology is really cool. I had once been writing Javascript for a long time.  But this time, the flex environment is really a heaven to a Javascript writer. I will keep on learning the flex and post everything I have got from that here.

Thanks for reading, I have to go to bed now:-)

Sep
26

秀秀我的桌面

Posted by » admin
56 hits

经过一段时间的改造,终于把我的Ubuntu改造成苹果的外观了,我是不是有点老土,呵呵。

screenshot.png

Sep
18

关于在Nautilus与输入法冲突的问题

Posted by » admin
48 hits

在Unbuntu使用scim输入法的时候,经常会出现在Nautilus中不能输入字符(包括不能给文件夹命名,不能在location中输入地址等),在网上也找到很多资料,不够都不能很好的解决。最终还是在一位高人的指点下才得知一二。其实很简单,在任意一个文件夹里面,点击文件,按F2进入重命名模式,然后鼠标点击右键,在输入法一栏里面选择scim input method做为输入法。就解决这个问题了,其实很简单。我的ubuntu用起来就更顺手了。

另外最近另外一台机器上装的ubuntu8.04,发现稳定性还是一个问题,所以暂时就打消了升级这台机器的想法。

Sep
9

开始学习Adobe的Flex

Posted by » admin
60 hits

因为工作方面需要,开始学习Adobe的Flex了。对于Adobe,着实不是很爽。一方面,确实Adobe提供了很多不错的工具,不过心理上,没有觉得Adobe是一家擅长软件开发工具和环境的公司。第二嘛,Adobe的开发工具价格果然不便宜,也没有提出一个社区版或者学习版功开发者下载研究。第三嘛,对于我这样平时基本上只使用linux的人来说,FlexBuilder居然没有好用稳定的Linux版本,现在正在安装Eclipse和下载FlexBuilder的Linux版本,等安装后再写写使用感受,希望能够给我一个感觉不一样的Adobe。

Sep
4

使用Rails分页插件时慎用 include语句

Posted by » admin
60 hits

先说点题外话,最近这两个星期过的还是蛮烦的,主要是工作中的一些状况,让未来变得更加不确定。导致有段时间没有更新这个网站了。其实Leesoft的目标是做成独立的技术站点,所以不应该受到太多站长个人情绪的影响。在此稍微检讨一下。另外,最近业内也算发生了一件大事,就是微软将番茄彻底摘下来了。故以后我坚持合法使用软件的目标要更加坚定了。不过说道合法使用,并不一定要花很多钱。这台dell我已经全部linux化了,用了这么长的时间,其实还是挺好用的。我以后要更加努力的使用开源自由的软件来替代windows了。

说到开发,最近遇到了一个性能上的问题,这是我的代码:

conditions=[”1″]
build_query(conditions,”and username like ?”,@username)
build_query(conditions,”and realname like ?”,@realname)
@users = User.paginate  :page => params[:page],
:per_page => 10,:include=>’resumes’,:order=>’users.updated_at desc’,:conditions=>conditions

使用了rails的分页插件,其中users表中有几万条记录。结果页面一开始执行就死在那里了,非要重启MySQL才能解决。为了找到问题的根源我故意将condit拼错,从而让页面显示出SQL文信息, 发现执行的是如下的样式的SQL文:

select * from users left outer join resumes on resumes.user_id=users.id limit 0,10

在PHPMYSQLADMIN中执行这段SQL文速度也非常慢,然而去掉left outer join的内容

select * from users limit 0,10

事实上resumes表和users表一样,都很大,所以左连接的时候要扫描整个resumes表,导致系统资源耗尽了T&^%^$$#
因此虽然分页插件能够改善查询的效果,但是我们一定要好好了解include参数所连接的表,如果join的表本身也很大的话,服务器压力就会很大。