skysight-inc/HackerNews huggingface dataset:
Here's some stuff I find useful when editing Python:

(setq-default show-trailing-whitespace t)
(setq longlines-show-hard-newlines t) ; displays "\" at the end of lines that wrap past the window's edge

; camel case word navigation
(when (boundp 'subword-mode)
(add-hook 'after-change-major-mode-hook '(lambda () (subword-mode 1))))

; Bindings
(defun delete-backward-indent (&optional arg)
"Erase a level of indentation, or 1 character"
(interactive "*P")
(if (= (current-column) 0)
(delete-backward-char 1)
(let ((n (mod (current-column) standard-indent)))
(if (looking-back (concat "^\s*" (make-string n 32)))
(if (= n 0)
(delete-backward-char standard-indent)
(delete-backward-char n))
(delete-backward-char 1)))))

(defun newline-maybe-indent ()
"Like newline-and-indent, but doesn't indent if the previous line is blank"
(interactive "*")
(if (= (line-beginning-position) (line-end-position))
(newline)
(newline-and-indent)))

(add-hook 'python-mode-hook
'(lambda ()
(hs-minor-mode 1) ; code folding
(define-key python-mode-map (kbd "RET") 'newline-maybe-indent)
(define-key python-mode-map (kbd "DEL") 'delete-backward-indent)
(define-key python-mode-map (kbd "M-RET") 'hs-toggle-hiding)))

; On-the-fly spell checking
(add-hook 'python-mode-hook '(lambda () (flyspell-prog-mode)))

; On-the-fly pyflakes checking
(require 'flymake-point) ; shows errors in the minibuffer when highlighted (http://bitbucket.org/[redacted]/dotfiles/src/tip/.emacs.d/plugins/flymake-point.el)
(setq python-check-command "pyflakes")
(when (load "flymake" t)
(defun flymake-pyflakes-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "pyflakes" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pyflakes-init)))
(add-hook 'python-mode-hook '(lambda () (flymake-mode 1)))

I have a feeling there's probably a better way to do that delete-backward-indent thing. Maybe I should just switch to hungry delete mode.

My entire .emacs is here: http://bitbucket.org/[redacted]/dotfiles/src/tip/.emacs
"Research union card" is my preferred description. It encompasses the necessity but scopes the applicability :)
"Log into a Linux box with xmonad, emacs, and rxvt-unicode, and you have no choice but to create. That makes you a hacker."
And, assuming you're the same beginner who doesn't know what to do with a Mac (the comparison was with a mac), stare at the display with no clue about how to start an app.

Log into a Mac, with iLife with Garage Band (what? Creation != programming), easily installable XCode and cheap, good graphic programs and you can create whatever you want.

By forcing people to code you're not creating "hacker" nor "creators". You're replacing musicians, graphic artists, designers and other creatives with frustrated code monkeys.

"Get an iPad, and with easily-available movie downloads and an infinite supply of blogs and no way to enter text efficiently, and you aren't going to be doing much creating. That makes you a consumer."
Also, with graphic software, many ways to relax, and a Mac or PC that you sync to.

And a system that gets out of your way so that you can do what you want, possibly something more interesting that 10kline .vimrc.

I'm going to go the other way - for most people Linux is counter-creative. Instead of either making that (possibly stupid) clip, they have to configure the damn thing and somehow get the network drivers and the touchpad work at the same time. Effectively, they are consuming forum posts. Instead of relaxing by consumption they get frustrated, the only skill that's really developed is hard-core toner replacement and desktop computer troubleshooting.

In contrast, MacOS (usually) gets out of their way, even brings some fun, creative software OOTB. And the iPad is all about relaxing and finding fun stuff. You know, inspiration.

Linux is good for people who actually know what they want to do with it. So is an Arduino, a guitar and a large block of marble.
Turn your Android Phone Into a Remote Spy Camera with Ruby in 15 Minutes
Agreed. But 1. Have to give it a go. 2. I think with continued positive feedback and traction. It makes an interesting proposal.
Goodbye Blog. Hello Letter.
any evidence for these claims?
It looks like it's just some filters ... what am I missing.
These are pretty minor, but I use them constantly, and they're pretty self-contained.

(global-set-key (kbd "C-=") 'switch-to-previous-buffer)
(defun switch-to-previous-buffer ()
(interactive)
(switch-to-buffer (other-buffer)))

(global-set-key (kbd "C-z") 'shell)

(defun my-shell-mode-hook ()
(local-set-key (kbd "C-z") 'bury-buffer))
(add-hook 'shell-mode-hook 'my-shell-mode-hook)
Unfortunately, I've found articles on this site to be poorly articulated opinion pieces, written from broken premises and with incorrect information, rather than actual UX practice documentation. Comments that disagree and point out errors are routinely deleted; a response to the one comment of mine that has remained live included the line, "this is a blog, not a science lab." One of the differentiators of UX from art is that it can be tested, so I find the author's attitude professionally disappointing.

LukeW's seminal book, "Web Form Design" has an entire chapter (19 pages!) about label placement. Some notes:

This paper is cited as discussing a major eBay form design, explaining their methodology: http://scholar.google.com/scholar?cluster=106605571117736457...

This article is cited as having done the eye-tracking research for label placement: http://www.uxmatters.com/mt/archives/2006/07/label-placement...

The chapter starts out with the note that "it depends" for your specific usage.

A summary of the results are available on his blog: http://www.lukew.com/ff/entry.asp?504

He also discusses using inline labels on his blog: http://www.lukew.com/ff/entry.asp?687
I agree with your comment. But this is a matter of timing. I have to believe that within 12 months, they will incorporate apps in the new Apple TV. For a family of four, I spend close to $150 per month on cell phones. Apple is now getting a piece of that and I am happy they do because cell phones used to suck until they came along. I am also spending close to $100 per month on cable and I can't wait until Apple gets a piece of that as well. Nothing sucks more than Comcast Cable. That's a lot of money per month for apps. Go west, young man, go after the money.
BuzzFeed.com: Totally Viral and Transparent, All Our 7M Uniques Data
NYT article from 2004 discussing the same exact organisms:

http://www.nytimes.com/2004/06/01/nyregion/there-s-something...
http://github.com/al3x/emacs
Saw it. I guess there is a disconnect between the rate charged and the room assigned in hotel management systems. I could fix that pretty quickly with a few queries.
Ask HN: Ideas for Surveying?
I'm working on validating an idea for a project. As part of that validation I need to learn about my potential users. I thought that surveying them would indeed be a good idea, but it's proving challenging to get responses!

I've read a lot about driving traffic to a landing page via, say, Ad Words and FB ads, collecting email addresses, and then surveying that population. I'm wondering if anyone has had success with these techniques?

Are there any other good resources you commonly use when trying to survey or when trying to find populations to survey about an idea?
Who would have guessed that the general public will be gaming the same system that has been gamed for years by the corporations? ;-)
http://www.boxee.tv/faq
Any other company? Really? Name a sufficiently large petroleum company: they automatically have more "users" than Facebook for something those "users" are automatically guaranteed to pay for. (Do anything and you use petroleum, directly or indirectly. Even getting out of bed in the morning requires energy, i.e. food, and that food was shipped using petroleum products and likely harvested with petroleum-consuming tractors as well.)

You can even get more potential from having a lot fewer users, but monetizing each user by a greater amount. Having tons of unmonetized users and looking for a way to monetize them is questionable at best.
I humbly suggest you sign up for our mailing list & drop our RSS feed into your reader :)

And I second that opinion, replacing 'humbly suggest' with 'order you to'!

The cultural foundation of Breadpig has motivated me to pursue a small idea I've had for a while, but which was never going to be super profitable - switching into the charitable mindset, however, makes it a much more energising project. So thanks for that inspiration, I guess.
Why would you need a FB app for iPad? FB looks awesome on the iPad as is. In fact when you visit FB on the iPad you're actually served a (slightly) different version of FB than if you visit in the browser.

iPad is all about HTML5+JS apps...Facebook is a sweet HTML app in and of itself.
I believe that the new Apple TV won't be a runaway success (and possibly a failure by their standards) for Apple.

The reason the iPod was a huge success was because you could fill up that enormous hard drive with music you didn't pay for. What would be the point of owning a piece of hardware you paid hundreds for if you now had to pay hundreds or thousands more to fill it with music? Of course some do, but they are in the minority. People have no problem paying for an expensive-looking piece of hardware they can hold in their hand but balk at the thought of paying a lot for digital content they can only access temporarily (especially when said digital content could be downloaded free elsewhere). I think this is the elephant in the room that Apple have overlooked. If the Apple TV did everything the new model did but had a 1TB drive attached, it would be a different story.
(Blog author here)
I totally agree -- I don't think there's ever a good reason to use a LB for mail, for exactly the reasons you mention.

However, the problem with using CNAMEs for LBs is that you can't both host mail and a site at the same subdomain. Ideally, what I would want to do is set up redundant MX records for .pagerduty.com to our mail servers, and also set a CNAME from .pagerduty.com to the ELB for to handle the web traffic. The DNS spec doesn't allow this though (it would be ambiguous).

I've thought about using round robin DNS with a low TTL instead of an ELB. Problem there is you don't get all the fancy auto-scaling stuff. I've also heard rumors that some ISPs have their DNS servers configured to put a floor on the retrieved TTL values...
Some universities are better at this than others. My alma mater, University of Bristol, actively encouraged their faculty and students to create startups inside their incubator, giving them a bunch of money (usually alongside other VC AFAIK). You had about a year to pop, if nothing happened you went back to your day job, if it did, the company span out at UoB held onto their equity. I'm sure this is a model you'll see at other top universities such as Stanford.

I'm now at UC Santa Cruz, and despite being 40 minutes from Silicon Valley, I see absolutely zero of this entrepreneurial spirit. The administration is wasting their talent from top to bottom. They had a business plan competition. Top prize: $500. Not an incubation offer. No VCs invited. Nothing.

Even my Computer Science Masters at UoB had a business plan class baked in, and the final project pitch was to a board including the head of CS, the head of the business incubator, another faculty member, and an invited VC. You had to impress all of them to do well. Apparently the VC was the only person who didn't like my pitch :) But UCSC is doing nothing like this anywhere. It's a terrible waste.
I have a friend who used to approach concession stands at sporting events and ask the teenager behind the counter if he'd give him a free x,y, or z if he put $2 in their tip jar. This usually worked.
Haven't used it, but I think the Roku box is a serious competitor as well, and already exists. Netflix and other channels, plus a SDK.
"The Boxee Box is going to be $100 more expensive than the Apple TV, but will give you the freedom to watch what you want."

What if I want to watch movies from the major studios? Netflix?
If we could now adjust the cutoffs for high blood pressure and high cholesterol so as to include 77% of the population, that would totally increase the market cap of the pharmaceutical manufacturers.
This kind of BS is why I quit IXDA. Hypothesis with no convincing evidence either way being passed around as fact.
Seems like you're not doing a good job of resisting! That said, it would be interesting to hear from Japanese or Japan-resident HNers about this.
> Increasingly, I was struck by how much impact the experience was having on me. Surmounting this challenge night after night was actually giving me a certain self-assurance, a feeling of having grown up. Some might find this disillusioning: “You mean life is not first-come, first-served?” I found I had a different reaction: “You mean all it takes to crack one of New York’s most daunting thresholds is fifty bucks?” Even if I chose not to do it on a regular basis, just knowing how doable it is brought the whole puffery of New York restaurants into perspective. Bribing, it turns out, has as much effect on the briber as it does on the bribee.

If you ever wanted to know why corruption is so entrenched in many parts of the world, there is your answer.
I use color-theme.el to manage, well, colour themes and use the twilight theme: http://github.com/crafterm/twilight-emacs/blob/master/color-...

To mimic some of TextMate's functionality, I use:

1. autopair.el: http://www.emacswiki.org/emacs/AutoPairs.

2. yasnippet.el: http://code.google.com/p/yasnippet/

The latest version of Emacs for the MacOSX has an awesome fullscreen capability. I followed the instructions here: http://www.sanityinc.com/full-screen-support-for-cocoa-emacs...

iswitchb-mode has awesome minibuffer completion capabilities. http://www.emacswiki.org/emacs/IswitchBuffers
I wouldn't necessarily agree this is true as long as you never have a mentor, never take money from anyone who wants voting shares and only work by yourself.

All environments have politics. It's inherent in collaborative human interaction. What changes is the extent and the style.

I much better understand university politics than I do office politics. University politics is glacially slow and almost always run democratically; if you want something to change, you need plenty of closed door discussions with as much faculty as possible to get them on-side when the time comes to push.

My exposure to office politics was always power struggles between people with titles, and who can get the right handful of ears to listen. Sometimes you needed to step on the throats of other people internal or external to the company. I could never find the right pace, people or aggression to get it right.
"No matter how much resolve you could muster, it was still difficult to quit Apple if Steve wanted you to stay. You'd have to sit down with him for a reality distortion session, which was often effective at getting people to change their minds."

http://www.folklore.org/StoryView.py?story=Are_You_Gonna_Do_...

Okay, that's from the 80's, but you never know, it might still be true and makes a good story either way.
This article http://www.iovs.org/cgi/content/full/50/3/1158 implies that vertical saccades are less accurate than horizontal saccades.

I could not find direct measurements of the vertical vs horizontal velocity in the few minutes I searched, but you can try it for yourself.

Try rapidly flicking your eyes left-right, then try up-down. At least for me left-right is much faster.

Edit:

http://elmar-inc.com/Papers/Clinical/SaccadesInChildren.pdf has a graph that clearly shows that horizontal saccades are faster.
* Smex. This adds IDO completion to M-x. Can't live without it. http://github.com/nonsequitur/smex/

* Undo-tree. (http://www.emacswiki.org/emacs/UndoTree) Makes emacs undo useful.

This has been one of the most useful functions I've added to my .emacs:

(defun xsteve-ido-choose-from-recentf ()
"Use ido to select a recently opened file from the `recentf-list'"
(interactive)
(let ((home (expand-file-name (getenv "HOME"))))
(find-file
(ido-completing-read "Recentf open: "
(mapcar (lambda (path)
(replace-regexp-in-string home "~" path))
recentf-list)
nil t))))

(global-set-key [(meta f11)] 'xsteve-ido-choose-from-recentf)

From: http://www.xsteve.at/prg/emacs/power-user-tips.html, which has a bunch of good tips/key bindings
In the case of Google, this is pretty much exactly where they are headed (by design):

"I actually think most people don't want Google to answer their questions," he elaborates. "They want Google to tell them what they should be doing next."

Let's say you're walking down the street. Because of the info Google has collected about you, "we know roughly who you are, roughly what you care about, roughly who your friends are." Google also knows, to within a foot, where you are. Mr. Schmidt leaves it to a listener to imagine the possibilities: If you need milk and there's a place nearby to get milk, Google will remind you to get milk. It will tell you a store ahead has a collection of horse-racing posters, that a 19th-century murder you've been reading about took place on the next block.

Says Mr. Schmidt, a generation of powerful handheld devices is just around the corner that will be adept at surprising you with information that you didn't know you wanted to know. "The thing that makes newspapers so fundamentally fascinating—that serendipity—can be calculated now. We can actually produce it electronically," Mr. Schmidt says.

Source: http://online.wsj.com/article/SB1000142405274870490110457542...
several syntax highlighting stuff apart from standard ones, of course.

This is super useful to me:

(global-set-key [f6] 'linum-mode)
(global-set-key [f7] 'next-buffer)
(global-set-key [f8] 'previous-buffer)

I also have yasnippet, but I don't really use it at all (I should). Also, recentf http://www.emacswiki.org/cgi-bin/wiki/recentf-buffer.el for a recently opened stuff (like dired, but for recent stuff).

And most importantly, I setup my font to monaco, tango color scheme and I prefer full screen emacs, so i have a bit of an involved process where I have basically this:

(global-set-key [f11] 'ds-darkroom)
(global-set-key [f12] 'menu-bar-mode)

where F11 puts me in and out of full screen mode and f12 toggles menu bar. F11 uses a small utility written in C# for windows to make this happen.

clean darkroom - http://i.imgur.com/LloOY.png

with menu - http://i.imgur.com/yTeUz.png

I'm trying for years to force myself not to move my right hand to arrows and instead use C-p C-n and C-b C-f, but I can't (well sometimes I do, but not all the time).

And various tweaks here and there, I might have forgotten something though.
There's no need to use a load balancer for MX. The protocol it's self handles the problem of machines being offline. I agree with your point about not being able to point the root of your domain at an ELB though... I wasn't aware that you can't use a CNAME at the root.
Protip: it doesn't always have to be money.

In college I lived across the street from a art house movie theater. I was invited to the Thursday night after party by a guy who worked at the theater and another local establishment I frequented. Instead of money, I brought a giant bottle of liquor. Because that theater had a "friends get in free" policy and because I was now well known as the "guy who brought the liquor to the party" I was everyone's friend. I would bring 2-3 people with me to the theater, we'd all get in, and we'd all get employee servings of popcorn and soda. Best $20 I ever spent.
Very nice indeed.

Maybe you could also monitor some #hackertweet hash tag and include the matching tweets. That would be convenient to submit a tweet from any client, not just yours.
I did this with my university project source code. The only difficulty is that Gmail does not allow executables even within a zip file. You have to work pretty hard to avoid getting them into your repo.
;; move along, nothing to see here :P
;; the beef is in ~/.vimrc and under ~/.vim/ ;)
I can't deal with the glare for the length of a book read, just doesn't feel as comfortable.
HN is silently banning contributors
You don't like LaTeX-math-mode (bound to C-c ~)?
This is exactly wrong. Jim Crow and that spectrum is based on race and other prejudices. It's based on things people can't change (reasonably), and on "knowing your place" in society. This is the exact opposite. This is about personal relationships, connections, sphere of influence. This is not about classism, or racism, or any kind of prejudice.
No Frills SSL Certificates are Inexpensive and Useful
http://gist.github.com/561519

textmate.el is pretty awesome, as is ide-skel.
OAuthcalypse didn't kill my apps
REP Interactive - Online commercial
Repinteractive.com is an online marketing company that specializes in the production of New Media Commercials™. It creates and assists in developing marketing, advertising and public relations campaigns. It’s also provides an array of marketing and advertising services including digital marketing, traditional public relations and social media consulting.
For more please visit: - http://www.repinteractive.com/
Sigh.

Everyone has one or two symptoms, a little, occasionally. To actually have a personality disorder you have to have lots of symptoms, often, to a severity that it causes problems in your life.

Lots of people have occasional headaches. You could also say those people have symptoms of a brain tumor. But that would be stupid because they lack many other symptoms of a brain tumor.
I live in Southeast Asia as well, and there is a strong sense of reciprocity here (and no expectation of tipping) so if you do decide to tip, the obligation to repay will be very apparent.
Collaborative task management, task sync between devices (iPhone to gmail), convert emails to tasks, 'snooze' function for tasks. I could go on...
"The topic of SSL certificates is a bit arcane, but the much of security of our everyday online purchases depends on SSL. Yet, fewer services use SSL than one might hope. It is possible to buy a basic no-frills SSL certificates from a universally accepted certificate authority very inexpensively–less than $15 a year–if you shop around. In most cases, it makes no sense to use a self-signed certificate, to purchase a certificate from a second tier provider, or to purchase a chained certificate."

I'm interested in any comments. I'll see them here on Hacker News or the version on my personal site. http://bengross.com/no-frills-ssl-certificates-are-inexpensi...
Hot Dog! The best Americans (US Citizens) are the children of immigrants. I wish I had a way to prove this, but for now take it as my opinion. By and large immigrants (legal or no) have a rather minimal impact on US culture, and tend to occupy the extremes of the educational and economic spectrum. For most, integration is difficult and can never be fully obtained.

The children of immigrants on the other hand have a foot in both worlds. They have heard their parents tell them about the opportunities that our country provides, and see in their parents how hard one must work to obtain them. They also have the advantage of full unquestioned citizenship (until the Tea Party messes thing up) and cultural acclimation that their parents lacked, along with social networks that extend beyond the immigrant community.

My experience is that the children of immigrants are more political and socially active then their peer with more established ties to community. They are better at taking risks and working for their own success. Most important, they understand the value of the opportunities, and the personal responsibilities that come with them, far better then other Americans who feel entitled by their birth to all that the country can give them.

Say what you will about immigration and its effect on jobs and the economy, but make sure to keep the children. They are worth every penny spent on their education, health care and other social services.