News for hackers. Stuff that matters.

kaveri

The template system rocks if you like handcuffs on your templates - and for some projects that may be the case.

Otherwise it's crippled in comparison to Jinja or Mako - with large amounts of un-Pythonic boilerplate if you want to write template tags.

To an extent you can replace it but again you will have trouble with those "reusable" apps.

Good point raised in one of the comments: why not have a giant wind platform out at sea to generate the hydrogen, and have tankers come and offload/replace the hydrogen tanks on a continuous basis ?
Re:Introducing MongoEngine: Django-esque ORM for MongoDB on Friday February 05, 2010 @04:07AM (#1103139)
I think the point being made is that it has an API similar to the Django ORM, not that it is an ORM.
Link to petition ?
I'm not sure about the causes, but it seems in the UK for example that social mobility has decreased in the past few decades compared to the 1960s. A big part of that has been the disaster of comprehensive education - the old grammar school system, which selected children from poorer families, gave at least some a chance of climbing the social ladder. Comprehensive schools are more of a lottery than a meritocracy, and the wealthy as always have the option of fee-paying "public" schools.
Re:Ask HN: What should I learn next: Ruby or Python ? on Thursday January 28, 2010 @01:12PM (#1084518)
Absolutely agree with you on most of the points. A couple of quibbles - Django now supports multiple databases (as of 1.2) and South (http://south.aeracode.org/) is more or less the default migration tool nowadays and is OK for most jobs.

Personally, I find generic views to be useless for anything but the simplest of prototyping. Making them functions rather than callable classes was a big mistake IMHO. I very rarely use them in a serious project.

Another pet hate is UserProfiles - you have to use a separate model if you want any custom fields for your users which entails a join whenever you want to use it. It's been a ticket for years but nobody seems willing to fix it.

I agree with you 200% on templates and am in a very similar situation. Having to write convoluted code in template tags for the simplest of things is frustrating, when you can have simple function calls and template macros in Mako and Jinja2.

I'm not hugely fussed about AJAX myself - I tend to keep things simple in the views and just pass JSON back and forth and jQuery does most of the front-end work. I disliked the Rails way of binding everything to a particular JS library, not sure if it's still done that way any more.

Django is OK for certain projects. What annoys me though is that like Rails, it has gotten such mindshare in certain companies that they call themselves "Django shops" and want to use it for everything, without considering alternatives. Personally I stay well clear of it for my own projects - Pylons, Werkzeug, SQLAlchemy et al are a lot more fun to work with.

Re:Ask HN: What should I learn next: Ruby or Python ? on Thursday January 28, 2010 @12:47PM (#1084445)
Who said anything about whining ? It is your duty as a professional to promote what you consider the best tool for the job. A spade isn't much good if your job is to rake some leaves.

Of course your advice might be overruled for perfectly valid technical or non-technical reasons. But by keeping silent and not suggesting alternatives you are doing yourself and your employer a disservice.

There's still no reason to limit post size because Twitter does - title and shortened URL to the original post works fine.
Re:I will make 100 redesigns because I'm sick of startups on Wednesday January 27, 2010 @10:09AM (#1080629)
It's a great idea in theory, the problem is that corporate designs go through ten different committees each wanting something different, so you end up with an unusable mess.
Very nicely done. I take it this is running on Google App Engine ? (Just a guess, based on the Google Account signup).

No need to market it as just for rural locations. In the UK we have Gumtree for example, which is a serious competitor to Craigslist. While I agree to some extent with the idea of Craigslist's simplicity, I think it is becoming long in the tooth and unwilling to consider new ideas, and it's time for a decent, usable replacement.

Some IP-based geolocation would be nice. And some localization: "yard sale" and "apartment" for example are US terms. But that's nitpicking, which is a good sign :-)

Re:Ask HN: What should I learn next: Ruby or Python ? on Tuesday January 26, 2010 @03:42PM (#1078783)
Django != Python and Rails != Ruby. There are other solutions in either language that might suit your project better.
Re:U.S. Versus Europe: No Winner on Friday January 22, 2010 @04:47AM (#1069397)
Language is a big factor: English is the first foreign language taught in European schools (and the mother language of most UK and Irish citizens); Americans are traditionally poor at foreign languages, so are less likely to move to a country where they need to learn one.

Another factor is culture - America is more "welcoming" to ethnic minorities, and is built more or less on top of recent immigrants. European nations have a stronger ethnic identity which is less able or willing to accept new groups.

Really though you can't compare America to Europe in a single generalization - Poland, UK and Spain, to name a few, are completely different places, more so than, say, California and West Virginia. It will be impossible (and undesirable) to achieve the same kind of unity America has, not in this century anyway.

Re:Zope3 renamed BlueBream on Thursday January 21, 2010 @08:48PM (#1068907)
True, but as a marketable name bluebream leaves a lot to be desired...it doesn't roll off the tongue very well.

And what was with the weird YouTube video with the wedding song ?

A name change is a good idea - there was too much confusion between Zope 3 and Zope 2 - but they should have spent a little more time on thinking up the new name.

Re:Why You Need to be in Silicon Valley on Monday January 18, 2010 @11:22AM (#1060116)
At the end of the day you succeed (in the larger world, not the Silicon Valley echo chamber) by having a great (or even good enough) product that hits the market at the right time, and can pretty much grow because you have customers willing to pay for it, directly or indirectly.

If all you have is a "me-too"|yet-another-Twitter-client that appeals only to the geek crowd, and has no viable business model, Silicon Valley is the place to be. Especially if you want to burn through early capital living in one of the most expensive locations in North America.

Re:Reconsidering Star Wars IV in the light of I-III on Saturday January 16, 2010 @11:10AM (#1057047)
Maybe because Luke was so powerful in the Force and Leia wasn't ?
Re:Doing things with Django forms on Friday January 15, 2010 @07:01AM (#1054714)
Django forms (and their non-Django counterpart, WTForms) are very easy to use, with a declarative syntax.

The advantage is that validation is decoupled from models. Often you need to handle validation which doesn't directly involve a single model - for example sending an email, or handling updates to a number of models. This saves you having to litter your controller/views with validation code.

Re:Why I switched back to PHP after 2 years on Rails (2007) on Thursday January 14, 2010 @03:01PM (#1053455)
If you are using MVC maybe. ASP.NET WebForms and postback add tons of crap to the HTML.
Re:Single-tasking/workflow manager on Thursday December 24, 2009 @06:45PM (#1014541)
what other technologies are you using apart from MongoDB ?
To an American, perhaps. Ask someone from China the same question.
Re:Early adopters bloodied by Ubuntu's Karmic Koala on Wednesday November 04, 2009 @03:55AM (#921342)
Updated my Advent laptop from Jaunty a week ago, no significant issues. Can't say it's massively better than Jaunty in terms of features or performance though.
Re:Ask HN: Are (web) developers now a commodity? on Wednesday October 28, 2009 @03:56PM (#908608)
Probably from some idiot MBA. Now there's a commodity.
Re:Magic sucks, Django Rocks on Thursday May 07, 2009 @02:20AM (#597545)
I get the impression Pylons tries to be the "anti-Django" inverting the NIH attitude of Django and trying to be all things to all developers. The end result however is a huge number of dependencies and options that make installation and setup harder than it should be. Turbogears 2, which is based on Pylons, has an even greater number of dependencies - such that I needed to install virtualenv to get going with it.

For example, in order to support a large number of template engines, Pylons uses Buffet, another library which provides a common interface for these engines. Typically, however, you will only use a single template engine in your project and it only needs a few lines of code to set an engine up.

Although I do most of my web development in Django, when I do need more control or something a bit simpler I go with a Werkzeug + SQLAlchemy + Jinja stack (plus WTForms, similar to Django forms but in a standalone package). The code needed to get up and running isn't that much more than Pylons (and paster generates a whole lot of code anyway) and I can count the dependencies on one hand. That makes deployment a lot faster and easier, and it's just as easy to swap out these dependencies as with Pylons.

Re: on Tuesday May 05, 2009 @07:00AM (#593915)
That's the problem - when Rails bloggers come across as over-hormonal 15 year olds (as this blogger does) it casts doubt on the maturity of the community as a whole.

Why not try dumping this silly, dated "rock star programmer" attitude and start discussing the strengths and weaknesses of your preferred technology like an adult ?

Re:Rails is (still) a Ghetto on Tuesday April 28, 2009 @06:08AM (#582927)
I think this points at a general problem with developers.

Developers assume that just because "it works" then non-code issues are irrelevant.

In truth, people choose frameworks and languages not just because of the code and career opportunities but also because of the community. This goes for developers and management.

There is nothing wrong with that - software development is as social as any other human activity. A good community is helpful, welcoming and tolerant. Compare for example the Lisp and Python communities - Lisp has definitely been hurt by an elitist, unwelcoming community, whatever its technical merits.

After this presentation and related comments across the blogs, the Ruby/Rails community comes across as arrogant, sexist and immature (as do its leaders). This does a completely unnecessary disservice to the technology.

Re:Cause of gray hair discovered on Tuesday March 03, 2009 @03:58AM (#501224)
Internet Explorer ?
Re:Why is enterprise software so bad? on Friday February 27, 2009 @12:41PM (#497413)
Enterprise applications also have a smaller number of users, so the feedback pool is smaller: you don't get the same number of bug reports feeding back into your development cycle as you would with a widely-used web or shrink-wrap application.

End-users who happen to be employees don't get to choose the software - just like developers who are forced to use Java at work but code at home in Haskell or Python, they are forced to use a system decreed by management and therefore will often have a negative bias to start with - "the new system" being both a focus of complaints in the coffee room and a catch all excuse to tell customers.

"The investor tells me, "Oh, this is fine. Treat your stock like Monopoly money and give it to the freelancers.""

This has happened to me on several occasions. Where do startups get the idea they can rip off freelancers with worthless stock ?