The Sweet Spot
On software, engineering leadership, and anything shiny.


Oftentimes in Verilog code, we build testbenches (test fixtures). A common thing to do is to instantiate a module and plug in wires of the same names.

Now a common hack is to copy and paste the module declaration line (the “prototype,” if you will). The prototype looks like this:

module Foo( bar,
</br> baz,
</br> …
</br> );

The HDL synthesizer can correctly wire inputs, regardless of instantiated order, by surrounding the names of the local wires with the input names as declared in the prototype in a format such as:

Foo foo_instance ( .bar(bar),
</br> .baz(baz),
</br> …
</br> );

So to do so is a rather painful matter of adding a period before the input name, copy and pasting the input name and pasting it after the name, bracketed by parentheses.

But what do you do if your module has thirty inputs? Our previous solution was to surrender our wrists to inevitable Repetitive Stress Injuries. Today, I realized that I should have used a freakin’ elementary regular expression.

Search: (.*),
</br>Replace: .$1($1),

Wah-lah! I’m kicking myself for not thinking of this earlier. And it has taken me 10 minutes to tell you how I saved forty-five seconds and my poor wrists. Anything to avoid more work (shh, don’t tell Alex) :)

Currently Listening
Kid A
By Radiohead
see related


Sensations 02: Those Who Dreamed

Liveblogging from: the Stacks

I have friends who run a cost-benefit analysis on every decision. And they’re always measuring things up against Time. Freakin, Endless, Time. I think I’m one of them, too. May it never be so.

I remember why I’ve never liked the stacks: these chairs are pretty much the least ergonomic chairs ever built, on par with medieval torture devices.

I remember why I’ve missed the stacks: being here makes me feel smarter. And how time somehow seems to stands still, but that might be the artificial lighting and the fact I’m fifty feet underground.

There was a study done a long time ago where a woman volunteered to live underground for like a month. And they measured her sleep cycles, and it went wack by about a week (can anybody name this study or correct me if I’m wrong?). I always wondered what kind of music you’d listen to if you were underground for that long. And if she ever figured out how to work a Rubik’s cube. Being underground for that long seems like a good way to determine cube optimization strategies.

Oh, essay. The closer I get to the end, the harder it gets to write. 9 pages down, three to go and I’ll either finish in one hour or in six.

Edit: it was six.

Taiwan Roundup

So I’m writing the first part of my International Media paper on the structures of the media systems in Taiwan. Just wanted to share with you what I’ve been coming across in my research so far:

Here’s a aggregate blog of many of the main English blogs on/in Taiwan.

Interestingly enough, many of the high-visibility English political blogs have heavy DPP rhetoric where many of my 1.5-gen Taiwanese friends at school and back home lean blue. It’ll be interesting to discover where native Taiwanese political pundits/bloggers lean.

A photo blogger posts photos from the perspective of a foreigner in Taiwan.

Portnoy Zheng, a Taiwanese graduate student keeps a blog (this is his lesser-updated English blog) on Taiwanese media with a particular Web emphasis.

I am also following another interesting conversation regarding Taiwanese bloggers–the complaint that the English and Taiwanese blog communities are largely independent of one another. Michael Turton describes the need to unify the two realms:

For me the major challenge is going to be bringing the Chinese-language and English language blogospheres together, because they have much to say to one another, and because Taiwanese bloggers need to get more recognition.

Scott Sommers largely agrees in his post, but more interesting is the meta section of his entry where there is a lively debate on who needs to take the first step: English- or Chinese-speaking bloggers. One commenter proposes considering the hegemonic properties of Western values:

In my opinion, if English readers can answer these two questions, then maybe they might understand.
1. Why is it one can not export American-styled democracy anywhere, no matter how good the intention?
2. Why is it certain missionaries, churches, or faiths are more accepted then others; even when their messages are the same?

Portnoy Zheng (previously mentioned), believes the problem is less about hegemony than it is about language:

It is nothing about English hegemony; it is about how to communicate
effectively,how to break the language divide, and how to enhance our
understanding of our neighbors.

Interestingly enough, there is a movement towards an Open Source Translation Project which is calling for volunteers to translate Chinese blogs (not limited to TW) to English and vice versa. The implications here could be enormous, not just for Taiwanese blogs but for the Chinese web audience as well.

Finally, Tony Chung is a composer, songwriter and pop singer in Taiwan. He also happens to be from San Jose. He also happens to run a tech blog and a Web 2.0 podcast show, recently covered by tech blogger, Robert Scoble. Not to mention he also was ASB president my sophomore year in high school. Go check him out and support him. Best to you, Tony (er, Tone?).

AND I need to get back to work (yunno, actually writing).

eXtreme Editing

I realized today (with a grin) that I wasn’t editing my essay as much as I was refactoring it.