Print Story Facing the music
By TheophileEscargot (Sat Aug 21, 2010 at 09:51:59 AM EST) Reading, Me, MLP (all tags)
Work: any tips on Facebook/PHP app development? Reading: "Alone in Berlin". Links.

So after being pulled away onto another project, I'm supposed to be doing a prototype Facebook Canvas app. Struggling with it: the Facebook API seems pretty ugsome compared to Twitter.

We're mostly a Windows house, so I initially tried using a .NET API. Couldn't get that to work and the forums seem to think they're pretty dreadful, so I thought I'd try PHP instead which seems to be better supported.

However I can't get that to work either. You need a public-facing web server for Facebook to call. Installed PHP on our IIS server but can't get the Facebook stuff to work: seems to fail silently when I try to make certain calls. Possibly a configuration/firewall problem, but not sure how to fix it, or if I even have enough permissions to fix it.

So, tried a couple of free PHP-hosting services, but they both seem to fail because they don't allow PHP to make calls to other domains.

Pretty pissed off with it. I despise Facebook anyway. The business were totally uninterested in our Twitter demo and I don't see them being any keener on this.

Anyone know of a free/cheap PHP hosting service with the CURL PHP extension and allow_url_fopen switched on?

Update [2010-8-23 18:32:16 by TheophileEscargot]:
OK, the issue was that behind a proxy, local and internal network addresses worked, but Internet addresses didn't.

In PHP 5 there doesn't seem to be any way to configure global proxy settings for PHP and have all the network code just work. Instead you have to go into the .php files and edit the code to use proxies.

Here's how to do it for curl and file_get_contents.

What I'm Reading
Finished Alone in Berlin by Hans Fallada, which seems to have got some attention lately, sometimes titled "Every Man Dies Alone". It's by a German writer, set in the Nazi period. The main characters a middle-aged couple who mount a minor rebellion by distributing anti-Nazi propaganda postcards, but it also follows some other characters living in the same apartment block.

It's not exactly the most cheerful book in the world: it's made clear from the start that the characters are doomed, but follows them remorselessly to their execution. Does have a few redemptive touches, where a kind of moral victory is implied in spite of their practical failure.

The book is stylised rather than gritty: some of the conversions and events are not too believable, for instance there are multiple occasions when characters are knocked harmlessly unconscious with punches to the jaw.

The book does do well with its depiction of everyday life under the Nazis. We tend to imagine life under the Nazis in the dramatic binary with-them-or-against-them terms of the movies. But the interesting part is the all-pervasive nature of the regime. There are thousands of little ways that they make your life a little bit easier if you cooperate, and a little bit harder if you stay neutral. Promotions for party members, subtle demotions for non-members; party members allowed to shirk when non-members are not. Also the endless stream of requests for pledge drives and attendance at meetings, made it very hard to stay neutral: duck out of the meetings and you're marked as uncooperative.

There's an afterward describing the author and the real events the book was based on, which is equally interesting. The book was apparently written in only 24 days, after the author was released from a psychiatric hospital where he'd spent the last phase of the war. It might have been a bit better with more revision, but Fallada's health was poor, he was coopted into the post-war recovery, and he died in 1948. I think that leads to a degree of ambiguity in the book: when he wrote it, Fallada could not have known that Germany would ever have recovered.

Overall, while a bit flawed, it's still a fascinating document about everyday life under the Nazi regime. Worth reading if you can take it.

Review, review, review, review, review, review, review.

Random. Word of the day: ugsome. David Gilmour to release album with The Orb. Inception snow fortress is a library.

Pics. Slideshow of how painted Greek statues may have looked. (Bit skeptical that they were completely covered in paint: they were certainly part painted, but why would you use marble rather than clay or wood or soapstone if you didn't want to show it off?) 1926 swimmer. Book cover cliché: partly obscured figure of a woman against a plain background. Miss Universe 2010 National Costumes. 1932 map of Harlem.

Economics. US matches Indian call centre costs. Did Germany experience rapid industrial expansion in the 19th century due to an absence of copyright law? Greek austerity measures drag down economy.

Politics. ConDems to soften stance on tax avoidance. (Note that tax evasion much bigger than benefits cheating, on which they're ever so tough.)

Video. Wonders of the Stoner System. Shuttle SRB falls to Earth. What sorting algorithms sound and look like. Life is not a journey.

Sociology. Is lack of free play harming children's cognition? The Metallic Metals Act and public opinion. A year after forced prostitution crackdown: 3 cautions.

< So totally messed up | Once I was a mighty warrior. >
Facing the music | 19 comments (19 topical, 0 hidden)
Taxing by Breaker (4.00 / 1) #1 Sat Aug 21, 2010 at 11:13:22 AM EST
Don't be mixing up legitimate avoidance and illegal evasion, kthx.

That said, what the leftists (and to a lesser degree, the rightists) seem to be missing is that a lot of evasion is done by the small tradesman giving VAT off for cash, individuals working cash in hand.

Whilst the leftists like to scream about the elite rich evading tax, I'd wager that a not inconsiderable amount is down to small companies and one man bands.

It's also revealing that the leftist regards wealthy individuals' money as the states' money and that it is theft for the rich to arrange their affairs within the law but minimising the tax handed over.

All of the above in mind though, the tax code in UKia is a fucking mess after 13 years of Stealth Brown.

The first step should be to massively simplify our tax code so it's harder to find the loopholes.  Then, by all means, hammer those who break the law.

Maybe all those soon to be redundant diversity counsellors can retrain to work for HMRC?

Marble by Scrymarch (4.00 / 1) #2 Sat Aug 21, 2010 at 11:16:49 AM EST
I thought marble was relatively cheap and available in classical Greece and Roman, at least in the early periods? Plus with clay and soapstone the statue itself would wear - with marble you could just repaint it. It's a pretty cheesy pink they have chosen for the skin colour in those pictures though.

The call centre article is interesting. I wonder how much of that is down to infrastructure. People I have worked with remotely in Mumbai - not call centres mind - all seem to spend hours going back and forth to the office, and often aren't available in the business hours I would have assumed.

That play article reminds me of a quote from Fred's Beyond Good and Evil: A man’s maturity: that is to have rediscovered the seriousness he possessed as a child at play. Of course I had to google that. The rest of the book was a bit pants.

Iambic Web Certified

Marble by TheophileEscargot (4.00 / 1) #3 Sat Aug 21, 2010 at 11:28:46 AM EST
Wikipedia reckons that the largest single expense was transporting the [marble] stone from Mount Pentelicus, about 16 kilometres from Athens, to the Acropolis. But the acropolis itself is basically a big lump of limestone.

I just don't why they'd lug marble from far away, when they basically lived on a giant lump of stone that's easier to carve, unless they liked the way it looked.

It the statues were covered in paint, I don't see how the stone could wear away faster than the paint. The statue itself could be made of anything you like: the paint would protect it, as long as you kept touching it up Forth Bridge style.
It is unlikely that the good of a snail should reside in its shell: so is it likely that the good of a man should?

[ Parent ]
I guess skin tone... by Metatone (4.00 / 2) #6 Sat Aug 21, 2010 at 12:35:51 PM EST
is the obvious place not to cover. The guy from the article seems to have found traces using UV and chemical analysis for painted clothing. But did they have a "white god" complex? I have no idea.

FWIW as a comparison, some of the big old temples in India were made of marble and the statues were largely fully painted (and most of the Hindu lot aren't white skinned...)

Although many of the statues are carved out of the side of the wall.

Perhaps it's just that once you're constructing a temple in marble, then you start using the offcuts for the statues...?

[ Parent ]
It might still have made a better base by Scrymarch (4.00 / 1) #14 Sun Aug 22, 2010 at 07:43:12 AM EST
Painting on pottery for instance is actually pretty hard. Especially if you are using a wet clay technique as for classical grecian urns and with a reddish base.

Might have the same issue for limestone, especially if they were working with a more limited palette. But yeah, I'm into rank speculation here.

I like Metatone's offcut theory though.

Iambic Web Certified

[ Parent ]
I wonder... by ucblockhead (4.00 / 1) #16 Sun Aug 22, 2010 at 07:52:26 PM EST
I wonder if it might be because it's probably pretty easy to get the paint off the marble and redo it.  Perhaps they were repainted from scratch every so often?
[ucblockhead is] useless and subhuman
[ Parent ]
Not a crazy idea. by Scrymarch (4.00 / 1) #17 Sun Aug 22, 2010 at 08:48:13 PM EST

Iambic Web Certified

[ Parent ]
Colors by ucblockhead (4.00 / 1) #8 Sat Aug 21, 2010 at 01:00:11 PM EST
I suspect that the artists then had a much more limited color pallet than later artists.
[ucblockhead is] useless and subhuman
[ Parent ]
I'm sure you're right by Scrymarch (4.00 / 2) #13 Sun Aug 22, 2010 at 07:08:12 AM EST
Though I couldn't presume to say what came when. I'm just wondering, like TE, why Sunburnt Scotsman After Four Days On Spanish Beach was the skin shade of choice, over, you know, white.

Iambic Web Certified

[ Parent ]
PHP by Driusan (4.00 / 2) #4 Sat Aug 21, 2010 at 11:34:52 AM EST
Are you sure you have the whatchamacallit.htm that's used to allow cross domain scripting set up properly? There's no errors about cross site scripting/security violations in your web browser's error console?

Are you sure that, on the facebook side, you've given your app enough permissions to access whatever personal information you need to access?

Vive le Montréal libre.

I think so by TheophileEscargot (4.00 / 1) #5 Sat Aug 21, 2010 at 12:05:11 PM EST
On my own work PC, I can call file_get_contents() in a php file and grab the contents of a file from the Internet.

When I try that on a test page on the public-facing server, with the same PHP configuration, the page silently stops loading at that call.

So I think the PHP config is OK. However, the server is running a different version of IIS, so it's possible I've failed to configure that properly. Or it could be something about the server, the network, or the firewall, which I don't have control over.

That's with a very simple test page which just calls:
print file_get_contents("http://avalidurl");
...with no Facebook stuff, and no browser errors. The browser doesn't know about the cross-domain stuff, that all happens on the server.
It is unlikely that the good of a snail should reside in its shell: so is it likely that the good of a man should?

[ Parent ]
As long as... by Vulch (4.00 / 3) #7 Sat Aug 21, 2010 at 12:38:44 PM EST
You've got "allow_url_fopen = On" in your php.ini PHP ought to be happy to use URLs in file read operations, even on IIS. It's worth checking you're using the php.ini you think you are by looking at the output of phpinfo(), and if it stil fails you can fake the whole thing with Curl anyway.
Depending on your exact definition of cheap, a virtual server from CrispyDuck (Blue Room Hosting logo at the bottom of the page) or Bytemark starts around 15 quid a month plus VAT and gives you complete control of everything.

[ Parent ]
Library by ucblockhead (4.00 / 1) #9 Sat Aug 21, 2010 at 01:03:53 PM EST
Yeah, I noticed that in the movie, as that was "The Library" where I went to college.  What is really unfortunate is that it looks nothing in the photo like it did when I went there.  When I went in the mid-eighties, it was in the center of a eucalyptus grove, so you could not see the base.  Instead, you walked through the grove and suddenly it was there above you.  They cut down half the grove when I was there, the rest shortly after.

The school joke was to convince someone something was on the "third floor" (which did not exist.)
[ucblockhead is] useless and subhuman

SRB falls to Earth by duxup (4.00 / 1) #10 Sat Aug 21, 2010 at 03:40:08 PM EST
Damn government has cameras EVERYWHERE!  What do they think I'm doing in space with solid rocket boosters anyway?

Linode? by dev trash (4.00 / 1) #11 Sat Aug 21, 2010 at 05:48:00 PM EST

love the vid by ana (4.00 / 1) #12 Sat Aug 21, 2010 at 09:43:33 PM EST
from the solid rocket booster, from separation to splashdown.

"And this ... is a piece of Synergy." --Kellnerin

Facebook app advice by chuckles (4.00 / 1) #15 Sun Aug 22, 2010 at 07:04:37 PM EST
Games that feature grinding monotony seem to do well.

"The one absolutely certain way of bringing this nation to ruin [...] would be to permit it to become a tangle of squabbling nationalities"
Outsourcing .... by Tonatiuh (4.00 / 1) #18 Sun Aug 22, 2010 at 09:50:49 PM EST
A company I know very well (ahem,ahem,ahem) is terminating its contract with a well known overseas  consultancy.

Service is not as cheap as it used to and quality was never good (not the fault of the contractors mind you, simply they are over sold, they are clever and well prepared, but are simply too green to understand complex processes and procedures. You can't get experience in the cheap, some companies are learning that the $$$hard way$$$)....

Inception by nebbish (2.00 / 0) #19 Tue Aug 24, 2010 at 04:16:58 PM EST
Someone on Reddit was saying "OOh it looks just like my college library" the other day.

Book looks good, wishlisted.

It's political correctness gone mad!

Facing the music | 19 comments (19 topical, 0 hidden)