It's Perfectly Fine to Only Code at Work – Don't Let Anyone Tell You Otherwise - <AUTHOR> https://dev.to/ben/its-perfectly-fine-to-only-code-at-work-dont-let-anyone-tell-you-otherwise--25i3 <comment><USER2> There is one thing that is extremely important for me as a developer that I cannot really do at work: reinventing the wheel.

My GitHub is full of wheel reinventions (TCP load balancer, B+tree index, monitoring daemon...). No employer would have paid for me to develop these projects, and yet I learned so many invaluable skills by doing them.

I'm happy to invest my free time this way because I feel that I develop myself, but keeping a healthy balance is hard. I've noticed that I can keep working on a side-project after work for a few weeks until starting to feel burnt-out, losing motivation for both work and the side-project.

<comment><USER3> > No employer would have paid for me to develop these projects, and yet I > learned so many invaluable skills by doing them.

I'm going to disagree with you here. It depends on the employer, and more often, the circumstances at any given time. For example, last week I spent the time writing my own implementations of HOTP/TOTP based on the RFCs [1][2].

I did this all at work while being paid. They also paid me to extract and open source our param validation tools. Both cases served me more than the company, but the company benefited because of the skills I learned while doing both.

All of that to say, you're half right - under most circumstances you won't be paid to do a passion project. Though, there are parts of your work for a company where you can make an argument for reinventing the wheel rather than pulling in an existing OSS package. Your employer has to see the value in the long game which too often isn't the case.

Cheers.

1\. [https://tools.ietf.org/html/rfc4226](https://tools.ietf.org/html/rfc4226) 2\. [https://tools.ietf.org/html/rfc6238](https://tools.ietf.org/html/rfc6238)

</comment></comment><comment><USER4> On a related note, it's probably also worth pointing out that:

A: The majority of people in the tech industry are indeed like this. They go to work, build sites/programs/apps for eight hours or so and go home to relax. The percentage you saw doing tech envagelism on Twitter or hosting conferences or heading up open source projects or posting on Reddit or Hacker News all the time are a minority of the population, and you're not a failure or 'strange' if you're not like that.

B: Even if you didn't have enough time to build up your knowledge while working, 90% of companies that need developers don't need cutting edge technology. Most people aren't working at Google/Facebook/Apple/Microsoft/whatever.

<comment><USER5> Re point B, I'd say it's the other way around: the cutting edge technology often originates _within_ those companies, created on the job during work hours.

<comment><USER6> Indeed. Where did react, cassandra, golang... come from?

</comment></comment></comment><comment><USER5> Common counter-argument is "but how will you learn the skills you need", but actually it's perfectly possible to learn everything you need on the job.

Julia Evans has nice list of how people learn at work: [https://jvns.ca/blog/2017/08/06/learning-at- work/](https://jvns.ca/blog/2017/08/06/learning-at-work/)

And e.g. I feel work is best place to learn new programming languages: [https://codewithoutrules.com/2017/09/09/learn-a-new- programm...](https://codewithoutrules.com/2017/09/09/learn-a-new-programming- language/)

<comment><USER7> But as you wrote, _" At the end of the process above I still couldn't start a Ruby project from scratch, or write more than tiny amounts of Ruby."_

This matches my experience; I was in a Python shop, and got tasked with interfacing our code with a Ruby app developed externally, plus with running it on our servers. For small things, it became easier to learn enough Ruby than to bother the external devs.

That said, I wouldn't say I _know Ruby_ , the way I know other languages, even ones I never used a lot. For example, I probably wrote fewer lines of Go than Ruby, yet I'd say I know it better, since I know the core parts rather than a few random bits and pieces.

</comment></comment><comment><USER8> While not terribly experienced with hiring, I have found that asking about coding outside of work is a convenient proxy for two reasons:

\- If you hobby code open source, this often offers me my only real opportunity to see first hand how you code and how you run a project and how you interact with people.

\- But really, I don't care about coding. I care about finding people who are passionate about building things and thinking, and who can express themselves well. Can you express the challenges and interests of what you love, whatever this is?

Still, I worry that this may result in me only hiring people like myself.

<comment><USER5> You are really limiting your hiring pool, yes. And for that matter discriminating against parents with small children.

<comment><USER9> Oh god. As a former spare time programmer (current PM, former arch/eng), with a three month old. There. Is. No. Time.

</comment></comment></comment><comment><USER10> This whole spare time coding, public repository pressure, and interview coding assignments are the reson why the industry is spitting out burned out people before they reach 35 and why the communities are so hysterical.

<comment><USER11> I've told this story on HN before, but when I was first interviewing, companies would ask me for my GitHub/public projects/conferences/etc. and I would say that in my free time I'd rather be outside doing various activities instead of in front of a computer.

Turns out you can still take pride in your craft and be a professional without having to spend every waking minute coding. Some companies seemed taken aback by the fact that I'd rather be hiking or kayaking than working on some pointless open source project. It was kinda weird for me seeing their reactions though.

</comment></comment><comment><USER12> I am at "I only code" at work person. I dont even have a desk at home. Luckily our work enviorment encourages new techonolgies and skills. I use my off time not to code, but to teach, draw etc. These are skills I see also compliment coding, improving all the supporting skills that are nessecary to be a good dev.

<comment><USER3> I agree with you. I spend my time doing things I enjoy such as spending time with my kids, hiking, playing basketball, etc. Sometimes, I'll say "hey, I want to make a new app for my daughter to practice math", so I do it. I use whatever I want without scrutiny (i.e. no code review) and just make it work. It's quick, dirty, and often teaches me something I didn't know.

The crux of it is, the happier you are, the less stress you wrestle with, the more wholistic person you are, the better you produce in whatever you do.

</comment></comment><comment><USER13> One side of this I haven't seen, people like me, entirely code for work, but also work a lot. I work 60-80 hours a week (even more!), so that doesn't leave much time for coding on the outside.

Why? Because I really love what I do. I find the problems interesting, and I am trying to push my career further and bonus higher.

When I go home, I often take the time commuting and at night to read research, run, maybe read or experiment more, but that is mostly just out of habit.

I tried to do little bit on github before, but it sits there, dated looking abandoned. I was seriously thinking of deleting it, but i don't know if that would look even worse.</comment>


Rooted - A Stack Exchange for computer security questions - <AUTHOR> http://www.askrooted.com/

<comment><USER2> What is the difference between the security tag on <http://serverfault.com/>? <http://serverfault.com/questions/tagged/security>

</comment><comment><USER3> Why not just post these questions on stack overflow, under the 'security' tag?

<comment><AUTHOR> Stack Overflow is about programming in general, this website specializes in security on its own. Furthermore, this site accepts security questions that may not necessarily be programming related

</comment></comment><comment><USER4> That's a nice SO clone, What is it built upon? Obviously it isn't a SO site.

<comment><USER5> StackExchange is the whitelabel SO clone service Joel and Jeff are hoping to grow with VC funds.

<comment><USER6> Close, StackExchange is the whitelabel SO-derivative hosted by Fog Creek. But it is not what they are hoping to grow with VC funds, it's a separate entity than Stack Overflow proper, which is what they're trying to grow with VC funds. It's a little non intuitive but not terribly so.

</comment></comment></comment><comment><USER7> "Rooted" is a common colloquialism here in Australia :-)

<comment><AUTHOR> Basically if your box gets rooted, you're fucked ;)</comment></comment>


Scaleway offers 75GB of free Object Storage per month - <AUTHOR> https://www.scaleway.com/en/object-storage/ <comment><AUTHOR> Hello everyone, i just got this email from Scaleway about their Object Storage and i thought i would post about it here, since HN helped me choose my Object Storage provider(Backblaze) before.

Disclaimer: I do not endorse any products of Scaleway, i am not even a customer(i used to be though), i just thought it is a good deal and maybe some people can share their opinions on Scaleway(previously Online.net)</comment>


Grindr sold by Chinese owner after US national security concerns - <AUTHOR> https://www.ft.com/content/a32a740a-5fb3-11ea-8033-fa40a0d65a98 <comment><USER2> Isn't this basically the plot from silicon valley. That show is so on point.

</comment><comment><USER3> They already have the data, lol.</comment>


Show HN: BackboneScreencasts.com - <AUTHOR> http://joeybeninghove.com/2011/10/17/announcing-backbone-dot-js-quickly-a-90-plus-minute-screencast

<comment><USER2> I've been trying to get into using Backbone for a while, but I've been frustrated by the lack of resources - the official docs are essentially just a lengthy reference and an extremely basic Todos demo, neither or which has been all that helpful in getting normal app started. I'm excited to try out this screencast :)

<comment><USER3> The Backbone.js homepage assumes that you're somewhat familiar with building JavaScript-heavy web applications ... I can see how it would be lacking if you're coming at it fresh.

Would you like to see an official tutorial listed on that page, or would a screencast be better? Doing a section linking out to all of the third-party tutorials is another option.

<comment><USER2> A good official tutorial would be fantastic, one that walked through something with a little more complexity than the basic to-dos demo. It's not that the official docs are particularly hard-to-read, it's just that it's very much a reference that doesn't give you a good place to start or "big picture" overview.

</comment></comment></comment><comment><USER4> I really like the "live" style of these screencasts. It seems almost like I'm pair programming. I appreciate the polished feel of screencasts like the RailsCasts, but this feels more... real somehow.

<comment><AUTHOR> Great compliment! That is the _exact_ type of experience I'm hoping to bring with both these screencasts as well as CastingCode.tv. I know I really enjoy sitting down and pairing with folks myself, so I really hope I can bring a similar experience with these types of screencasts and live coding events.

Thanks!

<comment><USER5> Not going to be cheap enough to do a plug here ;-) but I had exactly the same comment from someone about 1.9 Walkthrough today (that is, warts and all live coding with only minor editing). So perhaps there are legs to this approach! :-)

</comment></comment></comment><comment><USER6> I'd be interested to see what value this adds compared to the documentation and existing (free) blog posts on it's use. IMHO Backbone's docs are super friendly and if you're really wondering what's going on under the covers the source code is relatively easy to jump into and understand (assuming you're a javascript programmer not a jQuery hacker)

<comment><AUTHOR> I agree about the Backbone.js docs being quite awesome. I think they get a bad wrap myself. But I've also found that some folks like the option of watching screencasts to learn about certain topics as well.

I kind of fall into both categories. I really like reading the docs (and more importantly, the code itself) as well as watching someone demonstrate certain topics. I guess I'm weird like that. :)

</comment></comment><comment><USER7> The Backbone source code is concise and well documented. If you feel like you've hit a wall, it might be worth your while to read through it.

Check it out at <http://documentcloud.github.com/backbone/docs/backbone.html>

</comment><comment><USER8> I started playing with backbone.js and stumbled upon your other intro video where you explained the basics. Combined with the docs and another example, it was pretty helpful for me to get started. Thanks for that and I will try this screencast as i move ahead.

<comment><AUTHOR> You're very welcome. Really hope this new one is a help for you too! Let me know if you have any other questions about the code. Thanks!

</comment></comment><comment><USER9> Hi Joey, I remember watching a screencast by you on the same topic (linked from HN) a few weeks ago. Is this a different video?

<comment><AUTHOR> Yes, the one you probably watched a few weeks ago was one that I published a couple months ago which just gave a basic introduction and only covered the Views aspect of Backbone.js.

This new one I just published a couple days ago, and it's a longer screencast that demonstrates how to build a complete Backbone.js application from the ground up, using a live coding format. All major aspects of Backbone.js are covered including Views, Routers, Models/Collections, Templating, etc.

Hope that helps.

</comment></comment><comment><USER10> This is cool but do they all have your face on the bottom corner?

<comment><AUTHOR> Haha, I know. I have an ugly mug for sure. :) That's always been kind of my style for screencasting in general. I think it gives it a nice personal feel. But would you rather have the option of just seeing the code without the live video?

<comment><USER10> Not that it's ugly, its just distracting from the code, also it takes up screen real estate. Just my 2 cents, if that's your style, go with it.

<comment><AUTHOR> Thanks man. That's great feedback. Perhaps I could play around with the sizing of the video a bit. I try to keep it out of the way of the code so that it doesn't overlap too bad.

<comment><USER5> My straw polls (or "market research" if I ever needed to big it up ;-)) showed a general dislike (though not strongly) for live video throughout a screencast but including portions was OK. That said, everything Gregg Pollack does seems to have him in it the whole time, and he's doing OK ;-)

I avoid it mostly because it adds overhead to the file size. You can crunch down a screen / presentation only screencast to pretty incredible sizes with H264 but as soon as you mix in live video, you either need to sacrifice its quality severely or put up with large files.

<comment><USER11> I've found the same thing. Solid colors of a screen capture can easily compress to under 200 MB for 60 minutes of video, but live action (even with only small movements) can double or triple that in size.

<comment><AUTHOR> Yep, I've known about the file size issue when including live video, but it's something that I'm willing to continue experimenting with. One of my main reasons for including live video in my own screencasts is because I myself enjoy watching ones that have it. So, I guess you could say I'm doing it because it's something I enjoy. I'm hoping others will like it as well. :)

<comment><USER12> What about making an actual screencasting site where someone can turn the live video on and off in JS?</comment></comment></comment></comment></comment></comment></comment></comment>


Half of Trump voters think the Bowling Green Massacre is real - <AUTHOR> http://www.recode.net/platform/amp/2017/2/10/14576184/bowling-green-massacre-trump-true-kellyanne-conway-facebook-twitter-fake-news <comment><USER2> The question is misleading.

The real interpretation of the pool is that 50% of Trump supporters will agree with whatever measure Trump takes for whatever reason and 90% of Clinton supporters will disagree with whatever measure Trump takes for whatever reason.

If you ask:

"Do you agree or disagree with the following statement: 'the Bay of Pigs invasion attempt shows why we need Donald Trump's executive order on immigration?'"

you will get almost the same result.</comment>


DeepBrain: Personalized EEG Interaction Through Attentional and LSTM Learning - <AUTHOR> https://arxiv.org/abs/2002.02086 <comment><USER2> _The subject is asked to wear the EEG device and control robot by mind_

Have they succeeded? The paper does not answer that. Unless I missed a link to a video where someone wears an EEG headcap and controls a real robot.</comment>


The End of FeedDemon - <AUTHOR> http://nick.typepad.com/blog/2013/03/the-end-of-feeddemon.html

<comment><USER2> Sad. I've relied on FD for probably 8 years now. It silently runs and monitors craigslist, deal sites, blogs and "just works". Just make it freeware.

</comment><comment><USER3> open-source it?

<comment><USER4> [http://nick.typepad.com/blog/2013/03/my-plan-for- feeddemon.h...](http://nick.typepad.com/blog/2013/03/my-plan-for- feeddemon.html)

 _> First, open-sourcing FeedDemon sounds nice, but I don't see it working. I use a number of commercial third-party components which can't be open- sourced,_</comment></comment>


F() vs. F(void) in C vs. C++ - <AUTHOR> http://nickdesaulniers.github.io/blog/2019/05/12/f-vs-f-void-in-c-vs-c-plus-plus/ <comment><USER2> Prefer T foo(void) in C because that's the declaration that actually introduces, into the scope, information about the parameter list.

T foo() is a deprecated old style from before ANSI C 1989 which declares _foo_ in a way that is mum about how many arguments there are and what their types are.

(void) is actually an ANSI C invention. C++ adopted this for better C compatibility. (Yes, C++ did that once upon a time!) Then some C++ coders started doing silly things like myclass::myclass(void): something that would never be processed with a C compiler.

(void) is ugly; it would be a productive change in C to do away with K&R declarations and make () equivalent to (void) like C++ did some three decades ago.

<comment><USER3> > it would be a productive change in C to do away with K&R declarations and > make () equivalent to (void) like C++ did some three decades ago.

But this would mean you no longer have a nice way of specifying a function that takes parameters that you can't list :(

<comment><USER4> How often do you need to do that? I feel like I never have, and I think feel like it's a rare enough use as that it shouldn't be the default behavior, but maybe I haven't written enough C.

<comment><USER5> int main() { return 0; }

Main takes argc and argv, but it's idiomatic to omit them if unused.

<comment><USER6> Why not just use int main(void)?

<comment><USER5> I'm confused. main doesn't take void--it takes two arguments. The f() syntax means that the definition doesn't specify how many arguments the function will be called with, while f(void) means it takes no arguments.

<comment><USER7> As per the standard, main() can take no argument [ie, main(void)] or 2 arguments [main (int, char asterisk asterisk) or equivalent] or some implementation defined manner. See 22.214.171.124.1 in C2x working draft[0].

[0] [http://www.open- std.org/jtc1/sc22/wg14/www/docs/n2346.pdf](http://www.open- std.org/jtc1/sc22/wg14/www/docs/n2346.pdf)

<comment><USER8> Wow, it is painful to see that they still haven't accepted case ranges. They are supported by gcc, clang, and icc. Like so:

case 123 ... 456:

Switching on strings is another thing people have been wanting for half a century. It would seep up many programs, because most programmers don't bother to generate a perfect hash or a carefully-balanced tree of "if".

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> For those who are still wondering the actual reason for the extra instruction after reading all that, it has to do with the calling convention: when calling a variadic function in SysV AMD64, AL holds the number of vector registers used for parameters. I believe the Microsoft x64 one doesn't do that.

Also, a xor r32, r32 is 2 bytes, not 1.

<comment><USER3> > a xor r32, r32 is 2 bytes, not 1

Does the article imply otherwise?

<comment><USER10> Yes.

> So Clang can potentially save you a single instruction (xorl %eax, %eax) > whose encoding is only 1B, per function call to functions declared in the > style f(), but only IF the definition is in the same translation unit and > doesn't differ from the declaration, and you happen to be targeting x86_64.

<comment><USER3> I couldn't seem to find that bit, thanks for pointing it out to me.

<comment><USER11> I just updated the article, too, sorry if that caused confusion.

</comment></comment></comment></comment></comment><comment><USER12> > Is an error in C, but surprisingly C++ is less strict here, not only > allowing it but also taking the semantics of the definition. (Spooky)

Aren't these just declaring one overload of foo and defining a different overload?

<comment><USER11> Ah! That's it, thanks! edited the article

<comment> J-Kuhn Came here to say something that I suspect operator overloadíng. I read your comment, pressed refresh, and it was already fixed.

</comment></comment></comment><comment><USER13> I feel like basically any "explanation" of fails to sufficiently explain `f()`.

`void f(){}` is just a special case of the old style of defining functions. Another case of this is `void f(a, b) int a, b; {}`.

Using the old style, functions are defined without "prototypes"; that is, the type of the function does not specify its arguments.

Since changing the meaning of `void f(){}` would have broken backwards compatibility, they added `void f(void){}` as the way of specifying "no arguments" in the new style.

Edit: to further demonstrate, this is a perfectly valid C program:

> void f(a, b) int a, b; {}

> int main(void) { if(0) f("oops"); }

As the type of `f` does not specify its arguments, there is no constraint violation (compilation error), and as the call is never actually performed (`if(0) ..`), the program does not invoke the undefined behaviour that would result in performing the invalid call.

</comment><comment><USER14> Thank you to this guy for not burying the lead. I hope more people put a simple conclusion at the beginning when writing such a blog post.

Also, any one else notice that the favicon is a gif (nyan cat)? I didn't know that was supported.

<comment><USER15> This might blow your mind :)

[https://news.ycombinator.com/item?id=19712167](https://news.ycombinator.com/item?id=19712167)

</comment></comment><comment><USER16> I've always wondered why EAX was getting cleared; I see it all the time in disassembly. Very cool stuff!

</comment><comment><USER17> In the conclusion the author says he considers T f() to be prettier than T f(void). I personally prefer the look of T f(void) to T f(); the former is explicit to both the programmer and the compiler that this function is not supposed to take any arguments. If I can cause the compiler to not be helpfully clever when it doesn't need to be, as well as make it clear to my future selves, or any other poor soul condemned to read my code what my actual intention was, I see that as a Good Thing.

</comment><comment><USER18> > If we change foo2 to a declaration (such as would be the case if it was > defined in an external translation unit, and its declaration included via > header), then Clang can no longer observe whether foo2 definition differs or > not from the declaration.

I tried enabling link time optimization on clang-8, it does see through and eliminate redundant xor instruction in foo2(). gcc fails to do that, however. I inspect the result by calling objdump on generated object code.

<comment><USER11> Great! Thanks for confirming; I suspected LTO would be able to do this optimization as well. I should add that to the post.

</comment></comment><comment><USER19> That should have been disallowed in C11, but apparently it wasn't. You do have to have function prototypes now, but they can still be empty.

</comment><comment><USER20> I found another difference between C and C++ recently. C++ compiles the code in the following post ok, but C doesn't.

[https://old.reddit.com/r/C_Programming/comments/bn04w0/confu...](https://old.reddit.com/r/C_Programming/comments/bn04w0/confusion_on_array_parameters/)

In short, for "typedef struct bar bar;", C views "bar" as an incomplete type, but C++ doesn't.

<comment><USER21> That doesn't sound right. I think the difference is that C++ doesn't treat that as an array declaration so it doesn't require a complete type.

<comment><USER20> What is the root cause for the difference?

</comment></comment></comment><comment><USER22> Ah, the days of void main(void)</comment>


Show HN: ShortcutRef.com – discover and learn shortcuts easily and quickly - <AUTHOR> Hi, my name is Yadong and I'm learning to build web apps. I just made a website (https://shortcutref.com) for shortcut references in the past week.
It has very clean UI and shows only the relevant shortcuts you need with short and precise descriptions. The goal of this tool is to help users learn shortcuts of a specific application in a few minutes.
Let me know if you like it and I'll add GIF and search support.
Thanks! <comment><USER2> This is pretty nice! I have bookmarked it! Adding printable versions that we can hang on our walls would be cool :)

<comment><AUTHOR> Thank you David. I'm so glad you like it. I'm adding new features this weekend. Printable version is in the feature backlog and I'll work on later.</comment></comment>


Yale Climate Opinion Maps - <AUTHOR> http://climatecommunication.yale.edu/visualizations-data/ycom-us-2016/ <comment><USER3> In my experience with some conservatives, it seems that they believe global warming is happening but they are skeptical of how effective left-leaning politicians can be in combating climate change. Therefore it is not worth conceding political turf on other issues if they will see little change in the rate of global warming.

Interesting once you start to take into account other countries contributions to global warming. The United States is relatively low among developed economies when it comes to emissions per GDP : [https://en.wikipedia.org/wiki/List_of_countries_by_ratio_of_...](https://en.wikipedia.org/wiki/List_of_countries_by_ratio_of_GDP_to_carbon_dioxide_emissions) .

I am really not impressed by any sides efforts to combat global warming.

Of course this will be met by criticism from HN, but I would love to see more discussion beyond conservatives are anti-science radicals who want to kill the earth.

<comment><USER4> > I am really not impressed by any sides efforts to combat global warming.

The reality today is that no efforts are made whatsoever by any political movement on the planet to combat global warming, in the entire planet (except perhaps the CPC of China, against all odds). American Republicans do not even have the hint of honesty of admitting the issue at stake. They denied it 10 years ago, now they want to turn their audience into believing that it may not be human-caused.

> I would love to see more discussion beyond conservatives are anti-science > radicals who want to kill the earth.

The discussion was over dozens of years ago, there is no debate. Human activity (intensive farming, petroleum and coal burning, cement production, ...) is causing climate change, period. And the changes are already past the point of being reversible. The data is plentiful and everywhere for the world to see.

<comment><USER5> > The discussion was over dozens of years ago, there is no debate.

You might find this attitude counter-productive in achieving your goals, especially in a democracy.

<comment><USER6> The "debate" means "a formal discussion on a particular matter in a public meeting or legislative assembly, in which opposing arguments are put forward and which usually ends with a vote."

If 95% of the scientists of the whole world agree the global warming exists and is human caused, that "formal discussion" is really over since 1990. Since then there was no debate if. You can read the results of that discussion in the IPCC reports, the last summary here:

[http://www.ipcc.ch/pdf/assessment- report/ar5/wg1/WG1AR5_SPM_...](http://www.ipcc.ch/pdf/assessment- report/ar5/wg1/WG1AR5_SPM_FINAL.pdf)

If you mean that the politicians would like to "debate" between themselves "what to do about it," they sure do. But they shouldn't be allowed to _doubt_ all scientists of the world. It's criminally irresponsible, considering the potential dangers.

It's also extremely simple in basic principles: without naturally occurring greenhouse gases, Earth's average temperature would be near 0°F (or -18°C) instead of the much warmer 59°F (15°C). More greenhouse gases, the higher the temperature on the surface. The same way you cover yourself with the blanket, under the blanket it's warmer, not because you produce more heat but because more warmth stays under the blanket. It's that simple, as simple as wearing the coat not to freeze in the winter, and unbelievable that somebody can be manipulated to doubt it.

P.S. Surveys of scientists' views on climate change (to answer the question to this post):

[https://skepticalscience.com/global-warming-scientific- conse...](https://skepticalscience.com/global-warming-scientific-consensus- intermediate.htm)

But they are of course less important than the IPCC which is official, worldwide and in the agreement since 1990.

<comment><USER5> > If 95% of the scientists of the whole world agree the global warming exists > and is human caused.

I often read this number, do you know where it came from, and what 95% of scientists agree on specifically?

<comment><USER7> You can check this source: [https://www.skepticalscience.com/global-warming- scientific-c...](https://www.skepticalscience.com/global-warming-scientific- consensus-advanced.htm)

<comment><USER5> On one hand that seems fairly reasonable, on the other hand I can't escape the feeling that the author had a conclusion and was fitting results to it. It is an inherently messy and complicated field and there are many ways one could interpret this largely qualitative data, but the author seems to have not a shred of doubt or uncertainty, for my type of personality it makes my spider senses tingle.

EDIT:

[https://www.scientificamerican.com/article/how-to- determine-...](https://www.scientificamerican.com/article/how-to-determine- the-scientific-consensus-on-global-warming/)

One of the problems with Cook's appeal to authority is this: So far, no one has quantified the consensus among natural scientists on global warming. In fact, it cannot be done easily, said Jon Krosnick, a social psychologist at Stanford University who has been studying communication strategies for decades.

While the Cook study may quantify the views expressed in published literature, it does not establish the beliefs of any defined group of scientists, Krosnick said.

"How do you determine who qualifies to be surveyed and who doesn't qualify?" he asked. "Personally, I haven't seen anyone accomplish that yet."

EDIT2: This might be an interesting read if it wasn't behind a paywall:

[https://www.iceagenow.info/97-percent-consensus-errrr-not- ex...](https://www.iceagenow.info/97-percent-consensus-errrr-not-exactly/)

[http://link.springer.com/article/10.1007/s11191-013-9647-9#p...](http://link.springer.com/article/10.1007/s11191-013-9647-9#page-1)

<comment><USER6> > there are many ways one could interpret this largely qualitative data

Only if you don't understand the basic science or you have a denialist agenda.

If you want to know the facts, see:

[https://www.bloomberg.com/graphics/2015-whats-warming-the- wo...](https://www.bloomberg.com/graphics/2015-whats-warming-the-world/)

And those are good and precise calculations.

But even for the simplest, back-of-the-napkin calculations, you'd have to deny the contribution of CO2 to conclude anything else. And the CO2 contribution is 100% proven.

The same stands for the basic chemistry: The humanity burns immense amounts of carbon, burning hydrocarbons produces CO2 (if there's enough fresh air) or CO (if there's not). If you don't believe that, I suggest you to close yourself in a sealed room and burn a fire (coal) inside and keep it burning. You'd die, provably, unless somebody rescues you.

[http://www.smh.com.au/nsw/man-died-from-carbon-monoxide- pois...](http://www.smh.com.au/nsw/man-died-from-carbon-monoxide-poisoning- after-using-heat-beads-in-greystanes-home-20150718-gif8d8.html)

The concentration of the CO2 increased proportionally to our burning of the hydrocarbons increased, and additionally, the seas got more acidic. Everything fits.

See also:

[http://rationalwiki.org/wiki/Argument_from_incredulity](http://rationalwiki.org/wiki/Argument_from_incredulity)

P.S. If you "just" doubt in the study of over 12,000 peer-reviewed climate science papers, you are free to evaluate them yourself and to publish your take on them. I really doubt that the results would significantly change, if the scientifically valid methods are used. I have emphatically not called you personally a "denialist." But I argue that you can't be intellectually honest if you use an "argument from incredulity" (which you suitably call your "spider" that is, in reality non-existing, non-sense sense) or stating "there are many ways one could interpret this" which obviously isn't true. You linking to the work which main conclusion is "that partisan presentations of controversies stifle debate" has also no relevant scientific value, as the scientists agree about the human caused global warming occurring at least 30 years already. There are scientific facts, and to establish other facts you have to do real scientifically valid work. Scientifically valid also means accepted by the scientists. The majority of them in the relevant field. Again, politicians, lobbyists and media don't count. It's very known that the US public perception of the scientific agreement is wrong (including OP the statistics we comment), and your "spider sense tingling" (your name for you avoiding logically and technically valid arguments) fits that exactly.

[https://static.skepticalscience.com/graphics/consensus_gap.j...](https://static.skepticalscience.com/graphics/consensus_gap.jpg)

<comment><USER5> > or you have a denialist agenda

Simple, honest skepticism, what used to be considered an intrinsic part of the scientific process, literally isn't an option? The irony. :)

Note that in this case I wasn't questioning the science of global warming, I was questioning the methodology and manner in which they qualitatively reviewed these scientific papers. There are, in fact, many different conclusions one could draw, depending on your agenda. Presenting it as nothing more complicated than simple math seems suspicious. Being accused of being a "denialist" when pointing this out is cringe worthy.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> Interesting. My big takeaways were:

(1) For most of the country, 40-70% of the folks in sample say they are concerned about global warming (GW); (2) Areas of widespread (70-90%) concern are limited to the west and northeast coasts; (3) Many people believe that scientists doubt GW too; (4) That all notwithstanding, many folks across the land believe that we should reduce CO2 and take other green steps; and (5) Nearly everybody thinks that this issue has been over-talked – that the talk is way ahead of the science.

Note to opinion-makers: talk about cleaning up more and GW less. You are turning off your audience and volume won't change that.

edit: formatting

<comment><USER9> The most interesting thing I found was that a strong majority, everywhere, claims to trust climate scientists about global warming. But huge areas of the country disbelieve the fact that most scientists think global warming is happening! I'm not sure whether this reflects widespread cognitive dissonance, or merely demonstrates the effectiveness of propaganda.

<comment><USER10> Effective propaganda creates cognitive dissonance.

It seems it is likely easier to convince people scientists don't believe something than it is to convince them scientists are stupid or lying.

I guess all you need is one of those "He Said/She Said" TV interviews where you get one of the vast majority of scientists who believe something on one side and one of the minority who disagree on the other side, and then the conclusion is drawn: "Scientists evenly split on the issue! No actionable information is available from Science!"

</comment></comment></comment><comment><USER11> Fascinating: 71% say they trust climate scientists regarding climate change, yet only 49% say they think "most scientists think global warming is happening". This would imply it is not necessary to convince people anthropogenic climate change is real, only that most climate scientists think it is real. Very different message.

<comment><USER12> Depends on your definition of "happening".

For most of the population their only daily contact with a STEM person is the TV weatherman who typically goes to great wishy washy lengths to explain that tonights snow fall or last weeks record high are not the sole or most significant primary proof of the truth or falsehood of global warming. Meanwhile clickbait and disaster pr0n movies for generations have implied we all gonna die due to climate change yet for generations life has gone on, and in fact will continue to go on, and the alarmists are looked with contempt similar to pseudo-Christian preachers and cult leaders announcing the end of the world, admittedly for differing strategies but identical reasons, gaining money and power (edited)

So everyone knows most STEM people are honest and that honesty results in our admittedly pretty awesome modern world, while simultaneously their personal daily experience of a climate expert is at best extremely wishy washy and the scam of begging for money and control via the impending apocalypse goes back millennia before modern "climate change" and most people very wisely scoff at it.

The results make sense that most scientists are technically trustworthy, as opinion leaders their politics are less influential than your average plumber's opinions, and apocalyptic preachers have always been full of it and always will be.

For political reasons and tribal reasons, many will have to pretend to be surprised to signal that they're in the in group and the out group suxs, but we all know the above is how the world really works.

<comment><USER13> Most STEM people are honest? No. Having worked decades as an engineer, sometimes over scientists, I can tell you that STEM people are just as susceptible to human frailty and peer pressure as any other group. Some of them dont need help to be dishonest.

I posit that none of you have any daily experience with science, otherwise you'd appreciate that 95 percent of PhDs dare not stand up against the groupthink. You would also appreciate how much if clumate science is total garbage.

What an echo chamber. Thankfully, the political pressure to accept climate orthodoxy is currently waning.

And i give a damn about your downvotes, or your unqualified replies.

<comment><USER12> Well, I'll give you credit for pointing out I meant relative applied honesty.

An EE calculating a resistor for a circuit has a certain applied relative honesty such that either he's truthful about 2+2=4 and the circuit works or he lies and the 2+2=5 and the circuit doesn't work. That times 300 days/year time millions of engineers times centuries of progress equals our pretty freaking cool miracle of a modern world. Some individuals sometimes cheat when they play poker, or lie about politics, whatever.

On the other hand consider a line of work inherently relatively on average dishonest like marketing a dish soap via TV commercial method of marketing. No amount of extra lying will eventually construct Hoover Dam or land men on the moon.

</comment></comment></comment></comment><comment><USER14> People have been trained to be individual consumers of both products and information. They'll believe something so long as it's easy to fit in with their other opinions. There is very little way of me understanding climate change science myself, but I'm willing to believe climate scientists, but this is actually an act of faith, I can't independently confirm that climate change is caused by humans, just say that it's very likely.

My Dad is a little bit like Donald Trump in how he searches the Internet for things which support his already well held views; he thinks that climate change is a hoax. When I quote him this brilliant tweet from Scott Westerfeld:

"Plot idea: 97% of the world's scientists contrive an environmental crisis, but are exposed by a plucky band of billionaires & oil companies."

He just laughs and tell's me about fake news sites he's read as a counter point.

This is a great piece of research anyway; I love that people largely are willing to hedge their bets/beliefs and agree that investing in renewables is massively important, even though a lot of those people don't believe in climate change!

<comment><USER15> > There is very little way of me understanding climate change science myself, > but I'm willing to believe climate scientists, but this is actually an act > of faith, I can't independently confirm that climate change is caused by > humans, just say that it's very likely.

That's exactly how I feel. I tend to roll my eyes at people that deny global warming is happening, but I equally roll them at people that talk about it happening as if they've done the calculations themselves. It's refreshing to see this sort of humility on HN. Thanks.

<comment><USER16> I don't roll my eyes at people who tell me carrots are healthier than potato chips, even though I don't really understand nutrition or digestion. There's nothing wrong with trusting experts.

If you would like to have at least a conversant base of knowledge, read the IPCC report Summary for Policymakers[1]. People who _do_ know what they're talking about have done a great job summarizing the state of research, evidence, and probability of outcomes given different projection scenarios. It's not a particularly long or difficult read and you'll come out the other side far more informed than you were before.

[1] [http://www.ipcc.ch/pdf/assessment- report/ar5/wg1/WG1AR5_SPM_...](http://www.ipcc.ch/pdf/assessment- report/ar5/wg1/WG1AR5_SPM_FINAL.pdf)

<comment><USER17> > _I don 't roll my eyes at people who tell me carrots are healthier than > potato chips, even though I don't really understand nutrition or digestion. > There's nothing wrong with trusting experts._

Nutrition is a specially bad example. There are plenty of studies that are overhyped and make crazy claims about why some food is good or bad for you, but the are not reproducible, have a small sample number, barely reach p=0.05 using p hacking. And a few weeks later you can read a equally bad study with the opposing conclusions.

For example "I Fooled Millions Into Thinking Chocolate Helps Weight Loss. Here's How." [http://io9.gizmodo.com/i-fooled-millions-into-thinking- choco...](http://io9.gizmodo.com/i-fooled-millions-into-thinking-chocolate- helps-weight-1707251800) It's a bad study made on purpose, but the problem is that many studies have the same bad methodologies. Are eggs good for you? The food pyramid?

Nutrition is a good example of a field were you have a very complex system and you can´t make very controlled experiments, so it's very difficult to make reliable measurements.

<comment><USER18> That's _exactly_ the same excuse people use to do nothing for climate change: "it's too complex and there are conflicting opinions, so let's do nothing or not enough"

The dietary variant of this is: "nutrition is too complex, so I'm going to remain fat and do nothing for my health, except maybe get a diet soda once in a while"

This is the most toxic anti-fact position possible and needs to be stomped out with intensity every time it appears. It's the intellectual equivalent of cupping your ears and sticking your head in the sand.

</comment></comment></comment></comment></comment><comment><USER19> Interesting to note in this map, the people generally more concerned about climate change are in several types of places:

1) Near coasts. The traditional boring stereotype about the coasts having higher levels of education overall.

The point to notice here is that a some people will see this map, see that obvious fact, and then stop thinking. For example one commenter here said:

>Areas of widespread (70-90%) concern are limited to the west and northeast coasts.

"Limited to." Quite a brushoff. But some of the other hotspots are interesting too:

2) Near mountains. The Rocky Mountains stand out in particular. Because of steep altitude changes, people who live there get exposed in their daily life to many different microclimates in the short span of a few miles as they travel around their locality -- if not by actually changing altitude as they move around, then at least by being able to see from a distance things like the changing leaf colors in the fall, having it essentially in their face what changes are happening and when, each year. Some of these areas have also seen an influx of new pests damaging tree populations in a highly noticable manner, which are suspected to be related to changing temperatures.

3) Near rivers. See the Mississippi for example. I take it the impact of changing water flow patterns raises awareness in nearby communities.

4) For different reasons, North and South Dakota. I would guess the opinions there are influenced by the fact that the states have heavy involvement in energy-related mining activities starting with coal but also with shale and fracking, as well as alternative energy activities like wind power.

<comment><USER20> The hotspots in the Dakotas are slightly correlated to Native American populations from what I can see.

</comment></comment><comment><USER21> Slightly concerning to see so much skepticism. I do wonder if it's a personal choice. By being in denial you do not have to make any changes to the way you live.

Locally they wanted to increase recycling. The answer is to provide offical small bins (140l) that are collected only every two weeks, but collect recycling waste weekly. We've gone beyond the carrot and are now using the stick because many people simply do not want to change.

<comment><USER22> Climate skepticism is Anglo-Saxon phenomenon. Political lobbying seems to be big part of the phenomenon.

Poles Apart - The international reporting of climate scepticism [http://reutersinstitute.politics.ox.ac.uk/publication/poles-...](http://reutersinstitute.politics.ox.ac.uk/publication/poles- apart)

>It concludes that climate scepticism is largely an Anglo-Saxon phenomenon, found most frequently in the US and British newspapers, and explores the reasons why this is so.

<comment><USER23> Thank you for posting this. A international comparison was what I was hoping to see when I clicked on this article.

</comment></comment></comment><comment><USER24> How is it that everyone (82% Nationally) seems to agree that the most critical step forward (Funding Research in Renewable Energy) is a good thing BUT we spend all of our time arguing about whether or not global warming is happening??

This reminds me of a failing, early-stage start up. Rather than just getting to the grind and finding a way to make money, it is so easy to just spend time dreaming and argue about the way forward and spending your time ignoring complaining customers while I'm sitting around pondering how to change the world.

<comment><USER12> I like your idea of startup analogy.

I'd propose its more like you have two partners who hate each other viciously and spend all their time scheming for their dominance and submission of the other. Meanwhile there's programmers trying to ship a MVP. Now as long as the partners verbally argue constantly, they can't screw up what the programmers are trying to do. But if one partner gains total supremacy then they'll need something to do all day, someone to verbally spar with, like maybe the programmers. As long as they argue loudly progress can be made, but once the micromanagement boom falls, all progress will cease, in fact retrograde progress will begin regardless of who "wins".

</comment></comment><comment><USER25> Incredible... the most eye-opening difference was the majority of Americans believe global warming will harm people in the US, but very few people believe it will harm them personally. And this isn't limited to west/northeast coasts-- it covers the entire country. What would cause people to think GW will harm others but not themselves?

<comment><USER12> To be extremely blunt, yet honest, poverty harms a lot of Americans but its not going to harm my socioeconomic group very much. Ditto heroin, meth... Its an admission of the death of class mobility. Most people will never be economically mobile enough to hang with me and it would be virtually impossible with my social support net to fall into extreme poverty. It could happen. Due to lack of social mobility its very unlikely however.

You can either model the effects of climate change as a parallel argument or merely a cloaked poverty argument. A parallel argument is Hurricane Katrina only hurt people on the south coast but the entire country saw Americans being hurt. The cloaked poverty argument is me and my descendants are in a socioeconomic group that was mildly inconvenienced by the hurricane whereas poor people, and we'll never be members of that group, literally died on TV. Either way Hurricane Katrina is a great example of people being harmed in the USA that could never in a geographic or socioeconomic sense hurt me and my family, or frankly anyone I work with or hang out with.

<comment><USER20> Unfortunate but true. There's a large amount of people (especially in this country), who feel that way. When they hear in policy discussions "X will harm people", they automatically translate to "X will harm people that can't afford to do Y". When a person's _entire_ social group can afford Y, then its really hard to make them see the need for that policy.

It's not a lack of compassion, it's a lack of visibility.

</comment></comment></comment><comment><USER26> US county maps always overemphasise land area over people. You can fit millions of people in a pixel, but on this map they will be barely noticeable.

</comment><comment><USER27> I've always wanted to see a good site with the most habitable locations once global warming is taken into effect.

Seems a bit late to wait to become a climate migrant. So, which is the best place to move to (in Europe)?

I'm actually kinda surprised capitalists aren't investing in large tracts of land.

<comment><USER28> The general rule of thumb is the farther north the better, although you probably want to be south of melting permafrost. Europe is in for a rough ride, as it will be faced with hundreds of millions if not billions of refugees from Africa, the Middle East, and southern Asia in the not-that- distant future.

So, Alaska, northern Canada, or New Zealand if you can afford to buy citizenship.

</comment></comment><comment><USER29> I wish there was more discussion of the core reason for Climate change - <USER2> massive population explosion.

The world population has doubled in the last 30 years.

Instead, we argue over the symptoms, spend billions on things that won't make any difference, rather than understanding the cause.

<comment><USER30> Population growth is leveling off. Short of going out and murdering a hell of a lot of people, there isn't much more that can be done on that front.

</comment></comment><comment><USER31> Interesting data! I do wonder how this would compare to other countries.

</comment><comment><USER32> What kind of software/stack was used to make such a kind of visualization? Any good tutorials, courses or books that can be recommended?

<comment><USER33> It's D3 according to the source file; the type of map is called a 'choropleth'. Here is a tutorial that might be useful. (I haven't done this specific one but I've made similar stuff before.) [http://www.cartographicperspectives.org/index.php/journal/ar...](http://www.cartographicperspectives.org/index.php/journal/article/view/cp78-sack- et-al/1359)

<comment><USER32> Thank you!

</comment></comment></comment><comment><USER34> Many times survey does not matter (that much). People will say they are concerned, but their action may reflect they do not really care at all.

Are people at east and west coast really concerned about global warming? Let's don't simply ask them, but check their action instead. Are they selling beach houses? Are we seeing price dropping in beach houses?

</comment><comment><USER35> I have said this in the past (to climate scientists as well as others) and I'll say it again. Check the energy equations for the climate science predictions. It is easy enough to do, especially if you have a calculator or spreadsheet.

The interesting thing is that the required energy for the predictions is the bugbear and it cannot simply be gotten around. Even the analysis papers that look at the last 50 odd years show a major discrepancy between the energy required and the climate science predictions.

This leads me to believe that the climate science models in use are very problematic (that is screwed badly).

It is also interesting to note that every technology that is posited to be used to replace the current coal based or nuclear based has a high pollution index for the creation of the base elements for these technologies - this is something that is not discussed.

There is also some very interesting biological research that strongly indicates a higher ecological benefit for increased CO2 levels (up to 1000 to 1500 ppm from the current levels) including increased plant growth and lower water usage.

A recent study also indicates that in greenhouse environments, increased CO2 levels has a higher energy transference, that is the greenhouse environment get colder quicker.

So what do we get from all this, as individuals, we can do some investigation into the reasonableness of the climate science predictions and we can come to our own conclusions as to whether or not climate science is sound science. We don't actually have to take the word of either side, we can check the veracity of both sides.

My own investigations have lead me to believe that climate scientists have less an idea of what is causing climate change that do people who have observed the world for 60, 70 or 80 years.

When the models give credible predictions for short, medium and longer term periods then we can start to give credence to what climate scientists might say.

Does waiting for this increase credibility mean we do nothing now. No. We have various infrastructure problems now that need to be solved, some environmental, some energy related, some populations related, etc. Unfortunately, even though there are positive things we can do to mitigate specific problems in the infrastructure realm, the political situation will ensure that these are not done.

Even though the rightists have some good ideas, the leftists will object. Even though the leftists have some good ideas the rightists will object. Any ideas from the middle-of-the-roadists will get shot down by both sides.

So it is up to each of us as individuals to make changes that positively effect our surrounding situations.

<comment><USER36> Can you elaborate on what you mean by "Check the energy equations for the climate science predictions"?

</comment></comment><comment><USER37> Do you have children?</comment>


Ask HN: Is there any one book or resource on search engine development & theory? - <AUTHOR>

I'm working on a search engine for a web application I am developing and realized I really didn't know that much about making search engines. I've taken a bit of AI & Expert Systems in school but never really run into any books specifically on developing search engines. Do any such books exist? If so, recommendations? <comment><USER2> Gred Linden likes Introduction to Information Retrieval: [http://www- csli.stanford.edu/~hinrich/information-retrieval-...](http://www- csli.stanford.edu/~hinrich/information-retrieval-book.html) (free online).

</comment><comment><USER3> This article gives a wonderful overview of the challenges:

"Why Writing Your Own Search Engine Is Hard" <http://queue.acm.org/detail.cfm?id=988407>

(site is down currently.) google cache: [http://220.127.116.11/search?q=cache:13tlOSQwtjAJ:queue.acm.o...](http://126.96.36.199/search?q=cache:13tlOSQwtjAJ:queue.acm.org/detail.cfm%3Fid%3D988407+writing+a+search+engine+is+hard&cd=1&hl=en&ct=clnk&client=safari)

</comment><comment><USER4> There are some ACM/IEEE journals that have relevant papers, but you have to ask yourself: is reinventing the wheel what you really want to be doing? Given that there are lots of available COTS solutions, shouldn't you be focusing on things that are unique to your app?

(Needless to say, if the search engine needs _are_ unique to your app, and a COTS solution isn't viable, you might want to bring in someone with relevant expertise.)

<comment><USER5> spot on. OP: Are you asking how basic tf-idf works, or is there something you can't get lucene / SOLR / sphinx / tsearch to do easily?

nevertheless, here are some good background materials (search amazon on "data mining"

<http://www.amazon.com/gp/product/1584504609>

[http://www.amazon.com/Data-Mining-Practical-Techniques- Manag...](http://www.amazon.com/Data-Mining-Practical-Techniques- Management/dp/0120884070/ref=pd_sim_b_8)

Also the Collective intelligence by Satnam alag is quite good (a lot of java code to wade through tho

<comment><AUTHOR> To be honest I hadn't even heard of tf-idf before you mentioned it. It is definitely not the case I am stepping beyond the bounds of something like sphinx.

I basically want to lay a bit of foundation before I start mucking around with something I have no idea about.

I have a couple e-books on Data Mining but I didn't think it was applicable. Are Data Mining and Search two things closely intertwined?</comment></comment></comment>


Your code should be taken out back, lined up against a wall, and machine-gunned - <AUTHOR> http://www.cygwin.com/ml/cygwin/2005-08/msg00520.html

<comment><USER2> There's a great story about a heckler at a Windows NT conference:

MS speaker: and we've got POSIX, and we've got POSIX ACLs, and we've got a Unix Subsystem and we've got Korn Shell, and it works just the same way as under Unix.

Heckler: NO IT DOESN'T

MS speaker: er, ok. It does work. Anyway...

Heckler: NO IT DOESN'T WORK

MS speaker: What doesn't work?

Heckler: (rattles off differences in behavior and brokenness of ksh on NT)

MS speaker: we'll we've had our top guys working on this ...

Heckler: I'M DAVID KORN.

 _Room erupts in laughter._

Update: source: <http://slashdot.org/articles/01/02/06/2030205.shtml>. See question 5.

<comment><USER3> we realllly need people like that at political speeches

</comment></comment><comment><USER4> While I always enjoy a good rant, I don't see why it had to be so vicious and insulting. Yeah, the guy's clearly pretty confused (if he wanted to do these kind of tricks, I'd try to use setjmp, fiddle with the structure, then longjmp to it), but there's no reason to be mean about it.

<comment><USER5> I think it's because his indignant demand of the Cygwin team to fix this "bug" and make it work for him. Basically it's the attitude that I know my way is the right way, now fix the platform so that my program runs.

<comment><USER4> I don't see any demands in the original mail:

<http://www.cygwin.com/ml/cygwin/2005-08/msg00504.html>

He questions whether it "should be fixed" in Cygwin, a perfectly reasonable request, and he fully admits that he isn't sure whether it's a problem in Cygwin or not.

<comment><USER5> "Should be fixed" is a passive aggressive way to demand it to be fixed.

His reference to Linus doing the same thing in kernel (not) sounds very much like a smack response.

Also he claims he knows what he's doing since he has done the same thing in DOS so when it's clear that he has no clue of what's going on just irrates people.

<comment><USER6> Instead of trying to walk "indignant demand" back to "passive aggressive way to demand" inch by inch, just concede that all the guy did was ask a question and make a case for why he thought Cygwin's behavior was broken. Nobody's saying Cygwin has to agree with him, but you've simply mischaracterized the start of the thread.

My interpretation is that Korn was trying to be funny (and he succeeded), but as usual the peanut gallery ruined the joke.

</comment></comment></comment></comment></comment><comment><USER7> Best part is in the follow-up discussion:

      > Do you actually realise that not all computer languages can
      > be implemented with a model of one stack?
      >

      Do you actually realize that there are far better ways to implement stacks
      for interpreters than dinking with esp?  Ways that actually have a chance of
      working?  I suggest you investigate those alternatives instead of trying to
      do something that cannot work, and then getting all pissy when people try to
      dissuade you from wasting your time.

      And don't make me break out my Turing Machine on you about that statement of
      yours.

<comment><USER6> Strong disagree. Korn's response is at least funny. The rest of the responses are petulant, somewhat ill-informed, and orthodoxical. The argument over whether C does or doesn't have a runtime is particularly tedious. You get the impression that these people would all be very, very upset at the Detours paper, except that Detours works so well they'd know a priori they'd lose the argumet.

The original commenter --- despite his very fragile code --- is right: for what he wants to do, he needs to create temporary stacks. What he doesn't have is a mechanism to allocate and swap in and out of those stacks (he's hoping that switching stacks is a 2-liner that just relies on knowing the inline asm incantation for changing ESP).

Regardless, it is a uniquely and flagrantly _bad_ way to educate (both the questioner and the world who's reading the thread) to start from the premise that "you're not ready to build the thing you want to build" --- at least when "the thing" we're talking about is systems code. 90% of C programmers are not "ready" to build production C code that will get deployed in hostile environments, and as a result, in every web project we ever do, we have to embark on a tedious inventory of all the 3rd party stuff our clients use to find the horrible C ZIP library they accidentally included. No C coder is blameless.

Unless I missed a whole leg of this thread (the part where they explained temp stacks and stack switching to this guy, who, in challenging the notion that C has a real runtime or the notion that the OS should [heh] be controlling ESP, is demonstrating more on-the-ground systems programming knowhow than several of the commenters), I think this is a remarkably douchey example of a programming help thread.

<comment><USER5> Why don't you show us a working version of the code instead of spewing endless argument?

<comment><USER6> Because, as you've demonstrated amply downthread, the people making the most noise about how incompetent the original poster was for asking this question about Cygwin are the ones least qualified to have an opinion about this stuff, and are actually making Dave Korn (who was at least funny and who clearly does know what he's talking about) look worse.

But if you know how to use The Google, you can actually find code of mine that does this. I doubt very highly you can say the same thing.

<comment><USER5> Really I don't know you before this thread. I did what you asked and googled "thomas ptacek" and here are some of the result on the first page.

I'd Like Thomas Ptacek To Apologize Please <http://www.zedshaw.com/blog/2010-01-12.html>

Welcome to Thomas J Ptacek Furniture <http://www.thomasjptacek.com/>

Security Idiot: Thomas Ptacek: Too Quick By Far! [http://www.securityidiot.com/2008/07/thomas-ptacek-too- quick...](http://www.securityidiot.com/2008/07/thomas-ptacek-too-quick-by- far.html)

Are those yours?

<comment><USER8> This is hilarious.

</comment></comment></comment></comment></comment></comment><comment><USER9>
      Then the bleeding corpse should be hung, drawn and quartered.

      Then burnt.

      Then the smouldering rubble should be jumped up and down on.

      By a hippo.

By a hippo....

<comment><USER10> It is a natural choice. 3,600 lb is more than the weight of any human in the world, and elephants can't jump.

<comment><USER11> Well, you'd at least hope so.

</comment></comment></comment><comment><USER12> I for one would pay good money to get a response like this.

He points out the errors,the incorrect assumptions and offers pointers of what to do. The general standard of discourse on most mailing lists tend to be quite a bit lower than this.

</comment><comment><USER13> Or, the code could be released under the CRAPL:

<http://matt.might.net/articles/crapl/>

</comment><comment><USER14> I'm a little bit slow with the low level stuff. Could someone explain what's so horrific about this code?

<comment><USER5> For one thing, he's using assembly of one type of machine and expects it to work on different type of machine. He confuses Linux as a machine abstraction and demands that Cygwin running on Windows to be the same.

For the low level mess, he sets the stack frame pointer to a uninitialized heap-allocated buffer which contains God-know-what garbage. When main() returns, it pops its return address from the stack frame pointer, which contains garbage and crashes. The printf() might sometime work depending on how the compiler emits code to set up the stack frame.

It just shows how dangerous some ignorant programmers can be.

<comment><USER15> Uh, actually, his original program (<http://www.cygwin.com/ml/cygwin/2005-08/msg00542.html>) did restore the stack pointer before returning from main. He "wanted to cut [the example's size] down for the sake of the mailing list", so he left that bit out.

<comment><USER16> Still a terrible thing to do. I think it's possible just calling printf() itself could do wacky things if printf is depending on the stack being set up a certain way by the C runtime startup code prior to main.

But the real issue is that what he's doing is completely unnecessary, because you could manage multiple stacks yourself using ordinary C data structures and ordinary C code. Evidently he thinks he's gaining some kind of speed advantage by doing things this way, but the risk is very high versus the gain. This kind of optimization may have worked OK on a DOS machine, but it's neither safe nor obviously faster to do things like this on a modern CPU and OS.

<comment><USER17> Well, doing terrible things is sometimes necessary to perform magic or to get a better understanding about how things work. From the less flamey parts of the discussion, I gather his ideas weren't all that unsound, just extremely hard to pull off.

<comment><USER18> Generally speaking if you have to do terrible things then you need to _a:_ know exactly what you are doing before hand and _b:_ have the fortitude to be able to withstand harsh criticism until you can prove your code.

In this case I think the harsh criticism was fully justified. People should be warned away from doing this sort of thing, precisely because it's hard to get right. As the thread makes abundantly clear the original programmer was fairly clueless, otherwise he wouldn't have gone off half-cocked thinking that the fault was with cygwin or somesuch. He was making his own dynamite and was too clueless to realize what he was doing wrong.

<comment><USER17> I don't agree: we have no reason to doubt his claim that he wrote a task switcher for DOS. That means he's reasonably clueful. It's easy to dismiss someone as a complete loony, because he's wrong/confused about some things and is getting burned to the ground for that. Remove the flaming and there is criticism and the pointing out of mistakes, but nothing to indicate the guy has no clue whatsoever. If that were the case, it would be hard to even being criticising the idea. The fact that people could succinctly point out the problems means the ideas were stated in reasonably clear language.

</comment></comment></comment></comment></comment></comment></comment><comment><USER19> Why was he complaining about the stack pointer first? Isn't this line:

st1 = (void *)malloc(5000) + 5000;

completely invalid too? You can't (I think it's undefined) increment a void pointer.

<comment><USER6> It may be undefined, but gcc accepts it without warning under -Wall and does exactly what you'd expect. Note that (a) casting malloc's return is evil, (b) casting malloc to void* is silly since it's declared returning void* already, and (c) casting malloc to void* so it can be received as a char* is also pretty goofy.

<comment><USER20> This might be a stupid question, but what are you meant to do if not cast malloc's return?

My C is a bit rusty, but how else are you meant to allocate data of different types on the heap?

<comment><USER21> C allows implict casting of void* to any other kind of pointer. Hence, you never need to cast the return from a malloc if you're storing it in a pointer.

C++, however, does not allow this. So, if for some reason you're calling malloc rather than new in C++, you need to cast.

<comment><USER22> You are not the poster who said "casting malloc's return is evil", so perhaps you don't agree with that statement, but I don't see how either of the points you make lead to the conclusion that it is "evil". You say that since void* is implicitly cast to all pointer types, you never need to explicitly cast it, but why would that make an explicit cast evil?

<comment><USER23> An explicit cast of the result of malloc() can mask an error when you haven't included its proper definition in stdlib.h.

</comment></comment></comment></comment></comment></comment><comment><USER24> Is that the same Dave Korn that did Korn Shell?

<comment><USER17> In case you haven't gathered from other responses in this thread or are only reading this in your 'threads' view: yes.

<comment><USER25> Er, no he isn't.

(The older David Korn actually wrote a sort-of-competitor to Cygwin, called UWIN.)

<comment><USER17> Oops, sorry, I took the top comment at face value :(

</comment></comment></comment></comment><comment><USER26> Recruiting tip: don't hire someone who is able to answer this way to someone, no matter how skilled.</comment>


Show HN: Umedoc – Find, visit and keep the perfect doctor for you - <AUTHOR> https://umedoc.com/

<comment><USER2> Ahh...so as soon as we posted it seems like the site stopped loading and now it's acting strange. We're scaling it up now so the link should work in just a few minutes! Oops. Well, thanks for showing us there's something we need to fix, everyone! ^_^'

</comment><comment><USER2> Hello, I'm one of the founders of Umedoc. Just wanted to say thanks for taking a look - it's only our MVP - we literally launched just now so we'd appreciate all feedback on things that are broken and things we could do better!

</comment><comment><USER3> Hi, I'm from Umedoc. After a very painful afternoon, we have everything up and running again. Apologies to everyone who tried to access the site while "broke". We'll try not to do it again ;) .

</comment><comment><AUTHOR> Hmm, looks like it might not have been us after all: AWS Service Status: US West (N. California): [RESOLVED] Increased Launch Error Rates

</comment><comment><AUTHOR> Ok, it looks like there's enough server instances now, yay for aws elastic beanstalk :-) Sorry about that...</comment>


Using event capturing to improve Basecamp page load times - <AUTHOR> http://37signals.com/svn/posts/3137-using-event-capturing-to-improve-basecamp-page-load-times

<comment><USER3> That was a very well written and engaging article. most programming articles concentrate on the programming logic only, but i liked this article because it included the business case and explained the reasoning. Although i didnt quite understand what's going on with the code itself, i still found it an interesting read.

<comment><USER4> Thanks, I really appreciate it!

</comment></comment><comment><USER5> The _last_ paragraph that should be on _top_ :

"If you're looking to speed up page load times in your own projects, _start by profiling_. Then identify the hotspots and defer them until the furthest point of intent — where you know the user is about to perform the action you need to set up."

<comment><USER6> It's too bad that the article did not measure how long it takes for the action to fire when the user does perform the action after refactoring.

I would think that it's a bad user experience to experience a big pause right when they want to do something. Sure the page loads faster but a noticeable pause after a click would be tremendously annoying and contribute to the "laggy" feel.

<comment><USER4> At that point it's much more about feel than a hard time measurement.

After implementing deferred initialization I asked myself "does reordering feel laggy?" and the answer was no. If it had felt laggy then I'd have started profiling again.

<comment><USER7> Excellent article. Do you mind going into what tools/techniques you used to do the profiling?

<comment><USER4> Sure thing.

For high-level measurements I use good old "new Date().getTime()". One call before, one call after, subtract the former from the latter and log it to the console.

When I want to dig deeper, I go to the WebKit Inspector's Profile tab. You can turn it on or off through the UI, or use console.profile()/console.profileEnd() in your code to control it programmatically.

<comment><USER8> >For high-level measurements I use good old "new Date().getTime()". One call before, one call after, subtract the former from the latter and log it to the console.

Why not use `console.time` and `console.timeEnd` for that? They probably have the same resolution as the underlying date object and they're significantly less of a hassle.

<comment><USER4> Because I didn't know about it :) Great tip!

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> Instead of using capturing you could also just trigger another mousedown event which will be seen by the sortable plugin. This has the advantage of working even in old IEs.

Be mindful though that by deferring the setup of the sortable list until the mouse action, you will introduce UI lag to the user. Sure: The page might load a bit faster, but now users clicking on the sortable elements will have to wait longer for their click to register.

As an aside, it's ironic that as usual, the browsers which would profit the most from these kinds of speed optimizations don't support them to begin with.

It's also always the slowest browsers that require the polyfills with the worst performance characteristics.

</comment><comment><USER10> Why don't you just load it after the page has loaded and is displayed to the user. Then they can scan the page and read while you're loading the sortable and other functions.

</comment><comment><USER11> That was a really great explanation on how capturing works. I've just always used bubbling. But wouldn't it be easier to just setTimeout for maybe 1.5 seconds? Or perhaps split your page load into two parts: Essential core stuff, then once that's done it signals to start the second, less critical part, which would include things like .sortable()?

</comment><comment><USER12> > document.addEventListener

Have a feeling you're going to regret that.

</comment><comment><USER13> "New basecamp requires IE9 or higher." They just lost a sale with that.

Finally made the decision to use redmine(<http://www.redmine.org/>) instead.

<comment><USER14> If they are saying IE9+ _only_ then that is a rather daft decision both technically and commercially.

If they are meaning "something not from the stone age" (i.e. you need FF3.5+, Chrome or Opera of similar lineage, or IE9+) then I can understand not supporting IE8 or less. Increasingly people are deciding that it simply isn't cost effective to continue to support IE8 and its elder kin, the few lost sales that result being worth less than the cost in time and other resources committed to testing those environments (i.e. people are taking the opinion that someone using IE8 is a _cost_ not a _customer_ ).

It is a decision that should not be taken lightly of course. I _wish_ I could refuse to support IE6 and IE8 but our clients are large banks who really are stuck in the stone age in that regard. I assume that they fully considered the pros and cons of telling IE6/7/8 users to get stuffed before taking that path.

If you are stuck on IE8 or less then you have no choice but to vote with your wallet. If enough people do the same then they were wrong in their assessment and will have to reconsider. Given the target market, as I understand it, though: I don't think they are likely to be wrong.

<comment><USER4> Of course we support browsers other than Internet Explorer.

Here's the full list of supported browsers: <https://basecamp.com/browsers>

And way to miss the forest for the trees, guys—this article isn't about IE at all. I've come to expect no less from the Hacker News crowd these days.

<comment><USER13> Well, it did have a whole IE support paragraph... so it is about IE8 somewhat. I have been looking at basecamp over the last few days too. So for me, this was the most relevant part of the article. Unfortunately some customers still use IE8 (and even 7), so it would be silly of me to force a tool on them they can't use.

Back onto the main topic...

In my experience IE8 is the most important one to profile and speed up - <USER2> it is quite slower than other modern browsers. Spending time in the IE developer tools profiling can give some pretty good gains.

Moving expensive code into click handlers can have the drawback of making the user Touch Points, or where the user is doing interactivity slower. This is where users can often notice the slow down. But I'm guessing you managed to make it take less time than 200ms, and it's probably a little touched item anyway, so probably still worth it. The alternative is to spread the computation after load, so the user might not even notice it happen. Or if you're modifying the DOM, why not just do it before you send it to the user - and send them html which doesn't need a lot of javascript manipulation done.

It also brings up the point of testing and profiling. I noticed there was a bug report in your blog comments. It's really helpful to have tests before you start doing profiling, and especially once you have made your changes. Tools like speed.pypy.org are really nice for tracking performance regressions too. So, when a developer adds some new JS functionality into your app in 4 weeks time, you can see when the performance regression was added.

cya</comment></comment></comment></comment>