News for hackers. Stuff that matters.

roam

Re:A first look at Django's new background tasks on Friday November 28, 2025 @06:34PM (#46083796)
With regards to args and kwargs? None. Your callable is basically replaced with a Task instance that’s not callable. You need to invoke its enqueue(*args, **kwargs) method and yeah… that’s of course not typed.
Re:The inverse of IoC is Control on Thursday February 07, 2013 @07:35AM (#5181731)
Don't use IoC if you don't need it, but I'll explain why we need it in our case: some customers require different implementations.

That's where the DI part comes from -- to enable us to load a different dependency based on the customer. Now, you could provide a different bootstrapper class per customer or start building a mega class with a lot of ifs-and-buts(elses), or you specify this kind of stuff in a configuration file.

We opt for configuration files. We opt for IDEs that can interpret Spring configuration files which means typos or incorrect dependencies do show up. This allows us to swap out implementations in case shit goes down without having to recompile, connect over a VPN to a remote desktop and hop through a few more hoops to get our class file on the other side. If you're not running your own apps on infrastructure you control (we should be so lucky), you have to take this sort of stuff into account. I'd love to be able to say "This is how stuff's set up. Deal with it."

(And when shit goes down, it is usually not at the place you were expecting it to happen, which means all kinds of configuration options for your bootstrapper would probably still fall short.)

Re:Dynamically generate HTML/CSS for forms, icons, buttons on Wednesday January 16, 2013 @06:17AM (#5066321)
No doubt for styling purposes.
Re:Engage by Mixpanel on Monday October 22, 2012 @01:29PM (#4684249)
Off-topic, but a heads up to the Mixpanel team: your announcement email sucked. A single big image containing all text? Come on. You guys can do better than that.
Re:Show HN: Storylane - People sharing things that matter on Thursday October 04, 2012 @02:03AM (#4611110)
Fantastic!

What the hell does it do? I'm not signing up without knowing a single thing about this service.

Re:Apple promises maps app will 'improve' on Friday September 21, 2012 @09:30AM (#4553631)
Seriously? Nine out of ten companies will turn "make it suck less" into "make it even better". Apple dropped the ball, Apple does some very questionable things, but please stop this idiotic bashing, whether it's targeting Apple, Microsoft, Google or even RIM. Just stop it.
Re:Django Best Practices — Updated for 1.4 on Thursday September 13, 2012 @05:30AM (#4515363)
I imagine most of those icky suggestions are coming from people who used to run php on hosts with a lot of restrictions. You're right, this should definitely be a part of a best practices guide.
Re:Django Best Practices — Updated for 1.4 on Thursday September 13, 2012 @05:07AM (#4515323)
What's confusing you? (I'm trying to help, not being snarky)

If you want to invoke some Django-based logic at regular intervals without having to install Celery (and monitoring and a decent queue) you'll opt for a management command. The link you posted should help you out here. Invoking the script yourself or telling cron to invoke it for you shouldn't be hard if you know about cron.

With regards to Celery: I think the tutorial and docs are pretty clear on how to use it and how to set it up.

Re:Ask HN: What are your side projects? on Monday August 27, 2012 @03:11AM (#4437776)
http://widgetthemes.be/ - premium jQuery UI themes that don't suck.
Re:BugHub Relaunches With Completely New UI on Wednesday April 11, 2012 @12:59PM (#3828434)
Bug #1: illegible text on the website. Browser: mobile Safari.
Re:Ask HN: What did you build in March? on Monday April 02, 2012 @10:14AM (#3788175)
I haven't tried it out just yet, but you should certainly keep working on it. Great idea!
Re:Create a blog in 30 mins with Django 1.3 (Screencast) on Saturday March 10, 2012 @10:49AM (#3687945)
The reason you have to start looking in settings.py and urls.py is because you used "django-admin.py startproject". Why would you do that? Probably because it provides a nice and common layout with some sensible default configuration.

But you don't have to use "startproject". Here's an example: http://olifante.blogs.com/covil/2010/04/minimal-django.html

No, I don't recommend you to do that. Use Flask, Bottle or any other lightweight framework/library you want to use. Just don't get hung up on how the Django docs suggests you structure your project. It's all still Python.

Re:The first year of our first app - an exciting journey on Wednesday February 15, 2012 @01:03PM (#3595292)
If that's what you're expecting you will be disappointed: it's simply a Git client, a (very nice) GUI alternative to the command line.
Re:Ask HN: How do you promote an app in the Android marketplace? on Tuesday February 14, 2012 @09:07AM (#3589985)
Please proofread the copy of your website. The titles on the site make zero sense to me unless I take a moment to parse them again and again. I mean, "Sparse Rss Pro Best Android Full Text New Reader Application" just screams spam to me. :)
Re:SaaS Fatigue on Monday February 13, 2012 @03:04AM (#3584684)
Key part: "to any web app". You'll need some kind of OAuth provider on top so people can just plug it in right next to their Google, Twitter or Facebook providers.
Re:SaaS Fatigue on Sunday February 12, 2012 @04:21PM (#3583066)
Build something that can expose any LDAP to any web app safely and you'd probably make millions.
Re:Django Production Deployment and Development Using Git on Monday February 06, 2012 @08:10AM (#3557250)
I... don't understand your problem. Is it a PITA to split settings files every single time you start a new project? Yes, sure. Does it take more than five minutes to do so? No.

Really, Flask's config options are better, but they aren't that different from Django. Use the default settings, tell Django which settings to use from the commandline or specify an environment variable pointing at the settings to use. Where you put those settings is completely up to you - nobody's saying they absolutely positively must be part of your repo.

When you're working with multiple environments you'll have to specify which configuration to use one way or another so I'd prefer it to use the least amount of abstraction.

Re:Ask HN: How does an engineer learn design? on Friday January 13, 2012 @05:46AM (#3460028)
You might want to have a look at "Design for Developers": https://news.ycombinator.com/item?id=3283162
Re:Ask HN: Design tools and software. What can I buy? on Friday November 18, 2011 @10:25AM (#3251985)
Look, noahc is absolutely right. If you think Notepad++ is holding you back when coding HTML and CSS, you're wrong. You need practice. So practice.

Have a look at PatternTap (http://patterntap.com/) to find inspiration for specific bits of the UI. Find out how you would create your own in Photoshop/Gimp/Illustrator/Pixelmator/Paint. Maybe add a texture, find a better color scheme or change around the font.

Then build it with HTML/CSS/JS. Use Frontpage, Dreamweaver, Eclipse, Vim, Notepad++ or, hell, even regular Notepad. It does not matter.

Great designers use the tools they are comfortable with. Most use a tool such as Photoshop to build something tangible (a PNG, PSD or, if you're management-material, PPT). That let's them define the way the website should look under ideal circumstances without getting to hung up on the correct HTML and CSS. Then they cut that up and code it in HTML and CSS to create something useful.

That's what you need to practice. And if you're worried your designs look too "Web 1.0", you need to focus on the first part of that process: defining what it should look like, before opening up your editor of choice.

Re:Ask HN: Web forms normalizer on Sunday October 09, 2011 @10:23AM (#3090486)
If you mean the rendering of form fields across browsers and OS, you're probably looking for Uniform: http://uniformjs.com/.
Re:Show HN: Our Django Dash project: Proposalmatic on Monday August 01, 2011 @03:07PM (#2833873)
Thanks! It actually looks pretty great for something put together in the span of 48 hours.

(But I think you guys forgot to filter the proposal queryset by account in the SnippetForm.)

Re:Google Chrome Now Blocks Insecure Scripts on HTTPS on Sunday June 26, 2011 @01:57PM (#2698560)
IE has been doing the same thing for years.
Or go for the Play framework: http://www.playframework.org/

Older »