Posts

Showing posts from January, 2007

Separate user for each webapp's MySQL database

The following commands will create a separate user for each MySQL database. > GRANT ALL PRIVILEGES ON PureExample.* TO 'pureuser'@'localhost' IDENTIFIED BY 'purepassword' WITH GRANT OPTION; > FLUSH PRIVILEGES; This is good practice when writing web applications, so that each web application has its own database user.

PDF bookmarks with LaTeX

After the mail fiasco was taken care of, I decided to pursue one of the things I've been wondering about: how to make PDF files have bookmarks (those links on the side pane that let you jump to well-defined sections of the document). For my setup, all I had to do was add this in my document: \usepackage[pdftex,bookmarks=true]{hyperref} Since I use Ubuntu, I had to install the tetex-extras package, which contains hyperref.sty for running pdflatex.

Thunderbird's "too many connections" message and Courier IMAP

When we use Mozilla Thunderbird at my workplace for our IMAP mail, Thunderbird often tells us that we have too many connections. It makes going through my folders impossible. This article explains that it's because Courier IMAP (which is used by Plesk) limits the number of connections from a single IP address to something like 4. Since we're all behind a firewall, we're all considered to be one user, as far as the server is concerned. I just had to change the values of MAXDAEMONS and MAXPERIP in /etc/courier-imap/imapd to allow more connections. Mozilla Thunderbird caches something like 5 connections by default, so even one user will put the IP past the limit. While I was figuring my way around this problem, I set up another server to copy my mail over. It's an Ubuntu machine and I just used the distribution's Courier IMAP, but since I've been using UW-IMAP all these years, the configuration process for getting a system user up and running was completely for...

Iteration produced the Constitution

The other day, I was in a meeting with a potential customer. I explained that when I'm faced with the daunting task of having to build something complicated, I take what's called an iterative approach. Taking an iterative approach starts with an early phase of exploring the problem by creating a quick, throw-away prototype that works. It gives a sense of what's possible and what's not, and quickly pokes holes in any weak spots in the overall idea. Sometimes, I think I'm crazy for taking this approach, but it works wonders for me. It helps that people like the folks at 37signals and Fred Brooks have written explanations of the methodology more thoroughly and eloquently than I could possibly write, but I was doubly reassured during my reading lately when I read about how the United States Constitution came about. In particular, the odd setup of our legislative branch is due to an iterative approach the Founding Fathers took at the Constitutional Convention in 1787. ...

A cheap and nutritious lunch

I remember when I first tried ugali during my trip to Kenya last May. It didn't taste like it had much nutritional value, but it made me full very quickly. It's been a slow month at the company, so we've been saving some money on food. I have stopped going out to lunch, and instead I go home to my apartment and cook myself some pasta. I treat myself to parmesan cheese on top, but no meat. The trouble with this is, it has been tough to get full, even after a lot of pasta. Today I was impatient and ate two bowls of cereal while my pasta was cooking. I ended up having room for only one bowl of pasta, and I was stuffed. Normally, I'd eat four bowls of pasta and still be a little hungry. I guess I accidentally stumbled upon a solution to staying full. I'm writing this down for my own reference: for cheap eats, have two bowls of cereal and a bowl of pasta.

Helping the rich world keep its livelihood

This week's Economist cover story, " Rich man, poor man ", about globalisation's winners and losers, offers three categories of solutions to help out those who lose out. Education in rich countries must equip people with general skills that make them more mobile in the workforce. Detach health care and pensions from employment, so people who move jobs don't have to worry about much else. Beef up assistance for those who lose their jobs, in the form of generous training and policies to help them find new work. These all sound good, but as the editorial acknowledges, these will take years to implement, and it won't be easy. I've also got my own reasons to be skeptical about the effectiveness of these general measures. People who are part of the educational system in rich countries will see these "general skills" as irrelevant because they want something that's very close to practical. It's difficult to learn something if you're not real...