skysight-inc/HackerNews huggingface dataset:
try/catch, which blurs the line between errors that are mistakes (accessing a property of null, calling .write() on a stream after .end(), etc.), and those which are expected application-level problems (invalid data, file missing, and so on).

While I tend not to be a big fan of try/catch myself, one thing I like about Objective C and Cocoa is that they at least provide classes to separate programmer mistakes (NSException, used with try/catch) from application issues (NSError, used however it best fits the app). If the try/catch pattern must be used, I think its sensible to have this kind of separation of responsibilities.
If you do this, and you should, then please do it with a permanent marker as opposed to pencil or biro. In 10 years it will not fade away leaving a tantalising tag with no information.

I refer you to my home fuse box :(
Why teenagers are rebellious and why its good.
This is neat, it's clean and works well.

However, I've always disliked the drop down menu. I avoid it at all costs (unless a client really demands it). It seems chaotic to me, and it doesn't give any affordance to being a mechanism that shows more options on hovering.

That said, there are some nice implementations that I've enjoyed using because they can reduce clicks if it is responsive enough. This one could easily fall in to this camp.
Yeah I've got a notation that's kind of based on mind maps. I put 'standing stones' in the middle of a whiteboard to represent desired outcomes, and then try to create a path from the edge of the whiteboard into the stones.

It's useful to track where your dead ends are for further discussion. Someone else comes along and says "why didn't you just do this?" and you can't remember why, just that there was what seemed like a good reason at the time.
Care to link to that review?
Invest in companies that are actually producing something valuable. That's the way to restart the economy.

Can we all move on from the social media bubble and get back to real work now ?
NERO, a game platform for Machine Learning and AI research
GeoCities, Yahoo, and AltaVista, oh my
> when we had to check the return/value and or the error code after every function call... if we wanted error handling to work.

Errors as return values force you to think about every possible error, which is a good thing for code quality. Look at how much rock stable C software we have out there. Software that can be compiled on many different architectures, run in many different environments, and it all just works, even 20 years later.

Writing code with try/catch is much less work. Not because you have to do less typing, but because you simply think less about how errors should be handled.
Free Marketing Ideas- An Real Review
http://news.ycombinator.com/item?id=3222253
مباراة مصر والبرازيل بث مباشر
مباراة مصر والبرازيل بث مباشر
Hey,

There isn't any nice way to get in contact with you via the website, and you didn't leave an email address here. What's the best way to get in contact with you?
This has said "Error establishing a database connection" for a few minutes now. Quite ironic.
If You’re A Developer You Better Love Your Job
Double Loop Learning and the Lean Startup
Couldn’t agree more. Couple of weeks ago I almost lost my domain name registration, because Gmail had stuffed the Godaddy notifications under “Bulk” which I forget to check regularly.
That being said, there is a way to use AI to cope with email overload, without running that risk. We have built a tool (www.tagwolf.com) that reduces email filing to one mosue click. It uses AI technology to analyze each email and propose the most likely folder for it on a tagcloud. The user just needs to click on the folder name and Tagwolf files the email.
IE was always tied to Windows, but that never prevented other browsers from running.

On tablets (only Metro), the browser would have to be compiled to run on ARM processors (assumedly), so the barrier to entry is perhaps higher than now.

Sure, but that's hardly locking browsers out, and besides Mobile Safari already runs on ARM (as does Firefox).

I think that it's likely there will be alternative browsers (assuming MS doesn't lock them out), but it may well be a similar situation to the iPad, where these browsers are really just a skinned UIWebView, rather than a different rendering engine.

But why? Just because Apple locks other browsers, MS will too? I don't get why you assume that.
I think the article title says it all. The author has NOT, in fact, switched.

/story
Aren't those arguments very US-centric ? If Windows phones sell well in Japan and in Europe, they could attract developers.

They are already marketing it heavily in Japan and Nokia is a European company.
Exceptions aren't the one and only solution to 'null' issues in Java et al.

http://blog.orbeon.com/2011/04/scalas-optionsomenone.html
Seems like a huge long shot. Even if you wanted to get one now, it's $250.

I guess I've never seen this yet, but what happens when they can't' deliver you the working product? Do you get your money back?
> Don't throw exceptions if you can handle the error and continue where you left off. Exceptions is for when you can't continue.

Yes, although quoting that example doesn't support the assertion. JSON.parse is a library function. How can it judge whether the caller can continue or not just because the JSON cannot be parsed?

> Think of throwing as a way to roll back transaction, stop whatever you were trying to do, and go back to the last consistent state.

Any try block that is larger than one atomic operation can become a nightmare to roll back, since the catch gives you no idea how far it was into the block, what resources were allocated, etc. So although try/catch avoids the hassle of checking state after each operation, you pay for it on errors.
Eh, I'm going to quibble with your assertion that other professions have more error tolerance than programming.

A bricklayer that makes a chimney collapse could very easily make the bathroom collapse too. Arguably, the bricklayer has even less margin of error because if he messes up, people could be physically injured or killed.

I'm a neurobiologist. While doing dissections I separate the hippocampus from the cortex. If I don't perform that dissection well, my cultures will be contaminated with excessive cortical neurons and that will bubble through all my results. Typically not noticed until weeks later when the neurons are mature. If the errors were subtle enough these might get propagated into a journal article and published as Scientific Knowledge.

When I worked fast food waaaay back in high school, if I dropped a burger on the floor, I would back up the entire kitchen because our orders were no longer flowing correctly.
Looks like a cool project.

One note to entrepreneurs using Kickstarter, or creating any slide presentation for potential investors: Take the time to spell check your slides.

Tim Sefton (creator of this project), if you happen to be reading this, here are some notes that may help you make your presentation more professional...

"One thing.. The Sterling engine is about 10% more efficent then the gasoline engine, but strugles with changes in suden acceleration - like what is needed for cars."

If you are the author of the presentation, you may want to correct the four errors: efficient, than, struggles, and sudden. Also misspelled is "temperature" (on the previous slide),

Not a big deal to me, but some potential investors will absolutely be turned off by that.
I wonder how much of it has to do with their new 3d semiconductors [1]. These things seem ideal for dedicated servers and the like.

[1] http://www.youtube.com/watch?feature=player_embedded&v=r...
The editor is a former communist and the editorials reflect his pro-CPM views, but on the whole, the articles are mostly neutral and reported in a matter of fact way.
That's one of the best shows of support Virginia Rommety could get!
The user systems are usually very much different than the flight control systems. In the plane I worked on, all flight control systems ran on VxWorks and hardly used networking for anything. The majority of the communication between systems happened on a 1553 bus (http://en.wikipedia.org/wiki/MIL-STD-1553) which had pre-defined messages on a redundant bus (as shown in the wiki article).

The amount of oversight a avionics system must go through when writing code for it is unfathomable for a modern software engineer. I know it sounds "cool" to hack into an avionics system from the in flight entertainment, but the likelihood of that being possible is somewhere around zero if the plane got approved by the FAA to be in the air.
They're a magazine/glorified blog. Their job is not to make things clear, it is to mystify and amaze and awe.
Two months ago my contract was up with AT&T, so I decided "What the hell, I'm going to purchase an iPhone(4)!". So I did. Turns out, after all the hype I was completely underwhelmed by it. It's not that it's a bad phone, it's great. It's just that the general OS feels tired to me. The interface. I ended up playing with a Samsung Focus a few days later in the same AT&T store and swapped my iPhone for it. I'm incredibly happy with this phone, and the Mango update addressed many of my concerns. Microsoft did well on the core features with this phone, which for a user like me is everything. I'm not a particularly heavy app user, so the seeming lack of quality apps doesn't bother me (even though there seems to have been an upturn in good apps lately).
The Bridge - The First Truly Universal Remote
This reminds me of the Qt framework which is C++ but doesn't make any use of exceptions.

Before I worked with Qt, I never thought this was possible without sacrificing the API, but the Qt API is very clean and doesn't seem to suffer from that design decision. So I looked around in the Qt API for some time, trying to learn how they managed to get along without exceptions. And I think I finally got it.

The whole error handling in Qt mostly boils down to providing sensible null objects. That is, instead of using NULL pointers (as in C) or generic null objects (as in JavaScript), for all kinds of objects there are specialized null objects which behave sensible to the most possible extent.
Ask HN: Should a real developer care how things work?
What do you think?

For example, if you are advanced in jQuery, should you know how you can
write that particular jQuery function in plain Javascript? (that's just one example)
I might be going completely off-the-wall here, but are the cameras in mobile phones reliable enough to be used as a sensor.

Obviously there would have to be a two-stage process:

1) Someone with your model of phone (iphone 4 say) figures out the properties of the camera and uploads a 'phone profile'.

2) You use that profile to calibrate your LCD screen.

I'm just curious, because I've never seen this idea done, or rejected outright. This might be because there is some really obvious reason to reject it that I am missing.
RBarnes & Noble reveals Microsoft's patent strategy against Android
Pointfree style in Python
Un jugo natural de naranja en la ma�ana...
It filled my back button up with mess :(
"Well the average US household uses about 8,900KWH of electricity per year - that comes down to 24 KWH per day and so our goal is to have a minimum engine output of 1KW so that it can produce close to the average home use of electrical power per day (24 hours of 1 KW output give you 24KWH)."

This math isn't taking into account that the power use isn't consistent, batteries will be needed to handle the variances in consumption. You'll never get 100% efficiency from power storage so the amount needed per day is much higher.

I also didn't see anything about the temperature required to make this run. Does this go on a roof or do they expect me to keep this in the fireplace the whole time.
LoopFuse Custom Events Dashboard Lets SaaS Companies Engage Users Individually
To a first approximation, yes it is. Your paper provides chemical mechanisms which explain some of the second order corrections.

If you are a bodybuilder aiming for muscle + visible 6-pack, or a fighter aiming for a specific weight class, you care about the second order corrections. If you are a fattie, the second order corrections means you might approach a healthy weight slightly faster or slower than the HB equation predicts.
The problem is, people are saying that it's development is very slow now, compared to others like Nginx & Cherokee. And that they're mostly fixing bugs, and not adding features. Is it true?
True, Steam and the Mac App Store have largely remedied that, but the amount of titles available (and release date) are still quite a bit behind Windows. I've also noticed my games (Source games in Steam and Minecraft) push more fps when I boot my MBA in Windows 7. (although I don't fault OS X for that - it's probably a developer/driver issue).
Nice. To avoid the annoying type-to-search feature, just search for "a" and get the whole document at once:

http://instacss.com/#a

Edit: ugh, that doesn't actually work. It only gives you p-z. Hey instacss! Please provide us with a link to the actual document. Preferably in plain HTML so we can download it. Alternately, anybody care to scrape this thing and post it in full?
I work in Windows file systems for a living. We very much live with two models: exception handling and canonical return codes. I cannot tell you how many times I would have killed for Lisp-like conditions. If I were to tell you that, however, I would also have to tell you that most of the killing would have been in vain.

The trouble with the never-ending "try-catch versus conditions versus return codes versus fail-fast" argument is that there is no easy way to have the conversation about big swaths of code. The log parser is a great example, yes, but it is exceedingly simple. The fact is that 'low' in the linked example is exposing its guts to 'high' whether it likes it or not, and that in any reasonably large body of code this too can become unmanageable.

Wherever you see a religious war, your Spidey sense should be tingling, telling you: people are arguing over which tool is better for all jobs when in fact you might want to learn all of the tools and choose the best whenever possible. And that you will at times show up to a job site where they're using the wrong tool and you'll have to learn to change them or live with it -- whichever makes more sense/is more possible.

That said, sometimes consistency just wins out. A module that throws to a module that returns is always baffling, but if it's hiding this fact from the rest of the module -- or many more modules -- then it's worth it.

(edited to note that these are Windows file systems, hoping to avoid 'is that really so')
really? oh man, those TOS are killing me. let me check that... thanks for telling me!
Handsomely done.
Very well said. I'm a fellow participant in the program, having been here in Chile for four months. These insights are spot on.
I guess I cannot argue that. all summed, at the end of the day, C# is quite nice indeed :P
Just do it for everything - I have a tiddlywiki [1] full of notes about how to fix/install/setup/tune etc. things on my computers.

This started after I spent hours figuring out how to fix a network problem the the Nth time last year :) Now all I have to do is search the Wiki.

1. http://www.tiddlywiki.com/
How do you feel about Erlang's "let it fail" policy? I personally was afraid of it at first thinking you couldn't write stable code, but the result was quite the opposite. Things fail, and get started back up by supervisors and everything is happy. No error checking and code bulk, no try/catch nonsense littered all over the code.
http://indieconf.com - clickable :)
Also, there has to be some sort of mechanism for heat, and then something to actually generate it. All this is going to be is the engine to turn it I believe...
FWIW, IBM is more expensive on a PE basis, trading at trailing PE of 14 compared to Microsoft's PE of 9.8.
I'm guessing this is their first HN slam.

I submitted it because i found very few mentions of it via HN-search.
In some cases that may have been true, but in most cases it was not. This spoke to poor company communication more than any awesomeness people think that I think I possess.
I loved this reply. Clarifying and correct, as far as I can tell.

http://www.reddit.com/r/IAmA/comments/mateq/i_am_neil_degras...
While this tagged pointer construct is pretty common but makes some people wretch, realize that the entire web is built upon this same concept, only bigger. The nan/nun-boxing that is used by various dynamic engines (e.g. All JS engines) relies on the fact that pointers on x86-64 hardware only use 48-bits of memory address space. They use the remaining 16 bits in the double for flags pertaining to what type of object it is. This has a nasty side effect of preventing these engines from running on any 64-bit architecture that does not have this memory address space restriction (e.g. Sparc, POWER). One either has to force the environment to only allocate space out of the lower 48-bits or come up with some other kind of encoding scheme to indicate if the address is a "far" address and should be added to the 48-bit base.
I think the best is a little of both ways. For instance in python:

x = some_dict['meh']

Will raise if 'meh' doesn't exist. If you believe that 'meh' should be there in your program, it's fine to 'let it raise an exception'.

However, if 'meh' could be there, it's better to use an error style such as:

x = some_dict.getDefault('meh', 'some-neutral-value')

And continue without raising because there's no need to raise as there's nothing exceptional here.

Ideally, raising an exception should have the meaning "Hey, something is wrong here and I don't know what to do next". And someone in the call hierarchy would handle this and say "Oh, the connection stopped.. that's why it's not working. I'll reconnect and call you again".

And note that this "parent handling" might be way higher than where the problem occurred..
Note to everyone: don't confuse 'try-catch sucks' with 'exceptions suck'.

There's no inherent reason an exception-throwing method can't be invoked in a style that gives back a value/exception pair. That limitation is a property of the specific language, not all languages. For example: exceptions could be caught succinctly if method invocations prefixed with 'catch' returned a value|exception tuple (`v, ex = catch ParseInt("test")`).

The primary difference between exceptions and error codes is the default behavior. Error codes default to 'ignore' and exceptions default to 'propagate'. The rest of the differences (requiring acknowledgement, succinctness of handling, availability of stack traces) are more of a coincidence based on the common decisions in languages like Java, Go, C, C++, python, etc.

I think the main downside of existing exception implementations is they discourage programmers from defining useful error cases for functions. It's so easy to propagate or suppress that anything else feels like massive busy work. Simple improvements would be to make wrapping exceptions easy and defining new types easy (throws FileNotFound as forge MissingNetConfigFile).

On the other hand, the main downside of error code implementations is the ease of ignoring. Go has a very good idea in the "x, _ = funcWithIgnoredError" style, but it extends poorly to otherwise-void methods like 'flush stream'.
At least in languages like Haskell you can use things like Monads that allow you to write the high level code and do the error routing for you behind the scenes. In C manually writing the error handling is a painful and error prone process.
It is more like center leftist. Although politicians of CPM do feature on editorials
with this kind of device you just need smart plugs so that your dishwasher/dryer/washinmachine run at night.
I think you're wrong, because "social media" is not a bubble. Actually, it's part of the real life. :-) And I don't know what Warren wants with this, maybe he's believing in another monopolistic move of IBM, which is not too smart these days.
>It's just that the general OS feels tired to me.

What does this even mean?
i have seen the other sites.. this site is a personal site.. i am looking for a programmer cofounder that would want to partner up with me and start one of my ideas.. i do illustrator mockups of my ideas and create logos and write up all the business aspects and functions of the idea... looking for someone to cofound with me.. i have plenty of great ideas and names.. just need someone with the skills to make it happen
Yes gas is near $4 - what does that have to do with utility prices, since there aren't any gasoline powered plants in the USA since the 70s ?

I would have to assume the way the utility company produces power is far more efficient than a town with thousands of mini-engines. Only stuff like solar cells work better in distribution.

Not sure how this would work either - what fuel are you going to use to power it for 24 hours without maintaining it? Will it drive an alternator to power an inverter? How stable would the feed be?
Ectomorph Diet Break Down
Can you please split your comment in two?

The first part is pretty on the spot, but the second part is stupid, wasteful and does not belong on HN since Social Media is productive (Facebook allowed me to get back in touch with some old friends that I haven't heard from in years). You don't have to turn out forks or dig iron from the ground just to be productive.
Intel's new hexa-core Sandy Bridge-E 3960X released, reviewed
This is terrible and needs fixing immediately.
Actually, I agree with you on the benefits from social media to the society. But for 5% of useful features, there is 95% of trendy/fashionable projects that do not have any benefits to the grand scheme of things, are really expensive (color?) and are driving workforce away from more important projects.
I second this. An option to see the whole document would be /really/ nice.
Google Music to launch missing licensing from Sony and Warner
Here ya go
https://developer.mozilla.org/en/CSS
The Scariest Cloud Security Statistic You'll See This Year
(How to Raise $$) The Expression of Love
My Thoughts | Bizcovering
How does one learn to think, if not through education? And academic article-based education is the primary way of learning in academia.

I very much agree with the post's point about the first step. In order to make a significantly disruptive breakthrough, it's necessary that one knows where the outer edges of that domain lie.
Actually its probably partly OSX's fault too, the OpenGL rendering code tends to go more for correctness over speed from what I've seen. That said, the drivers aren't exactly speed daemons.
He said he won't buy MSFT b/c he's close with Gates. If he bought and they announced a share buyback / dividend, people would wonder if he heard something from Gates. He sees no point in running that risk.

Not a MSFT fan myself but I have to regard Buffett's frienship with Gates as a pretty strong endorsement of him as a businessman.
Does AMD have an embedded platform outside of Fusion (like it, but without a graphics core)?
People at those "special genius places" can't participate in any of the things you mentioned. They get paid for other, much more important jobs. Darpa grand challenge wasn't due to the government not being able to do something, it was due to it being much cheaper to just pay someone to do it for you. In the end, lots of teams competed and only a few got any money out of it, the rest of us ended up just volunteering for the government for a while in the hopes of making a lot of money.
Robert Weisberg's book "Creativity: Beyond the Myth of Genius" revolutionized my understanding of creativity. Now I see the mainstream view of the Genius creator struck by the muse as over-romanticized, whereas people who history has called genius work in a more structured fashion.

I recommend his book to anyone who creates or wants to create more. He doesn't tell you how to think, but you can figure it out. He reveal how myths confuse things and could send you down unproductive paths.

I talk about it more here -- http://joshuaspodek.com/creativity