Playing with My Son - <AUTHOR> https://medium.com/message/playing-with-my-son-e5226ff0a7c3

<comment><USER2> Now I feel like a bad dad. I thought I was supposed to limit screen time. Also, I've always been more of a PC (and before that home computer) gamer than a console gamer. Only now do we finally have a Wii (and my 5 year old son beat Lego Star Wars on his own, though that's probably not that big of a feat; also, he thinks Mario Galaxy is scary).

But what I'm really waiting for, is when my son is old enough for RPGs and strategy boardgames. He already plays chess, go, Dominion (which he sometimes wins) and Settlers of Catan. I'm going to buy Hero Kids soon.</comment>


Ask HN: How to do server side image processing? - <AUTHOR>

I have been using this site for a while now and I'm kind of curious as to how it is implemented.
http://placeit.breezi.com
It takes an image and creates a product shot. Really cool, how would you go about implementing such. HTML5, PHP? <comment><USER2> It's done server side, so isn't just a case of applying to your image a linear transform that matches the destination image of the phone you want to place it on, then using "green screen" technology to insert the transformed image into the image of the phone.

Seems pretty trivial, technically. Maybe I don't understand your question.

</comment><comment><USER3> It just uploads the image you drop, combines it server-side (in PHP you'd use something like <http://www.php.net/manual/en/book.image.php>). Tricky part is getting the tilting right so it matches the phone.</comment>


Don Eyles Walks Us Through the Lunar Module Source Code - <AUTHOR> http://hackaday.com/2016/07/05/don-eyles-walks-us-through-the-lunar-module-source-code/ <comment><AUTHOR> There's something amazing about carrying around your dot-matrix printed source code in a roller suitcase. The only thing that says "stable release" more than printing it out on hundreds of pages of paper is launching the computer running the code into space with no hope of doing an update.

<comment><USER2> Kids, today! You have no idea how lucky you are. At the time of writing this code, there were no 32" color monitors, IDEs, code text editors, or source code management systems. Code was first written out by hand and then typed onto punch cards or paper tape. These were fed into a mainframe computer for assembly. If you made a mistake, you had to find cards (by hand), remove and replace them with corrected cards. Get the cards out of order, you were toast. In general, the only way to gain a big picture of the code was to print it out, often over and over. Needless to say, paper was in huge demand.

<comment><USER3> Yup..."back then" you would arrange all your cards in a shoebox and then take a marker and make a diagonal mark from top left to bottom right JUST IN CASE you dropped said shoebox on the way to class to turn in your homework/take home test. Without that mark there's no easy way to recreate the correct order of the punch cards.

Source: dad was an engineering major in the early 70s.

<comment><USER4> The first six columns of IBM cards used for COBOL programming had sequence numbers that could be used to validate that program lines were in order.

<comment><USER5> I'm curious what % of HN readers have ever written a program with line numbers...

<comment><USER6> Even punch cards, but more teletype-style [https://en.wikipedia.org/wiki/Punched_tape](https://en.wikipedia.org/wiki/Punched_tape)

The punchcards were considered uncool then, the tape was much better.

</comment></comment></comment></comment></comment></comment><comment><USER7> There's a link to the source code on GitHub[0], is that not the full source though? Just searching for a comment like 'hello there' from the photo[1] doesn't seem to exist in the repo.

[0] [https://github.com/chrislgarry/Apollo-11](https://github.com/chrislgarry/Apollo-11)

[1] [https://hackadaycom.files.wordpress.com/2016/07/apollo- sourc...](https://hackadaycom.files.wordpress.com/2016/07/apollo-sourcecode- example-wb.jpg)

<comment><USER8> Googling some of the surrounding lines suggests that it is available here:

[https://github.com/avtobiff/virtualagc/blob/master/Luminary1...](https://github.com/avtobiff/virtualagc/blob/master/Luminary131/BURN_BABY_BURN --MASTER_IGNITION_ROUTINE.agc#L878)

</comment></comment><comment><USER9> If you enjoy this, you might also enjoy a DIY Apollo Guidance Computer build by John Pultorak [1]:

"John Pultorak created a working reproduction of the Apollo Guidance Computer (AGC), wrote a complete manual that will allow you to build your own Apollo flight computer clone and released it in the public domain."

[1]: [http://www.galaxiki.org/web/main/_blog/all/build-your-own- na...](http://www.galaxiki.org/web/main/_blog/all/build-your-own-nasa-apollo- landing-computer-no-kidding.shtml)

</comment><comment><USER10> The I/O on the diagram blows your mind, I wish the projects I worked on had outputs like Decent Engine

My career choices really suck, should have joined NASA or SpaceX :-)

</comment><comment><USER11> There's mention of interpreted sections in the code. Do you know if it was possible to manually enter interpreted code to have it ran by the system afterward - or even program some of software by hand (being dictated hex) in case something unexpected occurring during the mission warranted it?

<comment><USER12> All of the code was in read-only memory (core rope), so it was impossible to modify it.

There was at least one case when the behaviour of the code was significantly changed in flight to work around a hardware failure (shorted button). This involved changing the writable memory, which kept all the state, to selectively disable some parts of the lunar landing program. For more details see:

[http://www.ibiblio.org/apollo/#Final_exam_for_the_advanced_s...](http://www.ibiblio.org/apollo/#Final_exam_for_the_advanced_student_)

</comment></comment><comment><USER13> I couldn't have been the only one that read this as Don Rickles. Man you thought reviews from coders was tough, wait till you get roasted.

</comment><comment><USER14> Does no digital copy of this exist to the public?

<comment><AUTHOR> There are digital copies if you search around the Internet (at least a couple have been linked in other comments).

For me the most interesting part is that there are hand-written notes in this version which are from the development process.</comment></comment>


Not Smart Enough to Succeed: IQ Inequality = Income Inequality - <AUTHOR> http://greyenlightenment.com/not-smart-enough-to-suceed/ <comment><USER2> From a different article on the same site:

"""Martin Shkreli, a smaller version of Elon Musk, combines wealth with intellectualism, and is very popular among millennials who are rejecting 'low- information' SJW-liberalism and class warfare in favor of wealth creation, self-improvement, and intellectualism."""

and

"""Interestingly, on Reddit and 4chan, English, History, and Philosophy majors are also respected, too, as they sacrifice monetary gains to pursue a 'higher' calling. Such degrees, even though they may not pay very well or have immediate real-world applications, are a solace of intellectual purity, patience, and understanding in a society spoiled by instant gratification, ostentatious materialism, 'low-information' pandering, and sensationalism. Both STEM and some liberal arts (not the useless ones like child development or gender studies) combine authenticity, sufficient intellectual rigor, introspection, and abstractions. For the math major such abstractions include axioms, postulates and theorems; for the literature major, it's words and grammar; for philosophy, it's ontology and epistemology. 'Low-information' means not circuitous enough, too obvious."""

and I don't know how I'm supposed to take any of this seriously.

<comment><USER3> Also advocating IQ based basic income and links to eugenics.</comment></comment>


Help Thy Neighbor and Go Straight to Prison - <AUTHOR> http://www.nytimes.com/2013/08/11/opinion/sunday/kristof-help-thy-neighbor-and-go-straight-to-prison.html?smid=pl-share

<comment><USER2> The gaps in Kristof's narrative really highlight how he's trying to spin a story out of this:

1) Why didn't he dispose of the shotgun shells? Surely someone told him that as a convicted felon he wasn't supposed to possess firearms or ammunition?

2) What led him to be suspected of the burglary?

3) He notes: "Then Young became a suspect in burglaries at storage facilities and vehicles in the area, and the police searched his home and found the forgotten shotgun shells as well as _some stolen goods_." He keeps mentioning the shotgun shells, but never returns to the issue of the stolen goods found in Young's house.

I agree with the sentiment of the article. Minimum sentence laws are wrong. Felon in possession laws are wrong. The disabilities applied to convicted felons after they've served their time are wrong. The U.S. imprisons too many people, especially in states like California where there is an toxic amalgam of scared suburbanites, police and prison workers unions, and for-profit prison companies that have created an unsupportable situation.

BUT: the fact that the author has to resort to presenting a story that's as much of a mixed bag as Daniel Young's should give you some pause. It should give you some perspective of the scale of the problem.

Kristof's exaggeration is unnecessary ("totally innocent people sent to jail just for helping their neighbor!"). I once had to watch a sentencing hearing for a class. The guy was a scumbag. Drug dealer (not the harmless neighbor kid who deals pot mind you), had two kids with two different women but didn't support either of them. One of the moms came to testify that he was trying to be more of a father to her kid recently and that imprisoning him would destroy that. The judge handed down I think a 15-20 year sentence based on the raft of prior enhancements (I think he had assaulted his other baby momma, did some burglaries, etc). He was not an innocent guy. At the same time, it was unnecessary to sentence him to 15-20 years. Our sentences are just too damn long, even if they are mostly applied to scumbags.

<comment><USER3> >1) Why didn't he dispose of the shotgun shells? Surely someone told him that as a convicted felon he wasn't supposed to possess firearms or ammunition?

I'm not sure that a "why not?" like that is a gap. I'm also not convinced that anyone _would_ have told him that. You're generally just supposed to know the law. Nobody necessarily tells it to you.

<comment><USER4> "You're generally just supposed to know the law. Nobody necessarily tells it to you."

If no one tells you, then how are you meant to know?

How?

<comment><USER5> That's been the practice since Roman times.

[http://en.wikipedia.org/wiki/Ignorantia_juris_non_excusat](http://en.wikipedia.org/wiki/Ignorantia_juris_non_excusat)

<comment><USER6> That was a reasonable principle up to about a century ago, when statutory law started growing out of control and drowning out other more stable and sensible sources of law.

When legislatures churn out volumes and volumes of bills every single year, _" ignorantia juris non excusat" non excusat_.

On top of that, what ever happened to _mens rea_ being a necessary element of culpability? Why are all of these _malum prohibitum_ laws strict liability offences?

<comment><USER5> Kafka wrote something about that ;)

</comment></comment></comment></comment></comment></comment><comment><USER7> Our betters love gun control and don't believe that anyone committing a felony deserves to possess any, or ammo in this case.

Given how harshly "citizens" with no records are often treated for the same thing, I have mixed feelings about this case. E.g. any "citizen" of Massachusetts doing this without having a state Firearms Identification Card would be going to jail for 1 year, no judicial discretion allowed. One of the first cases was a teen who borrowed the jacket his father had used for hunting, which had a leftover shotgun shell or two.

<comment><USER8> I don't think that's about gun control, but about America's hostility to post- sentence reinstatement - ex-felons also find it hard to vote, have to ID themselves as ex-felons for the rest of their life on job applications etc. etc.. At least there's some rational basis for restricting them from owning firearms if they have a documented history of violence.

<comment><USER7> " _At least there 's some rational basis for restricting them from owning firearms if they have a documented history of violence._"

Not that it doesn't support your thesis, but _all_ felons are banned. Even those guilty of e.g. environmental "wetlands" (based on law about _navigable_ waters) "crimes" absolutely lacking in _mens rea_ (guilty mind; feel free to substitute your own favorite ludicrous felony).

<comment><USER8> Many states have a procedure for getting those rights restored. You might find this article of interest: [http://www.nytimes.com/2011/11/14/us/felons- finding-it-easy-...](http://www.nytimes.com/2011/11/14/us/felons-finding-it- easy-to-regain-gun-rights.html?pagewanted=all) See also: [http://scholar.google.com/scholar?hl=en&q=firearm+rights+res...](http://scholar.google.com/scholar?hl=en&q=firearm+rights+restoration&btnG=&as_sdt=1%2C5) although I've only skimmed this one as my printer's broken.

</comment></comment></comment></comment><comment><USER8> Surprisingly, this article omits to mention that the DoJ is asking the US Sentencing commission (and independent statutory body) to dial back mandatory minimum sentencing: [http://www.justice.gov/criminal/foia/docs/2013annual- letter-...](http://www.justice.gov/criminal/foia/docs/2013annual-letter- final-071113.pdf)

</comment><comment><USER9> So a white guy gets targeted by the laws meant for minorities, and all the sudden the walls are falling down?

<comment><USER10> People who write NYT op-eds don't notice when it happens to black people, sure, but that doesn't mean the author of the linked page only wants the laws fixed for white people...

He even points out the disproportionate effect on minorities later in the article; he's not ignorant of it.

</comment></comment><comment><USER11> Point by point:

"He later found, mixed in among them, seven shotgun shells, and he put them aside so that his children wouldn't find them. "

Ok so why did he "put them aside". Why is this taken as a fact anyway?

""He was trying to help me out," Mumpower told me. "My husband was a pack rat, and I was trying to clear things out." "

Why does this matter at all? The fact that he was helping her and the fact that he held on to the shells has nothing to do with anything.

"Then Young became a suspect in burglaries at storage facilities and vehicles in the area, and the police searched his home and found the forgotten shotgun shells as well as some stolen goods. "

but then:

"It didn't matter that the local authorities eventually dismissed the burglary charges. "

So we find out that he was enough of a suspect to be charged with burglary. (Not a big deal but not the same as "walking through his house they saw shells" or anything like that. Apparently even though he had committed no crimes since 1996 there were circumstances that made him a suspect in a burglary.

"So the federal government, at a time when it is cutting education spending, is preparing to spend $415,000 over the next 15 years to imprison a man for innocently possessing seven shotgun shells while trying to help a widow in the neighborhood. "

What does education spending being cut have to do with anything? What does the amount they are going to spend have to do with anything? What does the fact that he was "innocently possessing" have to do with anything? I didn't know that that mattered and of course where is the proof that he was "innocently possessing" or is that just a conclusion that Kristof came to?

" With less than 5 percent of the world's population, the United States has almost one-quarter of the world's prisoners. "

Why does this matter at all? So other countries don't lock up as many people. Who cares about a comparison like this other than to try to get people all emotional about this case (clearly the point quite obviously "ah the injustice of it all").

"Almost everyone seems to acknowledge that locking up vast numbers of nonviolent offenders is a waste of money. California devotes $179,400 to keep a juvenile in detention for a year, and spends less than $10,000 per student in its schools. "

Who are the "everyone" and why does it matter comparing prison spending to education? They are two different things. People get locked up in prison when they break laws. Stick to the argument of the law part don't say "we could feed 10000 hungry children if we didn't lock this guy up".

"Granted, mass incarceration may have been one factor in reduced crime in the last couple of decades; there's mixed evidence."

The NYT "to be sure" phrase. I'm surprised there is only one of these in the opinion.

" One careful study of 35,000 young offenders by Anna Aizer and Joseph J. Doyle Jr. reached the startling conclusion that jailing juveniles leads them to be more likely to commit crimes as adults. "

"One study" \- speaks for itself. So what. One study.

Etc. Etc.

Sure it's an opinion piece. I know. Just pull at the heart strings with a compelling story and we will all fall for it.

<comment><USER8> I agree with the article's basic premise, but it's very poorly argued. I suspect that's why it doesn't include a direct reference to the case in question (US District Court for the Eastern District of Tennessee 1:12-cr-00045-1). I obtained and uploaded the prosecution's sentencing memo, for reference: [http://www.scribd.com/doc/159437911/12-cr-00045-36](http://www.scribd.com/doc/159437911/12-cr-00045-36)

It pisses me off that NYT columnists/researchers and journalists in general are too lazy to spend the 5-10 minutes it requires to make original documents available to readers.

<comment><USER12> The sentencing memo tells a very different story than the Times article, and suggests that Young didn't "turn his life around". In particular, Young confessed to the burglary that he was suspected of, and was in possession of several of the stolen items. (We don't know why those charges were dismissed, but perhaps it was because the local authorities didn't think it was worthwhile to pursue a case against someone who'd be in federal prison for a longer term than he could get for the burglary charges.)

From the sentencing memo:

 _On October 1, and October 3, 2011, the Chattanooga Police Department ("CPD") received reports of several burglaries of storage building and vehicles. There was video surveillance of the areas burglarized and a suspect car was identified which CPD Detective Tomisek was able to trace to the defendant. On October 5, 2011, Detective Tomisek went to the defendant's residence and received consent to search from the defendant. Detective Tomisek and two other officers witnessed the defendant sign a written consent to search from for, among other places, the defendant's residence.

Detective Tomisek found several stolen items and seven shotgun shells. The shells were in a box in a chest of drawers next to the defendant's bed. While Detective Tomisek was holding the shells in his hand, the defendant voluntarily stated that they were his. The defendant later gave a taped statement in which he confessed to the burglaries. The defendant admitted to having his son help him load the stolen property into his car. The defendant was a convicted felon at the time he possessed the ammunition having sustained at least the following felony convictions: four Aggravated Burglaries, three Burglaries, five Thefts._

</comment></comment></comment><comment><USER13> Cases like this are one of the reasons pardons exist.

<comment><USER14> Ha, that's only for the rich and powerful who have bought influence with the Administration.</comment></comment>


Writing, Briefly - <AUTHOR> http://www.paulgraham.com/writing44.html <comment> mark-t Wow, you managed to find the one remaining page on paulgraham.com that hadn't been submitted before.

<comment><USER2> I thought I submitted "the one remaining page" when I posted <http://www.paulgraham.com/asterisk.html>

wumi, you win.

<comment><USER3> You guys make me want to write a bot to crawl his site and just submit every URL.

Would probably be funny until my account got deleted.

<comment><USER2> There is an art to what I did. Instead of enjoying Piccasso, you are trying to write a GIMP plugin for cubism effect. It is not the same, dude. ;)

</comment></comment></comment></comment><comment><USER4> OK, I'll be the first to admit... I had to look up the meaning of "anaphora".

<comment><USER5> So you're not using aif or awhen I bet.

<comment><USER6>
        a·naph·o·ra [...]
            –noun
            1.  Also called epanaphora. Rhetoric. repetition of a word or words at the beginning of two or more successive verses, clauses, or sentences. [...]
            2.  Grammar. the use of a word as a regular grammatical substitute for a preceding word or group of words [...]
            3. (sometimes initial capital letter) Eastern Church. [...]

Aif and awhen use meaning 2, while this essay probably means 1.

</comment></comment></comment><comment><USER7> Interesting and quite useful. I have made so many false starts on starting a blog of my own, that I have lost count. Being a founder of a software startup, I know I have to start blogging sooner than later, but (this may sound really weird) so far I have not had the courage. This essay will help me organize my thoughts and take me closer to "putting pen on paper"

</comment><comment><USER8> Another added tip for writing and, this can be used for almost anything, is following the Statement Example and Explain format. (SEE) It is very English 101 but always helps, e.g., "I need you to change the font to bold" (Statement) "See this is how you do it <strong> my bold text</strong>" (Example) " Once we make the change visitors will be able to read the text better" (Explain) Or "I love you" (s) "I think about you all the time" (e) "This is why we should get married" (e)

</comment><comment><USER9> Here's one: If your essay turns into a list, use bullet points or numbers rather than a block of semicolons.

Otherwise, great stuff. I like that pg's advice for writing--create a first draft and iterate rapidly--is exactly the same as his advice for creating startups.

<comment><USER10> Amen to that. I had to fight hard to finish the article.

<comment><USER11> After the first 2 items of the list I realized it was indeed a list until the end: from that point, knowing the structure of the article made the reading even easier.

</comment></comment></comment><comment><USER12> Interesting that most of the advice can be well applied to programming also.

</comment><comment><USER13> Nice ending! Poetic even :)

</comment><comment><USER14> Don't be afraid to use long sentences.

There are no rules, only guidelines.

<comment><USER15> If, and only if, you can craft one that makes sense and is coherent.

</comment></comment><comment><USER16> He uses too many semi-colons for my liking.

<comment><USER17> Most modern English speakers seem to use way, way fewer semicolons than they should; I'm not sure whether to blame this on education or if it's just the bar for publishing being lowered; nevertheless, the vast majority of people I've talked to don't know to use semicolons with coordinating adverbs (or whatever they're called) such as "however" and "nevertheless;" oftentimes they also don't know that comma-splices are bad; as an amateur Grammar-nazi, this general practice really irks me.

<comment><USER18> kurt Vonnegut was rather famously against the use of semicolons. it made me rethink their usage. these days i'm more likely to use two sentences to convey the same idea.

<comment><USER19> there are three ways to break up the flow of writing. . is to start an entirely new subject , is to stay on the same subject ; is somewhere in between, you're still on the same topic but have switched focus.

another way to think of it is conversationally. a period is a breath, a coma is a pause, a semi is a slightly longer pause.</comment></comment></comment></comment>


Ask HN: What is your preferred choice/style/frequency of note-taking? - <AUTHOR> I have a notebook in which I dump all information with an index on the last page. It is some Japanese indexing style that I read about sometime ago. I also use Cornell style note-taking for meetings, etc. With the given diversity of HN users, I would like to know what is your method? <comment><USER2> When I take notes (usually in class, as I'm still _sadly_ a uni student), I mainly take them on my computer, using a markdown-like syntax on a tool I created that sends everything in a builtin postgreSQL database (that syncs itself with my server every time I connect the laptop to internet). Every note is identified by a unique identifier like "<day><month><year><document number><document type><category>", for example, my latest economy course was noted "0710161CECO", making it kinda weird to others, but crystal clear to me. But as I take notes on paper too (due to professors forbiding us the use of a laptop in class) (completely stupid as these classes are about linux and C development) I write the code on the top right corner of the paper, usually with a small cat drawn (as I love cats)

<comment><AUTHOR> No laptops in linux classes?! Marking papers with code - it reminds me of a python script I had written some years ago. It looked for markings on the top right side of the document and depending its colour, it would file it in the correct folder and assign an appropriate file name.

<comment><USER2> We are in a tech/IT uni and I can only use my laptop in math for courses.. I'm thinking of dropping out but my current situation doesn't let me.

</comment></comment></comment><comment><USER3> I take a lot of notes during lectures - just very simply on A4 lined paper that I file at the end of the class. For personal notes I use a small notebook, but I don't have any special system for it. When it's full it's full...</comment>


Hubble Wallpapers - onreact-com http://hubblesite.org/gallery/wallpaper/

<comment> onreact-com Something for your kids :-)

<comment><AUTHOR> New background for me. Done.</comment></comment>


Why Mozilla Matters and Won't Switch to WebKit - <AUTHOR> https://techcrunch.com/2013/02/15/why-mozilla-matters-and-wont-switch-to-webkit/ <comment><USER2> I always felt that the fear of browser monoculture was misguided. Does anyone suffer under the current Unix monoculture? BSD market shares are a sliver of Linux's.

It seems to me that the assertion that a browser monoculture would be a bad thing stems from the presumption that WebKit is controlled by the iron fist of Apple, and Chromium by the iron fist of Google. It seems like an unintentional damning of open-source. After all, what good is Chromium being open-sourced if Google effectively controls the codebase, and no forks are realistically possible, because the codebase is too complex for the community or even a small company like Mozilla to take on? (Microsoft has managed it, of course, but that's another megacorp).

<comment><AUTHOR> Microsoft using Chromium might moderate Google's influence on it and in turn the web.

With Mozilla's recent layoffs etc, it seems in the long run they might be better off building Firefox on Webkit. It'll strengthen Webkit's position as an alternative to Chromium and stop splitting the non-chromium vote, so to speak.

</comment></comment><comment><USER3> (2013)

<comment><USER4> Heh, yeah, I didn't realize what year it was until I got to "Mozilla's CTO Brendan Eich" and thought "Wait—that guy? Now when _was_ this..."</comment></comment>


Windows System Exploit - <AUTHOR> http://megafrock.com/cryptex.html <comment><USER2> the bluescreen is because, well, "CRITICAL_OBJECT_TERMINATION". in Windows, some processes, if they terminate, cause the entire operating system to stop with a bugcheck. think of it like init dying in linux.

there sadly is no 'stack backtrace'. it looks like he's managed to send some message to csrss.exe that caused it to crash with an invalid memory operation.

this is bad, it might even be exploitable. even though the exploit would be in csrss, which is not kernel mode, it's still extremely important and trusted. also, untrusted low-user code could make this call to privilege escalate.

it's worth noting that thought the author states " I stumbled accross the bug inadvertently while working on something totally unrelated to security, and decided to publish my findings so that this can be fixed by Microsoft.", microsoft actually has a security team that can be found here: <http://technet.microsoft.com/en-us/security/ff852094.aspx> (google for "microsoft report security bug")

the bugs you report to them remain confidential until they are fixed. this way, potentially bad exploit code isn't floating around the internet for some indeterminate amount of time. like this!

<comment><USER3> You usually can get a backtrace using the right commands in WinDbg after opening the crash dump.

<comment><USER2> indeed!

a trouble here is that the original fault is in user-mode csrss. you cannot use a user-mode debugger to debug csrss, so, to debug it you must use a kernel debugger. the process is involved. it is documented by microsoft though...

another trouble is that it seems that, at least on my systems, the ability to create a full dump of memory from the faulting process has been removed in w7. all you can do now is dump kernel mode memory, which would not include the needed information...

</comment></comment></comment><comment><USER4> This isn't really an exploit, except insofar as a local user can cause a DoS for the system. Until there's a demonstration that arbitrary code can be invoked with elevated privileges, it's just a bug.

<comment><USER5> Agreed. Raymond Chen refers to these types of problems as involving "being on the other side of this airtight hatchway": [http://blogs.msdn.com/b/oldnewthing/archive/2010/05/11/10009...](http://blogs.msdn.com/b/oldnewthing/archive/2010/05/11/10009450.aspx)

<comment><USER6> That's not entirely true - non-privileged local users are not supposed to be able to bluescreen the system. Note that, e.g. Terminal Server exists.

<comment><USER7> You can cause a blue screen by trying to copy the device context of the screen to itself with BitBlt - a stupid thing to do but still causes a blue screen

<comment><USER8> Sounds interesting. Anyone else have evidence for Microsoft's policy of ignoring local DoS vulns?

</comment></comment></comment></comment></comment><comment><USER9> Untill proven otherwise this totally violates full Disclosure policies. I know they are like 'gentleman agreements' but this feels bad, and looks bad, like the author is only out for some internet fame. I can not believe that he in any way tried to contact Microsoft, but clearly took his time on this publication.

<comment><USER10> I kind of get the feeling that the author doesn't really know what he's doing. The actual exploit code is a fragment of what looks like a 'hello world' sort of console IO test. The 0xC0000000 he goes on and on about is just GENERIC_READ | GENERIC_WRITE, which is a totally legal combination. And he disassembles his own code for no particularly good reason.

Given all of this, it's not really a surprise that he's not clear on responsible disclosure policies (this doesn't really violate 'full disclosure policies' - he's fully disclosing it, after all!). It sounds like he was just playing around with things, found a way to crash his own machine by accident, and decided to post it online.

I also note that the code is incomplete, and looks reasonably straightforward and correct from casual inspection. I wonder if the real cause is elsewhere?

<comment><AUTHOR> I haven't exactly pinpointed the cause of the problem, I just noted that that call was the last point in my code to get executed before the system was hosed.

Also, the code is complete: check the tarball listed at the end of the page.

</comment></comment></comment><comment><USER3> Call stack from WinDbg:

      ChildEBP RetAddr
      8942ec9c 82b1d2a1 nt!KeBugCheckEx+0x1e
      8942ecc0 82a9ae5a nt!PspCatchCriticalBreak+0x71
      8942ecf0 82a9ad9d nt!PspTerminateAllThreads+0x2d
      8942ed24 8287b8fa nt!NtTerminateProcess+0x1a2
      8942ed24 77b87094 nt!KiFastCallEntry+0x12a
      00f8f260 77b868d4 ntdll!KiFastSystemCallRet
      00f8f264 75d3301f ntdll!ZwTerminateProcess+0xc
      00f8f2a4 75d34d7c CSRSRV!CsrUnhandledExceptionFilter+0xcb
      00f8f2ac 75d36f48 CSRSRV!CsrApiRequestThread+0x3e2
      00f8f2c0 75d36cde CSRSRV!_EH4_CallFilterFunc+0x12
      00f8f2e8 77b87199 CSRSRV!_except_handler4+0x8e
      00f8f30c 77b8716b ntdll!ExecuteHandler2+0x26
      00f8f330 77b5f98f ntdll!ExecuteHandler+0x24
      00f8f3bc 77b86ff7 ntdll!RtlDispatchException+0x127
      00f8f3bc 77b92cc7 ntdll!KiUserExceptionDispatcher+0xf
      00f8f708 77b92c78 ntdll!RtlpLowFragHeapFree+0x31
      00f8f720 75c6b349 ntdll!RtlFreeHeap+0x105
      00f8f734 75c72ce2 sxs!operator delete+0x1c
      00f8f740 75c724f6 sxs!RawStack::~RawStack+0x12
      00f8f74c 75c72484 sxs!XMLParser::~XMLParser+0x68
      00f8f758 75c72e7c sxs!XMLParser::`scalar deleting destructor'+0xd
      00f8f76c 75c686f3 sxs!_unknown<IXMLParser,&IID_IXMLParser>::Release+0x27
      00f8f77c 75c73e1f sxs!CSmartRef<IXMLParser>::~CSmartRef<IXMLParser>+0x1b
      00f8f7fc 75c74a37 sxs!SxspIncorporateAssembly+0x5db
      00f8f83c 75c78001 sxs!SxspIncorporateAssembly+0xb8
      00f8f874 75c6a944 sxs!SxspCloseManifestGraph+0x7c
      00f8f928 75ce28c7 sxs!SxsGenerateActivationContext+0x48f
      00f8fa90 75ce1ad3 sxssrv!BaseSrvSxsCreateActivationContextFromStruct+0x490
      00f8fac8 75d34d65 sxssrv!BaseSrvSxsCreateActivationContextFromMessage+0xdb
      00f8fc40 77b45e7a CSRSRV!CsrApiRequestThread+0x3cb
      00f8fc80 77ba374e ntdll!__RtlUserThreadStart+0x28
      00f8fc98 00000000 ntdll!_RtlUserThreadStart+0x1b

</comment><comment><USER11> I think this it utterly irresponsible to publish without trying to contact Microsoft's security team first. Why on earth?

<comment><USER12> I wonder how easy it is to actually contact Microsoft on matters like this? It would probably take hours upon hours of searching convoluted corporate websites just to get an e-mail address or phone number to contact. Just slamming it on the web and posting on hacker news will take less time and is sure to reach Microsoft's attention quickly :) Sure, it's not responsible but not everyone is.

<comment><USER13> _I wonder how easy it is to actually contact Microsoft on matters like this? It would probably take hours upon hours of searching convoluted corporate websites just to get an e-mail address or phone number to contact._

You could go to microsoft.com and type "report a security vulnerability" into the search box. Then click the first result.

<comment><USER12> Well that was easy. It even worked on the internationalized version in my native language, which is not common with corporate websites. But that's just the first step, anyway.

</comment></comment></comment></comment><comment><USER11> Ok, tried it. This DOES NOT trigger blue screen on Windows 8 (64bit) / Visual Studio 2012. I'm pretty sure the author has some other problems in his environment.

<comment><AUTHOR> This is not the case.

Did you use the makefile to build it? I'm thinking that those specific compile and link flags are key to the triggering condition.

I've gotten it to crash at least three or four times on several windows 7 boxes of wildly differing configurations. No confirmed trials on a windows eight box, the bug may have been fixed there.

<comment><USER11> I also ran it on Windows 7 (64-bit). Nothing happens, although the prompt was displayed. It wasn't on Windows 8. The program doesn't do anything special. Either you're running some other version of the program, or your report is incorrect.

<comment><USER3> Was able to reproduce and get a dump on Win7 32-bit, but had to run the program more than once.

<comment><USER11> I think I was able to reproduce it myself. Yesterday I ran your program on one particular laptop, tried to get it to crash but it didn't. Then today when it woke up from sleep, it suddenly bluescreened. I think you may onto something here...

</comment></comment></comment></comment></comment><comment><USER14> I hate the idea of "full disclosure." I, instead, love what this author has done. You found a bug, you're posting about it. Great. Any decent, respectable, commercial enterprise should have _somebody_ watching sites like this, looking for posts like these. They shouldn't rely on somebody taking time away from themselves or their projects and write up a bug report. No.

<comment><USER11> I don't get it. It takes the exact same time to write a report to Microsoft about it. The author clearly didn't even consider it.

<comment><USER14> We don't know the author. He may very well enjoy writing these types of articles. Filling out a form online? Maybe not so much. He also has complete freedom in writing anything he wants with no obligation of providing further proof or information. To some, that's enough motivation.

<comment><USER11> Look, I get it. I just don't approve it. I think it's irresponsible.

</comment></comment></comment></comment><comment><USER15> >but to make life simple for programmer's

Programmer's what?</comment>


Show HN: Mac_format, rapid OS X OUI lookup tool and MAC address format translator - <AUTHOR> https://github.com/xraystyle/mac_format <comment><AUTHOR> Network administration frequently involves looking up the vendor info for numerous MAC addresses, as well as chasing MACs across a network over devices belonging to multiple vendors. Network gear vendors have zero standardization when it comes to the formats they use for displaying MAC addresses. Some use Linux colons, others don't. Cisco, for example: 'aabb.cc11.2233'

This makes copying and pasting MACs across multiple devices problematic. Looking up vendor info is also time consuming and usually involves a trip to the web browser with another copy/paste. There's not really any way to do any of this that isn't tedious, hence the inspiration for this project.

mac_format adds these functions to the right-click 'Services' menu on OS X, and provides a command line utility with the same functionality for CLI work and scripting.

Full documentation as well as an installer script are on the Github page for the tool. Everything is open-source, suggestions and pull requests welcome!</comment>


Travis CI launches an awesome crowd funding site - <AUTHOR> http://love.travis-ci.org

<comment><USER2> If you haven't heard of Travis CI before, it's a continuous integration service for open source* software. They currently support ruby, erlang, php, clojure, and node, with more languages in the pipeline... and more already working sans first-class support.

To abuse a phrase, this is the opposite of selling sugar water. It's set to revolutionize the already high quality OSS scene.

* - a planned feature is to support private, non-OSS projects

EDIT: moar languages than I thought!

</comment><comment><USER3> Not everyone can give their time to do this so having a way to donate is awesome!

</comment><comment><USER4> \o/</comment>


The Unfinished: David Foster Wallace's Struggle to Surpass Infinite Jest (2009) - <AUTHOR> http://www.newyorker.com/magazine/2009/03/09/the-unfinished <comment><USER2> If anyone is daunted by Infinite Jest but undaunted by the fad of hating DFW, definitely start with his books of essays & journalism. IMO they're a lot more rewarding and enjoyable than his novels.

I think _E Unibus Pluram: Television and U.S. Fiction_ is essential reading. (PDF link: [https://jsomers.net/DFW_TV.pdf](https://jsomers.net/DFW_TV.pdf))

<comment><USER3> Wait, what fad of hating him?

<comment><USER4> Like any other subculture / virtue signal which gains in popularity, there's a strong group for DFW and a strong backlash against from both sides. One side rejects the signal due to its popularity ("only dilettante freshman losers love DFW, REAL enthusiasts love REAL lit") and the other rejects the signal due to its accessibility ("these hipsters think they're cool just because they've read something, anyone could buy the book and do that!").

We see it in programming, too - "only newbie idiots love Ruby, Rust 4ever" plus "this damn hipster Rust brigade is ruining programming, Java is still just fine!"

<comment><USER5> Don't forget the hate from the positivist-minded STEM crowd and right-wingers, who both have a reflexive dislike of anything with a whiff of postmodernism about it.

</comment></comment></comment></comment><comment><USER6> I found Infinite Jest extraordinarily compelling, hilarious, and endlessly entertaining. I wouldn't go as far to say that it was "hard to put down". The book will fatigue you at points, as there is such a density of ideas within a single page that you need to just step back for the day and take it all in. But I was inevitably drawn back every time to sit down and open Infinite Jest again and again. Maybe it was the prose, or the endearing and terrible characters that DFW make all come to life, or the sprawling mystery plot. I love the way DFW makes these small, minute observations of life that always seem to make me go "yeaaaah I can relate too!" So many unforgettable moments in that book, including the section about marijuana, and the chapter of the kids playing tennis analogized with war.

<comment><USER7> _I love the way DFW makes these small, minute observations of life that always seem to make me go "yeaaaah I can relate too!"_

We need a word for that, in English. I had a very close friend that had an uncanny ability to find things about any situation that I would gloss over, but when he pointed it out, I would realize that I had missed seeing it but I completely agreed with it. And, weirdly, this friend also committed suicide.

<comment><USER8> The word is insightful.

<comment><USER9> I think "empathizable" Igor "relatable" are better candidate, though they lack the sudden quality that parent post has.

</comment></comment></comment></comment><comment><USER10> I wonder how the critical reception to The Pale King will evolve over time. In my opinion it's been a bit over-esteemed by fans of DFWs work. It really does feel incomplete, and not just in a Brothers Karamazov sort of way. It lacks a center of gravity, and I never really felt a strong connection with any of the characters. By the end of Infinite Jest the book had become something greater than the sum of its parts, and I didn't really feel the same thing happening with The Pale King.

The only part of the book that I feel comes close to the greatness of Infinite Jest is the 100-page 'As the world turns' chapter. But then, I don't think that chapter necessarily benefits from being a part of the book, and could just as easily have been published as a stand-alone piece.

<comment><USER11> Isn't that the nature of the thing though? If he could have completed it, you'd be reading a finished novel. You'd have to kind of squint and try to look through the trees to the set of places he might have been heading.

</comment></comment><comment><USER12> show of hands, how many HN readers have tried to read Infinite Jest and never made it all the way thru?

<comment><USER13> I made it about 125 pages. I wanted to like it, but the endless digressions and footnotes wore me out.

<comment><USER14> FWIW, I didn't like it for the first 300-400 pages either. But it very quickly became one of my favorite books. Its worth sticking it out to the end.

<comment><USER15> >300-400 pages

>very quickly

How good can a book be if it starts off bad and stays that way for so long, most books would have already ended?

<comment><USER14> I never said it starts off bad. DFW just makes a point to make the book inaccessible. It isn't meant to attract a wide audience, but many good things are initially dismissed because they aren't easy.

</comment></comment></comment></comment></comment><comment><USER16> IJ is really one of the most wonderful books ever written, it was a long read but extremely rewarding. I love how it comes full circle, you get to the end and want to read it again. But most amazingly the central event of the plot is completely absent and up to the reader to figure out. The digital version makes the footnotes much much easier.

</comment><comment><USER17> Has anyone made an easier to read online version of Infinite Jest? With pop up footnotes so you don't have to flip pages?

<comment><USER18> It's not so bad in dead tree form if you use two bookmarks (one for the main text, one for the endnotes).

<comment><USER19> I prefer it in kindle form, i.e., lighting it on fire.</comment></comment></comment>


Google's Project Tango - <AUTHOR> https://www.google.com/atap/project-tango/ <comment><USER2> For some context these were unveiled in 2014 - [http://www.zdnet.com/article/google-introduces-project- tango...](http://www.zdnet.com/article/google-introduces-project-tangos- android-3d-mapping-smartphone/)

There was a presentation at Google I/0 2015 - [https://www.youtube.com/watch?v=iP9m9a2KEN4](https://www.youtube.com/watch?v=iP9m9a2KEN4)

Lenovo announced at CES 2016 that the technology could appear in smartphones this summer. - [http://www.lenovo.com/projecttango/](http://www.lenovo.com/projecttango/)</comment>


This diet study upends everything we thought we knew about 'healthy' food - <AUTHOR> https://www.washingtonpost.com/news/to-your-health/wp/2015/11/20/the-diet-study-that-upends-everything-we-thought-we-knew-about-healthy-food/ <comment><AUTHOR> Cited article here: [http://www.cell.com/cell/fulltext/S0092-8674%2815%2901481-6](http://www.cell.com/cell/fulltext/S0092-8674%2815%2901481-6)</comment>


Zaarly's Founder On How To Get 100,000 Subscribers In 3.5 Months | Business Tips - <AUTHOR> http://mixergy.com/how-to-get-members/ <comment><USER2> I'm not sure I agree with every one of these methods. Incentives for pre- signups seem a little hollow if people aren't already somewhat excited for the site. Maybe I'm just overly skeptical of social media marketing in the pre- launch stage, but I'm interested to know if anyone has found it particularly effective or otherwise.</comment>


Stream: A Crypto Token for Streamers - <AUTHOR> https://github.com/streamproject/wiki/wiki/Project-Overview <comment><USER2> This proposes cutting the streaming platform host out of tip profits entirely, do I understand correctly? What incentive is there to the developer to create the streaming platform if there is no stake in profit? Did I miss something?

</comment><comment><USER3> when ico</comment>


Why Peak-Oil Predictions Haven't Come True - <AUTHOR> http://online.wsj.com/articles/why-peak-oil-predictions-haven-t-come-true-1411937788 <comment><USER2> "Peak Oil" as a phrase always seemed like a way to stumble into some really simplistic conversations. I never really quite understood it. I've been in conversations where people have described it as a peak "moment" where overnight our life will turn into one of those bad ABC tv shows that gets canceled mid-season.

If you've got a steep price curve, such that a little bit of extra demand means that the cost goes way up (because of constrained supply), then it also means that the price curve is also steep on the way back down.

What that means is that if a demand spike makes the price skyrocket, then all sorts of alternative fuels become economical when they weren't before. And then, as more people switch to them and the demand for oil relaxes even a little bit, the oil price can fall dramatically as well, until some of those alternative choices don't seem as economical.

Even just a simple model like that can explain all sorts of brain-numbing conversational patterns. Like the certainty that big oil has had the knowledge of clean, cheap energy and that they keep it secret to make money on oil... or that they'll pump up oil prices to lure the alternative energy people to make business risks, and then purposely flood the market in order to put them out of business, etc.

<comment><USER3> No. In the case of oil, there's low elasticity of substitution. Trillions of dollars of infrastructure run on oil, not alternative fuels. That's why spikes in the oil price cause recessions.[1]

The price of energy matters too, not just its derivative. We can make synthetic fuels that existing infrastructure can use but they're too expensive to support our civilization.[2]

Imagine your robot vacuum can run an hour on a charge and takes 15min to make a roundtrip to its charging station. If you move the charging station so the roundtrip takes 30min, you'll get dirty floors, and they'll still be dirty a year later. The robot's EROI has gone from 4 to 2 and it can only handle a smaller house, or one that sees less activity.

The EROI of a commodity like oil is approximately inversely proportional to its price. For commodities, competition brings price to the marginal cost of production, which is the cost of the embodied energy (so for fuels, this cost is unitless). The synthetic fuels are expensive because their synthesis is energy-intensive.

It's something policy makers should understand when they advertise energy projects as creating jobs. Manifestly, the more jobs an energy source requires, the worse it is. Energy is a means to an end not an end in itself.

[1] [http://econweb.ucsd.edu/~jhamilto/oil_history.pdf](http://econweb.ucsd.edu/~jhamilto/oil_history.pdf)

[2] [http://www.inscc.utah.edu/~tgarrett/Economics/](http://www.inscc.utah.edu/~tgarrett/Economics/)

<comment><USER4> >No. In the case of oil, there's low elasticity of substitution. Trillions of dollars of infrastructure run on oil, not alternative fuels.

Is this elasticity of substitution quantified? I'd like to read more about it if you have a link. My gut feeling is that this elasticity is improving (despite increasing oil consumption) due to general technological advancement and a high-speed globalised economy.

How well can we respond to a price spike now versus 30 years ago? Can we mitigate the economic impact of a price spike faster than we could 30 years ago? These are the trends I am interested in investigating.

<comment><USER3> In 2013, the world average price per GJ of coal was $3.63, of natural gas $6.81, and of oil $18.22. That's a factor of 5 ready for arbitrage in a $5T industry, sitting there for years at a time.[1]

The average age of cars on the road is 11 years, and apparently rising.[2]

Technology itself is notorious for lock-in effects. Windows 10 was announced today... I use a Dvorak keyboard (1936) but most still use QWERTY. You can ponder when Bret Victor's dreams will come true. In teaching technology, we're arguably no further than Papert was in 1980.[3][4]

In Garrett's model (op. cit.) the value of civilization's accumulated wealth in years of current production (GDP) does fall over time. In 1980 it was about 60 years. Today it's about 45 years. (In 1820, it was about 300 years.)

[1] [http://www.bp.com/en/global/corporate/about-bp/energy- econom...](http://www.bp.com/en/global/corporate/about-bp/energy- economics.html)

[2] [http://www.latimes.com/business/autos/la-fi-hy-ihs- automotiv...](http://www.latimes.com/business/autos/la-fi-hy-ihs-automotive- average-age-car-20140609-story.html)

[3] [http://el.media.mit.edu/logo- foundation/logo/](http://el.media.mit.edu/logo-foundation/logo/)

[4] [http://logothings.wikispaces.com/](http://logothings.wikispaces.com/)

</comment></comment></comment></comment><comment><USER5> > The real constraints we face are technological and economic, they say. We're > limited not by the amount of oil in the ground, but by how inventive we are > about reaching new sources of fuel and how much we're willing to pay to get > at it.

This is exactly what the peak oil people have been saying, you can't claim they're "looking at it the wrong way" and then restate exactly what they were claiming. Peak oil was never about running out of oil, it was always about the rate and economics of extraction. "the size of the tap, not the size of the tank" etc.

This "recent boom" in the US remains cash negative - about 600b capex for about 500b in oil. And we don't know yet whether that's going to change.

Currently "geology is not only winning, it is crushing technology" [http://blogs.platts.com/2014/07/30/peak-oil- forecasts/](http://blogs.platts.com/2014/07/30/peak-oil-forecasts/)

<comment><USER6> I thought the peak oil people were saying we are running out of oil and that production would peak then decline relatively soon. If they were saying that prices would simply rise encouraging new technology to allow continuing increased production then I think they were very poor at communicating their ideas. More likely they actually believed what they were clearly saying: oil production would peak in X years.

See for example: [http://en.wikipedia.org/wiki/Peak_oil](http://en.wikipedia.org/wiki/Peak_oil) [http://www.nytimes.com/2010/06/06/us/06peak.html](http://www.nytimes.com/2010/06/06/us/06peak.html)

<comment><USER7> They certainly got the shape of the curve wrong, but the fact that you'll eventually have to stop using a finite resource is axiomatic, isn't it?

<comment><USER6> Agreed - it is either wrong or a contentless axiomatic statement. My sense is many "Peak Oil" people were predicting something dramatic would happen (not just price increases) and were simply wrong. What is strange is the strong appeal of the idea to some people.

</comment></comment></comment></comment><comment><USER8>
      He predicted that U.S. oil production would peak, probably in the early 1970s, and then decline. It would resemble a bell curve.

      If M. King Hubbert were alive today—he died in 1989—would he admit defeat? Probably not

No shit he wouldn't admit defeat. He was absolutely 100% correct. US oil production did peak in the 70's.

[http://en.wikipedia.org/wiki/Oil_reserves_in_the_United_Stat...](http://en.wikipedia.org/wiki/Oil_reserves_in_the_United_States#Production)

<comment><USER9> It's still a little premature to make that prediction. This graph ([http://upload.wikimedia.org/wikipedia/commons/a/a0/US_Crude_...](http://upload.wikimedia.org/wikipedia/commons/a/a0/US_Crude_Oil_Production_and_Imports.svg)) from that Wikipedia article shows a dead cat bounce. It's still too early to say whether that bounce will top the record production number in the 70's.

<comment><USER8> I just see it from the other point of view. I see it as being too early to say that he was wrong.

The article seems way too harsh on someone who made a prediction over 50 years ago that has stood the test of time flawlessly. He was objectively correct when looking at actual data.

The only counter point actually given in the article to peak oil is that it might be theoretically possible for production to beat those 1970's levels which isn't much of a counterpoint.

</comment></comment></comment><comment><USER10> The U.S. imported more oil for a while, decreasing domestic production, and then recently began importing less oil and increasing domestic production again in areas that had been left as reserves or hadn't been commercially feasible before the record high per-barrel prices of oil a decade ago (see e.g. [http://www.aei-ideas.org/2013/01/us-drilling-boom-brings- net...](http://www.aei-ideas.org/2013/01/us-drilling-boom-brings-net-oil- imports-to-a-20-year-low/) ; there are other sources available online if you don't like AEI).

So we have to look at world oil production, not just domestic. And, although world oil production is still growing, that growth is clearly in decline as most new sources for oil require far more effort to extract than in the past (e.g. [http://en.wikipedia.org/wiki/File:World_Oil_Production.png](http://en.wikipedia.org/wiki/File:World_Oil_Production.png)).

I'm not a peak oil alarmist. It's entirely sensible to expect that as oil becomes more difficult to extract, its price will go up, and as its price goes up, new sources of oil will become more feasible to engineer.

 _But_ , so much of oil production and consumption and everything associated with it is horrible and disgusting and a potential ecological and economic disaster waiting to happen. (...Deepwater Horizon...)

We shouldn't need peak oil scaremongering to move us off of oil dependence quickly. It should make sense to do so anyway, especially as other technologies continue to improve.

<comment><USER11> _But, so much of oil production and consumption and everything associated with it is horrible and disgusting and a potential ecological and economic disaster waiting to happen. (...Deepwater Horizon...)_

What about all the good it makes possible? Fossil fuels made it possible to build and run the hospitals that save our lives. Try running an ICU on wind and solar power alone, without a huge, expensive and _very_ uneconomical battery. Think also of the food we eat - while you can quibble about the merits of particular diets, there's no way that the 7 billion people alive today could get the calories they need to stay alive without tractors, fertilizer, etc. These two examples are the the beginning - our lives are made possible by oil.

While burning fossil fuels may have a negative effect on climate, is that effect so bad that we should abandon them? Fossil fuels give us such good control over our climates that climate-related deaths (everything from storms to hurricanes, etc.) have dropped precipitously over the past century: in the past 80 years, there has been a 98% decrease in deaths due to climate. Couple those facts with the abominable track record that everyone has about predicting the severity of future conditions (remember the shrill predictions of the 60s and 70s?), and fossil fuels come out ahead of everything else out there, short of nuclear.

<comment><USER10> Do you allow any room at all for a compromise? Or must you assume that I mean, "completely and totally abandon fossil fuels even where it doesn't make sense to do so"?

> _Fossil fuels give us such good control over our climates that climate- > related deaths ... have dropped precipitously over the past century..._

What? Are you sure this isn't due to better construction materials and practices? I haven't heard this before.

> _...and fossil fuels come out ahead of everything else out there, short of > nuclear._

This _probably_ isn't true, although it depends a lot on how you measure "ahead" and which numbers you choose to run with. If we're looking at EROI (or EROEI -- I guess it's lost a letter recently), then oil is somewhere between 10:1 and 5:1, and falling, and that puts it behind wind and hydro, but ahead of nuclear and solar. (I was surprised by the numbers on nuclear years ago when I first looked at this.) e.g. [http://spectrum.ieee.org/green- tech/solar/argument-over-the-...](http://spectrum.ieee.org/green- tech/solar/argument-over-the-value-of-solar-focuses-on-spain)

There are also some strong arguments for the adverse health effects of burning coal and oil (e.g. [http://www.ucsusa.org/clean_energy/our-energy- choices/coal-a...](http://www.ucsusa.org/clean_energy/our-energy-choices/coal- and-other-fossil-fuels/the-hidden-cost-of-fossil.html), or just go live in Beijing for a year and try not to get a respiratory infection).

I am all in favor of continuing to produce and consume oil where it makes sense to do so. I am also all in favor of continuing to develop replacements for oil as expediently as practical.

Do you think that's an unreasonable position?

<comment><USER11> > Fossil fuels give us such good control over our climates that climate- > related deaths ... have dropped precipitously over the past century...

 _What? Are you sure this isn 't due to better construction materials and practices? I haven't heard this before._

Construction materials and practices, made possible by what fuel? What powers the excavators, drives the furnaces to used to make steel that goes into everything from rebar to Catepillar tractors to the steel toe in the foreman's boot? What source of energy do people use to get a log from a mountainside to the mill, through it, and then to your backyard? What are the hardhats that everyone wears made of? (Plastic, which is made from oil.) Need I go on?

This same energy source is very cheap. That means that more people can afford new(er) homes. Homes which are equipped with better features that help them resist natural disasters, such as earthquakes, hurricanes, extreme heat, cold, etc.

Suppose energy were 50% more expensive. It doesn't take an economist to predict that under those conditions, many homes wouldn't be as nice, new and safe. How many more people would have to do without air conditioning? Clean drinking water? How many more people wouldn't be able to afford fresh fruit and vegetables in the winter?

<comment><USER10> I think you're reaching quite a bit here. Oil is demonstrably more than 50% more expensive now than it was anytime before 1974, even adjusted for inflation. (I just double-checked.)

You seem to be saying that the price of energy not only underpins the entire world economy, but that it is the greatest factor in the world economy almost to the exclusion of everything else. I cannot believe that would actually be your argument, so I must be misreading you.

While the cost of energy is certainly a big factor (and I'd readily agree that cheap energy is largely responsible for the industrial age), the world civilization would have collapsed already if it were tied that closely to the barrel price of oil.

</comment></comment></comment></comment></comment><comment><USER12> Crude oil actually has peaked (note the chart including shale/tar sands/LNG), it's just that the demand has been offset both by the ongoing global recession and the growth of other sources.

However, I still have a hard time seeing this as a sustainable path forward. In energy terms it may give us enough time to transition to renewable sources, but the main sources of remaining new carbon are tar sands, fracked shale, and deep-water/arctic drilling, all of which have huge and increasing opposition from local citizens and environmentalists, all of which have a far worse EROEI than traditional crude oil plays, and especially in the case of fracking appear to have absurdly short well lifetimes.

All of this combines I think to demand a fair amount of skepticism for the idea that these alternate sources of carbon can long offset the ongoing peak and eventual decline of crude oil - the EROEI if nothing else seems to metaphysically fuck the idea of transitioning increasing portions of our energy needs to those sources.

</comment><comment><USER13> Current oil price (NYMEX): $94.57. It was in the $20-$40 range for most of the 1990s. (All numbers inflation-adjusted.) For "new oil", that's near the price of extraction too, not markup from Saudi Arabia. We hit "peak cheap oil" a while back.

</comment><comment><USER14> There's a much better article covering the topic of 'peak oil' here:

[http://earlywarn.blogspot.com/2013/08/what-oil-drum- meant.ht...](http://earlywarn.blogspot.com/2013/08/what-oil-drum-meant.html)

I don't think the more intelligent people who argued that peak oil was a reality ever thought it was about anything other than the economics of extracting oil. Most of the discussion on the oil drum focused on what happened when the cost of energy outpaced economic growth.

While I think fracking has been a reprieve, and that natural gas can supply our electricity grid, I still think that there are a number of long-term issues we may face as there are no direct substitutes for cheap oil and all of the infrastructure we have invested to it (let's call it the oil grid).

It's not cheap to replace or retrofit an infrastructure of 250 million cars / trucks / etc in the US that run on gasoline. Or retrofit the gasoline stations for natural gas for that matter. Natural gas may be an alternate source of electricity, doesn't mean it is a perfect or necessarily cheap substitute for oil.

Similar techniques to fracking have been in the industry for many years btw - they started out with nitrogen injection. It did have the effect of temporarily boosting production in declining fields. The unintended consequence however was that instead of a gentle decline, when the fields using nitrogen injection did finally decline in production their 'curves' went very sharply down (instead of a gentle gaussian curve). The rate of decline after nitrogen injection has been extreme in many oil fields around the world.

See what happened to the super giant oil field in Mexico - Cantarell.

[http://en.wikipedia.org/wiki/Cantarell_Field](http://en.wikipedia.org/wiki/Cantarell_Field)

I think like Hubbert's peak - which attempted to sum the aggregate harvesting of oil at the time given what technology he was aware of - has been a fairly good approximation until very recently of what actually happened. In my opinion, while new technology may have turned the curve back upward for oil production, I think the aggregate use of fracking may also result in a curve that on the global level also declines sharply (just as in individual fields with nitrogen injection).

<comment><USER15> That's actually a pretty scary prospect.

</comment></comment><comment><USER16> When I was a kid in the 70's we used to visit my great-grandfather every summer on his ranch in Texas. He owned several oil wells in the area.

I remember at nights the family would sit around a bonfire and talk. The elders would smoke cigars. I still can remember the feeling of the dry summer heat and the star-filled sky.

Sometimes the topic would come up of what would happen if great-grandfather's oil wells dried up.

He always laughed and said the same thing, "Every time they say we're running out of oil, the price goes to the moon."

Then he'd ash his cigar and stare into the fire, "They've been saying it for sixty years. But those wells just keep pumping."

Great-grandfather isn't around anymore, but his wells are still pumping.

This last part isn't related to oil, but one year my great-grandfather tossed a box of fireworks into the bonfire. It was epic. I never laughed so hard in my life. Still haven't.

</comment><comment><USER17> These are very brave words for and by an industry that is still using primary and secondary methods for extraction. Primary means the pressure is high enough that it literally shoots out of the ground. That's pretty easy oil. Secondary means employing a mechanism -- like a pump -- to get it out of the ground. We're just now beginning to toy with new tertiary methods of extraction, and they are expensive. Yes, innovation marches on. However, we probably won't innovate planet-scale hydrocarbon supplies out of thin air in the next twenty five years. The price will keep getting higher, the methods more and more creative, but at some point, capitalism as a mechanism for oil extraction becomes ineffective (and eventually impossible), and the flow of oil stops. Whether or not we have another equally "free" source of energy standing by to take over is another issue altogether.

<comment><USER18> Nuclear is basically ready.

<comment><USER17> While I tend to agree, you can't spray your fields with nuclear energy (or solar, or wind, or whatever). Oil plays an enormously fundamental role across a broad spectrum of uses in our civilization.

<comment><USER18> Yes, but with some extra energy input any old source of carbon atoms will do. (Oil and coal just come with carbon _and_ energy, which makes them very convenient.)

</comment></comment></comment></comment><comment><USER19> I'm not afraid that we have too little oil. I'm afraid that we have too much.

<comment><USER20> In 1994, a chemistry professor told me with a grave expression, that "we have more than enough coal to destroy the world." My current concern is that we're now in a gold rush to extract fossil fuels before it inevitably must be stopped.

</comment></comment><comment><USER21> I really enjoy how articles and conversations like this tend to take place in a universe parallel to the one where the extraction and burning of fossil fuels, especially from "unconventional" sources, has grave environmental and social consequences. As if we can compartmentalize the economy and our environmental and social ecology as separate, non-intersecting concerns.

<comment><USER22> Exactly. The "boon" of unconventional oil looks like a catastrophe to me:

[http://photo.capital.fr/l-enorme-desastre-ecologique-du- petr...](http://photo.capital.fr/l-enorme-desastre-ecologique-du-petrole- bitumeux-2658)

Actually it should remind us of "the limit to growth" book: the meeting point of pollution and lack of resources will destroy us.

</comment></comment><comment><USER23> They haven't come true because they aren't relevant predictions.

Oil extraction costs have risen. Cars have shrunk and alternate energy sources have thrived as a result. If oil supplies continue to be challenged, prices will rise again, and you'll start to see truck fleets switch to natural gas (which is ridiculously abundant).

Society isn't going back to the 19th century.

</comment><comment><USER24> Peak oil assumes the price p of oil is a function of the supply s of oil: i.e. p = f(s).

It doesn't really account for the fact that as the price of oil increases, people get a lot more innovative at finding new supplies of oil. In other words, s is not some constant, but itself some other function, at the minimum dependent on p: s = g(p). Therefore, p = f(g(p)). Lo and behold, we have a _way_ more complex relationship between price and supply than some naively assume.

The fact that the earth has a finite amount of petroleum is irrefutable. Whether or not that matters on any "real" timescale is up for debate.

<comment><USER25> It does account for that fact.

</comment></comment><comment><USER6> Why do certain phrases, such a "Peak Oil", make so many people have such strong opinions based on so little information and expertise? It must simply be one of those ideas what captures the public imagination and makes everyone feel they must have an opinion no matter how little they know. I wish there was a better explanation. The human mind is a very strange and fascinating thing.

</comment><comment><USER26> Peak oil will never happen.

If we have to we can convert coal to oil, which we wont since other oils aka all the other fossil fuels are pretty plentiful given current tech.

I can't see energy costs going up by a factor of 10 changing my lifestyle much for $ reasons, so harvesting natural gas, oil, coal will be always viable. Even if that 10 times increase is only for a while my net worth's will be so high through technological innovations another 10 fold increase won't matter to me either by that time.

Part of those technological innovations will be cheap energy though so it won't really mater, oil aka fossil fuels won't run out, they will just become redundant.</comment>


Reduce GPS data error on Android with Kalman filter and accelerometer - <AUTHOR> https://blog.maddevs.io/reduce-gps-data-error-on-android-with-kalman-filter-and-accelerometer-43594faed19c <comment><AUTHOR> Increase position accuracy and GPS distance calculation for the driver's app on Android devices with Kalman filter and accelerometer.</comment>


Falsehoods Programmers Believe About Phone Numbers - <AUTHOR> https://github.com/googlei18n/libphonenumber/blob/master/FALSEHOODS.md <comment><USER3> This is much like Patrick's "Falsehoods Programmers Believe About Names".

[http://www.kalzumeus.com/2010/06/17/falsehoods- programmers-b...](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers- believe-about-names/)

<comment><USER4> Also:

Falsehoods programmers believe about time:

[http://infiniteundo.com/post/25326999628/falsehoods- programm...](http://infiniteundo.com/post/25326999628/falsehoods-programmers- believe-about-time)

More falsehoods programmers believe about time:

[http://infiniteundo.com/post/25509354022/more-falsehoods- pro...](http://infiniteundo.com/post/25509354022/more-falsehoods-programmers- believe-about-time)

Falsehoods programmers believe about geography:

[http://wiesmann.codiferes.net/wordpress/?p=15187](http://wiesmann.codiferes.net/wordpress/?p=15187)

Falsehoods programmers believe about addresses:

[https://www.mjt.me.uk/posts/falsehoods-programmers- believe-a...](https://www.mjt.me.uk/posts/falsehoods-programmers-believe- about-addresses/)

<comment><USER5> Nice! I wish I had known about these articles before. I just created a repository to keep track of them: [https://github.com/jameslk/awesome- falsehoods](https://github.com/jameslk/awesome-falsehoods)

<comment><USER6> Shouldn't that be 'A curated list of awesome falsehoods'? ;)

<comment><USER5> Indeed :) I updated it and made it a bit more specific: "A curated list of awesome falsehoods programmers believe."

</comment></comment></comment></comment></comment><comment><USER7> I've always loved the "Falsehoods Programmers Believe About Xxxx" articles. There's always that junior developer who says, "We need a Xxxx handler! That's easy, I'll write it myself in an hour!" (where Xxxx is either a time, address, name, etc., something with a huge number of tricky potential edge cases). You can just watch the bugs jump into the program as he types. Then you get to testing:

Me: Try this test.

Dev: Oh, didn't think about that one, let's add that case.

Me: How about this?

Dev: What? OK OK, let's support that too.

Me: And this one...?

Dev: Wait, what? How is that even...?

The code is about 200 lines now, and we've blown the afternoon, and it still doesn't properly handle Xxxx, so I'll forward him the "Falsehoods Programmers Believe About Xxxx" article.

Dev: Oh crap, maybe I should have looked for a tried and true library that handles Xxxx....

Me: Yes, grasshopper...

</comment><comment><USER8> Not exactly a falsehood, but certainly a quirk:

In general, in Europe "0" is national dialing prefix, leading to numbers written in the format of:

+44(0)870123456, meaning dial 0870123456 from within the UK, and +44870123456 internationally to reach the same number (i.e. "0" goes away in international format).

However in Italy, leading "0" in the national dialing format is an integral part of the phone number itself (only for non-mobile numbers); for example:

(+39)051234567 meaning 051234567 when dialing from within IT, and +39051234567 internationally (i.e. "0" stays in international format).

EDIT: Mobile numbers in Italy don't have leading "0", and could only be dialed in full/international format either within the country, or internationally.

<comment><USER9> I think the +4412345... form, or +39012345... work in all situations. But, outside small countries many people will be unfamiliar with a number in this format.

<comment><USER10> Additionally some people believe that dialing a +XX, or even regional number will cost more even if they are in the same country/region. Which, at least in the UK, at least with common service providers, is _not_ true.

</comment></comment></comment><comment><USER11> 0\. Every internet user has a phone number they can be reached at.

<comment> david-given This is my pet hate. There are too many places which require a phone number and won't take no for an answer. Some of them you can lie to, entering something that's obviously invalid like 0, but others do rigourous validation and simply won't let you enter something that's not a phone number (Google Play is an offender here). I usually end up entering 012345678, but that's actually a valid UK number, and I don't like doing that. But you have to wonder about any online form which requires you to lie to complete...

<comment><USER12> In North America, I've always used "<valid area code>-555-1212", which is one of the numbers for directory assistance. The area code may be varied based on whatever location seems plausible. Unless the service insists on sending a text or verifying the number with your credit card company (the latter seems less common now than it used to be) there are no problems. I wouldn't worry about "012345678"; if they didn't want that number they'd probably have changed it by now. Maybe they want "867-5309"?

<comment><USER13> There are reserved fictitious phone numbers in most countries you could use [https://en.wikipedia.org/wiki/Fictitious_telephone_number](https://en.wikipedia.org/wiki/Fictitious_telephone_number)

<comment> david-given The problem with fictitious numbers is that they normally don't look invalid. I don't want to supply them with a contact number which merely doesn't work; I want to supply them with a contact number which is _obviously not a real number at a glance_. Hence why I use 0 where possible.

Ideally I'd prefer them to allow me to leave the number blank, of course.

</comment></comment></comment></comment></comment><comment><USER14> As a Canadian, where postal costs have a space in the middle, I love how forms will reject them because I included the space, or failed to include it.

With all the code they wrote to generate that pop-up, you'd think they could massage my input into the format they wanted in the first place...

<comment><USER15> Do you mean postal (aka zip) codes?

There any many countries without postal codes at all, and we have to enter fake numbers to validate forms.

[https://gist.github.com/kennwilson/3902548](https://gist.github.com/kennwilson/3902548)

<comment><USER16> > postal (aka zip) codes

Post codes aren't quite the same thing as Zone Improvement Plan codes. ZIP codes are just the peculiar implementation in the US of the general post code concept.

An important difference between ZIP codes and Canadian post codes is that, since there are many more possible post codes than ZIP codes, post codes tend to cover much smaller regions than ZIP codes. In many cases, only a handful of individuals up to a single individual may have a Canadian post code. Thus, publishing Canadian users' post codes can severely harm Canadians' privacy, as you may as well be publishing their exact address.

<comment><USER4> 9-digit ZIP codes in the U.S. can also cover very small areas. For example, a large building could have its own 9-digit ZIP code.

</comment></comment></comment></comment><comment><USER17> I was scrolling through, feeling largely unsurprised, when:

        14. In Israel, certain advertising numbers start with a *.

Woah! Definitely didn't see that coming; I can certainly imagine my( prior )self storing/passing phone numbers as some integer type.

But along with another user's comment that in Italy, leading zeroes are required, it's clear that (at least in any international application) phone numbers need to be strings.

<comment><USER18> If you store phone numbers as integers (you normally should not), remember that leading zeroes are significant. 0123 is not the same as 123. But as integers they normally are (And make sure your parser doesn't parse 0123 as octal).

<comment><USER19> Also my U.S. phone number used to be 703-6XX-XXXX (digits omitted for privacy). That's not going to work if you store it as a 32-bit integer (when I was a dumb college student I made a similar mistake, and spent a couple of minutes scratching my head over why my number kept changing to 214-748-3647 every time I saved it to the DB).

<comment><USER20> "Somewhere in Dallas, some poor bastard is wondering why his phone rings off the hook with calls for the Nevada Division of Mental Health & Developmental Services, the Jackson County Florida Chamber of Commerce, a yacht club in New York….." And NASA, apparently [http://sbir.gsfc.nasa.gov/award_firm_list/selection_nid/3513...](http://sbir.gsfc.nasa.gov/award_firm_list/selection_nid/35136)

</comment></comment></comment></comment><comment><USER21> > A phone number uniquely identifies an individual

As someone who travels a lot I can attest to the annoyance of messaging apps which identify users by phone number. WhatsApp is a good example.

Another terrible design is one time passcodes which are sent over SMS. When a number gets recycled it can become impossible to recover access to a service which you forgot was associated with the number you had at the time of signing up in another country.

</comment><comment><USER14> I have a toll-free 1-8xx number.

Since I often change cell phone numbers because I move frequently (nationwide free long-distance has never caught on in Canada), I like having one number I can re-direct as needed. When I go overseas and buy a local SIM card, I'll re- direct it to that so I can keep in touch.

Telecoms have said they can't take it. The government tax agency can't accept it. Banks won't accept it.

Now when I call in and they ask what my phone number is to verify my identity, I have to rhyme off a string of old phone numbers.

<comment><USER22> Wait, all of your phone numbers rhyme?

<comment> nommm-nommm "rhyme off" is an idiom. It means to recite a list of items.

<comment><USER23> Presumably derived from medieval mnemonic texts, which used rhyme as a method for memorizing large bodies of text.

</comment></comment></comment></comment><comment><USER24> Another common falsehood would be "phone numbers everywhere are structured the same as in the US", e.g. with a three letter area code.

<comment><USER9> Or the assumption that all numbers in a single country are formatted the same way.

020 1234 5678 London.

0121 123 4566 Birmingham.

01234 567 890 Some small town somewhere.

07987 654321 Mobile. (Is that right? Maybe a second space.)

<comment><USER25> I have always seen the uk non metropolitan addresses written as 01234 567890.

<comment><USER9> You are correct: [https://en.wikipedia.org/wiki/Telephone_numbers_in_the_Unite...](https://en.wikipedia.org/wiki/Telephone_numbers_in_the_United_Kingdom)

</comment></comment></comment></comment><comment><USER26> Just ran into this the other day. A popular ride sharing app has a huge security hole wherein if you get a recycled mobile number you can easily gain access to the account details of the previous owner of the number and run up a bill on their credit card.

<comment><USER27> About 2 years ago I got a new number and I started receiving facebook notifications from the previous owner as SMS with autologin links in them.

</comment></comment><comment><USER28> It's just easier to treat phone numbers as a 100 character string in your DB. For validation & formatting, I have just sent it through Twilio's loookup api (which i believe is powered by google's libphonenumber).

</comment><comment><USER4> Another way that a phone number may become invalid is that its area code can change. For example, if an area code runs out of assignable numbers, it can be split into two or more area codes and some numbers in the old area code will be assigned a new area code.

Alternatively, new area codes can be overlaid on top of existing ones - <USER2> NYC, Manhattan has 212, 646 and 917. A phone number that's invalid one day can become valid the next day if a new area code is introduced.

<comment><USER29> When I was a kid, Portland, Ore. outgrew area code 503 and was issued an overlay area code, 971. To try to prevent confusion, the phone provider, which I believe was still USWest at the time (later Qwest later CenturyLink) made the area code mandatory. All the sudden dialing the 7 digits on most advertisements got you a recording: "Ten digit dialing is now required in the Portland area..."

Many years later, a friend borrowed my cellphone in an area where phone numbers were often dialed as seven digit. Not thinking about my being from out of state, he only dialed seven digits, and happened to get some rather confused person back in Portland. I had no idea my cellular carrier would even allow you to do that!

So overlay area codes can combine with number portability to have some odd results. A number may or may not be considered valid by the carrier, and may or may not get you who you expected, and in edge cases this may depend on the carrier.

</comment></comment><comment><USER30> At least the main part of phone numbers is true: they are scarce, which makes them the main way to prevent sybil attacks. Facebook accounts are a distant second. Throwaway emails make sybil attacks very common on sites that let you sign up with an email.

[https://www.technologyslegaledge.com/2014/04/telephone- numbe...](https://www.technologyslegaledge.com/2014/04/telephone-numbers-an- infinitely-available-scarce-resource/)

Does anyone know of any other easily verifiable resource which is on average available to very nearly one per person?

<comment><USER31> Credit cards - although people typically have more than one.

<comment><USER32> On the other hand, a huge group of people — Germans — usually has none.

<comment><USER33> Or lots of people in poor countries, I imagine.

<comment><USER32> Yes, but for startup people only focusing on numbers, losing 80 million well- off people might be more relevant.

</comment></comment></comment></comment></comment><comment><USER34> An issue I don't see raised here is the complications from Mobile Number Portability, where one may use different services to send text messages to different networks in a country and wrongly rely on the number prefix to identify the mobile operator.

</comment><comment><USER35> I remember being greatly annoyed at a version of Google Hangouts that would pop up a message about certain phone numbers being too long whenever I opened SMSs from them, and then flat-out refuse to let me reply to them.

In South Africa, we have a lot of SMS services that tack five or so digits onto the ends of normal numbers as unique identifiers, so what I assume was a programmer's false belief about phone numbers did some real harm there.

</comment><comment><USER36> A related falsehood that is built into many systems is the believe that zip codes don't change and that new ones won't be created. A co-workers area got a new zip code resulting in many months without properly working health insurance because computer systems kept flashing his zip code as invalid despite the new zip having been issued years ago.

</comment><comment><USER37> Years ago, North American area codes always had a middle digit of 0 or 1. This led to the practice of storing a phone number efficiently in 32 bits by swapping the first and second digits. It yielded a value that would fit in a 32-bit integer; for example, (912) 350-8000 became 1923508000.

This method broke in 1995.

</comment><comment><USER38> > phones in the disputed territory and partially recognised state of Kosovo > may be reached by dialing the country calling code for Serbia (+381), > Slovenia (+386), or Monaco (+377)

Monaco? WTF? And Slovenia doesn't make much sense either. Why wouldn't it be Serbia and Albania?

<comment> nommm-nommm I wondered about this too.

It appears to be because one of their mobile phone service provider's network is managed by Monaco Telecom.

[https://en.wikipedia.org/wiki/Post_and_Telecom_of_Kosovo](https://en.wikipedia.org/wiki/Post_and_Telecom_of_Kosovo)

<comment><USER39> I wondered too, and thought perhaps they meant Montenegro (+382), which is right next door to Kosovo. Apparently not.

</comment></comment></comment><comment><USER40> > _In Brazil, to dial numbers internally but across a certain geographical > boundary, a carrier code must be explicitly dialed to say which carrier you > will use to pay for the call._

Any Brazilians here who can confirm whether this is true?

I know that in Brazil you can select a preferred carrier for a long-distance phone call by dialing a prefix. For example, you'd dial 014 ahead of your phone number to choose Brasil Telecom or 021 to choose Claro. But this is optional as far as I know. If you don't dial any prefix, you get a default carrier.

</comment><comment><USER41> It's a shame despite the title there were no tips for using libphonenumber in the article. It's a very finicky library. You have to clean your inputs a lot before using it.

<comment><USER42> There are also a lot of edge cases where I've found it doesn't work. Phone numbers change all the time, so if you are using this library you need to update it constantly, and even then it may still be outdated for new changes.

If I need to validate a phone number is correct I'll send an SMS and ask the user to enter a code, otherwise I'll assume they know their phone number better than me.

<comment><USER43> Unless it's a landline...

</comment></comment></comment><comment><USER10> > "Phone numbers are always written in ASCII"

This one got me when I ran a Japanese website. Unicode (deriving from Japanese standards) has "fullwidth forms" for Roman letters and numbers. Thus your users can enter a phone number as 0123456789 or 0123456789 (or even a mixture), and your code had better be able to cope with it.

</comment><comment><USER44> If you're dealing with phone numbers, always normalize to E.164. It doesn't solve every problem, but it does a pretty good job of consolidating phone number issues to one place in your code (namely, the place where the E.164 normalization occurs).

If you're dealing with short codes or other highly regional things... Good luck...

</comment><comment><USER45> Those falsehoods looked less problematic than the prior ones about names and addresses. Maybe because phone numbers still are technical things, numeric, and less culturally coded over hundreds and thousands of years.

</comment><comment><USER46> Bottom line: phone numbers are really bad identifiers !

<comment><USER47> Yup, along with addresses, names, other identifiers and combinations of the above. To the irritation of those wanting to use natural keys.

</comment></comment><comment><USER48> Love articles like this. Learned some surprising things from it. Thanks to greenyoda for the others.

</comment><comment><USER33> How about `everyone has a phone number'?

</comment><comment><USER49> _1\. Phone numbers that are valid today will always be valid. Phone numbers of a certain type today (e.g., mobile) will never be reassigned to another type. [...] Tip: Don't store properties for a phone number such as validity or type. Check this information again from the library when you need it._

Not sure this suggestion is a truly pragmatic approach, because there is often very little else to determine SMS reachability up front, which is a common want. One might assume mobile until an adequately reliable SMS provider determines that the number is in fact not a mobile reachable SMSC-managed number. Fun fact: in China, there used to be multiple mobile messaging systems including a non-SMS system with weird gateway restrictions and no UCS-2 Unicode support. Another fun fact: UCS-2 kills bytes rapidly, you are better off (ie. get more length per message) using legacy local encodings like TIS in Thailand, etc. from a cost/length perspective. If you want to achieve that today, almost no mobile messaging provider can help you, you need to build custom SMS PDUs through their binary PDU submission interface, which is documented but still something of a black art and typically has very different reachability constraints to standard messaging (whole operators may suddenly become inaccessible).

 _2\. A phone number uniquely identifies an individual [...] It wasn 't even that long ago that mobile phones didn't exist, and it was common for an entire household to share one fixed-line telephone number. In some parts of the world, this is still true, and relatives (or even friends) share a single phone number._

This may be true, but on a related note, it is the trend now in many countries to require formal government identity document submission in order to obtain a SIM or make it functional through user registration. Therefore, in some parts of the world, you can skip a whole lot of mucking around with mobile-connected services by re-evaluating the probable bad-actor risk metric for customers from those countries through considering probably relatively strong police identification efficacy of abusive accounts in these markets.

 _3\. An individual has only one phone number. [...] Obviously, this isn 't necessarily true._

An individual has zero or more numbers which are not necessarily unique to that user, long term accessible, or of any certain or constant type or origin. Someone else may take these over at any time, so they cannot be relied upon solely as a trusted channel to the user.

 _5\. Each country calling code corresponds to exactly one country [...] The USA, Canada, and several Caribbean islands share the country calling code +1. Russia and Kazakhstan share +7._

This is only half true. They generally have longer prefixes. For example [https://en.wikipedia.org/wiki/Khazakstan](https://en.wikipedia.org/wiki/Khazakstan) shows +7-6xx, +7-7xx and much of the +1's can probably be reliably split through prefixes.

 _6\. Each country has only one country calling code_

Further example: calling Taiwan via China.

Another point: some endpoints need PABX suffixes to reach, for example voicemail or via corporate systems. There is no real standard for these programs, which tend to incorporate functions like "wait for initial connection", wait x seconds", "wait for a sound", or "wait for a second dialtone". In some countries people will write 123456 x7 for extension 7, but often multi-level inputs may be required (classic case: almost any telephone- based customer support system), in which case there is no standard.

Finally, I was inspired by this document to write a similar one about International Bank Account Numbers (IBAN), see [https://news.ycombinator.com/item?id=11321785](https://news.ycombinator.com/item?id=11321785)

</comment><comment><USER50> > _ITU says things like "national numbers can not be longer than sixteen > digits" but valid numbers in Germany have been assigned that are longer than > this._

German doesn't really have long phone numbers. Those are just phone number _phrases_ made of individual small phone numbers, but strung together by the German writing system.

:)

</comment><comment><USER51> I find the title of this article condescending. The falsehoods given in this list are surely not believed by all programmers (much less the ones who need to work with phone numbers), and moreover I'm sure belief in them is not exclusive to programmers. I might be off-base in this criticism, but to me starting off with "let me show you how you're wrong" is not the best way to engage your readership. Perhaps a better title would be "common misconceptions about phone numbers" or "things to keep in mind when programming with phone numbers".

<comment><USER52> I can appreciate that it is an aggressive (arguably clickbait) title and can be off-putting, I think the reason there's a focus on programmers is because most other professions will not need to ever know or consider most of these facts about phones ever.

The focus on programmers is because virtually every point is about handling phone numbers as data to be processed and worked with, which is a fairly unique perspective that, as far as I can think, only programmers have. Most of the points are pitfalls that might trip up a programmer when working with code that takes a phone number as an input and needs to validate it.

While I'll grant that your alternative titles are much less aggressive, the original title really isn't condescending unless you read into it as such, in my opinion. It doesn't say "all programmers", just programmers, and all points seem like fairly common misperceptions.</comment></comment>


Maybe Monads Might Not Matter - <AUTHOR> http://gbracha.blogspot.com.au/2011/01/maybe-monads-might-not-matter.html <comment><USER2> I thought this [http://gbracha.blogspot.com/2011/01/maybe-monads-might- not-m...](http://gbracha.blogspot.com/2011/01/maybe-monads-might-not- matter.html?showComment=1296027246940#c6671808644893652655) was a fantastic comment.

 _Sending a message on a channel usually costs at least a compare-and-swap or memory fence. This limits their applicability to things above a certain granularity [...] even in Erlang or Scala actors, you wind up passing around lists and other concrete data structures, because it isn't worth constructing those queues _everywhere_._

So when is a distributed program's internal communication and IO the right level of granularity?

Network IO would seem to be a familiar instance of an Actor model and should map directly.

Interestingly, Intel's new Xeon Phi chip [http://semiaccurate.com/2012/11/12/a-look-at-the-xeon-phi- ca...](http://semiaccurate.com/2012/11/12/a-look-at-the-xeon-phi-cards-and- hardware/) "looks like a cluster of x86 servers that are on a TCP/IP network, and takes almost no programming expertise to port to."

</comment><comment><AUTHOR> A comprehensive discussion on proggit; [http://www.reddit.com/r/programming/comments/f8b1u/maybe_mon...](http://www.reddit.com/r/programming/comments/f8b1u/maybe_monads_might_not_matter/)</comment>


Autodesk loses in claiming trademark for .dwg file extension - <AUTHOR> http://mccarthy.ca/article_detail.aspx?id=4940

<comment><USER2> _The court found that ownership of file extension designations cannot be appropriated under the Lanham Act -- file extensions are inherently functional, and functional uses cannot be trade-marked. It stated that computer programmers and computer users should be free to designate file extensions as they see fit, without the fear of infringing trade-marks._

It's nice to occasionally see an example of technological sophistication in the courts. I particularly like that the judge recognized the disproportionate burden that trademarked file extensions would impose on development. (Now, as for patents...)</comment>