« Archives in May, 2009

rrdtool and No font found

Recently we did an upgrade to CentOS 5.3 and rrdtool stopped working, specifically, rrdgraph. The reason is that there is no font installed in the system (not sure why, you can check it via “fc-list”). To fix this, do an “yum install xorg-x11-fonts-Type1” and make sure you see some fonts listed in “fc-list”. Also assume you already have fontconfig.

apf vs. newly assigned IP address

If you try to ping/traceroute and got this message, there are several places to look. First, disable the firewall and if it works again then you know it’s the firewall. In this case, APF. An call to “iptables -L -n” might be able to narrow down the root cause.

PING 173.x.x.x 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted

Edit conf.apf

Switch this off (from 1 to 0) and “service apf restart”.

# Block all ipv4 address space marked reserved for future use (unassigned),
# such networks have no business talking on the Internet. However they may at
# some point become live address space. The USE_RD option further in this file
# allows for dynamic updating of this list on every full restart of APF. Refer
# to the 'internals/reserved.networks' file for listing of address space.
BLK_RESNET="0"

Will WolframAlpha make the lazy lazier?

WolframAlpha is launching right now. I just tried a few and see the cheat sheet. The interface is nice and the results were presented beautifully and logically. I’ll definitely use it for its designed purposes and Yahoo for the rest of search queries.

If this type of computational search engine were widely available like it is now when I was in school, I probably would not spend any time trying to solve the problem manually and just punching numbers instead. For example, why should I know one gallon is 128 ounces, 1 acre = 43560 sqft? I suspect the same question can be asked for other search engines, including generic engines like Google and Yahoo. Stupid people will become stupider because of the vast amount of information that is available to consume without any thoughtful digestion.

However, on the other side, the argument can be made to reduce the time we spend on low-end or fundamental computations and focus our effort into solving a bigger problem. This is true when you have a good foundation and already been trained or knew how to get the information. Knowing what is possible is more important than the steps to implement it.

In summary, each generation has a new set of tools that help (or prevent, depending on who you talk to) them to solve problems. My suggestion to kids, students in highschool and university undergraduates is to learn the formulas, the theories and practice them manually with pencil and paper. Then once you really understand them, you can use tools, software to solve them for you. Conversely, if you depends on the tools too early, you will never bother to understand the basics and when a more challenging problem that is beyond the scope of these tools, you’d be screwed and at lost for any direction toward a solution.

How to make a cheap tomato cage

You can buy the small and flimsy one at the store. Walmart, HomeDepot all has 42″ tall for $2. The strong one are selling online for about $20. Or you can make a super strong one for about $4 each. What I got is a wire mesh from Home Depot. $7.65 makes 2 cages that fits the inside of a 15 gallon plastic pots perfectly, or the outside of a 5-gallon bucket. Steps:

  1. Use bolt cutter to cut it in half
  2. Roll it into a circle (in small segments, need patience and a little strength)
  3. Secure the two ends

You might want to cut the bottom ring so they become straight stakes to drive into a filled container. Or if you put the cage into the container first then you don’t have to cut the bottom ring.