HN user

inDesperateZone

65 karma
Posts2
Comments12
View on HN

What is the benefit of using phantomJS in this case? I understand that it is very useful if content is dependant on JS running.

But that doesn't seem to be the case here. With Python I would have used a parser like lxml or BeautifulSoup (and I'm sure there is something comparable for JS) coupled with Requests async methods. That would probably not only end up with shorter and more concise code, but also be a lot faster.

PHP offers a lot of things that other languages provide trough the means of a framework. So I don't think it is unfair to compare it to a framework.

The use of frameworks seems to be condoned. On my search for a template engine I passed by many articles of PHP developers saying they were unnecessary as PHP would provide all you could need.

Flask doesn't do much. But that's exactly the point. Even though it's so simple it offers enough to write an application that shouldn't have to hide because it's amateurish.

> From the rest of the post, it seems like the problem isn't that PHP is bad, but that you don't know (even remotely) how to write good PHP.

That may be true. But it could also be true that writing good PHP requires far more skill and time. Skill I might not have. But I'm not someone blindly following tutorials or someone who tries to whip out a lousy program as fast as possible. Nor do I think PHP is a bad language is such. But I had a hard time.

I wouldn't put PHP close to Flask in the same sentence. Even though PHP has quite an extensive function library and is a template language in itself, it doesn't provide enough to compare even to a micro framework like Flask.

To come close you would probably end up using a framework written in PHP. At that point the language doesn't matter all that much.

I'm helping a friend writing a simple wiki-like application and due to him having to explain every part of the program we decided to write as much ourselves as possible and only use external libraries when absolutely necessary. Me trying him to explain what Django does and why it would help him didn't end well.

I'm not the absolute master of Python web frameworks, but I know enough to come by. But I tell you, writing clean, understandable, side-effect free and secure code in PHP is much harder in comparison than I expected.

There are thousands of tutorials on the web. But a lot of them show things done wrong, deprecated or blatantly insecure. The language is quite a mess and you can do the same thing 10 different ways, 8 of which are deprecated and maybe 1 that works with unicode. Not that you would know it's deprecated, the original mysql API is still not officially called deprecated, but it sucks big time.

I reckon knowing how to use Flask and Django makes it harder for me to write code the hard way. I'm replicating a lot of functionalty in PHP. But at the same time I know that I'm not good enough to do so. And doing so costs time anyway. I would have probably finished his application in a quarter of the time using Django, heck, even Flask. And it might even hold up to industry standards. My PHP code not so much. Somebody would probably end up dead.

This should not apply to such heavy weight companies, but if you're little application suddenly becomes an overnight success you will have trouble scaling it.

The easiest step would be to store your static data on a commercial CDN. There isn't much logic running. If you would set up one yourself you would use a webserver that is extremely fast at serving static content. The only "thinking" part of the chain would probably be a load balancer.

You're server is now somewhat outside of the boundaries your application server "creates" and deleting old data requires new functionality (although storing too). Functionality that might not readily exist in the framework you use.

If the whole thing is growing too fast for you to keep up you might say to yourself "This and that is now far more important, have the data lying around for a while, it's too much work for now".

Yet there seem to be people who use their data to make a bit of money on the side. I haven't had time to do so, but I wanted to ask SO if the translated SO pages on humbug.in/stackoverflow are against any rules. He punches their pages trough googles translate and stuffs them full with banners.

Nearly drove me nuts because a friend who I was working on a project with kept searching in german. As a result he got the terribly translated pages first followed by the actual SO pages.

As a non-American I'm always surprised that people want them to go away. I can't imagine buying anything without using coins. Is every price rounded up instead of the deceiving 99 Cents? Do you buy two items for 50 Cent each instead of one so you can pay with a bill?

Okay, that's it, I'm cutting of my hair. Everyone seems to hate long hair on man.

But I wonder how many long haired man were in the sample. They are quite rare and a few ponytail grad students might lower the score.

Is it possible to develop an iPhone app without owning one? I have a copy of Mac OSX running virtualized but I never had the courage to learn all this stuff while jumping trough so many hoops and creating something I can't even test myself.

Sadly I'm not American. I forgot to add my location, I didn't think it would be important as I doubt many of HN's readers are German, which I am.

If I had the money to fly to NY, gee, that sounds both awesome and frightening. I envy people who can just take the already filled suitcase out of their closet and end up in a distant place without fear or confusion about what to do next.