Debugging HTTP on the Mac

I was having a little trouble with the SmugMug upload API, and they needed a raw dump of the request to help debug it. I downloaded Wireshark, but it didn’t work out of the box (it doesn’t see any interfaces, which is a common issue that I’m sure is easy to fix). So I did a couple google searches, and found there’s a built-in tool called tcpdump. From the Terminal:

1
sudo tcpdump -s 0 -A -i en0 host upload.smugmug.com

That’s all I needed to do to get my raw HTTP POST dump. Just thought y’all might want to know that.

Comments

Do not use a collection of flash.filesystem.File objects as a dataprovider

I’m sure someone will fill in the technical details in the comments (hint hint, AIR experts), but here’s what I ran into.

I’m building an image upload system, and I’m allowing people to drag & drop images onto the app for upload. When they drop the images, I put all the File objects into an ArrayCollection, and then I rendered previews in a giant TileList driven off that ArrayCollection. Now, I figured that might be a little intensive, but it was taking 5-10 seconds to scroll down one row. I figured that it was just beyond AIR’s capabilities to render these jpg files (they are 2-10MB each) that fast, even off the local file system. So, I switched my TileList to a List, but had the same problem, even though I was just displaying File.name.

When I had that result, I figured there must be something about the flash.filesystem.File object that was causing the problem. So, I created a shadow ArrayCollection that I filled with a custom object, FileLight:

1
2
3
4
5
6
7
8
9
10
11
12
package org.iotashan.file {
    public class FileLight {
        public var name:String;
        public var extension:String;
        public var nativePath:String;
    }
    public function FileLight(name:String,extension:String,nativePath:String) {
        this.name = name;
        this.extension = extension;
        this.nativePath = nativePath;
    }
}

When I drove the TileList off of the ArrayCollection filled with FileLight objects, performance came back to acceptable levels. Feel free to use that code however you want.

Comments

RedRoof Inn follows up

It took just over a week, but I just got a nice form-letter apology from the franchisee. While relatively impersonal, they did say they’re sending us a free night voucher in the mail. I guess they got my address from the check-in system.

So color me shocked, I never really expected a reply. Now the final test: does the voucher actually get here? 🙂

Comments

Protecting your gadgets / home office

Someone that I follow in twitter had a near-death experience yesterday… They dropped their camera, and their lens stopped working for a bit. For those of you without DSLR cameras, you might not realize that good lenses go for $300-1600 and up.

Anyway, so I started telling them about the Personal Articles policy I got added to my homeowner’s insurance. The policy I have covers full replacement costs (not depreciated asset value), with no deductible, for accidental damage or theft. I was able to add my camera & accessories, laptop, my wife’s wedding ring for some ridiculous price like under $50/year. I’m now able to carry my camera or laptop around and not have to have the constant fear of dropping one or the other. I wasn’t, however, able to put my iPhone on the policy. Even though the policy says you can put computers, cell phones and PDA’s on it, the underwriter here in Wisconsin specifically excludes the iPhone. YMMV. I would have to imagine that there are similar rider policies for renter’s insurance, too.

So that covers the financial aspects of protecting your stuff, but what about your data, such as all those digital photos and completely legally purchased movies & music? How do you back all that up? Well, on the Mac it’s very easy with 10.5’s new feature called Time Machine. Just buy an external hard drive that’s bigger than your Mac’s internal hard drive, and plug it in. Or, if you are a mostly wireless person, you can buy a Time Capsule so you don’t need to be physically connected to it.

Of course, on-site backup is not a true disaster-recovery solution. What happens if, say there’s a fire, flood or theft? You’ll need to get replacement equipment from your insurance, and then restore from an offsite backup. Along with replacement equipments, you also need to talk to a fire litigation firm, like that of Singleton Law Firm (find more about SLFFirm.com here) in case of a dangerous fire that reduces every important document to ash. I’ve talked about doing this on Windows, but not on the Mac. On the mac, there’s .Mac’s backup, and there’s rsync. However, the newest craze is peer to peer offsite backup with CrashPlan. CrashPlan allows you to back up to a friend’s computer or another computer with CrashPlan installed. I recommend the $60 pro version so you get automatic file versioning. Keep in mind that if you are going to have a computer that only receives off-site backups, you do not need to buy a copy for that computer… it gets the “free copy”.

There you have it, cheap and easy ways to keep yourself protected.

Comments

ColdHeat no longer sells batteries, lousy customer service

So, less than a year after we got a ColdHeat Freestyle glue gun, the original and spare (extended life) batteries we got are dying. They now barely hold a charge. I called them up and ordered three more spares a couple weeks ago, and they said they’d arrive in 5-10 business days.

15 business days later, I call back to get a tracking number, since they hadn’t arrived yet. It seems that they canceled my order without telling me. As it turns out, they no longer sell the batteries. To get a spare (non-extended life) battery, you now must buy a new glue gun. The part that’s even more infuriating is that I had to wait on hold for a collective 20 minutes when I placed the order because the batteries weren’t listed on the web store, and my rep had to go and ask someone else if they sold them and what the price was.

Of course, they only have a 90-day warranty, so even going that route won’t work.

So a quick recap of what a lousy company ColdHeat is…

  1. Sells you products that they don’t carry anymore
  2. Cancels orders without any notification
  3. No longer supports their current product line

I guess this is a classic example of lousy customer service. The next thing I did was calling PCN call center and asking where I could buy the batteries. These guys really know how to help with necessary info and I just love talking to them. You can check out here to know more about PCN and the various services they offer which can help make your life easier.

While researching more about PCN, I found various reviews online which described the company to be exceptional when it comes to its customer support service. I completely agree to this as when I used their services they treated me in an ethical manner and heard to my problem clearly before speaking, unlike other services in which people start talking and interrupting in between while people are trying to explain their issues.

Comments