Programming

Etsy API Fail – Well, Ok maybe not.

I’m working on a new project which uses Etsy’s API. As far as APIs go, theirs is pretty neutered. There’s no user authentication whatsoever so the only data you can get from it is what’s available to the general public. Since you can’t authenticate, you certainly can’t write any data, so things like allowing users to add Etsy items to their favorites aren’t possible.

Working with their API I found another “quirk.” If you try to getUserDetails on a username which doesn’t exist it won’t return null or false or an empty object. Instead, it responds with HTTP status code 404.

Wait, what?

This means I have no way of differentiating between an error in my URI and a simple case of a defunct username. In fact, this behavior is contrary to what Etsy’s own documentation suggests. Their sample code dies on any status besides 200, which makes sense although you’d probably want to handle the error more gracefully. Now I have to look up the status code and try to guess whether I got the 404 because of a malformed URI or because the username was wrong. That will make debugging super fun!

404 is an HTTP error. A correctly formed API query with a null result should not return a 404. Argh. In english terms, a 404 means “I don’t have the information you’re looking for.”

You could argue that Etsy simply doesn’t have the userinfo for that user, because it doesn’t exist, and therefore 404 is appropriate. But that’s a cop out. Etsy DOES know that user’s info: it’s empty. If I’m querying a database of all known users, and getting back a subset of said users based on my input, Etsy’s response should be “there aren’t any matching users” not “I don’t have that information.” A 204 error would be more appropriate.

Edit: Apparently this is becoming a common thing.  Although I haven’t seen it with any other APIs I’ve worked with. And let me state for the record that just because other people do it doesn’t make me think it’s any less of a dumb idea.

Edit again: Someone who is less sleep deprived than myself pointed out that the body of the 404 responses does contain useful information, which I had missed earlier. So in this case I will concede to being wrong, although I am still not a fan of this approach because it means my script relies on the exact English wording of their error messages. Carry on.

Uncategorized

Imitation is the sincerest form of flattery

I have to admit, I’m more than a little confused by Mark Frauenfelder’s contribution to Mac|Life’s “Apple Products of the Future” article. Specifically, I’m astounded that nowhere in the article does it give attribution to Makerbot, despite drawing liberally from Makerbot’s design.

Makerbot

The imaginary iMake

I’m not sure if Frauenfelder himself directed the “finished product” rendering, as it’s pretty different from his sketch shown 25 mg viagra in the article. But any attribution to Makerbot is conspicuously missing from the article. And they clearly were inspired by it somewhere along the line. It’s extra confusing because Frauenfelder is with Make:, who is currently documenting the unboxing of a Makerbot for all to see.

It’s disheartening. I think this sort of failure to attribute ideas hurts open source. Let’s give credit to the people who are actively realizing their ideas, not just doodling them. The Makerbot guys are taking it in stride, because they’re classy like that, but personally I’m disappointed to see their work being passed off as an Apple Product of the Future. The printer, while still in an early stage and without a high gloss shell, exists. In fact, that “App Store” to download printable models exists too, it’s called Thingiverse. So why are people who clearly already know this acting like they don’t?

Hacking

Sweet Classes at NYCR

Right now there is a super sweet list of classes coming up at NYCR, so many I wish I had the time to take them all.

I’m teaching my standby Intro to PHP class again, and also trying out a new one: Designing with QCAD. QCAD is used for 2D drawing, and is 50mg viagra retail price a great tool for designing things to be laser cut.

Aside from what I’m teaching there’s a DIY Vacuum Form class coming up this weekend, and a Hacking Classic Nintendo Games class I’ll sadly be missing due to Thanksgiving. Soldering 101 has been merged with Arudino 101, bringing you a class which teaches you to solder AND make things!

Overall I’m really excited and hope the classes are well attended. We’ll see how badly the holidays screw up everyone’s schedule. Stupid holidays.

Hacking

Introduction to Algorithms at NYCR

Introduction to Algorithms

What’re you doing Sunday evening? Nothing? Come down to NYC Resistor where starting this weekend we’ll be working through the Introduction to Algorithms course available through MIT’s OpenCourseWare project. What’s OpenCourseWare?

MIT OpenCourseWare (OCW) is a web-based publication of virtually all MIT course content. OCW is open and available to the world and is a permanent MIT activity.

We’ll start at 5pm and the lectures run about an hour and viagra and canadian a half. The time may shift a bit each week due to other classes happening at the space, but we’ll post it on the calendar well in advance. The class uses the text “Introduction to Algorithms” which you may want to pick up or borrow from a friend. We’ll try to scrounge up a couple copies to have on hand.

This event series is totally free to attend, but if you enjoy it please consider donating to the MIT OpenCourseWare project!

This week we’ll be watching Session 1: Introduction – Analysis of Algorithms, Insertion Sort, Mergesort

Crafting

Papercraft Nikon F

Tiny Prototype

For about a year now I’ve been trying to get some more models/kits designed for Everything Tiny. But it’s a super slow process, and admittedly one I don’t spend enough time on.

Today I prototyped a model of a Nikon F, the first SLR camera I used. I started fairly large, cutting with an xacto knife, and ended up somewhere which is still a little bigger than what I hope to get down to.
F Party
The largest model is about 1/2 the size of a real Nikon.

There’s still a ton I need to add (F stop / focus rings on the lens, the little button to open the back, etc) but they’re at a good stopping point for today.

After I was done modeling I googled “papercraft camera” to see what other people have done. I specifically waited until after I had my design roughed out. Olympus came out with some which make my little paper models look pathetic. Oh well. Since I want other people to be able to build these I need to keep it a little more sane anyway.

Uncategorized

Liveblogging a Comic Con

Today and tomorrow I’m selling Tinysaurs at King Con, a comic and animation convention in Brooklyn. Unlike other shows I’ve done this year, I have neither my intrepid booth-mate Sara nor my faithful sherpa boyfriend Chris to keep me company. It’s just me sitting at my booth, trying not to go stir crazy (things are a little slow so far).

I’ve been twittering but at this rate I’m not going to have any followers left if I keep updating my status every 10 minutes. So instead I’m liveblogging the event. If you don’t hear from me for a while it’s because I’m busy making zillions of dollars or have become unconcioous. Or both.

10:45 Most people are set up at this point. What’s surprising is how many tables are completely empty. Not sure if they’re no shows or just running late. There’s clearly a community similar to the craft show vendors. Lots of milling about, chatting, and catching up. A few people stop by and mention that they’ve seen my stuff on The Internet(tm).

11:22 First sale, a belt buckle and a belt.

12:05 A  small child with curly hair comes up to my booth. He points at the large stegosaurus model. “Is that a dinosaur?” he asks. “Yes,” I reply. “Is it made of something?” Why yes, yes it is made of something.

1:23 Sales are pretty good. Traffic isn’t super heavy but lots of folks are interested in my stuff. One thing has become clear: I don’t have enough large belts. I stock mostly mediums because that’s what sells best at craft shows. Guys are bigger. Ergo, bigger belts.

4:40 It turns out there’s not a whole lot to blog about, live or otherwise. Traffic is steady, sales are decent. Not earth shattering, but solid. I’m hungry and tired, but without someone to watch my booth I’m pretty much stuck here. And since it costs admission to get in I can’t easily get someone to bring me some food. Clearly a lack of planning on my part.

5:33 Found out there’s a cafe upstairs in this building, and got someone to watch my stuff for a few minutes while I grabbed a snack. First time I’ve left the booth since I got here at 10am. I was torn between the pumpkin muffin and the apple muffin, but now I’m wishing I’d grabbed both. Or better yet, a hot dog. Not that they sell hot dogs at that cafe, this is much too classy a place for that.

I know, this is riveting stuff.

Uncategorized

One kitten forward, three kittens back

On Tuesday morning we took our foster kitten Vader back to Liberty Humane Society. At over 2 lbs he was ready to be fixed and adopted out. He seems to be completely recovered from his surgery and was climbing all over his cage like a monkey. The shelter staff said his size and personality should make him quick to adopt, viagra pills for sale and they’re probably sending him over to Petsmart on Saturday for the weekly adoption event.

Today I went by the shelter in the morning to volunteer, and uh, ended up bringing home three more kittens.
A litter!
I didn’t mean to, really!

There was a lot of cat shuffling going on as there are more cats than places to put them. It’s like a game of cat tetris seeing which cats can tolerate sharing a cage, who needs a big cage and who needs a small one, who dumps their water on the cage below them, and who will steal food from the cage next to them. At the end of the tetris shuffle there was a box of kittens without a good place. After a hard sell from the shelter staff (which was totally unnecessary as I was already weak from missing Vader) Chris and I are fostering them until Thanksgiving.

I think I’ve become a cat lady.

Programming

Most Useful CS Classes?

One thing that’s clear about my quest for higher education is that I’m going to need some undergraduate level classes to fill in the holes of my self-taught education. I’ve been looking through course catalogs for various programs to get an idea of what I’m missing, but it’s hard to tell what would be valuable and what’s just filler.

For folks who got viagra online without prescription an undergraduate degree in computer science, what classes / topics did you actually find useful? I know I need to brush up on my math, I haven’t done anything resembling a proof in about a decade. Most of the programming I’ve done has been for the web. Lots of figuring out when to access and how to store various bits of data, but not much recursion. I’m used to speed being a factor of how often you hit the database, not how you’re manipulating the data.

I’ve found a community college locally where I can pick up some classes on the cheap, including one called “Language Independent Design Tools” which covers problem solving techniques, modular design, how to perform a proper trace, subroutines, etc. It could be either really useful or entirely too general, it’s hard to tell from the course description. It requires “Intro to C#” as a co requisite, which sounds like a lot of “this is a variable, this is a function.” Bleh.

Speaking of classes!

I’m teaching Intro to PHP at NYC Resistor in December. It covers the basics of the language, and doesn’t require any previous programming experience. Working knowledge of HTML is a big help, but not strictly required. You can sign up online, the class is taught at the NYCR Hackerspace in Brooklyn.

I’m thinking of teaching the GD image class again, because it’s fun to draw graphs and calculate resizing, shifts, etc. But the last one wasn’t very well attended so I’m not sure.

Personal

Healthcare Fail.

I haven’t been listening to much of the healthcare political banter because honestly I don’t think it’s going to get anywhere. Universal healthcare sounds great, except for the fact that the healthcare still sucks.

I’ve been trying to set up a doctor’s appointment with a psychiatrist to see if I have ADHD. I don’t have a GP, so I call my viagra without prescriptions insurance company for a referral. They gave me a list of people I can go to, I say thanks and start calling them.

I made it through the list of 6 doctors they gave me (which seemed plenty at the time) without having a single office answer the phone. I leave messages on answering machines. I go online to bring up a wider list. After an hour of calling places to find they either don’t know how to use a phone or aren’t accepting new patients, I finally find the one doctor in the entire New York area who is both available and accepts my insurance. Hooray. I set up an appointment.

Apparently I have to call my insurance company (Oxford/UnitedHealth) to get an authorization. Except sometime between last week and today I have managed to misplace my insurance card. So I call the insurance company.  They can’t find me in the system, hold on while we transfer… oh wait I just got dumped back to the automated voice prompts. Next rep, “oh you need to call this other department, you’re with a different group.” And so on and so forth. After two disconnects and 5 different reps, I finally get to someone who is capable of finding me in the system. I ask if I can have a temporary card emailed to me. She says sure, it’ll go out in 1-3 business days.

What? How does sending an email take 1-3 business days? How is there not a button they can hit which simply pre-fills a PDF with my subscriber ID and group number?

Ok fine. I get my number and plan on just printing it out for the doctor. I get transferred somewhere else, listen to some really not very calming classical music on hold, and finally get my authorization number. They ask the address of the doctor, which I’ve of course forgotten. So I look it up online.

I found the doctor’s address on one of those “rate an MD” websites.  Along with a number of reviews for the doctor. The verdict? Terrible. The kind of shrink who just wants to throw a prescription at you, take some money, and shove you out the door. The kind of shrink I hate. I’d cancel my appointment and make one elsewhere if it were possible to get anyone else to answer their phone or return a call. Since that doesn’t seem to be in the realm of possibility, I’m stuck with this guy. Maybe he’s really great and the 10 people who wrote terrible things about him are really just crazy. I mean, they are seeing a psychiatrist.

I could go out of network but wow that’s insanely expensive. My out-of-network coverage is pretty much a joke. So I get to go to the one in-network doctor I can get a hold of, who doesn’t seem like a good fit for me at all.

But at least with the new government healthcare plan, everyone in America will be entitled to the same infuriating service I’m enjoying oh so very much right now.