存档

作者存档

在google定制主页里加gtalk插件

2007年3月15日 hufey 评论已被关闭

点这里安装
效果是这样地

分类: commenting 标签:

Locationbar²

2007年3月15日 hufey 评论已被关闭

Locationbar²
很不错的firefox extension,记得把这个选项打开

分类: commenting 标签:

greatfirewallofchina

2007年3月7日 hufey 评论已被关闭

分类: life 标签:

回来了

2007年2月27日 hufey 评论已被关闭

从西宁俩人换班开20小时约1900公里,终于回到北京
两周中两个私人邮箱有将近400封邮件没看,工作邮箱应该有不少于这个数字的邮件需要看,其中至少10%需要回复
bloglines里的未读feeds有将近600个
上豆瓣把西藏从“在路上”状态改为“去过”

分类: listing 标签:

放假了

2007年2月13日 hufey 评论已被关闭

赶在凌晨之前把最后一点工作做完
上传几十M的文件到公司的服务器
上豆瓣
把“我去”里的“西藏”“珠峰”从“想去”改为“在路上”

分类: listing 标签:

FW: Readers Write About Symbian, OS X and the iPhone

2007年2月9日 hufey 评论已被关闭


Responding to Origins: Why the iPhone is ARM, and isn’t Symbian, sources from Sweden and Finland offer a revealing look inside Symbian development and how the OS is regarded at Nokia, and what that means for development on the iPhone.
One developer writes, “In most regards, Symbian’s reputation as a modern, robust, stable and advanced OS for smartphones is not well deserved. Sure, Symbian works, it has a very long feature list, and it’s probably even the best smartphone OS available today. But it’s mostly because the competition is pathetic than anything else.
“I have a done several Symbian projects and have a thorough knowledge and low-level understanding of Symbian. And I just hate it. It’s a very bad and uninspiring OS even from a programmers point of view.”
Nokia’s POS/OS
Sources close to Nokia say that Symbian is secretly regarded inside the company–even among high level senior executives–as a “piece-of-shit-OS,” explaining that “Finnish people usually have a very coarse language.”
A Symbian developer explains, “Nokia is more or less stuck with Symbian since it doesn’t have the competence nor the time to make a new OS from the ground up. Its only alternative, in practice, is to go Linux, which it is of course experimenting with, but it’s still not an easy path to go.
The Three Symbians
“That’s one of the reasons why Nokia is investing so much in the S60 middleware used on top of Symbian. S60 is so large and complex today, that I would regard S60 an OS itself, with Symbian as the kernel. It gives Nokia more control to add and change things on its own.
“Sony Ericsson, as one of the other large Symbian owners and licensee, just bought UIQ in November last year to get control of its own flavor of Symbian. UIQ is quite similar to Nokia’s S60 and should also be regarded as its own OS with Symbian as the kernel.
“From one point of view, there are no ‘Symbian’ phones in the market, but rather three incompatible and diverging OSs: NTT DoCoMo’s Symbian MOAP for Asia, Nokia’s Symbian S60, and Sony Ericsson’s Symbian UIQ.
“To make it even worse from a third party developer’s point of view, Nokia and Symbian made the new S60 version 3 binary incompatible to previous versions of S60. So none of your old Symbian apps will work on any new phones (i.e. if you actually bought any :-) .
“And of course UIQ has never been source code nor binary compatible with S60. But still you get the impression from analysts and media that ‘Symbian’ is one stable OS.
Symbian Signed
“For S60 version 3, they have introduced a new security model where it’s necessary to sign all apps with VeriSign to even get them to run. Something that costs several hundreds of dollars per year, just for the certificates, and makes shareware and hobby programming almost impossible from now on.
“Some operators are requiring the phones to be locked for any apps not carrying a ‘Symbian Signed’ certificate. Which means, you have to pay for a certification process where you are checked by Symbian, why you developed the application and why you want to use certain capabilities on the phone, e.g. read and store user data, using the telephony APIs, or the WIFI capabilities etc.
“All in the name of security, but of course it will be very tough to make programs, independently, that use functionality that’s not in the interest of the operators, such as non-operator controlled Voice over IP.
“So much for independently third-party software development on Symbian compared to the ‘closed’ model used on iPhone. In practice the difference is not that big. Apple will, of course, allow close partners to develop apps like they do with iPod Games today.
Symbian Design Issues
“When it comes to the myth of Symbian being a modern and robust OS, I have several objections. Symbian is severely limited by design decisions made in the beginning of ‘90. The design decisions were maybe okay at that point in time, when the target was Psion’s EPOC and EPOC32-based Series 3 & 5 with extreme memory and resource constraints compared with today’s devices.
“I could make a very long list of the problems but I’ll just summarize a few key areas:
1.
•Crippled C++ support. Symbian is C++ based—at least on the surface. When EPOC32 was designed (about 1993-1994 I think), there were very few good C++ compiler with full support for the newest C++ features like exceptions. Exceptions is the main feature in C++ for correct and efficient error handling. The other alternative is to use error codes like most operating systems use in their C APIs.
Symbian chose to select neither technique. They made their own home-cooked version of exceptions called Leaves. With an exception in C++, any memory or other resources in allocated objects are deallocated automatically in the correct order (deterministic destruction by calling each object’s destructor). This makes it (relatively) easy to make correct programs in C++ for both small and large projects.
In Symbian when a error is signaled with a leave (‘throw an exception’) no objects are deallocated. They just leak, if you don’t manually record each object allocated to be cleaned up. This process is extremely tedious, error prone and boring. The result is that it’s very hard and time consuming to make correct programs in Symbian, on the verge to be impossible in many cases.
C++ is a great language because of the advanced features, like exception handling with automatic cleanup (search for RAII, Resource Allocation Is Initialization), the standard C++ library (formerly called the STL library with lots and lots of support code for handling of data in containers-like lists and maps and tree structures, strings, algorithms, support for template code and last but not the least—all the standard patterns, practices and idioms all experienced C++ programmer are using on all design problems they are faced with.
If you remove the foundation for standard C++ development, it all falls together. Every design decision means the programmer has to think from the ground up to make a completely new architecture for the design because the normal way of thinking and the normal guarantees C++ and experience gives, doesn’t apply anymore. It really turns an experienced programmer into almost a beginner with lousy tools. It’s a nightmare for both programmer and development managers.
2.
•Confusing and limited string handling. There is no real support for a proper string handling. To use strings on Symbian you have to use a home-cooked and strange system of ‘descriptors.’ Every new programmer to Symbian spends the first weeks struggling just to understand how (and why) this system works.
The reason was apparently to save a few bytes on each string. But of course, today, that’s not even close to being relevant. Maybe a small point but, it’s yet another point that makes Symbian hard to use, hard to understand and hard to port programs to/from other platforms.
3.
•Limited support for multi-threading. An important technique used on all other platforms but is not used on Symbian. They do have limited support for threads, but it’s strongly recommended not to use threads since it ‘takes to much resources.’ That was hardly even a relevant argument in 1993 but it meant that Symbian uses ‘active objects’ instead of threads in almost all applications.
Active objects are just a very complicated variant of cooperative multitasking, where each object runs in sequence (unnaturally split into small subtasks) and are not able to preempt each other. It takes a lot of code to make this work, just to give the result of a system that is not very responsive, hard to program and port to/from other platforms. All for the aim of saving some CPU cycles in 1993.
4.
•Bad development environment. The development environment and SDK for Symbian (S60) is very strange and difficult to use. It can take several days to just make a functional installation of the SDK and development environment. My first installation a few years ago took over a week to setup and was very fragile. On the Nokia forums there are postings with recommendations on how to make a correct setup. If you do just one step in the wrong order it fucks up. You cannot use the latest version of Visual Studio but need to install Visual Studio 2003 to make it work. But everyone that does Windows programming have VS 2005 installed. Nokia also provides several commercial alternatives, ‘Carbide,’ that is based on Eclipse etc. But it is generally a very bad situation if you compare with Xcode/iPhone or other platforms.
Analysts Wrong on Symbian
“I realize the arguments above are quite technical, but they are nonetheless real and makes it very slow, error prone, and generally difficult to make applications on Symbian.
“This is just one of the reasons I believe the analysts and media are very wrong about the outlook for iPhone. Most media in Sweden (and elsewhere) have reported that the iPhone is nothing new at all. It’s mainly a nice package with limited/bad hardware and nothing particularly new on the software side.
“However, if you look at the speed and effort needed to make new applications on iPhone compared with other platforms it’s two completely different worlds. You have all the Cocoa frameworks that make it possible to create applications on a level not even available for most desktops today.”
“Most people don’t realize the huge difference in development speed (time to market), ability to make more advanced and useful applications with a greater user experience (read: Core Animation and other Leopard frameworks), code quality and maintenance ability—when you have full support for modern high-level languages and frameworks.
Existing Mobile Platforms vs OS X
“Of course, this is the same for most embedded programming projects: set-top boxes, mobile phones, stereo equipment, industrial equipment. But with phones, you are beginning to think about them as a small desktop computer and everyone tries to put in real applications in them.
“With Symbian (as well as WinCE, Palm OS, and I suppose also the Linux phones because they probably have a very limited number of Linux frameworks installed because of memory restrictions etc) you have a big problem to deliver on the marketing hype and media expectations because of all limitations. This is one of the reasons all mobile services are failing to badly—it’s simply to hard and complicated to deliver the market expectations with today’s platforms.
Five Years Ahead
“OS X and iPhone don’t have these limitations. It’s one of the reasons I believe Steve Jobs is more or less right in iPhone being 5 years ahead of the competition–of course there is slight marketing hype as well, but not that much an exaggeration as the media and analysts think. Making high quality, advanced applications with a superior user experience will be fast and easy with OS X. On other platforms it’s like competing with a small Fiat car in a Formula 1 race against Ferrari and Williams.
“OS X is probably only programmable in Objective C instead of C++, because of the Cocoa frameworks being used. But Objective-C is famous for being easy to program and you can freely mix Objective C and C++ in the same program. In Leopard Apple also introduces Objective-C 2.0 with garbage collection and lots of new stuff that makes it even better than C++ in some respects. And the Cocoa frameworks are world-class on desktop computer—they were even famous in the NeXTSTEP versions.
“So when you put all this together, Apple has sharp weapons and shining armor to compete with lesser equipped competitors for future smartphone apps and wireless services. Most analysts and media don’t have enough technical competence and knowledge to realize this.”

分类: saving 标签:

(收藏)汽车网络的分类及发展趋向

2007年1月23日 hufey 评论已被关闭
分类: saving 标签:

重新看好Symbian

2007年1月18日 hufey 评论已被关闭

Embedded OS的战争最后往往是API的战争。
Windows CE有广大的Windows 程序作基础, Linux有Posix API。只有Symbian(以前)是与众不同的。虽然Symbian是smartphone OS的老大,也养活了一堆小公司,但是对于一个第三方公司想为不同的系统写程序去维护几套API是痛不欲生的。Porting现有的程序也很困难。
直到今天看到Symbian的这个举措,我才相信Symbian的未来是可持续发展的。
——————————————————–
Symbian OS to gain POSIX libraries
Jan. 17, 2007
Symbian plans to beta test POSIX libraries for its Symbian OS this quarter. The PIPS (PIPS is POSIX on Symbian) libraries provide C and C++ APIs (application programming interfaces) in standard “libc,” “libm,” “lipthread,” and “libdl” libraries, with the aim of helping programmers migrate existing middleware and applications to Symbian.
The PIPS libraries were announced Jan. 16 in Beijing, where Symbian opened an office.
Symbian says PIPS will significantly reduce the work of migrating existing desktop and server components to Symbian OS. Typical applications might include web servers and file sharing software, the company says. For instance, mobile phone marketshare leader Nokia, which licenses Symbian for its smartphones, ported Apache to Symbian last summer.
Symbian executive VP Jorgen Behrens stated, “It is now realistic and desirable to migrate desktop and server code onto mobile devices.”
Symbian claims that there are about 100 million Symbian-based smartphones in the market, making it the top smartphone OS. However, Symbian’s fortunes may be falling, according to research reports last year from ARCchart, ABI, and The Diffusion Group.
Availability
A beta version of PIPS will be available for Symbian OS v9.1 (and above) as a downloadable .SIS file from the Symbian Developer Network by the end of Q1 2007, Symbian says.

分类: commenting 标签:

颠三倒四

2007年1月15日 hufey 评论已被关闭

周五象往常一样半夜两点多才睡
周六象往常一样睡到中午
周六晚决定早睡,12点就上了床
周日还是象往常一样接近中午才起床
本来打算去中关村买DVI线,结果中途去岳父大人家吃了吨中饭(在我是早饭)
结果又睡了几个小时,中关村也去不成了
周日晚上怎么也睡不着了
想了想在自己的desktop pc上装了ubuntu
以前一直是fedora,
另外的笔记本上是gentoo,
gentoo太脆弱,fedora升级不如ubuntu方便
fedora占了将近50G的硬盘实在是浪费
ubuntu确实是不错,方便,人性化
装上自己常用的软件后已经凌晨3点了
有了点困意
周一早上像往常一样9点起床
刮胡子手一快把嘴唇割破了,血流不止,找到创可贴剪下一小条贴在嘴唇上
已经10点了
出门打车,走了数百米,想起来手机忘带,只好付了起步费再回家上楼拿手机
再打车到公司

分类: listing 标签:

ZT: Linux: Accessing Files With O_DIRECT

2007年1月12日 hufey 评论已被关闭

Linux: Accessing Files With O_DIRECT
By Jeremy on Linux news
A thread on the lkml began with a query about using O_DIRECT when opening a file. An early white paper written by Andrea Arcangeli [interview] to describe the O_DIRECT patch before it was merged into the 2.4 kernel explains, “with O_DIRECT the kernel will do DMA directly from/to the physical memory pointed [to] by the userspace buffer passed as [a] parameter to the read/write syscalls. So there will be no CPU and memory bandwidth spent in the copies between userspace memory and kernel cache, and there will be no CPU time spent in kernel in the management of the cache (like cache lookups, per-page locks etc..).” Linux creator Linus Torvalds was quick to reply that despite all the claims there is no good reason for mounting files with O_DIRECT, suggesting that interfaces like madvise() and posix_fadvise() should be used instead, “there really is no valid reason for EVER using O_DIRECT. You need a buffer whatever IO you do, and it might as well be the page cache. There are better ways to control the page cache than play games and think that a page cache isn’t necessary.”
Linus went on to explain, “the only reason O_DIRECT exists is because database people are too used to it, because other OS’s haven’t had enough taste to tell them to do it right, so they’ve historically hacked their OS to get out of the way. As a result, our madvise and/or posix_fadvise interfaces may not be all that strong, because people sadly don’t use them that much. It’s a sad example of a totally broken interface (O_DIRECT) resulting in better interfaces not getting used, and then not getting as much development effort put into them.” To further underscore his point, he humorously added:

“The whole notion of “direct IO” is totally brain damaged. Just say no.
This is your brain: O
This is your brain on O_DIRECT: .
Any questions?

分类: saving 标签: