I quit my job, and am building Tindie fulltime - <AUTHOR> https://tindie.com/blog/i-have-some-news/

<comment><USER3> Hi Emile! So I just poked around on your site and see that you started a 99designs campaign to get a "dog mascot" logo...

This is the one you should go with -- the ones designed by WorkHorse; I would totally put one of those on my Macbook! The others? Not so much.

[http://99designs.com/illustrations/contests/illustration- tin...](http://99designs.com/illustrations/contests/illustration- tindie-162449?filter=eliminated&sorting=rating&show=shortlisted)

[http://99designs.com/illustrations/contests/illustration- tin...](http://99designs.com/illustrations/contests/illustration- tindie-162449/entries/32)

You can thank me later :)

<comment><AUTHOR> Thanks! I think you just tipped that one into the lead. You mean the more developed one, not the simple version right?

<comment><USER3> Well, I think the one that's a little more detailed works better and is more "roboty" and has more charm/character etc.

The other minimal versions are nice too -- perhaps you could use a less detailed version for small 16px icon sizes etc. i.e no bolts.

But, hey as long as its one of them!

And congrats on your bold move & initial success :)

</comment></comment></comment><comment><AUTHOR> Some data:

-1 developer (me)

-$646 transacted in July

-Over $1800 transacted last month

-Shipped to 20 countries & every continent except Antartica

-Avg 30k visitors a month the last 2 months

<comment><USER4> If you're taking 5%, that means a gross revenue of $90 for the month of August? Seems a little early to be quitting your day job.

<comment><USER5> For many projects, if you wait until you're profitable before you jump in full time, you may never take that step. Some projects just need full-time attention to get them to the point where they pay your mortgage. Presumably (or rather, hopefully!) Emile has looked at the current revenue growth and (with the attention he can give it full-time) projected the revenue he thinks it will generate in X months, X months being the end of whatever runway bootstap/funding money he has, and has concluded that at that point he will be able to pay his wages.

Statistically speaking he will fail, and I'm sure he has already thought of that and has a plan B in mind incase that happens. (Thats my devils advocate speaking, its a good idea and I have no other information about Emile, so he may very well beat the odds and I hope he does).

<comment><AUTHOR> Thanks Rob! I figured it is growing, and should grow quicker if I am working on it fulltime. If I kept at a job, that growth would be slower, a competitor might emerge- who knows. Only thing that is certain is the data- site is cranking so time to kick it into the next gear

</comment></comment></comment></comment><comment><USER6> This is really cool. I have a project I'm working on now which I'll be listing on there for sure. Shameless plug—it's a small IR receiver board which provides input switching and volume control to a stereo amplifier. I'm using it to upgrade a 1970s solid-state amp, but the intended user would be a chipamp builder. The MCU is an atmega168/328, so it's completely hackable.

The site is down right now, but would there be a way in tindie to get a volume commitment, a la Kickstarter? It would be great to be able to have a chunk of cash upfront, to pay things like setup fees for PCB fab and assembly.

<comment><AUTHOR> Hey Mike, sound great! I'm actually working on that right now. So it should be out in the next few weeks. - <USER2>

</comment></comment><comment><USER7> Very thrilled about this! As a Tindie seller [1], I've had an excellent experience so far. Congrats, emile!

I put this in an email to Emile earlier, but would like to say it here, too... I think Tindie is _perfect_ for people like me. I don't have the time (yet!) to dedicate a huge effort putting my projects up on Kickstarter. But by putting the project up on Tindie, and having a cap on my inventory, I can organically improve the project within my personal time constraints. I fully expect to ramp up inventory over time, but it's nice I can start at one or two items... and grow at a pace I'm comfortable with. Thank you so much for creating the site!

[1]: <https://tindie.com/hugs/robot-that-plays-angry-birds/>

<comment><AUTHOR> Thanks Jason!

</comment></comment><comment><USER8> That's awesome. Tindie was one of those things that I found so cool that I was actually a bit perturbed to find out that it was just someone's side project. Some ideas just deserve more. Best of luck.

</comment><comment><USER9> Congratulations.

You should now update your HN profile with pride, to read "Founder @ Tindie" rather than "Engineer @ UrbanAirship" :)

<comment><AUTHOR> Oops fixed!

</comment></comment><comment><USER10> Every time I see someone announce a new startup on HN, and they can't keep a blog online through a little spurt of traffic, it makes me think very poorly of their business. That if they can't configure a web server to not fall over, they can't program a stable, secure app either.

My own experience is that even the smallest Linode VPS, with an out-of-the-box WordPress install, serving a blog live from the database without a cache plugin, can handle all the traffic HN throws at even a #1 story on a work day afternoon. All it takes is setting the Apache config such that it won't spawn more processes than there's memory available, or using something lighter weight than Apache in the first place.

I _know_ this is a foolish connection to make, that their ability to keep a blog online isn't connected to the things that will actually determine whether the business succeeds or fails, but I can't avoid thinking it nonetheless.

To turn this rant into something possibly useful, maybe some advice: it's important to figure out the basics of setting up a web server, not because it's a terrible thing for your blog to go down, but because you're losing out on all the prospective users/customers that come with being linked to and discussed on HN or other sites. Even if they can read a cached blog post, you're probably less likely to get them to go visit the startup you're blogging about during this short moment you have their attention.

<comment><USER11> Keeping WordPress up was a black hole of my time and talent, despite having shipped applications with substantially higher performance requirements than "Serve 20,000 visitors mostly static content over an eight hour period." This is totally orthogonal to programming skill or creating things that solve problems for customers.

The optimizations you need to make are fiddly black magic ("Your blog goes down too often? #1 culprit: a _performance optimization called KeepAlive_ ", "How many worker processes fit in 1 GB of RAM if each take ~20 MB on average? Did you answer 48? Crashes a day later. Did you answer 36? Crashes a week later. Did you answer 24? Crashes sporadically. Did you answer 20? Hasn't crashed... yet." "Blog still going down? OK, let's break with every quickstart guide on the Internet, throw out all the work you did for Apache, and switch you to Nginx. Now we'll have _new_ failure modes!", "You incompetent nincompoop! You just need to add caching. Oh, you already cache everything? The KeepAlive issue can kill a blog hosting a simple static .txt file? Hmm, good point... put Varnish in front of it! A nice, simple solution! And if that doesn't work add cache to your caching so you've got caches for your caches!").

There's no point at which WordPress announces "OK, I'm ready!" -- you just pick your optimizations in advance then discover new requests-per-minute numbers or access patterns or what have you which cause it to degrade or bloom into a timed-out fireball of death.

Now I write a check every month for $200 to my hosting provider. Best money I ever spent, because this has lead to a 100% decrease in me having to wake up at 3 AM in the morning because Jimmy Wales decided to tweet a link to my blog.

<comment><USER12>
        Keeping WordPress up was a black hole of my time and talent, despite having shipped applications with substantially higher performance requirements than "Serve 20,000 visitors mostly static content over an eight hour period." This is totally orthogonal to programming skill or creating things that solve problems for customers.

Good point but if you go from being an employee to an entrepreneur you'll need to pick up a lot orthoganal skillsets beyond programming: sys admin'ing, basic accounting, copywriting, etc...

I recall you tweeted a few weeks back, the gist of it being "if all you want to do is program you're better off being an employee".

That being said, congrats to the OP on taking the plunge, when I checked the site was back up and and it looks like you've got a solid concept. Best of luck to you.

<comment><USER13> Yes on learning new skills, but the nuance is that you quickly identify which of those are not core to your business and offload/delegate them as soon as possible.

</comment></comment></comment></comment><comment><USER14> Great work and don't mind the uptime critique.

Anyone who have launched know that shit happens sometimes and that it has nothing to do with whether you have the ability or not.

Most people who know how to configure a server only do that (nothing wrong with that btw), you do much more so of course sometimes things fucks up.

Congratulations on the great start, will be sure to let my electronic geek friends know.

<comment><AUTHOR> thanks much appreciated!

</comment></comment><comment><USER15> Looks like it might have legs. I want to be able to limit myself to vendors on my side of the Atlantic. Better filtering please.

<comment><AUTHOR> Great comment. I'll add a filter by country.

</comment></comment><comment><USER16> Seeing that I'm much more of a "builder" then I'm a creator, I really have to admire someone who drops there job, to do something full time that hasn't proven a source of income yet.

Personally I love the idea of the site. I'm not sure it has anything that I would buy yet, but I'm still a huge fan of it. I keep looking for something I'd want off there.

That being said, I'm not sure what the market is, out there for these kinds of things.

<comment><AUTHOR> Thanks- yeah that is part of the gamble. Timing is never something people know until you are in it.

</comment></comment><comment><USER17> Down for me at least. Cache: [http://webcache.googleusercontent.com/search?q=cache%3Ahttps...](http://webcache.googleusercontent.com/search?q=cache%3Ahttps%3A%2F%2Ftindie.com%2Fblog%2Fi- have-some-news%2F)

<comment><AUTHOR> Yep, on it. Getting slammed by Hacker News and Reddit..double wammy

</comment></comment><comment><USER18> Hi. This is a site I would use personally, if you could provide a meaningful view for a European, filtering out items that sellers aren't prepared to post to me. (Postage within Europe is quite cheap).

<comment><AUTHOR> On the top of my todo.. should be out in the next 24 hours

</comment></comment><comment><USER19> This is awesome! I think I know where I can offload my assembled older projects when I'm done with them. =)

One note: When singing up you should redirect away from the registration page.

<comment><AUTHOR> Sounds good! Will do!

</comment></comment><comment><USER20> Does the site have some kind of "request commission" feature? Ie I can send out a request for a specific gadget I need made and people can bid on the project.

<comment><AUTHOR> On the way...

</comment></comment><comment><USER21> Please, oh please, list the price in the list pages.

<comment><AUTHOR> I had it up there for a while, however it cuts down on pageviews. I think people will see the price and not try to click the link to learn more about it & the value/ why it is that price.

</comment></comment><comment><USER22> Tindie is one of the few websites I've seen on HN that actually got me excited. Great idea, great execution. Best of luck!

</comment><comment><USER23> I upvoted purely because of what a great website Tindie is. Congratulations on the decision and best of luck!

<comment><AUTHOR> Thanks!

</comment></comment><comment><USER24> That's a million dollar domain you got there.

Tindie, really catchy. I wish you the best.

<comment><AUTHOR> Thanks! Best $8 I've ever spent!

<comment><USER24> Btw, start expanding your business to everything home made, so you can compete with sites like etsy, in billion dollar markets.

Aim for the moon!

</comment></comment></comment><comment><USER25> Very interesting site. Keep up the good work!

<comment><AUTHOR> much appreciated!

</comment></comment><comment><USER26> how are you managing the titles for the requests? I think you are saving items in one table with unique id, but the url is with text/title. Are you looking over a full-text indexed column for every request for an individual item?

</comment><comment><USER27> Congratulation, Emile!

</comment><comment><USER28> Congratulations on the jump, Emile :)

</comment><comment><USER29> Good luck!

<comment><AUTHOR> Thank you!

</comment></comment><comment><USER30> congra, proudn00b !

<comment><AUTHOR> Thanks!</comment></comment>


A Religion for the Nonreligious - <AUTHOR> http://waitbutwhy.com/2014/10/religion-for-the-nonreligious.html

<comment><AUTHOR> I feel like my mind is just about to get a glimpse at a step 4 "Whoa" moment whenever I think about why/how existence exists, i.e., how can there be something instead of nothing? For some reason, I can never focus too long on that ideo, because it derails my train of thought immediately. Somehow my mind just cannot grasp it.

Maybe the red alien two steps above us has all this figured out.</comment>


$10 router blamed in Bangladesh bank hack - <AUTHOR> http://www.bbc.com/news/technology-36110421 <comment><USER2> Related: [https://news.ycombinator.com/item?id=11548239](https://news.ycombinator.com/item?id=11548239)</comment>


Reverse Engineering x86 Processor Microcode [pdf] - <AUTHOR> https://www.usenix.org/system/files/conference/usenixsecurity17/sec17-koppe.pdf <comment><USER2> The significance of this achievement is that microcode and its update mechanism has been historically undocumented and hidden from public scrutiny by processor vendors (AMD and Intel in this case), while at the same time the lowest level of abstraction in a computing platform and thus extremely powerful. However it is not unreasonable to consider that well funded state actors have developed microcode exploit technology that would make their control over a system undetectable and impossible to remove. The recent leaks have shown exploits that target hard drive firmware for example.

<comment><USER3> Microcode updates have to be rerun every boot since the updates aren't stored. Modern chips use only signed updates.

I'd be pretty surprised if they were successfully attacking chips through this mechanism. There are so many other devices that are much easier to own.

<comment><USER4> I'd be pretty surprised if US govt have never send gag order to Intel and AMD.

</comment></comment></comment><comment><USER5> This is really amazing work. Physically removing layers of the chip to get images of the microcode ROM, inferring stuff from patents, writing their own OS for full control over the chip... wow.

</comment><comment><USER6> I wonder how much % of my CPU potential performance is given to all this "gimping" done in order to provide state actors a backdoor to every PC and to help the CPU manufacturer recover field servicing costs.

<comment><USER7> There is a diagram of part of the chip with the microcode engine highlighted. It is about the size of an integer ALU port, it looks like. Much, MUCH smaller than L2 cache.

</comment></comment><comment><USER8> Ben Hawkes' analysis of the update mechanism comes to mind, unclear why the authors did not mention it.

inertiawar.com/microcode/hawkes_intel_microcode.pdf

<comment><USER9> That's a very different sort of analysis. Ben Hawkes analyzed the cryptographic structure of the update blob on Intel CPUs but didn't analyze the payload because he couldn't decrypt it. The article here reverse engineered the payload on CPUs where it's not encrypted in the first place.

<comment><USER8> Agreed. Note that the update mechanism in itself involves microcode to operate on the blob.</comment></comment></comment>


Ask HN: What's the Purpose of Hacker News to You? - <AUTHOR> I was fascinated by the recent "Hacker Hacker News" post. Looks like a really cool idea. But the poster said that the "real" hacker news was about science, math, and languages.
Really? I thought the "real" Hacker News was about startups and things related to the startup culture.
Without posting the link, or quoting it (you all know the one), what is Hacker News to you? I know the PG quote, and I'm not interested in repeating it. Obviously HN means a lot of different things to different folks. What with all of the newcomers, I was wondering: why does everybody hang out here? <comment><USER2> Believe it or not, I'm more interested in the people here than the content.

Sure, content is important, should be high quality, and needs to be somewhat restricted to what interests us. But AFAIC, the purpose of the content is to build the community. Almost any article I find here I can find somewhere else. But I can't find the same quality of discussion as here.

I do use data from hn as a resource in my work, but only minimially. Most of what I do requires long hours and hard work, not outside input.

I have had the great opportunity to form many friendships here, most on-line, but quite a few in person too, through meet-ups, etc. I don't make many friends who are in the same line of work as me, so I really value relationships here.

Like many hackers, I spend long periods of time alone. Hacker News does a great job serving as my virtual water cooler/break room. Having cool things to talk about is a nice bonus.

<comment><USER3> _Believe it or not, I'm more interested in the people here than the content._

I wholeheartedly agree. As a matter of fact, I was reading the RSS feeds exclusively until very recently (2 weeks ago). A friend of mine then told me I should check out the discussions that take place on the site. I'm so happy I followed his advice. Generally, the discussions are at least an order of magnitude more interesting than the articles themselves. That's the reason HN is my browser's homepage now.

<comment><USER4> _Generally, the discussions are at least an order of magnitude more interesting than the articles themselves_

dito!

I must admit that I've never used the RSS feed (that's partly because I'm not the big RSS reader type). I always get my daily portion of Hacker News directly from the homepage :)

</comment></comment></comment><comment><USER5> There's very little crap here, both in the comments and the links.

Crap is my personal distaste in news, namely celebrity obsession, fluff, non- informative articles, time-wasters, fashion trends and the like.

I love the occasional article on 14'th. century Venice and biology as much as the ones related to hacking and startups because they aren't crap if they rise to the frontpage.

<comment><USER6> While I mostly agree with what you say, I have to admit I find hacker news a tad heavy when it comes to overhyping whatever language fashionable this month. Also I have about zero interest in startups and venture capitol etc etc, unless someone has any cool tech to demo.

Not a deal-breaker by any means, but it get tiring every now and then :)

I'm mostly here for the tech news and civilized discussion really. Call me a proggit-refugee if you like.

<comment><USER7> Proggit has gotten _terrible_ of late.

</comment></comment></comment><comment><USER8> Generally speaking, there's a level of respect here that you just don't find on the internet. Cooler heads tend to prevail, people value replies that explain rather than criticize even if the original poster was simply wrong, and with rare exception we don't tend to re-post the same thing over and over every couple of weeks.

It's really shocking that the environment hasn't changed as the site has gotten larger. I used to be a tad afraid that as more people joined we'd start getting more of the noise and flame-wars that one sees on other sites.

Sure, it's great that HN has interesting content and often times lets me see new and interesting technologies that I can apply, but really it's the respect that we seem to afford each other that keeps me as an engaged member of the community rather than someone that just lurks. I love discussion, but I have better things to do than fight with people.

I always try to remember what Prince Hassan bin Talal of Jordan said at a commencement at my university, "it is important to express your views, and sometimes even your anger, but at the same time remember that the noble art of conversation is not a martial art."

Thank you to everyone here who proves daily that we can respect one another on the internet.

</comment><comment><USER9> My route to Hacker News was:

Slashdot -> Digg -> Hacker News

Basically each of those stopped serving my purpose as they got cluttered with what I'd basically describe as irrelevant nonsense. Hacker News has managed to present content that is unique, fresh, interesting, mature, and useful to anybody that's more interested in learning something new than watching some video with cats. To me, Hacker News is a blend of content about technology, science, business, and startups. It's kinda the website version of the magazine 'FastCompany', and it's where my interests are right now ...

<comment><USER10> I've been thinking a lot about this over the weekend. Any bets on what's next?

<comment><USER11> I think HN will last more. There is a reason, HN is not a business like is Digg or Reddit, so I bet Paul Graham will try do to his best in order to take the site useful and don't attract noise here. The other sites can't do too much if the metric is "more garbage but much more pageviews", here instead there are no deals to do, nor ADS to serve, so the site can be adjusted just in order to maximize the quality over the time.

</comment></comment></comment><comment><USER12> I'm the person who made and posted "Hacker Hacker News." I didn't intend to say that science, math, and programming are really what this site's about, or even that they are better than anything else. I wasn't trying to make a statement, just a Web site. I can see how the name would imply that, though, but you all know how hard it is to find good domains these days. :)

<comment><USER13> I thought it was a good idea. No one would have to say something like "not programming" anymore.

</comment></comment><comment><USER14> I think something that's more important to me than HN being an intelligent community, is that it's a respectful community. People have polite (and intelligent) discussions (about topics that interest me) - that's become rare on the Internet.

</comment><comment><USER15> I came here from the link on pg's site, repeatedly. For a long time I just lurked. I started posting comments (for which I had to register) after I started noticing comment threads on which I had something to say. I like the start-up culture here, the most. What I also like is the general intellectual curiosity.

</comment><comment><USER16> HN is a highly focused & highly intelligent community that shares links and information on topics which interest me. Usually surrounding technology, science, entrepreneurship and the Internet.

<comment><USER17> My thoughts as well though I'll add that I feel there's been an increase in content that doesn't deal with subjects down to their minutia over the past few months.

</comment></comment><comment><USER18> HN has a good combination of content selection and comments. I've honestly never seen such high quality commenting on articles. I generally find about half of the links on the front-page interesting, and the comments are always lucid. If the link is garbage, somebody always points out the errors in the link in an intelligent way, not an annoying way (like /.).

</comment><comment><USER19> It's not what it is, it is what it isn't:

\- political news \- sports news \- 'entertainment' news \- and so on...

There are plenty of places that have all that HN has and more, it's the lack of the 'more' that makes HN a good place to hang out.

edit:

And of course the people here... there seems to be on the whole less immature behaviour here than elsewhere (though it does happen).

</comment><comment><USER20> I'm a compulsive arguer. I love to pit my ideas against reality. HN gives me the opportunity to argue with intelligent, thoughtful, articulate people on a large scale.

To an extent, this is what I do on my blog too. But it's a lot cheaper to write a comment like this one than to write a whole blog post.

As a start-up CTO, I also use HN as a "pulse feel" for the start-up/tech community. It's important to be in touch with the communities that you operate in or near, and HN largely fulfills that purpose for me.

</comment><comment><USER21> I wouldn't expect hacker news articles to be restriced to technology or startups or even news. I would expect them to be aimed at a deeper understanding of a topic.

</comment><comment><USER22> News filtered by people with similar interests to myself. I have never been a full-time coder and no longer wish to be; I'm a _bricoleur_ -type hacker, interested in solutions that solve present problems more than in engineering for the ages (although I greatly respect the latter), even if it does not always involve computers.

I also like the business/money content, since that's an area where I'm weak and welcome input that's good for geeks; the business content on HN reminds me of a pulse wave and generally tends to be either essential or trite.

</comment><comment><USER23> Odds are, I will never do a software-only startup. I'm an embedded systems guy and at the least I'll have to release electronic hardware as well. But for me HN is business from a different perspective. I get to see things from a primarily web-app, data-driven perspective. And while a lot of the business models I see here are doomed to failure, I can still learn from them by seeing what people are _attempting_ to do.

Science, math, languages? Not so much. Tech business is a lot more interesting and fun.

</comment><comment><USER24> Among the reasons others have already mentioned, I also regularly google through old HN articles for advice on which tools are the best.

Searches like "hosting provider" or "server monitoring" will bring up lots of useful comments from the folks in the trenches.

Edit: Another reason: positivy toward success. In my daily life, I'm surrounded by people who denigrate those who are more succesful than them. HN is a place where that rarely happens, even if the subject is as unusual as jocks or jewel thieves.

</comment><comment><USER25> To a certain degree, HN is a source of procrastination to me - which it is really bad for because almost every link requires a substantial amount of time to consume. I still go to Reddit to click on a few [pic] links every now and then, but HN is much more inspirering. I agree with you though - I generally consider the interesting topics to be the less technical and more startup- related ones.

</comment><comment><USER26> At its best, it's a window into how the world works. Most of the Internet tells you what is happening - HN is one of the few places online which dives into the why. This is mostly restricted to the intersection of tech and business, but that's fine.

</comment><comment><USER27> The closest match of people with the same interests as me - spanning both tech stuff, brainiac stuff, and business stuff - that I've yet to find on the Internets.

</comment><comment><USER28> Above all, Hacker News provides a free education.

My path:

Google Search for CS schools -> Joel on Software -> other bloggers -> Paul Graham -> Hacker News

They don't cover this stuff in Academia

</comment><comment><USER29> Because people here generally seem interested in the same things as me.

Or more importantly: everyone here seems to go "oooh shiny" at the same things as me :)

</comment><comment><USER30> I see technical news here frequently before I see it elsewhere, and the comment discussions make the links much more valuable. Many are the times I find myself following suggested links from the comments long after I've digested the original article.

I start my day with bbc worldservice, then npr, then hn. Last I add a dash of dvorak so I am up on my conspiracy theories :)

</comment><comment><USER31> Enthusiasm. <http://www.youtube.com/watch?v=ubWq-27184U>

</comment><comment><USER32> I use HN to find the two things that most aggregate sites don't provide. Thought provoking articles. Thought provoking comments.

Whether it is before I read the article, after, or both; I read the comments on HN. I rarely do that on <Insert Sitename>.

</comment><comment><USER33> I come here to learn what interesting people think and how. The links are also very entertaining (too much) but I like most to read the comments.

</comment><comment><USER34> I'm new to HN and coming to it straight through YC, it is what I expected - all about startups. Please keep it that way.

</comment><comment><USER35> To me, Hacker News is a more relevant and civilized place than Slashdot. People are nicer here.

</comment><comment><USER36> I use it to read stories and also to discuss with mind-like people and share ideas.

</comment><comment><USER37> To gain karma.

</comment><comment><USER38> HN is my newspaper, I read it everyday to be up-to-date in the tech world.

I like interesting news, but I don't care if:

\- gmail is down

\- somebody got shot at the apple store

\- the iphone burns my cheeks

\- yahoo will never recover

\- payperpost

\- propaganda

\- PR submarines

but above all, I hate FUD

</comment><comment><USER39> No Junk (in bold). Useful/Interesting articles.</comment>


YC App - no news so far - is it good? - <AUTHOR>

So far we haven't heard anything. does it mean still there is a hope or does YC will inform yes or no on 18th only?<p>I am counting days so had to ask :)

<comment><USER2> We tell everyone on the same day (whatever day we said).

</comment><comment><USER3> It is very good if you get some feedback from them before the announcement date, but it is certainly not bad if you don't get any interaction with them prior to that date.

<comment><USER4> Some applicants get feedback priior to the announcement date?

<comment><USER3> When I got an interview I got an email from pg and a call from jl asking why we were doing this now as undergraduates rather than waiting until we graduated.

</comment></comment></comment><comment><USER5> "the pressure is on, but guess who ain't gonna crack"

<comment><USER6> Hehe. Pardon me, I had to laugh at that.

<comment><USER7> Difficult takes a day, impossible takes a week

</comment></comment></comment><comment><USER8> This reminds me of applying to college...

</comment><comment><USER9> Any suggestions anyone on how to kill the wait? ... I'm running out of options..

<comment><USER10> improve your webapp (or start developing it if not yet ;)

<comment><USER9> I wish I could concentrate ...

<comment><USER10> You should, otherwise you're in trouble (if just waiting few days for YC's decision distracts you so much)

<comment><USER9> Thanks wise man... now go back to your webapp

</comment></comment></comment></comment></comment><comment><USER11> look forward for announcement.</comment>


Ask HN: Why does Facebook put itself under EU Data Protection Law? - <AUTHOR>

Just something I was wondering about, I'm (obviously) not looking for legal advice or insights into the inner workings of Facebook
When you're signing up to a Facebook account, the terms of use ( http://www.facebook.com/legal/terms ) state, in §18(1), that:
> If you are a resident of or have your principal place of business in the US or Canada, this Statement is an agreement between you and Facebook, Inc.  Otherwise, this Statement is an agreement between you and Facebook Ireland Limited.  References to "us," "we," and "our" mean either Facebook, Inc. or Facebook Ireland Limited, as appropriate.
So if you're in the USA or Canada, you've a contract with a US company, else, you have a contract with an Irish company, that then has to work under EU Data Protection Laws.
But why would Facebook do this? Why not just tell everyone that they have a contract with the US company, and then you don't have to be audited by the Irish Data Protection Commissioner (as they recently were). Why would they put themselves through that?
(And yes, the corporate tax rate in Ireland is 12½%, but that doesn't mean that end users need to have a contract with Facebook Ireland Ltd.) <comment><USER2> Facebook has operations in Ireland. As such they are subject to the EU Data Directive[1] which gives much more control over the personal data Facebook holds to the data subject (the user). Two things have happened to Facebook recently:

1\. They were sued by the FTC[2] 2\. And a person, turned to a group, has been making data subject requests to Facebook causing them some trouble[3]

All of these things lead to Facebook protecting itself legally with statements in their terms of use. At the end of the day it is not that you are contracting with an Irish company but globally Ireland's laws (EU Data Directive) gives you the most rights, so they are pointing that out to you.

[1] <http://en.wikipedia.org/wiki/Data_Protection_Directive>

[2] [http://www.bgr.com/2011/11/29/facebook-settles-privacy- suit-...](http://www.bgr.com/2011/11/29/facebook-settles-privacy-suit-with- ftc-will-submit-independent-audits-for-20-years/)

[3] <http://europe-v-facebook.org/EN/Objectives/objectives.html></comment>


Deadly 'superbugs' invade U.S. health care facilities - <AUTHOR> http://www.usatoday.com/story/news/nation/2012/11/29/bacteria-deadly-hospital-infection/1727667

<comment><USER2> I studied antibiotic resistance when I worked in pharma. It's a fiendishly difficult problem. You have a mix of factors that all conspire to a bad outcome. First, you have natural selection, so any antibiotic safe for human consumption is likely to eventually result in drug resistant bacteria. Secon, you have social practices. In the US you have patients who brow beat their doctors into giving them antibiotics when they don't need them. In other parts of the world, you can buy antibiotics over the counter! This is hugely problematic since the genes for resistance spread globally when they get a foothold (you can actually watch this over time with DNA sequencing and careful collection of samples). Finally, on the economic side, most regulators like the FDA will force any new antibiotic to be held back on the shelf and used only as a "drug of last resort". This reduces incentives to develop new antibiotics since the drug patent will expire before you can sell enough to make back the R&D cost. Much better to throw resources at cancer since your drug might end up as a front line therapy there, than to waste time on antibiotics (so the bean counter thinking goes).

I honestly don't know what the answer is. Most likely, there will need to be some new tech the bugs have a hard time beating. Outside the body we still have plenty of things that kill bacteria which they can't get around (bleach comes to mind). The likely outcome is some kind of new delivery mechanism that is fast, complete, and highly effective.

<comment><USER3> I wonder if it would be possible to use natural selection and human behavior to our advantage?

imagine a compound that causes bacteria to adapt in a way that makes us easier to control them. like putting fluoride in our water we'd distribute the Trojan biological 'malware' into the wild and make bacteria more susceptible to very specific types of treatments.

<comment><USER2> This is a clever idea, but likely to end badly in practice given the way genetics works. Any neutral trait that doesn't confer increased survivability will be filtered out rapidly and never spread. So you would need to design something that gives the bacteria carrying the trait a slight survival advantage, but at the same time has a hidden "back door" we can exploit.

Furthermore, the back door has to be intimately tied to increased survival and not just along for the ride. Otherwise, the bacteria will snip the back door part out and keep the part that gives them increased survival. Now you have genetically engineered super-bugs. Oops. Even assuming that you have perfectly designed this new trait to meet the needs of having a back door and increased survivability that are inseparable, you still fail. Eventually, the bacteria all drop your fancy new trait and revert to being plain old bacterium because _that_ state is now the one with the survival advantage that allows them to duck your new fancy antibiotics.

Probably, the only angle that is likely to work is immune system modification and enhancement. Something like a vaccine that causes the immune system to go thermonuclear on the pathogen is likely the best route. The immune system is highly adaptable and extremely well-honed. We've successfully driven many viruses to the brink of extinction this way, but the tech we have is not as good for bacteria (though there are vaccines for some bacterial infections).

<comment><USER3> yup, I can see my idea being the start to a sci-fi movie.

Even what you describe though is still just building more arms in an arms race.

Natural selection itself needs mutations as fuel. Another crack-pot thought - figure out how to decrease the speed of mutations that bacteria are subjected to. Something along the lines of biological or synthetic error correction on DNA.

At some point (have we crossed it?) human evolution has moved from physical 'fitness tests' to non-physical. When we get colder now we just design thicker clothes and warmer buildings, etc. Heart disease? more pills and surgeries. I've read people make an interesting case that corn is one of the most successful organisms as measured by adapting to fit because over time it became the corner stone of our entire diet as a species. And by that line of reasoning the genetic modification we do as humans on corn is part of corns continued adaptation. A little meta perhaps, but eventually I wonder how much control we'll have over the biology so that the mutations and modifications would seem artificial and human designed by today standards.

</comment></comment></comment></comment><comment><USER4> There is a rather rude joke that if you want to avoid dying you should avoid hospitals because lots of people die there. What the joke doesn't zero in on is that people that die in hospitals do not always die of what they had when they got there.

Hospitals tend to be very tight lipped towards the people they admit when it comes to admitting mistakes for fear of liability, but in cases like this there ought to be a maximum of transparency so the people that are about to be hospitalized can make informed decisions about the additional risks over and beyond the thing they're going to the hospital for in the first place.

</comment><comment><USER5> Here's a quote:

"The bacteria made headlines this summer after a CRE strain of Klebsiella pneumoniae battered the National Institutes of Health Clinical Center outside Washington, D.C. Seven died, including a 16-year-old boy. (Hospitals don't reveal victims' names in keeping with medical privacy rules.) But that case was neither the first nor the worst of the CRE attacks."

I'm curious, were new patients notified before admittance that they had a resistant outbreak in their hospital ?

Were existing patients notified that this was happening while they were there ?

I'll bet no, and no.

Another quote:

""We were really frustrated; we hadn't seen anything like this in the literature," says Costi Sifri, the hospital epidemiologist. "The fact that we had different bacteria told us these cases were not related, but the shoe leather epidemiology suggested to us that all these (infections) came from the same patient. ... We realized we might be seeing a mobile genetic event.""

... all the while continuing to admit new patients ...

<comment><USER6> this isn't anything new... hospital acquired infections (HAIs) are the 4th leading cause of death in the U.S.

nearly 1 in 20 hospitalized patients will acquire a HAI killing 270 people/day

hospitals... scary place

<comment><USER7> Yes, it is scary. But you forgot to add that give or take half the time doctors don't have the slightest idea of what they're dealing with.

However, the thing gets even hairier when you talk to med students. Most of the one I've talked told me their main reason to learn the craft was the money.

Take good care of yourself, exercise, eat healthy, and don't forget to have sex. Otherwise you're gonna end up in their books as just another entry.

<comment><USER8> >However, the thing gets even hairier when you talk to med students. Most of the one I've talked told me their main reason to learn the craft was the money.

I lived with a persistent and occasionally debilitating health problem for nearly a decade while being brushed off by clueless doctors.

Finally, I wound up in the ER (again) being served by a guy who actually took the time / had the ability to interpret a blood test.

Not long after that I was having a large, old and thankfully benign tumor removed.

As I understand the issue, a blood test would have revealed this at any point and likely even before the 10 or so years I'd been having symptoms.

Personally, I'm given to thinking that we tend to give folks in medicine too much credit.

Sure, I think it reasonable to expect that someone who has made it through medical school and successfully practices is above average in some regards - relative to the broad population.

However, within the field, I expect that incompetence / apathy is just as prevalent as it is in any other profession.

<comment><USER9> I'm currently dealing with similar issues. New symptoms started for me this summer, my GP and all the tests and specialists I've seen have no ideas.t

When I do my own research my GP brushes it off. I try to take that in stride -- I do recognize that I am uneducated in the field. But it's disheartening when a specialist comes up with my researched conclusion as one of their top possible explanations.

If you don't tick all their boxes on a list of precisely described symptoms -- which you must self-report -- for a condition that they've looked up moments prior to your appointment you won't get diagnosed correctly unless you are lucky and have managed to find a competent and caring doctor.

</comment></comment></comment></comment></comment><comment><USER10> Every time I hear about hospital acquired infections I cross my fingers for the narrow band UV lights I remember hearing about. Even if we could just have those in hospital hallways or elevators... Man, what a difference that could make.

[http://www.popsci.com/science/article/2010-11/researchers- us...](http://www.popsci.com/science/article/2010-11/researchers-use-bacteria- killing-light-destroy-pathogens-flip-switch)

</comment><comment><USER11> It's unfortunate that regulatory environment in the US is not more favorable for advancing phage therapy. It could be a promising alternative to antibiotics for treating infections caused by multi-drug resistant organisms.

<comment><USER12> From what I've read. You're probably right. They're worried that mutations make it hard to lock down the exact properties of any given phage treatment, but that would be a risk I'd be willing to take. Especially since they're in wide use in some countries with no horror stories that I've heard.

</comment></comment><comment><USER13> Assuming it is correct to say that antibiotic-resistant bacteria evolve in response to the (over-/ab-)use of antibiotics -

I wonder to what extent opposition to teaching evolution improves the chances of these kind of bacteria evolving. Disbelief in, and/or ignorance of how a process works is effectively giving that process a green light.

Conversely, might the appearance of CRE bacteria might sway the evolution debate?

Or to be more blunt, does a disbelief in evolution increase a nation's chances of collectively qualifying for a Darwin award?

<comment><USER14> > Conversely, might the appearance of CRE bacteria might sway the evolution > debate?

No. It seems like an easy political point, but there's a lot more to the story.

First, there are far easier and more visible examples of evolution. In UK schools, possibly because it's a nearby example, it is taught that the color of moths in London changed dramatically during the Industrial Revolution because light-colored moths were easy snacks for birds on newly soot-covered walls. There are more colorful examples closer at hand: most of the domesticated animals in the world are examples of evolution by artificial selection: cows today share little with cows 10,000 years ago, and corn today looks nothing like 10,000 years ago.

Second, thanks to #1, the belief is often that "humans (special) didn't evolve from apes (animal)" --- not that species never change. The belief is based on an idea that either evolution started after humans were created, or that even if evolution has been running for 100 million years, there's no way that natural selection could cause the leap from animal to human. It doesn't preclude belief in evolution among animals.

Third, antibiotics are all prescribed by doctors, who are plenty aware of the work of Sir Charles.

And, last, antibiotic misuse is largely a tragedy of the commons. Rational patients who are very aware of the risks of antibiotic-resistant phages will still request antibiotics: they feel the benefit (even if the chance of a benefit to them is small) but the pain of antibiotic resistance is felt by other people.

So, no, it's easy political point but it has more to do with enthusiasm than fact.

<comment><USER12> I agree with the tragedy of the commons point, but I think it might be a smaller piece of the puzzle than industrial farming. Pretty much every chicken that is raised industrially is given regular doses of antibiotics to "prevent" rapid spreading of disease through large chicken stocks. Which would happen easily since the chickens are kept in such close quarters. Just about any non organic chicken you buy has antibiotic resistant bacteria living on it.

</comment></comment></comment><comment><USER15> I think that what is important to note is that their only evolutionary advantage, and thus the main reason they spread, is their resistance to antibiotics, in normal conditions they would have a quite big chance of losing in competition with other bacteria. As soon as antibiotics are used, the competition dies and they can proliferate. This means that the best prevention method is to use antibiotics as rarely as possible. Let's remember that the same bacteria that cause infections, can ordinarily live on our body quite harmlessly.

</comment><comment><USER16> It is amazing how this bacteria interchanges genes with ease. Could it be possible to use this strength as a weakness? Inoculating a modified bacteria to act as a trojan horse?.

edit: missing letters.

<comment><USER17> I believe this approach normally doesn't work because any gene that leads to weakness with be removed via natural selection.

<comment><USER18> I think the goal might not be to make a bacteria that's easier to kill, but one that's less likely to kill us. There's generally a strong evolutionary pressure not to be fatal for your host.

</comment></comment></comment><comment><USER6> 4 in 10 chance that if you get infected with CRE bacteria you will die...

<comment><USER19> People who get sick from CRE usually have lots of other medical issues, and are weaker.

They don't necessarily die from CRE itself.

Also remember that CRE are not more virulent than non resistant forms of enterobacteriaceae, and those certainly don't kill 4 in 10 (although that family seems to have all the really bad bacteria like E. Coli, Salmonella, Plague and others).

<comment><USER20> It actually does. Healthy people who get MRSA often end up fighting a long uphill battle. If you are in a hospital you are going to have a compromised immune system. When someone gets sepsis it is really nasty.

</comment></comment></comment><comment> adam-f I've come across some mentions of MDR (Multidrug Resistance) pumps, and MDR pump inhibitors:

I assume there's a reason we're not mixing in Oregon Grape root into our antibiotic cocktails? <http://en.wikipedia.org/wiki/Oregon-grape> <http://www.ncbi.nlm.nih.gov/pmc/articles/PMC26451/> <http://www.ncbi.nlm.nih.gov/pubmed/11321580>

</comment><comment><USER20> My mother died from a hospital acquired superbug (MRSA) earlier this year......this is nasty stuff.</comment>


Hawaii's false missile alert sent by worker believing attack on US was imminent - <AUTHOR> https://www.washingtonpost.com/news/the-switch/wp/2018/01/30/heres-what-went-wrong-with-that-hawaii-missile-alert-the-fcc-says/ <comment><USER2> Wait, so all of the hand wringing over the crappy UI was pointless because it was actually a case of miscommunication?

<comment><USER3> No, according to the end of the posted article, poor UI and a lack of necessary safeguards were part of the problem, just not the entire problem.

<comment><USER4> I don't really understand how it is part of the problem. If the worker really believed an attack was incoming, confirmation screens wouldn't help at all.

<comment><USER5> I guess it would depend on how that confirmation screen worked. If the design asked for a confirmation from a second user, then a single user's confusion wouldn't have resulted in the error.

<comment><USER6> Sure, but that's a lot different from "move these buttons around and have the user double click to be sure."

<comment><USER7> The extra confirmation shouldn't have been on the same user. The "two man rule" exists for emergency protocols for a reason.

</comment></comment></comment></comment></comment></comment><comment><USER8> I think the most critical problem this revealed is _not_ in the chain of events leading to the false alert (which contains several real problems), but that _the State of Hawaii apparently has no clear process for sending an all clear and informing the public of the resolution after a live alert._

<comment><USER9> They probably figured there wasn't going to be a State of Hawaii after a real nuclear missile so why bother with an all clear?

<comment><USER8> Real missiles can miss, malfunction (the missile), be intercepted, not have a nuclear warhead in the first place, experience a warhead malfunction, and—even if they hit somewhere in the area of Hawaii and detonate a nuclear warhead—leave much of the state intact (Hawaii is, after all, about half as far across, east to west, as the continental US.)

The very last may not produce an all-clear in the short term, but it's likely to at least require lifting the "missile is likely to hit in our area soon" alert in favor of a very _different_ emergency posture, which is a similar need.

</comment></comment></comment><comment><USER10> Why does the state of Hawaii even need a man in the middle for issuing ICBM alerts. It would seem the military or at least something centralized at the federal level should be able to trigger this alert. Basically have it patched through directly.

I can't see a benefit of an extra person in the loop. It could at best delay sending the alert, send the wrong alert. At worst is obviously missing sending the alert altogether. One might say, well one benefit is the state could prevent a bogus alert from being sent. But does the State of Hawaii have its own independent monitoring network of satellites or radar? I am guessing it doesn't.

<comment><USER11> I can see value in having someone capable of issuing alerts who is geographically _on_ Hawaii, as the potential for dropped communication lines seems problematic.

I don't know enough about military/federal operations to know whether having them handle it would imply keeping operations on the islands, or if they'd literally "centralize" it to somewhere on the continental US.

</comment></comment><comment><USER12> Everybody who publicly excoriated the UI (or what they thought was the UI) of the Hawaii public alert system here should think about their role in spreading misinformation. This story was catnip to computer people, and too few people waited for any kind of confirmation before deciding they knew all about what happened, and how to fix it.

<comment><USER13> It still is bad UI, that hasn't changed. So people didn't spread misinformation.

Sure, the employee clicked the wrong button because of this audio alert, but the buttons/text are still poorly designed.

<comment><USER12> There's no way to tell if it's bad UI given the publicly available information. We'd need to see the whole flow (including confirmation steps), as well as know something about how the employees were trained on this interface.

<comment><USER13> That's UX, not UI. The user interface is bad. The bad labelling/naming of the links makes it more likely to click the wrong button. That is bad UI. Bad UX would be the situation if even after that, there is no double check or alert to confirm that users intention.

</comment></comment></comment></comment><comment><USER14> So, more fundamental than UX, that the proper employee action for an "exercise" differs from that for a real threat doesn't seem to be a proper test. Why not just have an administrative airgap keyswitch that enables exercises to be conducted without the requirement to disseminate the fact beforehand? Then you can test for the proper response without risk.

</comment><comment><USER15> I'm not saying the UI of their system is great, since I have never seen it, but I believe it's a better idea to have the "test" alert be very similar to the real one. When the time comes to send a real alert, the operators should be practiced. Diverging the UI could cause confusion in am actual emergency, wasting precious moments.

</comment><comment><USER16> After a few more days, we will hear that it was not the worker who sent the alert, and after some more days, we will hear that nobody sent the alert and that it was a bug. Just kidding. News such as these have to wait till the investigation is complete, otherwise we will simply be reading speculation.

</comment><comment><USER17> > Following standard procedures, the night-shift supervisor posing as Pacific > Command played a recorded message to the emergency workers warning them of > the fake threat. The message included the phrase "Exercise, exercise, > exercise." But the message inaccurately included the phrase "This is not a > drill."

This is just a test. This is not a test.

<comment><USER18> The worst civil air disaster happened in part because the controller said "you are not cleared for takeoff". Alas, there was radio interference, so the "not" didn't get through.

As a consequence, the words "cleared for takeoff" have been removed from the ATC/pilot vocabulary except when actually cleared for takeoff.

<comment><USER19> Are you talking of the Tenerife disaster in 1977? Almost correct: [http://aviationknowledge.wikidot.com/aviation:tenerife- commu...](http://aviationknowledge.wikidot.com/aviation:tenerife- communication-error-s)

</comment></comment></comment><comment><USER20> So who was fired for this? Someone dropped the ball by not communicating the fact that this was a test to the employee who sent the false alarm. That person should be fired.

This reads like a classic tale of government incompetence. If you don't fire people in a situation like this, why should we expect anything to change?

<comment><USER21> When it comes to ballistic missile warnings, I'd rather err towards false positives over false negatives. Whomever made this mistake is highly unlikely to do so again. Throwing that away seems wasteful, _ceteris paribus_.

<comment><USER22> False positives and false negatives are both really bad. Now if there's an ICBM launched at Hawaii this weekend, no one will believe it.

<comment><USER21> > _False positives and false negatives are both really bad_

Everything surrounding nuclear war is bad. Choosing the lesser of two evils is the best we can do, given the domain.

> _Now if there's an ICBM launched at Hawaii this weekend, no one will believe > it_

No one? My collection from friends in Hawaii is they're _more_ prepared. Each of them have at least contemplated a plan and a few assembled go bags. In any case, Japan and Korea's experiences with false alarms don't support your claim that a few false negatives outweigh a single false negative.

To be clear, I'm not saying false positives are okay. No error is better than error. But if we're going to have errors, and we are, one kind is better than the other.

<comment><USER23> > go bags

where are they planning to go?

It's a common mistake to make up "go bags" but forget they're only supposed to last you the 24 hours that it takes to get to a new refuge should your home/wherever else you're in become unsafe. I'm not sure how that works on Hawai'i after a nuclear missile attack, so I'd love to know what the plan is for such an event for these individuals.

<comment><USER21> > _where are they planning to go?_

Shelter, basement...depends on your situation.

I'm in New York and don't have a go bag. I did look up our nearest shelter, though, and thought about what I'd grab (water, cat, knife, extra glasses, bacitracin, band-aids, battery + cable, nuts, kibble, phone, flashlight, duct tape and masks).

<comment><USER23> Right, and that's super reasonable! What a lot of people _do_ do however is make elaborate go bags but but then fail to prep their home, which is almost likely the best place to hunker down and stay.</comment></comment></comment></comment></comment></comment></comment>


Ill-Advised C++ Rant, Part 2 (2016) - <AUTHOR> http://www.codersnotes.com/notes/cpp-rant-2/ <comment><USER2> > Calculating the size of static array

In C++17 you can do

        #include <array>

        std::array myarray{ 4, 5, 6, 7, 8, 9 };
        int my_size = myarray.size(); // returns 6

which even deducts the type `std::array<int, 6>` for you.

<comment><USER3> You can also use the std::size() free function to get the size of a C array, an std::array or any other standard container.

[http://en.cppreference.com/w/cpp/iterator/size](http://en.cppreference.com/w/cpp/iterator/size)

<comment><USER2> A free function for this looks even better IMO.

</comment></comment></comment><comment><USER4> > Calculating the size of a static array.

      #include <type_traits>
      int myarray[] = { 4, 5, 6, 7, 8, 9 };
      int x = std::extent<decltype(foo)>::value;  // returns 6

> Converting a string to an enum

Generally a bad idea, as it couples a protocol (whatever is feeding you the strings) to symbols in your language. Often, one of those has constraints that the other cannot meet.

> Binary file includes

      objcopy -I binary -O elf64-x86-64 -B i386:x86-64:intel in.bin out.o

Not the prettiest, but, why should a language do the linker's job?

> FourCC codes

How often does this come up, that you can't write a 10-line class to do what you want? Not to mention the obvious issue of endianness in the example given. Last time I had to do this I was writing a PNG parser, which was not something I should have been doing.

> Types as first-class primitives

I've been coding for 25 years and never needed nor wanted this. I know not everyone agrees, but personally I find reliance on RTTI to be a code smell. (Granted, pre-C++17 it's kind of forced due to lack of a proper variant type.)

(I realize the above is opinionated, but… so is the OP! :)

<comment><USER2> OP complains about C-style arrays when criticizing C++. Just using `std::array` makes life easier.

<comment><USER5> Yeah that one is a little weird. C++11 included std::array to solve that problem (among others), but he doesn't use it and then complains about it anyway.

</comment></comment></comment><comment><USER6> Totally agree with the author. I have started coding again in C++ after a 10 year detour to python.

Can we have basics first, and then robust libraries for say, as simple as networking.

Batteries included, is a thing, and is something a lot of programmers like me look for when choosing between languages.

<comment><USER5> Unfortunately, I have already heard complaints about the size of the C++ standard library, and how "I can write a better vector/list/etc.. class". I can't imagine what people would think of a networking module, designed by committee and full of compromises.

I don't envy the members of the standards committee. It is a hard and very thankless job.

<comment><USER4> I've been a hardcore C programmer for decades and just got into C++11 this past year. I _LIKE_ the standard library.† It's pretty much just basic data layout stuff that I've done 100 times manually in C, nothing more, nothing less. Leave the complicated data structures and libraries to 3rd parties. std::vector is already exactly what I want (though it could do with one fewer specialization ;). There's pretty much one way to implement it and they got it right.

On the other hand, there's 100 ways to implement, say, an HTTP client, and they're all wrong.

† Except for iostreams. Ugh.

</comment></comment></comment><comment><USER7> One way to solve the do/while(0) problem is by using a "statement expression". It's a GCC extension, and I don't know the reason it has never been accepted into the standard. Here's how it works:

        #define my_assert(X) ({ if (!(X)) error(); })

Another way is to use a lambda expression, and then call it immediately:

        #define my_assert(X) ( [=]() { if (!(X)) error(); } )()

Because the lambda captures by copy, it will catch inadvertent side effects in some cases.

You can also use the conditional operator in this case:

        #define my_assert(X) ( (X) ? error() : ((void)0) )

<comment><USER7> The last one is backwards, should be:

        #define my_assert(X) ( !(X) ? error() : ((void)0) )

</comment></comment><comment><USER8> I think Rust solves a lot of these problems.

> Calculating the size of a static array

some_array.len()

> Getting the maximum value of an enum

Rust's enums are strongly-typed (I think that's the right phrase), so this is a non-issue.

> Converting an enum to a string

impl Display for MyEnum (and then call to_string() on it)

> Converting a string to an enum

This could be tricky, since Rust enum variants can contain data. But if none of the variants contain data, it would be easy to make a method that returns a Result<MyEnum, CustomParseError>

> Binary file includes

include_bytes! macro (or the include_str! macro, depending on the exact scenario)

> Switch/case is still stupid

Pretty sure Rust's match is a lot better

<comment><USER9> > This could be tricky, since Rust enum variants can contain data. But if none > of the variants contain data, it would be easy to make a method that returns > a Result<MyEnum, CustomParseError>

Usually when you want to convert a string to an enum, you're trying to build some kind of parser or deserialization library, in which nom or serde are the best choices. (Of course, C++ has several parser frameworks too.)

<comment><USER8> Yeah, I would definitely be using serde in that case

</comment></comment></comment><comment><USER10> This person is not a very good C++ programmer. Also for some of the things he mentions, it will be covered by the Reflection TS.

1\. Size of a static array: Use std::array please

2\. Maximum value of an enum: See reflection TS

3\. Converting enum to string: ditto

4\. Converting string to enum: ditto

5\. #pragma once: see modules. They _are_ in fact trying to make something better. There are also some cases where you don't want/need it

6\. C99 designated initializers. They are there!

7\. Binary file includes. Ugh this is just such a dumb idea I can't even. When do you want the file to load? When the executable does? What if you want to read it in chunks? This idea is not well suited for a systems-oriented language

8\. FourCC codes. Again, this is a silly idea not even worth addressing. Just define it yourself. C++ is a programming language. Not your media toolkit

9\. do/while(0). What are you using macros for in 2016 (the time of writing)?

10\. preprocessor gripes. Stop using it! You have <type_traits> and stuff now

11\. Switch/case is stupid. No it's not. You want fall/through cases as well and if you can't see why, don't criticize. This is true in pretty much EVERY language that supports switch/case

12\. Still no strong typedefs. There are! Use the explicit keyword on a constructor definition.

13\. Types as Primitives. See reflection TS

Basically, this feels like any other "C++ rant." Someone who didn't learn the language properly or respects what the language needs to achieve.

<comment><USER9> > This person is not a very good C++ programmer.

Am I a bad C++ programmer for agreeing with some of it?

> 5\. #pragma once: see modules. They are in fact trying to make something > better. There are also some cases where you don't want/need it

The fact that modules have taken so long, and still have prominent members of the community saying they need to be sent back to the drawing board, is a legitimate criticism.

> 7\. Binary file includes. Ugh this is just such a dumb idea I can't even.

It's a useful feature, much used in the language I work on, allowing you to distribute a program that needs just one or two static data files as a single executable. It's also good for packaging data as libraries: for instance, Unicode libraries need a lot of random tables and it can be convenient to store these in binary form. Having to embed binary in C/C++ syntax as, say, ICU does just adds parsing overhead at compile time for no reason.

> 9\. do/while(0). What are you using macros for in 2016 (the time of > writing)?

There are lots of use cases of macros, too many to list here. Templates don't always suffice.

> 11\. Switch/case is stupid. No it's not. You want fall/through cases as well > and if you can't see why, don't criticize. This is true in pretty much EVERY > language that supports switch/case

I designed much of the pattern matching system in an industry language without fall through in switch case and I have never missed it. Nor has anyone else in the community I know of.

<comment><USER11> C# lets you do "goto case XXX" to go to another case, and empty cases fall through to the next. This is a bit inconsistent, but it at least retains the useful fall-through case, gets rid of the usually-undesirable case, and still accommodates the occasional exceptions.

</comment></comment></comment><comment><USER12> This is kicking a dead horse here. IMO, almost everything about C++ is terrible in this day and age. I'm so happy Rust exists and is doing well. I'll do anything in my power to never again create another C++ project.

</comment><comment><USER7> You can use user-defined literals for a portable way to write four-character codes:

        constexpr std::uint32_t operator "" _4CC(const char* str, size_t len) {
            std::uint32_t result = 0;
            for (size_t i = 0; i < len; ++i) {
                result = (result << 8) + (std::uint32_t)(unsigned char)(str[i]);
            }
            return result;
        }

        auto const movie = "MooV"_4CC;

</comment><comment><USER13> >Here's an example implementation for you. If you're using Visual C++, there's a built-in version. They could literally cut-n-paste this one line into <stddef.h> today.

>#define countof(X) (sizeof(X) / sizeof((X)[0]))

Could they? What if X is empty?

<comment><USER14> an empty struct has a size of 1 byte.

        struct Widget{
        };

        Widget widgets[256];
        printf("%d %d", sizeof(widgets), sizeof(Widget));

prints out

        256 1

if there are 0 elements, there are no issues because it's 0/x = 0.

<comment><USER15> the point is that they're indexing into an array of unknown size.

<comment><USER14> indexing in that case doesn't trigger a dereference, since it's being passed to the sizeof operator.

</comment></comment></comment></comment><comment><USER13> >Converting string to/from enum

It's generally a bad idea to do this, and an enormous headache to even attempt. If you want to do this, maybe you don't want to use an enum, because that's not what they are for. Maybe you want a hash map instead?

<comment><USER16> Why is it a bad idea? And if it's a headache, isn't that exactly when the language itself should do it so the developer doesn't have to?

<comment><USER17> How is it a good idea? Not everyone needs this functionality.

I wonder how much effort might be required to implement a purely opt-in syntax/library for the purpose: something like Ada's Enumeration_IO.

<comment><USER16> When you need it the compiler knows you need it. If you have enum Pet { Cat, Dog } and you write

        cout<<nameof(Dog)

The compiler could just replace it with the string value at compile time.

If you have a dynamic one the compiler could just make an array (or worst case hash table lookup) into a static array created at compile time. It's fairly simple and costs nothing if you don't use it. And it's a lot simpler and more elegant to do through the compiler than through a lib, metaprogramming etc.

And how useful is it? it's at least useful to be part of how most other languages work these days. An enum is should be seen as a list of names _and_ values.

It shouldn't just be limited to be a glorified way of saying

        const int Cat = 0;
        const int Dog = 1;

Defined like that I'd find it completely _unnatural_ if the symbol names were available at runtime.

<comment><USER17> It has a cost in the size of the object file or executable at least. What if I don't want my data segment being polluted with enum-string-values or, worse, your secret array/hash-table implementation, regardless of how little extra it is?

Something like this ought to be opt-in and explicit.

<comment><USER16> If you use nameof(Cat) then the string "Cat" is included. If you use nameof(some_pet) then the array ["Cat", "Dog"] is included. It's zero cost for something you don't use and it's exactly the same cost as you would have paid by manually adding this.

<comment><USER17> Ah, right, I see: the compiler only adds these things if it detects that it's necessary (i.e. there must be at least one use). Can't argue with that.</comment></comment></comment></comment></comment></comment></comment>


Using Quiescent States to Reclaim Memory - <AUTHOR> http://preshing.com/20160726/using-quiescent-states-to-reclaim-memory/ <comment><USER2> Related: epochs and lockfree data structures in crossbeam [https://aturon.github.io/blog/2015/08/27/epoch/](https://aturon.github.io/blog/2015/08/27/epoch/)</comment>