Better HN
topnewbestaskshowjobs
Log inSign up

jonascopenhagen

572 karma · joined Dec 27, 2012 (13y ago) · 84 submissions

Submissions

comment 13y ago · link · parent

Sure, and that's the way it works by default: In a <textarea> Enter adds a new line - in a single-line <input> Enter submits the form.

What I'm saying is that if you have a single-line <input> field and pressing Enter doesn't submit the form, you should add some HTML/JS to ensure that Enter submits the form.

comment 13y ago · link · parent

Clickable: http://jsfiddle.net/LFkGZ/ http://jsfiddle.net/6r7gh/

3.

Pressing Enter should submit the form

5 points · by jonascopenhagen · 13y ago · 4 comments

comment 13y ago · link · parent

I don't know if they edited the article, but right now it says "dozens of millions of pounds", which would mean at least £24 million, or roughly $36 million.

comment 13y ago · link · parent

Isn't that weekly? It'd be cool to have a daily one.

comment 13y ago · link · parent

A daily email digest of HN, sent to the user on a specific time he/she wishes, with all of the links (including Ask HN), sorted by points.

comment 13y ago · link · parent

Greece and Cyprus were forced to receive "economic help".

Not AFAIK. Their alternatives were just worse.

comment 13y ago · link · parent

Actually the Russian mafia supposedly has a lot of money in the tax haven that is Cyprus. (Source (in Danish): http://www.dr.dk/Nyheder/Udland/2013/03/16/100422.htm)

comment 13y ago · link · parent

I don't understand the need for this. Hosting 10 GB costs $1 per month on Rackspace Cloud Files and even less on Amazon S3.

Secondly, if you use a paid service you don't need to run your files through scripts to upload them, and you don't risk the files being taken down by the image host admins.

Also, while hosting non-image files on image file hosts technically might not be illegal, it still essentially is abusing a free service. Do you really want to be that guy?

comment 13y ago · link · parent

The big thing that killed market fundamentalism for me was doing a stint in business consulting and seeing what the average rich person actually is: a glorified street hustler.

Capitalism isn't just about the rich people. Small business owners are capitalists, too, and most of the ones I know don't fit your description.

comment 13y ago · link · parent

what would you accomplish by switching from Ruby to Python?

Simpler syntax?

comment 13y ago · link · parent

CRUD apps are inherently simpler than airplanes, and unlike airplanes no one dies when your CRUD app crashes.

comment 13y ago · link · parent

Sure - but if you compare, say, Zend with Laravel, you'll see that the former is hugely complex compared to the latter - and what I'm saying is that the complexity doesn't seem to make the code more maintainable later on - possibly quite the opposite.

comment 13y ago · link · parent

I know what you mean, and I realize there's more to web development than what I just wrote. Nonetheless, I think frameworks such as Zend add a level of complexity that is rarely justified. Zend fans would probably claim that doing things the "right" way in the beginning means less work when you need to maintain the app three years later. I'm not so sure. To be honest, three years from now I'd rather be maintaining a CodeIgniter app than a Zend one. I'm not a CodeIgniter fan per se, and I realize that it gets a lot of criticism for being written the "wrong" way - but the point here is that simple (and well-documented) solutions often win the day.

comment 13y ago · link · parent

> I have yet to see any Java-style absurdity.

Then you probably haven't tried Zend Framework ;)

comment 13y ago · link · parent

Pretty much sums up how I feel about most of the big frameworks (Zend in particular, but also Symfony and CakePHP).

The problem of over-engineering isn't just related to the big PHP frameworks - the same problem exists in Python and Ruby.

At its core, web development is about taking some user input, validating it, throwing it in a database, and displaying it again (perhaps slightly modified) to users. That's a fairly simple concept, and frameworks should reflect that.

comment 13y ago · link · parent

> I meant countries where English is not already the native language.

English isn't the native language in the Scandinavian countries or Finland, and yet most of us speak English fluently :)

comment 13y ago · link · parent

Yes and no - the Americans I know who live here are generally very happy with it. Some are so used to being able to speak English everywhere in Denmark that they live here for years without getting to know the language. But I would definitely recommend people who live here for a longer time (two or more years) to learn a little Danish. It's not that hard, and they can use their knowledge of Danish to easily learn similar languages like German, Swedish, etc.

comment 13y ago · link · parent

> Amsterdam is probably the only city, apart from London, where you can get by perfectly speaking only English.

You can get by perfectly speaking only English in most of Northern Europe.

Southern Europe is a different story.

comment 13y ago · link · parent

What kind of encoding issues are we talking about? I fail to see how PHP in itself should be specifically vulnerable to encoding problems.

comment 13y ago · link · parent

> Encoding. Never had any big problems in Python and a lot in PHP

Encoding is rarely a problem in PHP. Use UTF-8 everywhere, make sure every part of the system uses it (the database server, the database client in PHP, the web pages, etc.). If you're going to work with e.g. Japanese characters, use http://www.php.net/manual/en/mbstring.overload.php

comment 13y ago · link · parent

Deploying a PHP site can be done with the use of one or two apt-get commands. In Python I'd need to do that plus write WSGI-related stuff in a script, alter the Apache configuration, etc. Check out the instructions for Flask or Django if you don't know what I mean.

comment 13y ago · link · parent

> I will find someone who really hates angularJS because if we have a lot of validation, it will become a messy of ng-*

Are you talking about HTML validation? AngularJS supports using data-ng-* which means it's valid HTML.

comment 13y ago · link · parent

Do the majority of people print books themselves at home? Not in my experience. And if they did, they'd waste both time and money and have an inferior product.

comment 13y ago · link · parent

Sure, I agree that 3D printers have a future as children's toys (I wrote that towards the end of my blog post). But the factory-at-home idea where you print cheap objects in order to save money/time is not realistic.

comment 13y ago · link · parent

Home laser printers haven't replaced books, magazines, or professional marketing materials like brochures or flyers. The same way that 3D printing won't replace factory manufacturing.

comment 13y ago · link · parent

> For something you can't (custom items, small parts, little toys, ...), home printing is (or will be) great.

Custom items? Order them online (if they're semi-custom, e.g. a standard T-shirt with your custom text on it) - it takes less time and will probably be cheaper, despite the shipping cost. If it's a custom item you're 3D-modeling yourself, that's a different story - but that's for hobbyists - it won't be mainstream.

Toys? So instead of picking up that $5 doll in the supermarket, busy parents will find something online and wait a half hour while a noisy printer prints a product which is even more expensive than the $5?

123