skysight-inc/HackerNews huggingface dataset:
That's all you need if your application isn't surfacing errors to end users.

If you are surfacing errors to an end user then you'll need to ensure that the error message is localised.

If your Go code is merely an API to a front-end, then you'll want to return error codes rather than a textual string. The string your errors are producing are for developers to use and not end users, and to localise them you'll want to return error codes will enable the front end to select and choose the right message to display to a user depending on their locale.

If you're a HTTP API, immediately you'll think, "Ah, HTTP codes suffice, I'll return 'HTTP 404 no coffee' or 'HTTP 428 not enough coffee'" but you'll notice straight away that neither code fitted the scenario of "not enough coffee" well. Additionally, if you tell a client that HTTP 404 means "not enough coffee" you're stuck when you want to explain that they can't have jam on toast without actually having toast.

Yes HTTP codes help to tell HTTP clients what type of error happened, but fails to tell a client which message should be shown to help the end user resolve the problem... besides, our error string isn't localised (and shouldn't be, perhaps someone implemented a Welsh client and we do not know Welsh) so would the end user understand the message? We should presume not.

We're already at the point where the correct thing to do would be to return a detailed error code along the lines of Twilio's: http://www.twilio.com/docs/errors/reference or Oracle's: http://www.ora-code.com/

With an error code we provide the ability for a user client to make a simple lookup to localised and actionable messages about an error, perhaps with additional information and detail to a developer too.

Error codes help us avoid string matching too, the strings may change in the message but the actual error remains the same.

Now it becomes obvious that Go's errors are too primitive. They may be adequate for telling a developer something happened, and with logging they can tell a developer where it happened... but they are woeful at communicating with a user to help correct an error.

Error libs need both a message, and an error code (which isn't a HTTP code).

Stack traces are nice, but I find logging is better (and log.go can tell you which file and line the message was logged from) and HTTP codes are not adequate error codes, an application should have it's own table of codes.

PS: Interesting to note that Go does have error codes and a set of constants for a large number of errors http://golang.org/pkg/syscall/#pkg-constants but it hasn't made them first class by having godoc document errors a package has, encouraging everyone to create and use error codes, etc.
Why is continuous testing of your disaster plan so important?
I just set up a BTSync server with Pyd.io on top, which I can use to generate URL for my file. No manual copying.
So IBM sells UIMA with Lucene on top of GPFS and calls it Software Defined Storage.

* UIMA (Unstructured Information Management Architecture): http://en.wikipedia.org/wiki/Unstructured_Information_Manage...

* Lucene: http://en.wikipedia.org/wiki/Lucene

* GPFS: http://en.wikipedia.org/wiki/GPFS

Edit: GPFS instead of Hadoop
The Warren Buffett formula: How you can get smarter
Nope, that's not what this product is at all. It's GPFS. You could bang all three of those together fifty ways and not reinvent a distributed filesystem, so I have no idea what you're talking about. (Seriously? Lucene?)

Speaking as (I'm sure) one of the few people in this thread who will have used GPFS: GPFS is actually quite good. You'd be surprised how good it is. It has its downfalls, but it is extraordinarily useful, performs well, and just about hits the holy grail of distributed POSIX. It's also absurdly expensive, but: IBM.
Isn't that only in-state tuition? If you don't already live in the same state as the school that you'd like to go to, then you're going to have to pay much more.

Edit: some students are starting to do it: http://www.usatoday.com/story/news/nation/2013/06/25/america...

Also work permits are readily available for international students after 6 months of study: http://www.cic.gc.ca/english/study/work-offcampus.asp
Very good story.
Ask HN: What gets you out of bed in the morning? What motivates you?
Hello HN,

I'm not sure how to go about writing this post so I'll try to keep it to the point.

For the past few years I've been struggling with an overwhelming feeling that I have no real purpose in life. I work a comfortable job as a programmer and I have enough money saved that I don't have any immediate financial worries. I have hobbies that come and go and I try to keep myself healthy.

The only reason I get out of bed in the morning is because I don't want to lose my job. The only reason I don't want to lose my job is because I'd be bored otherwise. And it's socially unacceptable to be unemployed because "I don't feel like working any more".

But I don't feel that my job is the problem. My problem is that is that I just don't really know what my goals are in life any more. I don't know what makes me happy and I don't know what motivates me. Some people have a family to provide for, others a burning ambition to make the world a better place. Some people have the desire to become rich beyond their wildest dreams. I no longer have that fire in my belly.

I feel like an empty shell of my former enthusiastic self. I have become cynical and jaded and tired and I desperately need to do something to reignite my fuse.

I could write a lot more, but in an effort to avoid this post being entirely "boo hoo, woe-is-me, first-world problems", I'd like to ask the members of HN:

1. What is your motivation in life? What drives you and gives you the energy to make it through the day?

2. Where did your motivation come from? Was it something you were born with or something you gained through an experience?

Thanks for reading.
Holy god, this is awful.

I'm not sure why developers continue to believe that "tree of widgets!" is a good design for a CMS. It's horrendous.

First, most CMS users are end-clients who will have absolutely no clue to handle a drag-and-drop dependent UI, let alone a nested tree of UIs.

Second, it encourages a site structure where the content is stored hierarchically according to display requirements, instead of the actual semantic relationship between elements.

While I'm sure this is very well coded, it continues the long tradition of content management systems built by developers for developers and in such a way only other developers will like or understand.
So, they're Field Application Engineers, basically?
CRDTs are absolutely fascinating, but sometimes I really wonder. It seems like you throw words like 'semi-lattice' around ...

Also there is one particular element to the eventual consistency that bothers me, it's that all these eventually consistent algorithms aren't how high powered neural nets will work. Our brain is highly eventually consistent, but it computes without ever needing these algorithms.
I really thought the part about embedded developers was a joke.
Display hacks are one of the oldest forms of code. TMRC was hacking them together even before the PDP-1.
The disappointing lack of shape isn't just from decomposition - the foundered ship's timbers were used to build a fort.

http://www.smithsonianmag.com/history/the-lost-fort-of-colum...
http://en.wikipedia.org/wiki/Santa_Mar%C3%ADa_(ship)#Shipwre...
My understanding is those since the dawn of time setups generally needed "post-processing, retouching, or other image manipulation".

The desire for something like this might be obvious but the actual multiple moving parts they've arraying to achieve it in fact constitutes an invention. There might be many ways of achieving the same result -- those different setups are also inventions. Go take a look at how many patents there were for light bulbs before Swann and Edison.
People usually use SDL1 with OpenGL, and I don't understand what part of it is "hack". Is using OpenGL with a manually created context with tens of platform ifdefs less hacky? Or is EGL/glut/<your favorite wrapper> the one true way of doing things?
The Unabomber's Manifesto
You know which product is overdue for apple-style innovation ?

The macbook air.
It's a cost vs. energy carried trade-off.

Both systems have resistive loses proportional to the square of the current. However:

1. Total power transferred in a DC system is proportional to the voltage, whereas power transferred in an AC system is proportional to the RMS voltage (which is roughly 0.7 of nominal for a sine wave), so more energy is transmitted at the same current level in HVDC.

2. AC systems manifest impedance which has a resistive (aka DC) component as above as well as a reactive (aka AC) component, i.e. Z = R + jX. In DC systems X = 0. In a theoretical transmission line no energy is absorbed or supplied from line reactance, but in practice we have to transmit a certain amount of reactive power (VARs) to charge the line capacitance/inductance each AC cycle. This reduces the amount of our current capacity (limited by thermal constraints) that actually carries current that can be delivered to the load as active power (watts).

This effect is somewhat although not directly proportional to distance (characteristic impedance has no dependence on line length, but voltage drops along the line due to resistive effects meaning the variation from the optimal reactive power-minimizing voltage level increases).

The effect of (1) and (2) is that for any given conductor, at a given voltage level, more usable energy can be transmitted with DC than AC, and that differential increases with distance.

That being said, building DC converter and switching stations is much more expensive than AC. So for a shorter line, or one that has many switching stations, I could counter the above by simply generating 5-8% more power at the generating station and still come out ahead (because in real engineering everything is about $).

Therefore, DC is only more cost-effective ($/MVA of energy delivered) at long distances.
This assumes that all a TV needs is picture quality. But a TV could & should show dynamic content by knowing the difference between me and my roommate.

Or what about enabling augmented experiences with my phone?

There's plenty of room for innovation outside of just a quality picture.
That is not the same as open sourcing the GPU itself. They haven't released HDL source for the chips themselves.
And the thunderbolt display dangit. $999 is too damn high.
I believe photoshop uses Perlin noise (could be wrong)
Interactive Maps with D3.js, Three.js, and Mapbox
Sorry that I reply so late - was on travel. Go ahead and link me. And thanks for your activism to get good Thinkpads again.
'Arrogance' of ignoring need for sleep
WeBGL works just fine here (Arch Linux, 64-bit, Nvidia drivers [though my browser uses the Intel card]).
Ask HN: How much does L2 cache impact performance of a development machine?
Hi, I'm trying to decide between two budget laptops. While the lenovo laptop has only 4 gb ram, Im planning to add another 4GB so that is fine. My concern is, I'll be using the laptop for programming. It will mostly involve text processing and occasional number crunching. I will also be using two vms. Both the machines are quad core. Will the 4 mb L2 cache of HP have a greater impact on performance compared the 1 mb L2 cache of Lenovo?

This is going to be my primary work machine. I have only worked with thinkpads till date. So I'm also concerned about the comfort level of the keyboards. Has anyone used the HP Pavilion keyboards? Also, I have only used keyboards sans dedicated numeric keys. Both the laptops come with dedicated numeric keys and I'm afraid the keyboard might be a bit cramped. Any inputs regarding this experience would be great!

=======================================
HP Pavilion 15-e026AX Laptop (APU Quad Core A10/ 8GB/ 1TB/ DOS/ 1 GB Graph)
http://www.flipkart.com/hp-pavilion-15-e026ax-laptop-apu-quad-core-a10-8gb-1tb-dos-1-5gb-graph/p/itmdp2awh5hdhndg?pid=COMDP2AWH5HDHNDG&srno=b_1&ref=bc0646b6-bce2-45d7-81dd-5938a283feda

Rs. 37900
+8 gb ram
+a10 processor
+4 mb cache

-dos
-it has full keyboard including numeric pad I'm not sure how
comfortable that will be
-generally dont know how hp products are

=======================================
Lenovo Essential G505s (59-379987) Laptop (APU Quad Core A8/ 4GB/ 1TB/
Win8/ 2GB Graph)
http://www.flipkart.com/lenovo-essential-g505s-59-379987-laptop-apu-quad-core-a8-4gb-1tb-win8-2gb-graph/p/itmdz5afmgr6facs?pid=COMDZ59FTHJV9T9K

Rs. 32707 (at 22% off)
+ Brand that I have used in the past and trust
+ windows 8.1
+2 gb video raQ1m

* saw a review that said the keyboard was good, It also has full
keyboard with numeric keys

- 1 mb cache
- 4 gb ram
- a8 processor
"Give a man a hammer, then he wants a bell, and the next thing you know, he wants a song to sing, all over this land. Ingrateful SOB."

--danceswithcats on some random website I'm not going to bother finding in my history
CSS diff, using phantomjs and imagemagick
Tiny Hamster Eating a Tiny Baby
I just use charles (charlesproxy.com). Does everything this does and 15 bazillion other things too. Works with mobile devices and anything that can set an HTTP proxy.
Slow down before you give too much credit to tools. Guy has put lot of work in "whipping" up a beautiful website. Much of this seems to be hand coded. Example: https://github.com/emisfera/Splitchar.js/commits/gh-pages/in...
I think the Apple TV will be elliptical and so instead of sometimes having black bars when fitting content's resolution you'll always have four (active) parabolic edges (of varying size) that can display various info -- time/channel/chapter/url/subtitles/your friends' faces/etc.

The main reason for making an oval tv will of course be the novelty and design patent protection.
Signs We Are Headed Into World War III
That's what I was talking about, those frameworks/engines aren't on a trajectory that's going to lead away from the current graphics programming quagmire.
Tools/SDKs to make killer mobile apps
Annotations are just Java. Welcome to 2004!
You make two very good points, but I think this tool still has some important use cases.

I agree that this is a poor way to structure a whole site, but there's still a need for a way to produce ad hoc pages.

I also take your point about the tree of widgets thing, but there is always a trade off between conceptual-ease-of-use and power. There are plenty of users who will do just fine with this interface.
I too prefer the jax-rs annotation style, but this is definitely by design on part of the Spark project.

It emulates Sinatra for Ruby, which takes that 'clean' approach of doing things simply and predictably. You can very quickly understand how to use annotations with jax-rs. But that's declarative. You annotate your code, and understand that the framework will take care of the rest. This is great for fully built complex frameworks. The problem is, that with annotations you are marking something in a very ambiguous way that can be used by the framework in any way. Its easy to understand, but from just reading the code, you can't really know HOW the annotation is being used.

Sinatra/Spark on the other hand are much more imperative. You need to assume very little about what the code actually does, as you are imperatively building exactly the way you'll be listening to requests, without having to know anything of how the framework is going to interpret anything. It's much more direct in what you wrote mapping to a very specific predictable set of actions, determined by the language, not so much the framework.

Two separate ways of thinking/styles that are happy to live separately making people happy in different ways.
If you are encrypting each file individually, you are still giving away the file names. Hence you use encrypted file containers. They benefit from block level deduplication. They can be large in size.
May I take it with wine?
:-P
Some good points. Other links of interest: http://tools.ietf.org/html/rfc6819 and OWASP cheat sheets, including ones on authentication in general: https://www.owasp.org/index.php/OWASP_Cheat_Sheet_Series amongst other resources on Google ;-)
Why We Love The Contiki Operating System, and Why You Should Too
I think you're taking the neural net _model_ of the brain too strictly.
This is actually the first summer pandoc got a gsoc student to! (via haskell.org umbrella org). A lot of great work will be landing this summer, including some neat support for URL encoded inline images (and a bunch of other great things)
The problem seems to be that very few people understand timing attacks, and even fewer are capable or willing to fix it. This is evidenced by the fact I've seen this same argument made three or more times now, and all link to a completely technically void twitter post. Not that AGL isn't a brilliant man, mind you, but it seems people just link to the post with no real knowledge of whether the problem exists or what it means.
I like go and have contributed where I can, but like most, my time is limited. You're a respected member of this community with a respect for go. Let's say we work to fix this by 1.4. Are you willing?
There are plenty of browser based RTS games in they don't have turns. However, total war is much closer to starcraft etc than any of these: http://www.mmobomb.com/browsergames/strategy
Today at 16:53:20 GMT, it'll be 1400000000 in Unix time.
If you are encrypting each file individually, you are still giving away the file names. Hence you use encrypted file containers.

That doesn't follow - you can solve the problem without containers, e.g. by encrypting or hashing the filenames.

Containers protect the file sizes, but they lose the ability to selectively sync certain files to certain nodes.
I am reminded of Doris Lessing's saying: "It is not a sin to be second-rate. It is only a sin not to try to be first-rate."
great if you pay for octopus
Ask HN: Can a hackathon work for non-tech industries?
Is anyone aware of a hackathon/startup weekend style events that have been successfully implemented in non-technical industries, or those that don't involve software or hardware hacking (i.e. around processes or writing of content)?
Apple hasn't had trouble selling 27"/30" Displays and iMacs before, if they can handle those, they can handle a HDTV display. An Apple TV Set just needs two things:

1. Input ZERO for Airplay. When you airplay a video from your phone/iPad, the TV turns on automatically and starts playing the video without you having to find the crappy TV and receiver remotes and switching to the right input.

2. The ability to upgrade easily by just plugging in a new $99 puck whenever you want to take advantage of a new service that requires more processing speed.
SHA1?
git-annex allows you to see all the files, without having the contents; then you can do "git-annex get <file>" to pull it, and when you're finished, you can do "git-annex drop <file>" to free up the space.

(It also allows you to do full automatic sync, or just automatic upload, etc. And different machines can have different configurations, e.g., RaspPi syncs everything with my VPS, but my Nexus tablet doesn't)
Sprint Set to Throttle Heavy Data Users on Its Unlimited Plans Starting in June
How the NSA tampers with US-made Internet routers
I can't believe all of these articles haven't posted this: Where do THEY think the plane is?
Or even:

strlen("ahaoho")

The C code more closely reflects what the Ruby is doing, but otherwise yes, you're correct. In C++ I could probably get it all done at compile time anyways.
It's revenue, summed over any space of interest. (Months of life, sources of acquisition, account types, etc.)
It's configurable.

The default MAC algorithm to be applied on the filenames is HMACSHA1. A stronger one, for instance HMACSHA512, one can be chosen upon creation of the special remote with the option mac=HMACSHA512. The available MAC algorithms are HMACSHA1, HMACSHA224, HMACSHA256, HMACSHA384, and HMACSHA512.
US Holds Massive Nuclear Weapons Exercise Days After Russian Drill
Thanks. I spent quite a bit of time in 2007 through 2009 on that, and a bit until 2011. I'd be surprised if it has changed since then.
> More data would certainly be nice to have

From an interesting research standpoint yes but from a circus standpoint for the investigation probably not.

People like Duncan Steel who aren't actually on investigations like these would love for everything to be open sourced but never consider the negative consequences like suddenly companies and countries are much less forthcoming with information they don't want in the public domain and all the wackjobs that come out of the woodwork with nonsense distractions {How's that Boston Marathon bombing investigation going reddit?}.

They also overrate their own abilities, if the NTSB and AAIB need help with the physics I'm sure they would ask for it directly from their pick of world class experts -- people every bit as good as any of those who are lobbying for the investigation to be crowdsourced.
wc counts bytes, to make it count characters use -m in the GNU version.
Thanks for pointing to this. I remember reading about it a while back, but when I needed a stack trace wrapper I couldn't remember the name. I ended up adding a function to an error library I maintain (github.com/surullabs/fault).

When I find some time I'll pull out my code and start using either errgo or the SpaceMonkey version.
WHOIS, Screenshot and Social API
I'm pretty sure if we ever see the Apple TV, it will be an entirely different UX than what we have become accustomed to. Just like you don't compare your smart "phone" with a classic "phone", you probably won't compare your Apple TV with a classic TV. They will be the same only in name and form factor, but the experience and functionality will be much different.
Redis really is a fundamental building block for designing distributed systems these days. I was kind of surprised, but all these examples exist independently in the Zapier codebase as well (all backed by Redis).

I've been meaning to open source our timeseries implementation for a while now, it is very similar to the linked article but uses a "{key}:YYYY:MM:DD:hh:mm:ss" pattern on hashes where you pick your stored granularity and TTL for each time unit. For example: store second granularity "{key}:YYYY:MM:DD:hh:mm": {0-60: count} for 8 hours, minute granularity "{key}:YYYY:MM:DD:hh": {0-60: count} for 24 hours, hour granularity "{key}:YYYY:MM:DD": {0-24: count} for 3 days, the rest forever. Very similar to https://github.com/jimeh/redistat or other implementations.

Fun!
VESA Adds Adaptive-Sync to DisplayPort Video Standard
White Men Can't Jump
The article reminds us of some very good points about our relationships with developing countries. Education does so much more for spreading democracy than drones do, but our monetary priorities don't reflect this, unfortunately.

I stumbled in the last paragraph:

It’s estimated that 100,000 girls under 18 years old in the United States are trafficked into commercial sex each year.

What does that mean? With on the order of 5 million births per year (both boys and girls), that would imply 4% of all women are affected. That seems a bit on the high end. Does anybody know what's going on here in terms of statistics?
I made a quick first pass at an interactive WebGL version this evening. http://callum.com/sandbox/webglex/webgl_terrain/ - ground realism needs a bit of work :) but it was a lot of fun. Thanks for sharing your code Hunter.
I moved to Israel a few years ago because I am a Zionist. For me, I wake up everyday with the goal to improve Israeli society and the Israeli economy.
Majority rule? No. We live in an oligarchy. The elections are a farce. They've been engineered and Gerrymandered into intractable stagnation.
What do you mean by "Jonathan Rosemberg"? I think he already resigned from Google.