HNHacker News
TopNewBestAskShowJobs

edavis

1,965 karma · joined January 15, 2009

BDFL of hnrss
submissionscomments
edavis··on The optional “else” in Python loops
try/except/else used to throw me, but I've grown to like the idiom.

All it means is the try clause didn't raise any exceptions. And a "finally" clause is ran whether an exception was raised or not.

edavis··on MayDay PAC
Good points on all. Thanks for taking the time to engage, at any rate.

You're right: I'm too sanguine on the possibilities of what "wholesale, violent revolution" could look like.

I felt after bashing Lessig, it would only be fair to offer my thoughts on the matter. But I probably should have sat it on overnight and given more thought to the last third. C'est la vie.

If I could re-calibrate my "suggestions," I would disavow the violence while still emphasizing that reformers put themselves at a disadvantage when they try to play this incremental, inside game on the elite's turf.

But, I guess we'll see. I'd love to be proven wrong on this.

edavis··on MayDay PAC
Compared to the philosopher kings we have now?

Congress has an 80% disapproval rating. The President rains death from above via flying robots and secret kill lists. The Supreme Court routinely stacks the deck in favor of the powerful. Inequality keeps rising and more and more people keep falling behind.

> ... then we end up with violent revolutionaries in control.

You mean like how the United States itself was founded?

> What could possibly go wrong?

Not sure. Maybe we'll have a lot of parades in 240 years.

edavis··on MayDay PAC
But can you blame their apathy? It's hard to get fired up about making tweaks at the margins that ultimately might produce a few better outcomes down the road.

I say give people something bigger to aspire to and maybe they'll be meet the challenge.

edavis··on MayDay PAC
Save your money, people.

I'm sorry, but this just seems like another in the long line of Lessig projects with laudable goals but will ultimately amount to very little. Remember Rootstrikers?

From MayDay.us:

> The funders of campaigns are holding our democracy hostage. We want to pay the ransom and get it back.

This analogy only works if the campaign funders also see themselves as holding democracy hostage. But guess what? They don't see themselves that way.

The moneyed elites see themselves as exercising their right to free speech on the issues important to them. And they have the Supreme Court and the House of Representatives in agreement with them on this issue.

And this is where Lessig errs. As his diagnosis for what ails our democracy is wrong, his treatment cannot be successful.

----

Lessig sees our political system as a small cabal of wealthy black hats thwarting the will of the people while he fights on the side of the white hats trying to revive small-d democracy in America.

But how do the "black hats" in this scenario see it?

They'll see it as this other moneyed interest group trying to stifle their First Amendment right to free speech. And they'll fight like hell to prevent Lessig's group from being successful. They're not going to just "accept the ransom" and slink back to their mansions.

And because of the terrain Lessig has chosen to fight this on ("Fight money in politics with more money in politics! Embrace the irony!") we're back to square one: One group of moneyed interests fighting another group of moneyed interests. Exciting, right?

Only now, the "white hats" face a distinct disadvantage. The "black hats" can raise $5 for every $1 raised by the "white hats." Sheldon Adelson can drop tens of millions like that. How do you like them odds?

----

What's my suggested fix? Well, to quote The Wire: "The game is rigged, but you cannot lose if you do not play."

Stop trying to beat the wealthy at their own game. Change the game entirely.

Look around, people. The whole system is beyond repair and has been for years. We're way past the point where a SuperPAC will fix a goddamn thing.

Nothing short of wholesale, violent revolution and a complete re-structuring of our society and economy will suffice. We have to utterly smash the bastions of privilege and power if we want any hope of a fair and democratic society in our lifetime.

Happy Fourth :)

edavis··on Scoop: A Glimpse Into the NYTimes CMS
> What would it take to make an SSG appeal to a broader set of users?

I don't think the SSG, as they largely exist today, will ever gain widespread usage by mainstream users.

But one thing that could drive greater adoption would be to develop an aesthetically pleasing web front-end that lets users write content using familiar WYSIWYG tools, but save the content to local files instead of a database. From there, the process would be largely the same as it is now: transform this directory of lightly marked up plain text files into raw HTML.

So, to answer your question: Make it more like Wordpress.

edavis··on The Sorry State of Emacs Lisp Package Archives
I would love to see an Emacs package management system that copies the best parts of other, already established package managers instead of creating something from scratch.

Homebrew is a joy to use. APT is beautiful. Arch Linux is doing interesting things with pacman. Every scripting language that matters uses a standard, widely known packaging recipe (setup.py, Gemfile, package.json, etc.) that developers can understand in about 15 minutes.

Emacs? Emacs doesn't introduce its package management system until Chapter 47 in the manual. The default repo has so few packages I thought there was an error the first time I saw it. The entire packaging ecosystem screams "this is an afterthought!"

It isn't 1994 anymore. Package management may not be a "solved problem," but it isn't exactly a new problem, either.

I know the Emacs shibboleth is to do everything in Emacs, but we can't be afraid of other options if they've proven themselves to be better.

edavis··on Ask HN: Why do you star GitHub repos?
Encouragement, mostly. My way of saying, "I can tell a lot of effort went into this. Thanks for putting it together."
edavis··on Ask HN: Which feed reader do you recommend trying?
If you're up for it, try riverpy: https://github.com/edavis/riverpy

Here's a demo: http://river-demo.ericdavis.org/

The README is a bit out of date now, but it all works. I've been using it as my sole RSS reader for the past few months now.

edavis··on Ask HN: Will Hacker News Get An Official "Show HN" Section?
FWIW, I think there should be. Always seemed a bit odd seeing Ask and Show posts merged together like that.

In case anyone's interested, I've put together a project [1] that generates a "Show HN" RSS feed here: http://hnrss.org/feeds/showhn.xml

[1] https://github.com/edavis/hnrss

edavis··on Ask HN: I use excel to develop code. Is this rational?
You're fine. I've seen Excel used for far worse.
edavis··on Go Read: One Year with Money and App Engine
Great stuff, Matt. I've always wanted to build something in the RSS space that could net me some extra cash. Write-ups like this let me know it's not a totally hopeless idea!

As for optimizing when to check for new feed items, I recently moved to the "moving average" strategy described here [1] for my personal feed reader [2]. Overall, more active feeds have really benefited from it while I still need to tweak the algorithm for less active feeds, I think.

Here's to another successful year for Go Read!

[1] http://www.rn.inf.tu-dresden.de/uploads/publikationen/feedpa...

[2] https://github.com/edavis/riverpy

edavis··on Show HN: Realtime Hacker News RSS feeds (firehose, comments, search, and more)
OP here. I don't know of a feed that does this.

However, something like that should be relatively simple to build.

HN's API (https://hn.algolia.com/api) can access all comments in a post. Should just be a matter of collecting all top-level comments, sorting by points, and sticking the top few into the RSS <description> element.

I'll consider adding this as an optional feature in hnrss. Would need to add caching, though, as each feed request would generate 20 separate API requests.

edavis··on RSS: What Not Dying Looks Like
I hope it isn't uncouth to mention my RSS reader here: https://github.com/edavis/riverpy

It treats RSS like a newspaper instead of email. Here's a demo: http://riverpy-demo.s3.amazonaws.com/index.html

I'm biased, of course, but I think it's a pretty interesting take on what an RSS reader can be.

RSS is more active now than I ever remember it being when Google Reader was around. Really interested to see what the next few years bring.

edavis··on Ask HN: what do you listen to when you want to be productive?
John Frusciante & Josh Klinghoffer - Sphere (https://www.youtube.com/watch?v=QzLo4eHlpUI). The transition at 4:08 gets me every time.

I also find listening to songs on repeat helps. I get into the "zone" faster when I'm not hearing a new beat every 3-5 minutes.

edavis··on Ask HN: How did you get started with programming?
Worked through a "teach yourself HTML" tutorial on AOL. This must have been early 2000s. I remember being fascinated from the get-go. The concept that this was how you build web pages was just incredible to me.

To practice, I built all kinds of toy sites. Fan pages for bands I liked. Homepages for myself. I would take a site and try to duplicate it. Anything.

Then I learned about servers and hosting so other people could view my sites.

Eventually I picked up PHP which really opened my eyes to what could be done with websites.

Somehow or another I found Python. Mark Pilgrim's "Dive into Python" made the language click in a way other tutorials never did.

Found Django shortly thereafter (2007-ish) and the rest is history.

edavis··on What's New in Mercurial 3.0
See, but I don't think they're "internal" at all.

The "underlying model of git" that David refers to (blobs, trees, commits, tags, branches, HEAD, etc.) aren't seen as internal data structures to be glossed over by a UI. They're the very essence of git.

edavis··on Solving a Maze with D3.js
I still remember the days when Javascript was regarded as a toy language. A glue script for image rollovers and drop-down menus and little else.

Now there are a dozen new Javascript creations each week on HN that make my jaw drop.

It's amazing how far it's come.

edavis··on Ask HN: Any useful tips for writing in Emacs?
You can move paragraphs around with M-<up> and M-<down>. It also works on headlines/plain lists.

Just discovered this yesterday and wish I had known about it earlier.

edavis··on Ask HN: What "weekend project" will you work on this weekend?
I'm trying to turn Emacs into an outliner that can natively read/write OPML files. After asking #emacs today, I think the key bit is using "format conversion" [1] to accomplish this.

I've finally gotten over the "beginner hump" when it comes to elisp and its becoming a fun little language to toy around with. I figure this'll take a good chunk of Saturday.

[1] http://www.gnu.org/software/emacs/manual/html_node/elisp/For...

edavis··on Ask HN: Show us your work in progress
Export Org mode files to OPML: https://github.com/edavis/org-opml

I think OPML[1] is way more powerful and interesting than most people realize. It could be the lingua franca of transmitting structured information if more tools supported it.

My problem was I couldn't find an outliner I was happy with. Then I remembered using Org mode a few years back and decided to dust it off again. Turns out it has a very powerful export engine and I was able to whip something together pretty easily.

[1] http://en.wikipedia.org/wiki/OPML

edavis··on Ask HN: Do you call yourself Ninja/Hacker?
I'm transported back to 2008 whenever I hear "Ninja." Same with "Rockstar."

"Hacker" doesn't bother me.

Developer, Programmer, Designer, Engineer. Stick with the fundamentals.

edavis··on Python Best Practice Patterns
May I suggest `any` here?

    def is_file_for(is_nagyker, type):
        return any([
            type == KIS_ES_NAGYKER,
            type == KISKER and not is_nagyker,
            type == NAGYKER and is_nagyker])
I know unsolicited code improvements from strangers isn't the coolest thing in the world, but `any` (and `all`) can really improve clarity for stuff like this. I know I use them quite a bit.
edavis··on Ask HN: Were you ever scared of pushing to production?
I still get nervous, but I've learned to manage it.

Some things that help:

- Keep your changes small. You should be able to fit the entire diff in your head and completely understand the purpose for every changed line. If you can't, split it up.

- Automate the process as much as possible. Invest in learning whatever tool works best for you (Fabric, Rake, Grunt, etc).

- Use a staging environment. This is especially helpful for catching issues like missing dependencies, DB migration problems, etc.

edavis··on Ask HN: Gay bashing at bayarea tech company—What do?
> You know what humans do? They make mistakes, and are often reasonable and have the possibility of changing.

When I was 5 or 6 I put my hand on a coffee pot warmer because I thought it was a scale. That was a mistake.

Going on a five minute rant against gay people that made (at least) one person very uncomfortable? That's not a mistake. That's creating a hostile work environment.

This is why HR departments exist. Let them evaluate what happened and determine if any guidelines set by the company were broken.

edavis··on Gmail Glitch Is Causing 1000s Of Emails To Be Sent To One Man’s Hotmail Account
It's probably healthy for us "web people" to get a reminder every so often that vast swaths of humanity use computers in ways that are nearly incomprehensible to us.
edavis··on A Peek at Emacs 24.4: Auto-indentation by Default
It appears a wholesale switch to git is already in the works: http://esr.ibiblio.org/?p=5211
edavis··on Ask HN: If Politicians were selected by Random Lotto?
Absolutely. Well said.

To your point that the electoral system doesn't provide "meaningful choices," one suggestion I've always thought was interesting is Jonathan Bernstein's "floors, not ceilings" idea:

> No, the trouble in campaign finance that bothers me the most isn’t corruption, or the massive sums spent on presidential campaigns; it’s the fact that many Senate challengers and most House challengers can’t raise enough to run minimally viable campaigns. The solution to that, in my view is to put a layer of public financing as a floor for all major party congressional nominees, while loosening the rules to make it easier for them to raise larger amounts of money. Floors, not ceilings (plus meaningful disclosure).

http://www.washingtonpost.com/blogs/post-partisan/post/for-f...

edavis··on Ask HN: If Politicians were selected by Random Lotto?
> "... w/ 1 term only."

Nevada introduced term limits a few years ago and the result has been, at best, zero meaningful change and, at worst, actively making an already crappy state government even worse. And they're still given at least a few terms, rather than just one (which would make it even worse).

What ends up happening when you term limit politicians is other actors in the political system gain more power. And in Nevada's case, that means lobbyists and special interests.

They're the ones who can accumulate 20 years of experience while politicians come and go. They're the ones freshman lawmakers are forced to turn to because all other sources of institutional knowledge are no longer around.

In the abstract, I get the appeal of term limits. Fresh blood, new ideas, change for the better. In the real world, though, it just doesn't work.

edavis··on Passenger date header was incorrectly formatted as week-based year
Gotcha. I don't use Rails and wasn't trying to rub salt in, it just seemed like there must have been a reason %G was used instead of %Y and I was curious.
← PreviousPage 4 of 5Next →