Sun 19 August, 2007

2a. The assignment of something such as an event or name, to a time that precedes it, as in If you tell the cops, you’re a dead man.
2b. The use of a descriptive word in anticipation of the act or circumstances that would make it applicable, as dry in They drained the lake dry.
3. The anticipation and answering of an objection or argument before one’s opponent has put it forward.
add to del.icio.us. look up in del.icio.us.
add to furl
JRuby语言内部报道:ActiveRecord-JDBC版本0.5支持H2
- JRuby语言的软件包ActiveRecord-JDBC是Rails框架ActiveRecord进入Java语言世界重要的工具,也各种数据库在JRuby语言中使用Rails框架ActiveRecord的渠道。
- 代码库链接:请点击这里。
add to del.icio.us. look up in del.icio.us.
add to furl
Sat 18 August, 2007

add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
“ I’m like ‘OK Mom. We did this last week.’ ”
Tay Zonday
add to del.icio.us. look up in del.icio.us.
add to furl
New Release of FlexMock
FlexMock 0.6.4 Release
Just wanted to drop a quick note that a new version of FlexMock is now available.
There are two nice enhancements and a minor bug fix in this version.
The first enhancement is for mocking ActiveRecord objects. The folks at EdgeCase use a mockmodel() method for the RSpec mock that returns a mock that has some common ActiveRecord methods mocked (stubbed) with some reasonable values. This make is a bit more convenient when mocking Rails models. FlexMock now supports this natively, just sayflexmock(:model, YourRailsModel) to create a mock object
that mimics a YourRailsModel object.
The second enhancement is in regard to the What Should flexmock(real_obj) Return? question I blogged about last May. I asked the question: What should flexmock(real_obj) return, the real object or the mock object? Someone had suggested returning the real object when flexmock() is given a block. There was some positive response to that, so that was included in the FlexMock release.
But after several months of using it, I found it difficult to remember which version of flexmock() returned what. At one point I found myself caling flexmock() with an empty block, just to get the real object back. That was madness.
So starting with release 0.6.4, flexmock will always return the real
object. This is the best of both worlds, but it comes with a small
price. Real objects partially mocked by FlexMode will now be enhanced
with some extra methods, just enough methods so that addition mock
behavior can be added to it. For example, should_receive
is added to the partially mocked real object. This pollutes the
method namespace for an object, but the result is much simplier for
the programmer to use. If you really want to avoid method namespace
pollution, there is a :safe mode offered. Read the docs for all the
gory details.
By The Way, If You Grabbed Version 0.6.3 …
If you are one of the handful of people that downloaded verion 0.6.3 yesterday, then go ahead and grab 0.6.4. The only difference is in the API for mocking ActiveRecord models. After using it for a bit, I realized that the API could be improved, hence version 0.6.4. Sorry about that.
add to del.icio.us. look up in del.icio.us.
add to furl
Looking for a good way to browse the Rails API documentation? Alex Gorbatchev has recently created Noobkit, a documentation browser for Rails, Ruby core, and over 20 other useful libraries. It also supports searching, comments (with your OpenID), and bookmarks.
add to del.icio.us. look up in del.icio.us.
add to furlFri 17 August, 2007

add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
Splitting a float into its parts
4.55.divmod(1) # => [4, 0.55]
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
I've been a happy customer of DirecTV for about six years now. Even though my DirecTV Tivo knock-off DVR went completely pear-shaped on us and we had to replace it, I'm still a happy customer.
The phone rang last night, and the caller-id just said "800 Number". I answered and was greeted by a recording of a chipper woman saying, "Hello! This is Diane calling from DirecTV. This is not a sales call. If you are responsible for making decisions about your DirecTV account, please press 1." I figured it was a follow-up to my service call that had resulted in replacing my DVR, so I pressed 1. I don't remember the exact wording of what came next, but here's a paraphrase
You are currently on our "Do Not Call" list. From time to time, we would like to contact you with "special offers" from DirecTV, but since you are on our "Do Not Call" list, we can't call you. Would you like to be removed from our "Do Not Call" list so we can call you about these offers? If you would like to be removed from our "Do Not Call" list, press 1, now.I just hung up.
Do you believe that? They called to tell us that they can't call us, and would we like to let them call us sometime? I don't think so.
After I hung up, it occurred to me that I probably didn't hear all of the recording. It probably ended like this
... If you would like to be removed from our "Do Not Call" list, press 1, now.
...pause...
...pause...
...pause...
...pause...
or you can just hang up to be removed from our "Do Not Call" list. If you really want to stay on our "Do Not Call" list, you must press 6-5-1-2-6-3-4-5-#-#-# now.
add to del.icio.us. look up in del.icio.us.
add to furl
plentyoffish.com has gotten some attention of late because of how well it scales.
It’s written in ASP.net. Neat.
The highscalability.com article has a number of interesting observations. Here’s one that stood out for me:
The development process is: come up with an idea. Throw it up within 24 hours. It kind of half works. See what user response is by looking at what they actually do on the site. Do messages per user increase? Do session times increase? If people don’t like it then take it down.
add to del.icio.us. look up in del.icio.us.
add to furlThu 16 August, 2007

The day that Elvis died was like a mercy killing
America breathed a sigh of relief
We knew all about the drugs and the Vegas shows
And there wasn’t much of anything that looked like grief
And I guess he should’ve done like James Dean did
‘Stead of putting on weight and sinking down, down, down
It’s my 20th birthday today.
Sometimes I wish I was smarter than I am
With 20 years, Gauß already had shown it’s possible to construct a regular Heptadecagon, Ramanujan could calculate the Euler-Mascheroni constant in his head to 15 decimal places and Galois came up with the theory named after him—he’d die soon after.
I haven’t even published a single paper. (I’m working on it, but I only realized this a week ago and couldn’t get anything done in between. I’m sorry.)
And now it’s too late to crash
Too late to burn
Too late to die young
I’m admittedly still on my first apartment, first car and in the first city. Probably soon in the second apartment, second car and second city—if that is easy, shall I perform induction on life?
Can you name the last good film Marlon Brando made
While trying to keep his kid from going to jail
And the old people in the street are telling you
Don’t become like me, but every day you creep a little bit closer
Geez, soon I’m thirty.
And now it’s too late to crash
Too late to burn
Too late to die—young
NP: Dan Bern—Past Belief
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
- Emergency kits via Bruce Schneier's newsletter
Disaster planning for families
add to del.icio.us. look up in del.icio.us.
add to furl
The first release candidate for Prototype 1.6.0 is now available for download. This version features a rewrite of the event system, including support for DOM-based custom events and the DOMContentLoaded event, true class inheritance and superclass method references, and improvements to the DOM, Ajax, and function APIs. Please give it a spin in your apps and let us know if you run into trouble.
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
技术信息:最好性能和最强有力的数据库H2
- H2数据库首页
http://www.h2database.com/html/frame.html - 说明:
H2是一款新的Java数据库。使用简便、功能最强和性能极好。H2主要开发者是Thomas Mueller先生,也是Hypersonic SQL的主要开发者。 - 主要功能:SQL命令;Transaction;Clustering;Views;Subqueries;Encrypted Database;Triggers和Stroed Procedure等

add to del.icio.us. look up in del.icio.us.
add to furlWed 15 August, 2007

add to del.icio.us. look up in del.icio.us.
add to furl
Tip For the iPhone team
You know when you are against my ear so you should also know when you are in my pocket. Don’t ask to be unlocked if you know you’re not in my pocket.
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
It’s that time of the year again: time for another Rails coding competition. In the spirit of the previous Rails Day contests, Rails Rumble challenges teams of up to four to create the best application possible in just 48 hours. This year’s competition is a little bit differently this time around, so checkout the rules. Judging is now performed by the community, allowing anyone to signup and choose their favorites. Also, your app will be provided a VPS to host the application through the end of October. How cool is that?
If you want to compete, you need to organize quickly, the contest runs on September 8th and 9th.
add to del.icio.us. look up in del.icio.us.
add to furl
“ Opinion’s but a fool, that makes us scan
The outward habit by the inward man. ”
Pericles by William Shakespeare
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furlTue 14 August, 2007

I went to see Neko Case last night at The Tabernacle in Atlanta. She sounded great, vocally, but I was reminded again of the reasons why I hate going to shows at the Tabernacle.
- It's in downtown Atlanta.
- They took a beautiful, old church and desecrated it.
- The acoustics suck. Not just "suck," but "completely, totally, royally suck."
- It's hot as hell inside.
- The smoking lounge is in the basement, directly below the main performance hall. Guess where all that disgusting smoke goes. Remember, smoke rises.
- The sound engineers believe all the attendees are deaf, and thus turn all the soundboard knobs to 11.
- The acoustics suck. Mightily. (Yes, I know this is on the list twice.)
I said that Neko sounded good, but I need to clarify that. I could tell that the notes were correct as she sang, but had I not known the words to her songs, I would have no clue what she was saying. This goes back to the acoustics sucking, and all the soundboard knobs being turned to 11. And when Neko was talking, I have no idea what she was saying. She and Kelly Hogan made some comment about Chik-Fil-A and Kelly said something about Neko's "wicked axe" but that was all I could make out. The sound was loud and overlapping (that's the best word I can think of to describe it) and it was nearly impossible, once you added in crowd noise, to understand what she was saying.
I really don't like going to shows there.
add to del.icio.us. look up in del.icio.us.
add to furl
How can you not want to use a tool that includes this in the description:
“Ships with tests that actually pass.”
Vlad’s billed as a replacement for Capistrano, but without being a “quagmire, a rat’s nest, a labyrinthine mass of broken dreams.”
Brought to you by the clearly over-caffeinated Seattle Ruby Brigade
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furlMon 13 August, 2007

add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
Watched NY77 last night and it ruled. Really well done.
Props to the film makers. If you missed it, it looks like it will be on again this coming Tuesday evening.
You can see some clips here
Also a big shout out to Patty Heffley ; the show included Super-8 film she shot of Richard Hell, the Ramones, and Talking Heads back in the day. Wicked stuff. (For the curious, there’s some not-so-famous CBGB stuff here. Good times. )
The show reminded me of another good NYC documentary, The Freshest Kids , which covers the birth of the B-boy and hip-hop. (And if you like that, you’ll likely want to see Scratch as well.)
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furlSun 12 August, 2007

ThoughtWorks是个外企,所以,必然要大量的使用外语,而外语偏偏是我的弱项。当然,我没有不堪到一点英语不懂的份上。我的英语对付日常的读写没有什么问题,主要就是在听说上。我就是那种传统英语教导出来的哑巴英语,要不是之前和两个朋友曾经专门学过一段时间,我的英语恐怕到现在还是完全张不开嘴的水平,也就不可能能通过TW的面试。现在在北京的办公室里有不少来自其他办公室的同事,所以,不得不与他们进行交流。平时,有时还会有电话会议,原本听力就不那么好的我,再加电话里有些杂音,经常不知道对方在说什么。不过,自我感觉,这几个月下来英语还是有提高的,但为了如果想更好的与外国同事交流,英语还要进一步提高,这样的话,才可能讨论一些相对深入的话题。
前两天,和老大聊天,他提到了中国人同其他国家人的一个差别。我们比较含蓄,通常会在深思熟虑之后,才提出自己的问题,他们通常会把自己想到的都摆在台面上。所以,这就造成了一些沟通上的障碍,有些时候,我们本来已经发现了问题,但常常会考虑该不该把问题提出来,把问题提出来会带来什么样的影响。结果,往往是在思前想后的阶段,就耽误了一些事。当然,完全展现自己的想法也并不一定就是好事,有一些明显错误的东西还是有些浪费大家时间。和一个在微软的同学聊天,他也提到,他们公司也是鼓励大家想法说出来。只有把想法说出来了,它才是存在的,否则,最后的结果可能就是消亡在自己的大脑中。
现在在做的其实是一个产品方向,这就需要人有更加全面的能力。因为做项目的时候,我们往往只要关注特定的平台(OS、数据库、浏览器……),但是做产品要兼顾的内容就要广泛得多,有不少问题只有在特定的平台上才会显现出来,比如MySQL的数据库表名在Ubuntu下需要区分大小写,而在Windows上则不区分。这就暴露出我在这个方面的不足,我做过开发的平台其实并不多,所以,有些时候,我经常需要找同事来帮忙,还好,大家通常是只要自己知道,就会不遗余力的帮助你。
现在我实际上是在一个分布式的团队中工作。说实话,我并不太喜欢这种工作方式,因为可能一个和你工作了很长时间的人,甚至都不知道长成什么模样。道理上没什么,但总不如直接在一起工作,那样的话,交流成本更低。我现在更容易理解为什么我们公司要让大家围坐在一起,这样,有话就说了,即便是一些无聊的话。再有,不熟悉的人总不如熟悉的人交流起来得自然,公司经常会有一些team building的活动,而且通常会鼓励不熟悉的人坐在一起,其目的就是为了大家增进了解,这样的话,在工作中就可以更好的进行沟通。而对于一个分布式团队来说,这一点就很难实现。
之前做项目的时候,大多数时间都是拿到一个比较明确的任务,然后进行开发。而现在有些时候,某些任务并不是那么明确,虽然大的方向一直在那。仅仅拿远景说事,是不能完成任务的。这样的时候,是需要一些主管能动性让那些大目标变成一个个具体可行的目标。由于适应了之前那种工作方式,我经常会在那里等待。这在无形中就是一种浪费,对公司来说,也是一种损失。
这样那样的问题,只能说明一点,对于我现在所从事的工作而言,我在某些方面还存在一些不足。发现不足是进步的基础,努力让自己成为一个更加合格的ThoughtWorker。
add to del.icio.us. look up in del.icio.us.
add to furl
Ruby和JRuby语言错误信息说明
- 调用Ruby语言和JRuby语言软件包出现的问题(RubyGems配置问题)
错误信息:
LoadError: no such file to load
解决办法:
* 在文件层面中自己增加一行下面的代码
* 在irb工具和jirb工具中,或者在使用命令行irb或者jirb中调入rubygems,命令如下;或者进入了irb工具以后输入上面的命令,再调用自己的Ruby语言程序。require ‘rubygems’
Ruby语言运行环境
JRuby语言运行环境irb -r rubygems
* 在运行环境基础上解决办法jirb -r rubygems
Ruby语言运行环境设置环境变量
JRuby语言运行环境设置环境变量SET RUBYOPT=rubygemsSETJRUBY_OPTS=-rubygems - 执行JRuby语言程序错误
错误信息:
输入行太长。
此时不应有 :gotCP
。
解决办法:
关闭终端重新启动终端就可以了,这个错误可能是JRuby语言运行环境的问题。
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl