News for hackers. Stuff that matters.

inDesperateZone

Re:Web crawling and downloading ebooks with phantomJS on Sunday June 17, 2012 @08:53AM (#4122847)
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.

Ask HN: Guides to things surrounding app development like hosting, taxes, etc.?

I have a hard time finding the necessary information. There are thousand guides on how to develop an app, get it in the store, choose the right framework, getting ideas, marketing etc.But next to none concerning everything in between. And to be honest, I seem to know jack squat about paying taxes and self-employment.I probably don't even know about many small details and end up in jail or...

( Read More... | 1 comment | 7 points | on HN )
Re:Ask HN: Where to start? Am I on the right track? on Thursday May 31, 2012 @04:57PM (#4050324)
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.

Re:Ask HN: Where to start? Am I on the right track? on Monday May 28, 2012 @03:28PM (#4034636)
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".

Re:Preventing Site Scraping on Friday May 18, 2012 @09:03AM (#3991552)
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.

Re:What the U.S. needs is an 18-cent coin on Thursday May 17, 2012 @06:42AM (#3986324)
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?
Re:Ask HN: Heroku vs Dotcloud for Django? on Thursday May 10, 2012 @05:26PM (#3956145)
Doesn't Heroku allow somewhat unlimited development sites as well? Though the database limit is even smaller at 5 MB.
Re:What makes one appear smarter and more sociable? on Thursday May 03, 2012 @10:49AM (#3924057)
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.

Re:Ask HN: Becoming an iPhone app Dev. on Monday April 23, 2012 @01:04PM (#3879808)
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.
I actually own a guitar. Playing for two years now. But its not worth much and I'm not good enough to keep anyone listening. I think learning to code at a reasonable level is much easier than learning to play guitar well enough to be able to busk.
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.

I fear that I neglected that for too long. I don't know what is complex enough to impress anyone, but I doubt I can hack something together in under a month that will reach that level.

Ask HN: A place to sleep, a laptop, no résumé and a hungry man.

I've found myself in this situation more often than not. Due to my own fault of course. But I always ended up relying on others until I caved in, doing jobs that provided me with more money than I need but with no enjoyment and the feeling of unfulfillment, dropping them like I had a choice even if I didn't.I can program, it's what I can do best, it's what's keeping me happy. But without a...

( Read More... | 50 comments | 61 points | on HN )