Mac 打呼噜
December 11, 2008 3:21 pm UTC | In Tech | 6 Comments | hide昨天晚上睡不着觉转眼珠玩儿,发现 Mac 那个呼噜灯在视野里是间断的,不连成一条线,于是想到那个呼噜灯应该是脉冲发光的,通过不断调节占空比来调节(视)亮度模拟呼噜。其实早就应该想到的,对于 LED 发光来说,调节占空比显然比调节亮度本身要容易得多,而视觉暂留效果不用白不用。今天到实验室拿仪器测了一下果然如此,脉冲频率 153 Hz 左右。查了一下,苹果有一个相关的专利 US 6658577。

Tags: apple
乔帮主八卦
November 21, 2008 2:53 pm UTC | In Misc | 2 Comments | hideMagicGlaive 前几天在 Facebook 上 share 了 Steve Jobs’ 2005 Stanford Commencement Address。这个 video 很古老了,不过再看还是蛮有意思的,摘要一下乔帮主的讲话:(好吧,我承认这篇 Blog 其实是为了 link MagicGlaive 而写的……)
… …
If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later. Again, you can’t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. Because believing that the dots will connect down the road will give you the confidence to follow your heart, even when it leads you off the well-worn path, and that would make all the difference.
… …
I had been rejected, but I was still in love. And so I decided to start over. I didn’t see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.
… …
I’m pretty sure none of this would have happened if I hadn’t been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life is going to hit you in the head with a brick. Don’t lose faith. I’m convinced that the only thing that kept me going was that I loved what I did. You’ve got to find what you love. And that is as true for work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven’t found it yet, keep looking, and don’t settle. As with all matters of the heart, you’ll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking. Don’t settle.
… …
No one wants to die. Even people who want to go to heaven don’t want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life’s change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.
Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.
… …
(Ref: Stanford Report,根据乔帮主现场讲话略有修改)
========== 我是可爱的分隔线 ==========
附:一个听来的八卦。iPhone 第一代出品之前,位于 Cupertino 的整个研发中心大楼是全封闭的,哪怕乔帮主也不可以把 iPhone 带到苹果另外的楼。话说有一天乔帮主去那个楼玩 iPhone prototype,有个工程师上去对乔帮主说,这个 iPhone 设计有问题,耳机插孔不是 flushed 的(背景知识:第一代 iPhone 耳机插孔较深,一般的耳机插头插不到底,而苹果自己的耳机可以)。乔帮主瞪了一眼那个工程师,怒道,但是我们苹果有世界上最好的耳机,不是吗??
这件事情说明了几个问题:1、乔帮主是一个排他性的完美主义者;2、乔帮主很和气,可以随便搭话,有问必答,不会石沉大海;3、不要随便和乔帮主搭话……
杂记
October 28, 2008 3:10 pm UTC | In Life, Study | 7 Comments | hide前段时间 Windland 问我:“你最近是不是出啥事了?博客都不写了。”我晕啊,我一向来是执行“有事写点,没事不用写”的政策;如果确实有事可写,那么再苦再累也要写!不过,既然 Windland 认为不写博客是不正常的,那么我今天就来粗制滥造一篇。
1. 关于能源
大神 delphij 说,他去过的机房有用 LED 照明的,走进去就像宇宙飞船一样。右图是我用 LED 照明用电脑的情景,看起来似乎还不错。
LED 的好处是,省电,耐用。关于省电这一条,将我最近听到和实测的有关内容罗列一下:
- 电器用遥控器关掉之后还会使用一部分电力,由于待机时间的比例很大,据估计,待机状态使用的电力大概占到电器总用电量的 75%。现在推行 ENERGY STAR,这个数字应该没有这么高,我估计应该在 50% 以下,但是这仍旧是一个不小的数字。
- 变压器空载(比如手机充完电拔掉但是充电器还插在插座上)的能耗很低,至少我实测过的七八个都是如此。我估计变压器空载耗电大概占一般家庭用电量的千分之一以下,所以大可不必麻烦去拔变压器。
- Apple 虽然在某些地方看起来似乎很不环保,但是在给 Macbook 省电这件事上,他们还是做的不错的。
- 美国 36% 的能源消耗 / 65% 的电力消耗是在 “Buildings” 这块(照明、空调等)。
- 半年里太阳输送给地球的能量,比地球上所有不可再生能源的能量总和还多(包括未开采的)。
- 太阳给地球输送的能量中大概有千分之一被植物光合作用利用并转化成化学能(biomass)。
- 光合作用能量转换效率大概是 5%,而现代太阳能电池板差不多可以到 20% 以上。
- 植物被动物吃掉后转化成动物体内化学能的效率差不多也是百分之几,也就是说,草食动物利用太阳能的效率是千分之几,食物链上越高,利用太阳能的效率越低,(由于能量守恒)这就意味着有更多的热能被生物排放从而加剧全球变暖。素食主义者因此声称,吃肉是不环保的……(其实算一下数字就知道,这个影响微乎其微。而大量发展畜牧业,牛羊放屁排放温室效应气体导致全球变暖倒是有一定的道理。)
2. 关于“这是一个 feature”
“这是一个 feature”,这出自客服对待软件错误的一种常用回答:“It’s not a bug; it’s a feature.”。大神 delphij 非常善用这个句型,比如:
atppp:节能灯泡亮起来有一个过程。
delphij:这实际上是一个 feature,晚上开不至于一下子很刺眼。delphij:绿卡和公民的区别是绿卡没有政治权利,不能投票也不能参加陪审团。
delphij:(停顿)这实际上是一个 feature。atppp:中国食品质量真可怕。
delphij:这实际上是一个 feature,我们下一代抗毒能力强,和美国打化学战必胜。
仔细想想,任何“Every coin has two sides.”的转折都可以用“这是一个 feature”来代替。比如我们实验室的对话:
C:网断了!
atppp:This is a feature,我们可以专心做实验了。S:仪器坏了!
atppp:This is a feature,我们可以休息了。
Convert video to iPod format
August 7, 2008 8:21 pm UTC | In Tech | 1 Comment | hideBasic command:
ffmpeg -i input.avi -f mp4 -vcodec mpeg4 -b 1000kb \ -acodec aac -ab 192kb [-ac 2] output.mp4
“-ac 2” may not work if the input file is in mkv format with 5.1 aac audio (if you don’t convert 5.1 to 2.0, playing the file crashes your iPod/iPhone). Here’s a possible way to convert:
- Extract aac audio from the mkv file:
ffmpeg -i input.mkv -vn -acodec copy audio.aac
- Downmix 5.1 to 2.0:
faad -d audio.aac -o audio-2ch.wav
- Merge and convert to iPod format:
ffmpeg -i input.mkv -i audio-2ch.wav -map 0.0:0 -map 1.0:1 -f mp4 \ -vcodec mpeg4 -s 470x320 -b 1000kb -acodec aac -ab 192kb output.mp4
- The output of the last command gives a little more info of what I am doing here:
Input #0, matroska, from 'input.mkv': Duration: 01:24:42.5, start: 0.000000, bitrate: N/A Stream #0.0: Video: h264, yuv420p, 704x480, 24.39 fps(r) Stream #0.1: Audio: aac, 48000 Hz, 5:1 Input #1, wav, from 'audio-2ch.wav': Duration: 01:24:42.5, start: 0.000000, bitrate: 1536 kb/s Stream #1.0: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s Output #0, mp4, to 'output.mp4': Stream #0.0: Video: mpeg4, yuv420p, 470x320, q=2-31, 1000 kb/s, 24.39 fps(c) Stream #0.1: Audio: aac, 48000 Hz, stereo, 192 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #1.0 -> #0.1
Video conversion can certainly be way fancier than what I am doing here, and faad is obviously not the best way to downmix audio from 5.1 to 2.0. You can also find quite a few iPod converters but personally I like command line. Anyway, happy converting! (ffmpeg ref)
[Also note that on MacOS, you may have to change "-acodec aac" to "-acodec libfaac".]
某人用苹果电脑…
November 12, 2007 1:08 am UTC | In Life | 7 Comments | hide某人用 Mac 好几个月了,前几天需要重启动系统,死活找不到重启动的地方,电话我才得知需要按屏幕左上角的小苹果。这件事情说明了两个问题:
- Mac 系统很好很强大,电脑盲使用几个月都从来没有需要重启动过。
- Mac 的 usability 是不是还存在问题,特别是对于极笨的使用者……
I Love Apple
October 16, 2007 12:00 am UTC | In Misc | 5 Comments | hide什么叫 Usability,就是有两套音频系统的 Mac 电脑上切换喇叭只要按一个快捷键即可。什么叫 Us不ability,就是 XP 里面换音频设备还要停止播放音频再重来过。
什么叫 Usability,就是新 Mac 首次开机在很开始就询问需要接入的 WiFi 网及其密码。什么叫 Us不ability,就是新 HP 开机输了一大堆注册信息突然蹦出一个 STOP 的提示框说无线网有密码,注册信息发不出去,而且貌似切换不出去没地方输入密码……
什么叫 Usability,就是 iPod 包装盒在开口的地方不大不小的写了一个 enjoy,看到了不禁会心一笑。什么叫 Us不ability,就是 Dell 寄过来的笔记本箱子居然连个拎的地方都没有,害我抱着个方头方脑的大怪物在学校里面走被人笑话……
唉,苹果公司的设计理念,想偷是学不像的啊……
This weblog is licensed under a Creative Commons License.
Powered by WordPress. Theme based on Pool by Borja Fernandez.








