August 29, 2003

While we are discussing debugging

John Chang posted some tips for debugging Mac OS X apps on his blog. Most of them should be old hat to most people, but surprisingly are not (I, for instance, once wrote a set of gdb macros to do what print-object did, because I did not know it was there at the time I needed it). He left out one of my favorite techniques though, programmmed break points.

Here is the idea. gdb lets you set a break point. It also lets you script a command to execute when the break point is hit. If the last command you do is continue, the program will keep running. The most basic thing you can do is something like:

(gdb) b myFunc
Breakpoint 1 at 0x900107a8
(gdb) commands 1
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>bt
>c
>end
(gdb)

That will tell the debugger to print out a back trace and then continue the app. That can be really useful to track down rogue API callers, etc. You can do much more advanced things, such as argument replacement or filtering, but you get the idea.

Posted by louis at 11:11 AM | Comments (0) | TrackBack

August 24, 2003

Server stuff

Well, despite the fact that my bandwidth is reasonable, I am still getting a bunch of requests for other sites. That actually causes my system to actually waste a significant amount of outgoing bandwidth responding when the path they request also exists on my server. So I finally decided to get familiar with mod_rewrite, and now they are all getting 403 errors 8-) I have been watching my server logs, at it is absolutely amazing the shit people try to do. People are actually trying to proxy through my webserver to my mail server in order to relay through a local connection. Idiots.

Posted by louis at 08:36 PM | Comments (0) | TrackBack

I know I just posted...

But my mother just sent me an email about this and I had to post it. My dad co-owns a knitting mill, and the Philadelphia Inquirer ran an article on it. Its an interesting read.

Posted by louis at 12:18 AM | Comments (0) | TrackBack

August 23, 2003

A Fun Night

I went out looking for Al Franken's book today, and could not find it. Fortunately for me, my friend Matt found a copy before he came over to visit 8-) We hung out for a while, and then met up with some other friends in San Jose to see Brett Butler at the Improv, which was a lot of fun. Kevin Nealon is performing in September, which I think I will go to. Every time I have seen him do stand up on TV its been hilarious.

Posted by louis at 11:35 PM | Comments (0) | TrackBack

Political Stumping

My brother is a political activist in Massachusetts, so sometimes he sends me email asking me to get my friends to send their opinions to public planners, etc. Isially thats a little awkward, since I don't really feel comfortable trying to influence local politics 3,000 miles away, but if I can bring it to the attention of people in his constituency than I have done some good. Right now he is trying to organize Cambridge and Somerville people to push for better mass transit. His primary goal is to extend the Green Line to Union Square, which seems like a reasonably good idea to me. If your actually interested you can check out the Somerville Step and CTPS websites. Public comment ends on wednesday, so if you care, make sure you make your voices heard ASAP.

Posted by louis at 01:05 PM | Comments (0) | TrackBack

August 22, 2003

Weekend Update

Well, for those who are keeping track, my father is out of the hospital. He had surgery on wednesday, but I didn't talk to him until today (I seemed to keep calling while he was sleeping). Speaking of which, I just made an appointment to get my wisdom teeth removed. At one level I am kind of apprehensive, but at another level I am almost eager. I know it sounds strange, but I have never had surgery, and I have no way of synthesizing what I feel it would be like. I want the experience. How odd...

Tomorrow I need to go out and buy Al Franken's new book, "Lies and the Lying Liars Who Tell Them: A Fair and Balanced Look at the Right". Apparently Bill O'Reilly and Franken were both promoting their books on the same episode of Book TV. The episode is still available online, its a hoot. Apparently Fox sued Franken for trademark infringement, because they trademarked "Fair and Balanced." The case was flimsy, and apparently the judge ruled against Fox 8-)

Posted by louis at 11:36 PM | Comments (0) | TrackBack

August 17, 2003

Oh, the joy

I bought a new printer this weekend, an Epson Stylus Photo 900. Its big feature is that it can print on CD-Rs and DVD-Rs Its a really nice piece of hardware, and the team that designed the printer should be applauded. Unfortunately, everyone involved with its software and documentation should be ashamed.

The manual ignores a bunch of sections it should have (unpacking the printer, some finer details about the ink cartridges, etc), but hey, I'm a geek, I don't generally read manuals anyone. The printer comes with two discs. The first contains drivers for Mac OS (9 and X), and Windows (ME/XP/2000, I think). It also contains CD label design software for Mac OS 9 and Windows. If you look through the manual, all the pictures of the label design software are running under 9 (though all the pictures of the driver and printer utilities are running under X). The second disc is a copy of Discus EP 2.72 for Mac OS X, with some instructions on an insert int he disc sleeve. So far so good.

DO NOT INSTALL THE PRINTER DRIVERS. The drivers on the disc just crash whatever app attempts to print. Fortunately Epson helped out users trying to debug this by leaving a full set of debug symbols in their drivers. And people wonder why printer drivers are so large. After going to Epson's webpage I managed to find slightly newer drivers that appear to be more stable. You'd think they might mention on the driver page that the in box drivers crash under the current versions of the OS, it might save people time.

So I fired up Discus EP 2.72. Ugh. The interface is certainly not Mac like. Everything is big and clunky, and trying to make you pay for a more full featured version. I clicked on the type of project I wanted (CD), and then I had to select the type of printer I have. And it doesn't remember, you have to do it each time. It has interesting typographic control, but all the text looks really blocky and pixelated, they do no antialiasing, even at huge sizes with text on an arc (fortunately it appears much smoother when it actually prints). So I hit print and wait. The colors and image quality on the CD surface is nice. But ITS OFF CENTER.There appear to be no expert settings to fix it, and since the printer seems to print fine otherwise I can only assume that despite making me select my specific printer (every time I want to use the software) they can't even calibrate their templates right. I think I need to write a quick program to generate PDFs of CD surfaces so I can print out CD-Rs that do not look like shit.

Okay, I its not fair of me to complain so much. Its not like this is so much worse than any other product. Consumers put up with shitty quality, and manufacturers deliver it. In this case I am satisfied, I can write my own software, and the hardware seems good. But this weekend I am in a bad mood to vent, so I am venting.

If you have read this far you have far too much time on your hands. My parents visited a week ago, which was cool. My dad felt a little ill though. He was still feeling ill after they returned to Philadelphia, so he went to a doctor, and they decided to check him into the hospital for observation. The good news, it looks like its not that serious. The bad news, it looks like he is going to have to have surgery in the next couple of days. He seems to be in good spirits. I hate surgery.

Posted by louis at 11:38 PM | Comments (0) | TrackBack

August 16, 2003

Programming Language Inventor or Serial Killer?

This page amused me so much I just had to pass it along. I got a 6/10.

Posted by louis at 01:58 PM | Comments (2) | TrackBack

Expectations of privacy

When I read through Friendster profiles I sometimes notice that people have links to their blogs (quite often on LiveJournal). I think thats really cool, because you get to find out a lot more about someone that way. Whats very interesting about LiveJournal is that its default user information has fields for IM accounts. Now I rather jealously guard my IM information. I don't post it anywhere, or give it to any websites. So I don't really understand the etiquette involved. If you enjoy reading someone's blog, is it okay to IM them?

Posted by louis at 10:07 AM | Comments (1) | TrackBack

August 04, 2003

Some days my luck is just extreme (whatever the direction)

I was going to update sometime last week, but life intervened. Maybe some of you noticed this page was down for a while. Its quite a story. In March I was adjusting some apache settings, but got distracted. I missed a line in the config file. Unfortunately the file was still a valid config file. When I rebooted the machine in early July it came up as an open proxy.

Now my machine is a colocated at Hurricane Electric, and the link is pretty fast. A few weeks after I rebooted it someone noticed. As luck would have it it was while I was in the midst of changing groups at work and somewhat distracted. Some people used the the machine to anonymously grab porn. Not a big deal, except the machine actually managed to, for a short time, saturate my link, well past my base rate. Based on the billing estimates, it probably would have cost around $1500. Now these things happen, its like a car accident, or illness. I budget some money for these sorts of things, but it still pisses me off, since this is distinctly a form of theft, often by people who do not have any concept of what bandwidth costs. Hurricane's senior management decided to treat it as a hacking incident, and were very forgiving about it, though they were certainly under no obligation to do so. I can't recommend Hurricane Electric enough.

The irony is that open proxies hide your activities from your ISP, who has an incentive to protect its customers, and instead provide your access pattern to a complete stranger, whom you are costing money. So I would just like to say, to the people who had the following IPs in the last few weeks:

  • 211.8.50.253
  • 61.197.30.244
  • 68.96.55.85
  • 61.214.197.51
  • 210.143.159.49

Damn thats a lot of sick twisted porn you guys are into. I have no idea if those IPs are static or dynamic, and quite frankly I just want to let this thing go, but it is sorely tempting to report this to various ISPs, and based on where some of those IPs are, I bet some of the sites or illegal in the viewer's countries. Either way, I feel it is necessary to shatter the facade of anonymity, and I am more than willing to give the logs about this to any authority that asks, regardless of jurisdiction, etc. Most ISPs would insist on subpoenas. Maybe someone should just start a site filled with http logs of machines that have been used as open proxies, and make them all world viewable. After a few court cases use it I bet use of anonymous proxies would drop considerably. Of course it would probably have to run quite a while before it would become useful, but still...

I'll post more about other stuff that has been happening later today, just wanted to get that out of the way.

Posted by louis at 10:34 AM | Comments (2) | TrackBack