The “kamakesef” formula revealed: Calculate the wedding present’s amount

Introduction An Israeli website, “Kama Kesef” (כמה כסף in Hebrew, meaning “how much money”) is a neat web calculator telling how much to give as a money present in weddings and other events. When I realized that I’m far from being the only one using it to decide what sum to write down on the [...]

Using Perl to map FPGA pins from a board design to UCF pin constraints

One of the things I try to avoid as an FPGA engineer, is to manually configure the pin constraints (in the UCF file) in order to tell the tools which FPGA pin is connected to what. Not only is this extremely boring, but I also think that getting it done right (at the first go) [...]

Encrypted disk, partition or USB stick on Linux: A short do-it-yourself cookbook

Before anything: Recent distros come with packaged utilities for encrypting a disk, partition, USB stick or whatever block device. This little cookbook is for those who are not that lucky, or prefer to do things with their bare hands. If you’re not familiar with using loop devices, I suggest playing a bit with them before [...]

Why MySQL’s (SQL) DATETIME can and should be avoided

I warmly recommend reading the comments at the bottom of this page, many of which go against my point. While I still stand behind every word I said, in particular for web applications (which I believe is the vast majority of MySQL use), the comments below make some valid points, and single out cases where [...]

Xilinx’ XST synthesizer bug: ROM generation using case

Take a close look on the Verilog code below. This is a plainly-written synchronous ROM. Do you see anything wrong with it? (Spoiler: There is nothing wrong with it. Not that I know of) module coeffs   (    clk, en,    addr, data    );    input clk, en;    input [9:0] addr;    [...]

BLOB, TEXT, and case sensitivity: MySQL won’t treat them the same

When I first discovered that there is both BLOB and TEXT in databases, I was puzzled. They occupy the same amount of disk space, and the database doesn’t alter the data itself anyhow. Why two? Of course, I followed the stream, and went for TEXT and VARCHAR for everything, since I don’t store binary data [...]