Live data from Hacker News

Letters about Soap (1997)

people.cs.ksu.edu

61–70 of 74 posts

Re: Letters about Soap (1997)

#61
post #44
post #41

Ha, I expected it to be about SOAP the protocol https://en.wikipedia.org/wiki/SOAP but this seems to be more interesting. I suppose if you have a Galactic Empire sized business, maybe something like SOAP (or EDI) to really nail things down makes some sense. Otherwise I'm not so sure.

Not a year goes by where I’m not convinced that things would be easier if as a community we used a modern version of the soap protocol, maybe with JSON instead of XML. RPC is such a clean design compared to REST, and it we had auto-generated client code 15 years ago, something the likes of swagger are still catching up with.

SOAP was OK in theory but many implementations left something to be desired. In particular I generally found it worked OK if the client code was autogenerated from the same SOAP implementation that the server used, but if you could not use that autogenerated code (such as when your client was using a language that the generator did not support) it was a lot more iffy.

I found a great book at Safari Books Online on SOAP that said that it was written because the author had been bitten by those issues and other things caused by some less than brilliant decisions on the part of those who made the SOAP standard (he was considerably less polite than I have phrased it) and wrote the book so the rest of us didn't have to waste as much time figuring it out as he had.

I don't remember the name of the book or the author, and when I needed a SOAP book a couple years after that it did not show up when I searched.

At one point I got tired enough of the quirks of making servers work with clients not using the server's client generator that I wrote a little proxy that would sit between the server and client. Then I'd write a client using the server's client generator that would just go through all my services and log the communications.

For example lets say I had a server to look up VAT, which takes a sales price and a country code and returns the VAT rate and the VAT amount.

I'd do that through the proxy two or three times, which would save the XML the client sent to the server and the XML response. I'd then compare the XML from the different client requests to see if anything changed, such as timestamps.

I'd then open the client XML in an editor, replace any timestamps with "___TIMESTAMP___", then search for the price and country code to see how those were stored. I'd replace them with "___PRICE___" and "___COUNTRY__".

For the XML from the server, I'd open that in an editor and search for VAT rate and amount. For those I'd figure out a regular expression that could find them.

Then on the client I could dispense with using a SOAP library. When I wanted to look up VAT I'd just use the normal HTTP library of the client language, using the edited client XML as a template. I'd use the normal string or regex client library to replace "___TIMESTAMP___", "___PRICE___", and "___COUNTRY___" with the correct values, send the XML to the server, then use the regex to pull the answers out of the response.

From there it was a simple matter to make a library to handle this. Input was the client XML template, URL of the server, and a list of name => value pairs, and a list of name => regex pairs. It would look for "___name___" in the template for each input name and replace it with its value, call the server, and then for each name in the second list, use the corresponding regex to find the result, and return a list of name => value pairs with those results.

It was a bit tedious. If someone deployed a new SOAP service I had to go generate a client using the same SOAP implementation the server used, call the new service from that through my proxy to get the XML for the templates, and then make a template and the extraction regexes, but it was still usually less hassle than mixing server and client SOAP implementations.

Re: Letters about Soap (1997)

#62
post #4

Earlier quoted context omitted.

But they have to be in stacks no more than 4 high due to their tendency to tip over, so it might be more than one crate required.

If you create enough stacks around each other, that stops being a problem.

maybe, but that lessens the level of asshattery since by sticking to 4 bars high you are still complying with the customer's preference.

Re: Letters about Soap (1997)

#64
post #47
post #5

Earlier quoted context omitted.

"Welcome to the Soap-of-the-Week Club! Every week we'll send you some tiny bars of soap in a little stack. You may not revoke your membership."

3.. 2.. 1.. Someone starts a subscription service for small bars of hotel style soap, perhaps themes of hotel, room type, region, season regional or other soap minutiae, shipped once a month. Like Candy Japan, but for tiny bars of hotel soap.

I'm thinking a millennial lifestyle brand promising to bring world peace and eliminate CO2 emissions one mini bar of soap at a time.

Re: Letters about Soap (1997)

#65

I assume this guy did not want to bin the unused superfluous soap because that would be wasteful. I would feel the same way. Nowadays there is a no-pro that recycles the hotel soaps: https://thehustle.co/the-surprising-afterlife-of-used-hotel-...

This is great, but they're solving the wrong problem. Using soap and shampoo dispensers is a lot easier and more environmentally friendly, but there's still a bit of a stigma around liquid soap coming from a box stuck on the wall.

Re: Letters about Soap (1997)

#66
post #41

Ha, I expected it to be about SOAP the protocol https://en.wikipedia.org/wiki/SOAP but this seems to be more interesting. I suppose if you have a Galactic Empire sized business, maybe something like SOAP (or EDI) to really nail things down makes some sense. Otherwise I'm not so sure.

Working with a customer’s vendor now who still uses SOAP, so we had to add yet more libraries to handle it, because that’s what we do now as devs.

Re: Letters about Soap (1997)

#67
post #49
post #44

Earlier quoted context omitted.

Not a year goes by where I’m not convinced that things would be easier if as a community we used a modern version of the soap protocol, maybe with JSON instead of XML. RPC is such a clean design compared to REST, and it we had auto-generated client code 15 years ago, something the likes of swagger are still catching up with.

Auto generated client code is nice in theory. In practice I find it only really useful as a starting point. There are enough choices to be made in writing even a simple HTTP api that its unlikely that a generic tool will generate useful code for a given application. This could include library usage (http client, serialization, logging, DI integration), async vs sync, logging requirements, tooling support for generate…

Thrift seems to have a really nice solution of providing only types that eventually break down into scalars. And only for exchanging data - it doesn't dare prescribe the rest of that. I liked working with it.

Re: Letters about Soap (1997)

#68
post #55

Earlier quoted context omitted.

I had a similar issue. I really think that it is cheaper for them to write things off, than to receive replacements. I had an item shipped from China, and it arrived a day past when it was due (actually, it arrived in the late evening of the due date, so I guess you could say it "arrived as scheduled"). In any case, on arrival day, it had not arrived, so I sent in a complaint, and it was refunded immediately (Amazon…

I have always assumed that for items which are shipped from Amazon fulfillment centers, if stolen or lost during shipment, Amazon is covering the cost not the vendor. But I don't know if that's actually true.

The reality is Amazon rarely pays for anything on the merchant side. FBA gives up an enormous amount of control, and in our experience results in Amazon Customer Service Reps issuing returnless-refunds for nearly every single contact, regardless of the cause.

But, it's a numbers game. Do enough volume and anomalies, including blatantly obvious fraud, don't matter. For smaller merchants though, it can be brutal.

It's to the point where FBA wouldn't be worth it at all for anyone operating their own warehouse and what-not... except for the fact that Amazon "boosts" FBA offers in search results and gives FBA merchant offers a larger share of the "Buy Box"... so you miss out on a considerable amount of sales if you do not FBA. Most of the "real" operations (ones that exist off of Amazon as well) do both FBM and FBA just to cover all the bases, but not be dependent on Amazon. But... I digress...

Re: Letters about Soap (1997)

#69
post #54

I think I saw a comment, perhaps 20 years ago, saying that this is an adaptation of a stand up comedy routine. A quick search has failed to confirm or refute this, and regardless of the origin it is (a) very funny, and (b) instructive. But I suspect it shouldn't be taken as real, even if the lessons one can learn from it certainly are real, and it is all too plausible.

The comedian was Shelley Berman. Edit: notice he signed each note "S. Berman"

Thanks to your comment, I was able to find a Snopes article:

https://www.snopes.com/fact-check/hotel-soap/

It stated that this story is a work of fiction. Funny story, though! (And another instance of “this is so easy to verify, it couldn’t possibly be false!” which I think I need to be more wary of).

Re: Letters about Soap (1997)

#70
post #28

Earlier quoted context omitted.

Very USA... >Really, all I wanted was a discount, mostly to compensate me for the paint I needed to buy. Ad the time to seal off an area, shake the cans.... Jack up the price, 3 for the price of two, when it all fucks up, give 20% off...they fucking love it. Save 8.1%. Sold. Save $10.00 if you buy 3. Sold. Return the fucking thing. It's not what you wanted. Or, start the haggle BEFORE you enter into the negotiation.…

Sending the item back requires more effort than painting it. If you don't own a car (which is one of the main reasons you would order things like a tent for online delivery instead of going to your local outdoor/sporting/camping goods store where you could inspect them personally) then you need to somehow get a tent-sized and tent-massed box to the post office. (Remember, this isn't an ultralight-camping backpack ten…

It depends, obviously, but sometimes return shipping costs are too much (when factoring in original shipping costs, product cost, margins, etc), so the merchant may opt to send a replacement without a return, or issue a refund without a return.

I wouldn't assume this is how an issue will be handled, since it depends on the merchant and what the specific issue was.

Those mattress-in-a-box things on Amazon are notorious for this. Once you get it out of the box, there is nearly zero hope of getting it back in. Shipping a full sized mattress would be very expensive due to it's irregular shape and dimensions - so I've heard even minor defects result in refunds. Ripe for abuse... so it's best to steer clear of those sorts of products unless you can absorb the loss.

Post reply on HN