• entries
1212
1738
• views
1141019

# PHP versus Java

121 views

Looking at my list, I'm up to around step seven in the "buy Duck Tiles on the web" app. The entire front-end is done, and I was able to communicate with Paypal pretty effectively, mostly by seeing how other Flash-Paypal commerce solutions worked.

And it's a good thing I did my homework. Turns out Flash can talk to CGI's and fake form-data pretty easily, but it doesn't encode everything quite right if formatted as a POST (in which your form-data is streamed to the CGI). If you format it as a GET (in which your form-data is sent to the CGI as part of the URL), it works just fine. CGI purists turn up their noses at sending things as a GET, but I'm not seeing any problems with it.

Well, one problem. You can easily take apart and change your transaction by simply copying the gigantically-long URL, pasting it into a text editor, changing all of the prices to one penny, and pasting it back into your browser. The Paypal folks make it clear just about everywhere that your IPN (the post-payment code on your side) should verify that the transaction is kosher before getting the person his product, so I'd always planned to check for that anyway, so that's not really as big a problem as it seems.

If you wanna see the "buy my games" form, go to http://www.thecodezone.com/buy.html and try it out. Enter the coupon code "10off" to see how coupon codes are handled. You can even press the checkout button and send me some money, although you'll be waiting a while for your game, because the rest isn't ready yet.

So now I'm down to logging the transaction, checking validity, generating an unlock code, and mailing you the download link and the unlock code. And that's all server-side code.

And I hate server-side code. I've got ample examples of how to do it, but I've never written any PHP or MySQL code before. Coupled with the whole "black box" nature of that (what with the complete inability to debug and all).

So I'm down to the not-fun part. Too bad.
In other news, I feel like I'm selling a part of my soul. In an effort to downsize my life, I'm selling off my beautiful overpriced pretentious coffee-god and accompanying pretentious accessory. While the Nespresso makes gorgeous coffee, it uses propriatary and expensive metal capsules for coffee. I figure I can save a lot of money by getting a more standard machine and buying my own beans or using industry-standard paper espresso-pods. A $3 bag of store-brand espresso roast beans will make about 32 double-shots of espresso, or about 9.3 cents per double shot. Nespresso capsules, on the other hand, are 45 to 55 cents each. After doing a bit of research, I went with the Mr. Coffee ECMP40. It's very reasonably priced ($60 at Target), has a pump-based steamer, and has an adapter to work with standard espresso pods in case I get bored of grinding beans. We had a Mr. Coffee espresso machine before, and we were pretty happy with it. It's not too impressive on a counter, but it brews good shots.

Well, it works fairly well. I was at first a bit concerned because the smell of the short pull (the first half-shot) of the Water Of Life(tm) as it came out of the unit was very strong and smelled burned. As it went on, though, it evened out. The steamer works very well --better than the nespresso, actually. The Nespresso's steam nozzle was plastic and was a bit too wide. It didn't clog easily, but it didn't shoot the steam as powerfully to make nice fluffy steamed milk. The Mr. Coffee steamer has a metal nozzle with a very small hole, so it steams milk beautifully.

Espresso hint. After you steam your milk, take off the steaming pitcher, put a paper towel under the steam nozzle, and run the steam for a couple of seconds to clear out any milk in the nozzle. A clogged nozzle can overpressurize and damage your machine, so make sure the nozzle's clear every time.

In any case, I'm thus-far happy with it. It's not as effortless as the Nespresso, but it makes just as good a cup of coffee.

We're also selling off our Senseo, which I can't recommend nearly as highly as the previous two machines. It seemed like they were trying to make a cheap industry-standard Nespresso knockoff, but it didn't work too well. It makes decent tasting coffee, but the system they use to seal the little coffee pod in the machine is fairly poor and if you don't spend five minutes getting it snapped together just right, it'll squirt hot pressurized water out the sides and leave you with a messy countertop and a cup of lukewarm junk.

Also, the "industry standard" pods aren't so standard. Some pods we bought had too much coffee in 'em, so the machine couldn't close properly, leading to the aforementioned problem.

## 1 Comment

Quote:
 And I hate server-side code. I've got ample examples of how to do it, but I've never written any PHP or MySQL code before. Coupled with the whole "black box" nature of that (what with the complete inability to debug and all). So I'm down to the not-fun part. Too bad.

It doesn't have to be black-box - PHP has some debuggers, though they do const money. If you happen to have Visual Studio, you can always use ASP/.NET and get robust debugging too.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account