HNHacker News
TopNewBestAskShowJobs

flashingpumpkin

601 karma · joined May 4, 2009

Coder
submissionscomments
flashingpumpkin··on Django Best Practices
I've got to disagree with the chapter about settings files. Instead of maintaining multiple different settings for different environments, make your default settings file pull modifications for each environment from os.environ, e.g.:

  STATIC_URL = os.environ.get('STATIC_URL', '/static/')
This is a lot saner and won't descend into a mess that is keeping multiple settings files around. It's also a lot easier to explain.
flashingpumpkin··on Ask HN: How can I outsource DevOps?
This. And if you don't want to go to the length of maintaining your own Chef server you can opt for hosted Chef:

http://www.opscode.com/hosted-chef/

flashingpumpkin··on Summly: intelligent news summarisation
Here's [1] an interview Nick gave just a couple of hours ago on Bloomsberg.

[1] http://www.bloomberg.com/video/slacker-16-year-old-whiz-laun...

flashingpumpkin··on Sol — a sunny little homemade virtual machine
I think it's also worth linking to David Beazley's Curious Course on Coroutines and Concurrency [1]. It's exploring the ideas of a task scheduler implemented in Python. This article reminded me of it. It's not a full VM, but about half way into the PDF he goes into quite some detail on how to build a task scheduler modelled after an OS and how it works in an actual OS. Give it a read.

[1] http://www.dabeaz.com/coroutines/

flashingpumpkin··on Pyjaco - Python to JavaScript translator.
The issue I had with Pyjamas is that the whole tool-chain and compilation was a bit borked and the documentation a bit vague. After playing around with it for a day I decided it was too cumbersome so I ditched it in the end and tried py2js which Pyjaco is forked from. Mind you that was 2 years ago so a lot might have improved in that time but it convinced me that writing JS in Python is (was) not really feasible.
flashingpumpkin··on Pallet, Clojure Dev Ops like Chef and Puppet
I really like that they opted to do everything over SSH in contrast to both Chef and Puppet that need a client/server configuration or at least some of their packages installed locally.

We do all of our deployments with Chef Solo and push our Cookbooks via Fabric over SSH to our servers. Pallet is definitely something to have a deeper look at as I don't like installing more than the bare essentials of what our apps need on our servers for various reasons.

flashingpumpkin··on Review: Clojure Programming
Looks like the host is not quite keeping up anymore - cached version: http://webcache.googleusercontent.com/search?q=cache:aviflax...
flashingpumpkin··on Simple - An Obtvse clone written in Python
It's still not properly packaged up and also nowhere to be found on http://pypi.python.org resulting in no pip and no easy_install options. Pretty much every useful python package is distributed that way, see httpie for example [1].

[1] https://github.com/jkbr/httpie

flashingpumpkin··on HTTP Caching Tutorial
Yep, I stumbled over it while researching the Cache-Control header.
flashingpumpkin··on Tell HN: Gray text on white background sucks the blood out of my eyes
You can fix it with a simple user script for your browser.

User script, install to have black font in comment threads: https://gist.github.com/raw/1600378/95ad884caa17d8a02f1f425a...

And the gist: https://gist.github.com/1600378

flashingpumpkin··on The Facebook Platform Is A Trainwreck
Sigh. I feel your pain. They've deleted the Python SDK unanounced from Github two weeks ago. Not really responsible if you consider there were dozens of watchers and possibly at least as many other sites / projects depending on it. (Also that's ignoring the fact that their docs state 90 days warning period :()

edit Typos, writing on the phone and it's late.

flashingpumpkin··on Show HN - Random business from the INC5000 list in json (for business ideas)
Similarly, with Python:

  curl -s http://random-inc5000.herokuapp.com/ | python -m simplejson.tool
I've got the last bit aliased as `json` though.
flashingpumpkin··on Ask HN: Where is the Django community?
I've got to disagree with you.

It's clumsy, inflexible and restrictive.

Pretty much anything can be swapped out with custom code. Need a custom auth backend? Just write a class. Need custom session backends? Just write a class. Need to customise a certain view of an application? Just override the url. Don't like the ORM? Just use something else. Have special caching needs? Write a backend.

A look at the release notes are full of good things and following them is definitely worth it. Since 1.3 you've got class based views that make it dead easy to create RESTful views for example. There's new logging support, you can have multiple databases with different backends.

The community is pretty much dead.

It's true that there was a lot more blogging happening in the earlier days. I suspect that the community is simply busy building new things - but a look at the CheeseShop shows on any day a healthy amount of new and updated Django components. Right now there are 7 Django projects on the main page.

All my Django projects ended up being a big mess, and I had to undjango my way out of the various restrictions it placed on me.

I'm a big fan of how Django creates structure through its applications. It makes it very easy to build parts of functionality on a plug and play basis and use them across projects.

Django offers a lot of functionality and it can be difficult to pick the right ones being a newcomer. But once you get the hang around applications and repositories and start working with "advanced" Django and Python features and apps like the built in signals, Celery, Fabric, GUnicorn, etc building and deploying apps becomes a breeze.

flashingpumpkin··on Andrea Rossi energy catalyzer production ready
Yep, agreed.

Here's a little more information, including criticism.

http://en.wikipedia.org/wiki/Energy_Catalyzer ( Follow the references )

I also cannot see why the site would host a forum and the flamewars about its credibility.

flashingpumpkin··on Ask HN: Looking for a version control based backup tool
Have a look at this: https://github.com/hbons/SparkleShare

It's using git as a backend to sync.

flashingpumpkin··on I love async, but I can't code like this
We've adopted a way that allows us to do basically this:

    mainWindow.menu "File", (err, file)->
        openMenu err, (err, menu)->
            getItem err, "Open", (err, item)->
                click err, item, (err)->
                    getChild err, getChildType("Window"), (err, dialog)->
                        if err? and err instanceof NoFileError
                            # do stuff
                        if err? and err instanceof InvalidClickError
                            # do other stuff
                        if err?
                            throw err
                        # do stuff with dialog if no err
                        
Each function takes as first argument an error and as last a callback. If there's an error, the function just passes the error up the callback stack until it gets dealed with.

    fun = (err, args..., callback)
You can't pull that off if your code is heavily object oriented though:

    mainWindow.menu "File", (err, file)->
        # If mainWindow.menu errors, file is undefined 
        # and the call to openMenu throws an error
        file.openMenu err, (err, menu)-> 
            # ...
Breaking your code/api up with modules instead into classes fixes that.
flashingpumpkin··on JustSpotted (YC S08): Celebrity Geo-Stalking In Real-Time
Sounds a lot like what we're doing on http://pappd.com plug
flashingpumpkin··on HN London Meetup
Yep. Rivington street in fact.
flashingpumpkin··on HN London Meetup
I'm in. It's just a two second jump :)
flashingpumpkin··on [dead]
Hm yeah. I second that. My votes didn't have an effect on anything for a couple of months now, which is very disappointing when coming across good stories and comments. Voting degraded for me just to keep bookmarks around in my saved stories. :(
flashingpumpkin··on Ouch
$ man fortune
flashingpumpkin··on Switching to a Zsh Shell
To be honest, most of that stuff works just fine in BASH too.

http://gist.github.com/277975

That's my bash prompt, doing the same. Except, it doesn't factor in mercurial repositories, but that'll be a breeze to add.

Displaying: (<virtual_env>) user@host [ <folder> ~<branch> <* available changes>]$

flashingpumpkin··on Ask HN: Anyone went from PHP to Python?
> - Dont Count on autocompletion (at least not in eclipse)

Tbh, PyDev for Eclipse is pretty darn good. Doesn't fail me on autocompletion, function arguments etc, except for places where objects are created dynamically. Also, I find it very handy being able to navigate to any one places in my $PYTHONPATH with one keystroke on F3 and get the documentation + the implementation to read through. Keeps me away from most documentation sites and inside the IDE.

flashingpumpkin··on RWW Never Mind the Valley: Here's London
This seems quite spammy -> "Canadian online pharmacy". Someone should moderate this. ;)

[edit] Wee. Just had a look at the forums. That doesn't really seem usefull.

flashingpumpkin··on RWW Never Mind the Valley: Here's London
Greetings from a fellow Londoner :)
flashingpumpkin··on Canonical/Yahoo revenue deal; Yahoo is the new Ubuntu search default
Noooo :(
flashingpumpkin··on Ask HN: Please review my site - A Craigslist competitor for rural areas
Really like the interface. Will be interesting to see once there's content ...
flashingpumpkin··on Ask HN: A competitor stole my iPhone app content — what should I do?
Obviously the guy knew that he's onto something shady. Why else would someone name an sqlite database .png2?

Can't give you any legal advice though. I reckon you should go after what others recommend here.

flashingpumpkin··on Suppose The Earth Got Saturn's Rings...
That was my exact thought too - and from there probably some other conclusions too.
flashingpumpkin··on New scanners break child porn laws
I'd really want to know which technology powers these scanners. After a quick googling I couldn't come up with any relevant information. :(
Page 1 of 2Next →