Docstrings versus comments in my code
One of the great not quite arguments in the Python world is betweendocstrings and comments, specifically which one you should use inyour code. My answer is that I use both, although more comments thandocstrings, but I use them for different things.
My comments are primarily written as internal documentation; how afunction operates, why it operates that way, the high level logic andstructure of the code, and so on. Docstrings, when I write them, areexternal documentation, covering things like how to use
Tradeoffs in where you store volume management metadata
One of the divisions between different logical volume systems is whereand how they store the metadata about what logical volumes exist andwhat they're made up of. Roughly speaking there are two choices:'in-band', where you store the metadata in a reserved area of some ofthe disk space you're managing, and 'out-of-band', where you store itoutside. In-band storage is used by Linux software RAID and LVM; out ofband storage is used by Solaris
Mathematics
As we move on from the kindergarten to elementary school through graduate school, we learn the mathematics. We were taught that "one plus two equals three" and then "minus one plus one balances out each other." Simple
The stages of Bittorrent encryption
Recently it's been mentioned in the news that versions of BitTorrent have gotten more encryption. Because thissort of thing interests me (partly due to my long standing interest in BitTorrent), I'vedecided to summarize the various current sorts of BitTorrent encryption.
BitTorrent encryption efforts have been designed to hide BitTorrent, sothey have acted to make it less recognizable .
Traffic shapers started out recognizing (and choking) the distinctclient to client communication, so people obfuscated and encryptedit. A unique session key is arranged
小玩意
維持很久
在中午之前醒來,便想:嗯,今日可以寫 幾 篇文。
在下午醒來,便想:嗯,這個下午我要什麼都不做,找一間小cafe,選臨街的大玻璃窗位子坐著,閒閒地翻著某雜文,點
奇人
An idea for a browser anti-phish feature
Here's a somewhat naive idea for a browser anti-phish feature thatmight actually work, at least until phish spammers started gettingreally creative in various ways, sparked by yesterday's entry .
First, let's start with the twin observations that the real goal ofanti-phish efforts is to avoid you entering your bank login and passwordanywhere except on your bank's site, and that people notice the presenceof things much more easily than they notice the absence of things.
(Hence, among