Ask HN: Good blogs for junior developers? - <AUTHOR> Hey HN,
I am looking for interesting content aimed at junior software developers. I am thinking about, career advice, sharing experience, professional tips, education guidance. Not exactly tutorials and courses.
I am a junior developer myself, but I also started to blog about my experience (rodrigohgpontes.github.io). It would be great to exchange some ideas with people in the same space. I just couldn't find any.
thanks! <comment><USER2> Self-promotion: I started a blog to talk about all the skills that aren't "how to code a thing in language X" or "how to use framework Y". Things like productivity skills, conceptual skills, career advice and the like, that experienced engineers often take for granted and are harder to explain.

You can find it at [https://codewithoutrules.com](https://codewithoutrules.com)

<comment><AUTHOR> Awesome! A lot of content! And judging by the post titles, a lot of interesting stuff!</comment></comment>


Startup idea: Basic Income, how to make this happen? - <AUTHOR> The idea of an universal basic income is surfacing here and there. Having lost almost half my life (I'm 40) to useless grind work, I'm determined to change the way things work.
This is a series of serious discussions I'm starting, with the explicit purpose of making BI a reality within our lifetime. Very likely this won't be possible here and we'll have to create our own community (I'm quite certain this very post will get mercilessly deleted).
Anyways, please state your ideas about how and why to make this happen.
My line of thought:
1) Basic income will still require work (energy input). 2) Stop wasting our lifes to the 12-hours industrial grind. 8 hours work + 1 hour lunch + 3 hours commute due to crowding in job-offering cities = 12 hours slavery, we never quite broken free from it. I think we need an upper limit of 5 hours + 1 hour lunch, afterwards we can claim our lifes back. Creative people would get the freedom to change the world, right now our entire energy is sucked into a black hole of helplessness and hopelessness. 3) The politicians won't do it for us. We have to do it ourselves. We have to create a company which functions under the rules of the basic income, in concrete terms this means: WE HAVE TO CONTRIBUTE WITH MONEY, AS FOUNDERS, IN A MASSIVE CROWDFUNDING CAMPAIGN. The beneficiaries will be not just us but the entire world, and we must prevent our honest attempt from being hijacked and turned into the same feudal authoritarianism that runs the companies of today.
OK, assuming I'm not getting deleted, please state your input and let's make a plan. <comment><USER2> Good luck and please keep us posted how the money burning goes. lol</comment>


This is Rikers: From the people who live and work there - <AUTHOR> https://www.themarshallproject.org/2015/06/28/this-is-rikers

<comment><USER2> This is a really good article, and balances the viewpoints of both inmates and corrections officers. I encourage y'all to read the whole thing and not just skim.

I think the prison system is ripe for a disrupt, but it makes so much money for so many people and the American view of justice is (in my opinion) so incredibly warped towards punishment I don't see how anything can change.

</comment><comment><USER3> > The end of solitary confinement for 16- to 17-year-olds, in particular, they > say, has resulted in more violence, since they've lost the biggest > consequences for misbehavior.

I don't sympathize. So what if the guards found their job easier when they could employ this method of psychological and physical torture (via neglect)?

> And both inmates and officers think that a new generation of COs, many of > whom have taken a substantial number of college courses, is less street- > smart and thus less equipped to deal with the brutal realities of the job, > and therefore more likely to clash with inmates.

What an awfully polite way to say they don't want none of that book learnin round those parts. This isn't the first time I've heard this view expressed. A New York appeals Court actually upheld the legality of only hiring people with low IQs as cops. [http://abcnews.go.com/US/court-oks-barring-high-iqs- cops/sto...](http://abcnews.go.com/US/court-oks-barring-high-iqs- cops/story?id=95836)

Were I a cop, knowing that I only had my job because I failed an IQ test would be a blow to my pride.

</comment><comment><USER4> I really like this article, if only because it mentions real and concrete consequences that have come to the people at fault, like Corizon, the medical provider, being fired.</comment>


Killer tips to setup the new Facebook Timeline pages - <AUTHOR> http://blog.fanchimp.com/killer-tips-setup-the-new-facebook-timeline-pages/

<comment><USER2> Take care of your new Facebook page. Be creative and be clear.

</comment><comment><AUTHOR> What are other important advices?</comment>


Request and upvote ideas for free online learning courses - <AUTHOR> https://sagefy.org/suggest <comment><AUTHOR> Suggest Subjects – by Sagefy

Can't find a free online learning experience for what you want to learn? Request and upvote here! No sign-up or log-in required.

[https://sagefy.org/suggest](https://sagefy.org/suggest)

You can also post here if you're thinking about building a new online learning experience... see if there's interest.</comment>


Charting the Final Frontier--Google Maps for Indoors - <AUTHOR> http://www.smartertechnology.com/c/a/Technology-For-Change/Charting-the-Final-FrontierGoogle-Maps-for-Indoors/

<comment><USER2> I've often thought of doing a startup to provide maps of all malls, shopping centers, and big box stores in the US. Imagine how much easier it would be to find things in Home Depot for example.

And think of all of the augmented reality potential? And you could recommend things to people based on what aisle they're in. The possibilities are endless really.

Anyone want to join me? I'll do all the programming. I just need someone to call up all these places and get floor plans...</comment>


Why Apple doesn't sell televisions - <AUTHOR> http://www.cringely.com/2016/02/10/why-apple-doesnt-sell-televisions/ <comment><USER2> The title doesn't do the article justice. It's broader than that. Cringely proposes that Apple buy Dolby Labs as a way to spur adoption of HDR television, and to control the associated IP.

I think it could be a good idea, because anything is better than Apple just sitting around with literally hundreds of billions of dollars in excess cash, probably earning 1% return on it. But OTOH it seems that Apple is where acquired companies go to die, to disappear into a cosmic void, never to be heard from again.</comment>


How Silicon Valley is trying to fix its diversity problem - <AUTHOR> http://www.pbs.org/newshour/bb/how-silicon-valley-is-trying-to-fix-its-diversity-problem/ <comment><USER2> According to companies in Silicon Valley, 60 percent of employees identify as white, 23 percent Asian, 8 percent Latino, and 7 percent black.

Compared to the Census Numbers; 77% White, 17% Hispanic, 13% Black, and 5% Asian.

It appears Silicon Valley is more diverse than the General Population by a lot.</comment>


Ask HN: Is it worth upgrading to macOS High Sierra? - <AUTHOR> <comment><USER2> Before this thread is sunk into oblivion; good question but please check your grammar. "Does it" -> "Is it". And I have a MBP and no I haven't upgraded. Haven't found any pressing reason to do so. I actually stall doing updates for like months since they take too long and I can't bother reopening all my chrome and mozilla windows. Probably I should but please don't hack me and don't tell my boss. He's one of the security-crazy-people.

<comment><AUTHOR> Thank you for your comment. I fixed the grammar. :)

</comment></comment><comment><USER3> Why would you give it any thought at all? The update button appeared, and just before dinner I clicked "update". Done.

<comment><USER4> Why bother upgrading? There's nearly nothing to gain but tons of pitfalls such as unexpected breaking changes.</comment></comment>


$7.5 Million: Wikipedia Reaches Fundraising Goal - <AUTHOR> http://www.readwriteweb.com/archives/75_million_wikipedia_reaches_fundraising_goal.php <comment><USER2> Article is incorrect. Wikipedia and associated sites costs around 5.6 million per year, not 10 million (Source: <http://wikimediafoundation.org/wiki/Finance_report>)</comment>


De-duplicating Hacker News - <AUTHOR> http://shishirprasad.com/de-duplicating-hacker-news/ <comment><USER2> De-duplicating might have a couple of downsides:

1) Not all good stories get taken up the first time.

2) Not everyone reads every story on HN.

After a couple of years of reading HN, I'm happy to see quality posts reappear. I often glean new insights each time. If it's interesting to enough people, it'll bubble up again. The beauty of HN's "gravity" is that anything that's universally boring will disappear quickly.

"Anything that gratifies one's intellectual curiosity" needn't mean, "Hasn't been posted ever before."

If, however, a de-duplicator could automatically provide references to all previous HN discussions on the same topic, that'd be very cool.

<comment><USER3> One place a tool like this would be useful is on submission. If I post a link and something comes up that says "HEY! This was last posted 2 days ago and got 300 upvotes and had 45 comments, here's the link.", that would discourage reposting when the poster didn't know the article had been posted before.

<comment><USER4> I thought it already did that.

<comment><USER3> Oh, maybe. I guess I've never submitted a link before to know that. Even still, if that algorithm can be improved, even slightly, it'd be better for curbing repeat posts.

</comment></comment></comment></comment><comment><USER5> > Compute pair-wise Jaccard similarity of all articles with each other and > output the articles whose title similarity is greater than 0.5.

If I understand correctly, it checks the similarity between titles. How effective it will be if it also checks similarities between the article contents? Sometimes, the article may not have similar looking titles, but talking about same thing.

Example: [0], [1], [2]

OT: You can use Python haxor to get articles from the HN [3]. Disclaimer: I wrote it.

[0] - [http://www.bloomberg.com/news/articles/2015-07-17/google- app...](http://www.bloomberg.com/news/articles/2015-07-17/google-appreciation- day-as-record-60-billion-is-added-to-stock)

[1] - [http://www.cnbc.com/2015/07/17/googles-one-day-rally-is- the-...](http://www.cnbc.com/2015/07/17/googles-one-day-rally-is-the-biggest- in-history.html)

[2] - [http://www.bbc.com/news/business-33572959](http://www.bbc.com/news/business-33572959)

[3] - [http://github.com/avinassh/haxor](http://github.com/avinassh/haxor)

</comment><comment><USER6> My understanding of the article is that this is more about reducing duplication on breaking stories rather than preventing periodic reposting of long tail and evergreen content. That is, the proposal appears focused on the "news" end of the spectrum rather than the "feature" end.

It's a reasonable request but one I tend to disagree with. Funneling all attention on one version of a breaking story reduces nuance and diversity of perspective. It also rewards fastest posting over finding the best content while taking the community out of the calculus of story value. Finally, to me the dispersion of karma awards across multiple submissions is a feature not a bug...karma should tend toward rewarding quality rather than timing where an explicit mechanism is in operation.

Finally, there are occasions where a story is deemed to merit the full attention of the community. The deaths of Steve Jobs and Dennis Ritchie are examples.

</comment><comment><USER7> I think this is a bad idea. Last week I posted a link here and by random chance no one saw it, and it didn't get any points.

A few days later the same story ended up at the top of /r/machinelearning. At least 10 different people tried to post it. They all ended up at my post which was days old and dead. If HN just allowed resubmissions, it probably would have ended up on the front page that day.

<comment><USER8> how do you know that?

<comment><USER7> Posts with >5 upvotes tend to go to the front page for at least a few minutes. More than that many people tried to repost it.

<comment><USER9> What was the post? I'd be curious to look into it, if you don't mind saying. (Edit: might be best to email email@example.com.)

<comment><USER7> It was [https://news.ycombinator.com/item?id=9856637](https://news.ycombinator.com/item?id=9856637)

<comment><USER9> Ok, there was another factor. When a site is the source of many stories marked lightweight, it eventually gets penalized as a lightweight site. We have software that does this, plus moderators do it.

This was the case here: that site has been the source of, not spam exactly (which is why it isn't banned), but a lot of unsubstantive and/or derivative articles. The post you submitted is an example of the latter, since it was derived from a Reddit thread.

The penalties I'm talking about don't make it impossible for a story to get traction, but they do set the bar higher. So you were right that it was randomness, but the randomness was also skewed.

</comment></comment></comment></comment></comment></comment><comment><USER10> Looks like the site's been hacked now.

</comment><comment><USER11> Interesting approach, a slightly simpler approach is to just take the MD5 hash of paragraphs. Two paragraphs with the same hash are likely identical, and two articles with 2 or more identical paragraphs are likely a dupe.

So as a suggestion try that algorithm with your current infrastructure and let us know how it compares to the Jaccard similarity test.

<comment><USER12> Some blog have standard end paragraph like "If you have read all of this, you may like to subscribe to my rss", or "We are always hiring at ABC, send your resume." Another problem are short captions that look like a paragraph for the html parser, like "Advertisment" or "XYZ Benchmark (higher is better)". One possible solution is to skip the paragraphs that have less than ¿150? letters.

<comment><USER11> I agree that it is quite reasonable to ignore paragraphs that are fewer than 3 sentences.

</comment></comment></comment><comment><USER13> Nice, but do remember that dang has asked people to resubmit some links. Which is an interesting variable of did the initial link actually gain traction before it sunk into obscurity with no adding of comments.

</comment><comment><USER14> Duplicate content is de-duplicated to an extent. Oftentimes, if I forget where the HN story that corresponds to a page I'm reading, I resubmit it, and HN redirects me to the HN story.

I believe this is time-boxed by a few weeks, which allows for things like "Something interest from the past (2008)" to get posted again.

</comment><comment><USER15> If duplicates bother you, this is a sure sign you're spending too much time on HN.

</comment><comment><USER16> The problems mentioned can get real. Other simple solutions could be:

\- Allow to merge threads using special comments. Once a comment with a merge request gets 'a lot' upvotes / more than the corresponding thread, it gets merged.

\- Add an 'also on HN'-block with all threads linked inside the comments.

\- Allow to create compositions in submit-function. This could also create a potential for meta-HN-content, e.g. 'links with great discussions'.

IMHO: HN is nice because it does not have a lot on functionality. It just works. Complicating things isn't a solution. It's human-driven in contrast to an automatic news aggregator and it should stay human-driven.

</comment><comment><USER17> I'd just hope that the duplicate threads are merged together so I can see all comments because comments can't be duplicated.

I appreciate members that are solving the duplicate problem manually by pasting the links to the same post. May be there can be "Report as duplicate" so that admin can merge them together.

</comment><comment><USER18> When it comes to changing things on HN, I think something like comment collapsing would be much more helpful than de-dup (as some of the other comments mention), though I know there are extensions that help out.

<comment><USER19> That is, apparently, eventually, on the way, as is a mobile-friendly layout.

The staff are probably not looking forward to the day they deploy it and half the users lose their minds with impotent rage because the shibboleth of awkward UX is no longer there to drive away the casuals. Heaven help us if they implement thread folding in javascript...

<comment><USER20> An optional [https://m.news.ycombinator.com/](https://m.news.ycombinator.com/) with bigger font, and bigger vote buttons with better separation between them, would allow them to test how many users want a different UI.

</comment></comment></comment><comment><USER21> one issue i see is not the dupes but is that its decently easy to self-vote from several "accounts" and "ips" to be on the FP for a little while.

the other one would be that due to the fast-paced news, only a few per day are really interesting - and you dont look every hour you might even miss it (which is either way not very productive)

</comment><comment><USER22> It ain't broke.

</comment><comment><USER23> url seems broke can you check

<comment><AUTHOR> Ya seems to have been hacked or something :(. Let me look into it !! The parent site works and you can read the article there : [http://shishirprasad.com/](http://shishirprasad.com/)

</comment></comment><comment><USER24> Why can you not just use the canonicalized URL to detect dupes? That is infinitely simpler than doing text analysis.

<comment><AUTHOR> It will work for simple cases like https vs http or other cases of URL normalization but won't work for complex cases where they refer to the same content but with different title.

<comment><USER25> I think it could work with the canonical tag[1], not the url itself.

[1] [http://googlewebmastercentral.blogspot.com.ar/2009/02/specif...](http://googlewebmastercentral.blogspot.com.ar/2009/02/specify- your-canonical.html)</comment></comment></comment>


Ask HN: What's a radical company more people should hear about - <AUTHOR> Pretty much as per the title what's a really amazing company that more people need to hear about, and why?
For me there are a couple that I find hugely impressive.
Buurtzorg [1] - a nurse-led model of holistic care that revolutionised community care in the Netherlands. Everlade [2] - Transparent pricing [3] on their garments Lemonade [4] - I don't know how to describe this other than revolutionising insurance for the 21st century.
What are the other business that are disrupting traditional business, either with their business model, or via a disruptive customer experience?
[1]https://www.buurtzorg.com/ [2]https://www.everlane.com/ [3]https://www.everlane.com/about [4]https://www.lemonade.com/ <comment><USER2> Semco [1] It is not a new company but they are still miles ahead when dealing with transparency, work-life-balance and many others well being attributes for its employees and future generation.

I would love to see and know more radical companies in terms of methodoligies and personal evolution as examples as well, not only tech.

[1] [https://www.ted.com/talks/ricardo_semler_how_to_run_a_compan...](https://www.ted.com/talks/ricardo_semler_how_to_run_a_company_with_almost_no_rules?language=en)

edit: clarification

<comment><USER3> Thanks for this post. You saved me the embarrassment of writing something like "that company that ran everything in a much more humane way and benefited for it that a friend told me about years ago but I forgot the name".

</comment></comment><comment><USER4> Shameless self-promotion here; but I think it meets your requirements.

Hexafarms ([https://hexafarms.com/](https://hexafarms.com/) )- an indoor farming startup which can match a throughput that will enable us to grow food in the urban pockets at an efficiecy between 10-200x (depending on what you're meauring).

The website is a bit flashy and not very detailed. Also it is only this month I'm gonna be working ~full time hours on it. Here's why it's radical:

* A empty single-floor 2000 sq. ft. space can produce ~200k KGs of produce. Hence also the idealization of distributed and small farms and not those 10-storey robot driven ones. * Possibility of growing 'crafted-produce', say low-sodium lettuce for diabetes, bitter and juicy lettuce for kids (apparently they like it), very high oil content mint plants so you get same amount of mint oil from half the weight. * All of this greatly affects (and positively) the current supply chain. * It's heavily data driven. And this is not just because it's cool. Think of it as openAI GPT, but for X produce.

<comment><USER5> Link that works: [https://hexafarms.com/](https://hexafarms.com/)

Do you have any images of how the setup would look? Also:

> A empty single-floor 2000 sq. ft. space can produce ~200k KGs of produce.

Per which unit of time?

<comment><USER4> Thanks for fixing the link. That's another little known thing- an average field (max) produces three harvests of lettuce. I don't have actual data, but based on my experimentations I think a realization of 13-20 harvests is possible; actually there's literature on this as well. How exactly? Just a basic application of the queuing theory. A lettuce needs to sit in the main hole for max 20 days. Before that, within the same 2k sq. ft. that I mentioned, keep it in separate 'incubator'space which will take much less volume.

In the coming weeks I'll add pictures too.

</comment></comment></comment><comment><USER6> TypingDNA [1] recognises people by the way they type, and provides typing biometrics (aka keystroke dynamics) as a service via an API. This is currently used for Multi-Factor Authentication in industries like Banking and Education [2].

Don't take my word for granted, see it with your own eyes and even try it with a friend (can somebody else replicate your typing pattern?) [3]

There are free accounts provided to developers, so you can easily call the API yourself [4]

[1] [https://www.typingdna.com/](https://www.typingdna.com/) [2] [https://www.typingdna.com/authentication- api.html](https://www.typingdna.com/authentication-api.html) [3] [https://www.typingdna.com/demo-sametext.html](https://www.typingdna.com/demo- sametext.html) [4] [https://www.typingdna.com/clients/signup](https://www.typingdna.com/clients/signup)

<comment><USER7> Google's CAPTCHA also captures keyboard biometrics; [https://www.businessinsider.com.au/google-no-captcha- adtruth...](https://www.businessinsider.com.au/google-no-captcha-adtruth- privacy-research-2015-2)

<comment><USER6> Thank you for sharing this, very interesting! Although a bit old (2015), the article raises some questions on privacy & transparency, which are more important than ever (eg: the increasing legislation like GDPR, CCPA).

Luckily, the TypingDNA solution is secure and compliant, in accordance not only to the Privacy laws (GDPR, CCPA), but also to other kind of legislation like Strong Customer Authentication (SCA) required by the EU Payment Services Directive (PSD2)

</comment></comment></comment><comment><USER8> Maybe not radical, but I'm have a really good experience with [https://www.future.fit/](https://www.future.fit/)

They pair you with a personal trainer who comes up with a detailed workout plan just for you. Each workout arrives as a set of videos, showing ever exercise or stretch stitched together. You just follow along the video, but it's based exactly on what you want to achieve. (E.g. 'lessening pain from sitting and getting active'.)They send you an apple watch to track heart rate and ensure you're active.

B/c you text with your coach, and they see you're activity, you have a ton of accountability. So I've been working out more than ever while locked at home :)

Yes, it's a little expensive. But far cheaper than in person personal training. I'm benefiting from it!

</comment><comment><USER9> Self-promotion, but our company Greywing ([https://grey- wing.com](https://grey-wing.com)) automates Covid-19 assessments and crew changes for maritime.

Over a million seafarers are still stuck on vessels around the world as governments refuse to let them in, and we're trying our best to bridge the gap with software.

</comment><comment><USER10> Apeel Sciences: [https://apeelsciences.com/](https://apeelsciences.com/) I don't work for this company or have any affiliation but they are up to some really cool stuff in the food space. They develop a plant based coating for fresh produce that keeps it fresh for longer minimizing food waste and making produce easier and safer to distribute.

[https://andela.com/](https://andela.com/) is another company that is really awesome and doing some cool stuff with helping make technology jobs more accessible to people all over Africa.

</comment><comment><USER11> Syapse here! We are a real-world data company working across life science (pharma), hospitals, and with the FDA. We want to use real-world evidence to improve the outcomes of cancer patients. When many think of Health IT, they think primarily of patient tools, which are important. However, lots of decisions are made between pharma, hospitals, regulators and health plans that effect us; and aren't always grounded in what happens in the "real-world". We are hoping to help those decision-makers make better decisions for oncology patients using data, analytics and expertise.

</comment><comment><USER12> [https://nius.tv](https://nius.tv) is a next-gen news aggregator that uses an AI anchor. The mobile app will be released in October.

For now you can check out news videos here, [https://twitter.com/nius_tv](https://twitter.com/nius_tv) or subscribe to their website to get newsletters.

There is also a Medium post detailing the tech and motivation, [https://medium.com/@calufa/converting-news-into-video- storie...](https://medium.com/@calufa/converting-news-into-video- stories-5d8d4fc5a32b).

</comment><comment><USER13> This article about Everlane [1] and OP mentioning the company makes me wonder if we (outsiders) are capable of truly judging a company of being "radical" and deserving of free marketing by us outsiders / customers.

Of course we can look at financial results, but OP seems to be asking about something more intangible.

[1]: [https://www.nytimes.com/2020/07/26/fashion/everlane- employee...](https://www.nytimes.com/2020/07/26/fashion/everlane-employees- ethical-clothing.html)

</comment><comment><USER14> Some companies I'd put on the list:

1) Okta – Single Sign-On as a service

2) Snowflake – Cloud-native data warehouse as a service

3) Crowdstrike – Cloud-native security as a service

<comment><USER15> My company uses Okta now, and it's been the only SSO service I've used that's truly SSO.

Every other SSO service I've used only worked for certain accounts, or only for first party company accounts, or for specific things. Okta is the SSO that actually does what SSO stands for, and I've been loving it because I don't have to think about it.

<comment><AUTHOR> I'm a N00b - what makes this so special?

<comment><USER15> It worked.

Other SSO systems I have used were not entirely SSO.

</comment></comment></comment></comment><comment><USER16> A little on the nose, but check out RADiCAL ([https://getrad.co/](https://getrad.co/)). 3D Motion Capture from your phone. It's already pretty useful in the entertainment world, but once they bring down their rendering times, the possibilities are pretty exciting.

<comment><AUTHOR> That's pretty cool - thanks for sharing.

</comment></comment><comment><USER17> BluWave-AI [1] applying ML to modernize power grids. Not flashy, but revolutionary behind the scenes work.

[1][https://www.bluwave-ai.com/](https://www.bluwave-ai.com/)

<comment><AUTHOR> What makes it revolutionary? Sounds amazing btw but I would already expected grids to be using ML for surge detection etc. Is it not the norm?

</comment></comment><comment><USER18> Radical is a hard bar to get over but I routinely tell people fly.io is the most interesting infrastructure company out there right now.

If only I had time to build all the things on it I want to.

<comment><AUTHOR> That look uber cool.

</comment></comment><comment><USER19> Why is Lemonade radical?

<comment><USER20> It's online-only, chatbot-driven, no sales associates in offices to visit. You just snap some pics on your phone and you're insured.

<comment><USER21> i get my renters insurance through geico and i didnt have to take any pictures at all

<comment><USER19> Same, when I was a renter I applied online. Same for when I became a homeowner. My car insurance was also setup online.</comment></comment></comment></comment>


Why I haven't given up on C++ - <AUTHOR> https://josephanders0n.github.io/2016/02/12/why-i-haven-t-given-up-on-c.html <comment><USER2> C++ is a language that's easy to code badly in, but that doesn't mean it's hard to code well (portably, maintainably, effectively) in.

IMO it's a language that well suits pragmatic programmers who are willing to cherry-pick the most convenient and productive features for their projects and leave the rest alone.

It's a terrible language for those of us who compulsively try to be clever and use every little nook and cranny of the language they're using. They get lost out in the dark scary corridors and spiderwebs, and then say "C++ sucks" instead of "what the hell, don't go out there unless you really NEED variadic templates today."

Edit: And it's easy to get yourself in really weird pickles if you don't know what not to do, (static initialization order, I'm looking at you!) I've found my WTF-per-minute rate has dropped dramatically over the years as my coding style has improved.

<comment><USER3> Yes. C++ used to be my favorite language. I still like it a lot, but I no longer love it.

The trick, in my opinion, to C++ was what you were _not_ doing. Coding in such a rich language means making a lot of decisions up front about limiting complexity. That turns out to be a good thing.

The reason it's not my favorite anymore? Because the language designers seem hell-bent on continuing to make it more and more feature-ful. Over time, it's creating a huge, diverse codebase, all with the title "C++ code" on it, but all vastly different in nature and scope. That ain't a good thing.

STL is a good example. On its own, STL is a good thing. Greatly needed in the language. But now that its implemented, its basically its own system. You could solve world hunger with STL (I am being factitious to make a point) Remember the criticism Microsoft always had, that they couldn't build anything that did just a few things? Everything had to be able to do everything? C++ has that, only worse.

I like the language. I really do. I don't know if I've given up on it -- unless I wanted to tweak the hell out of something or was writing lower-level code the answer is probably "yes" \-- but it seems to be heading in a direction that is not good for the maintenance programming community. It's great for really smart people who love complex things, but no so much for the poor schmuck coming in 10 or 15 years later. It's become a monster.

<comment><USER4> I'm not sure why you say that about the STL - you didn't give any examples.

Having worked with it a large amount at this point it seems to me to be mostly very well designed and focused on fundamentals of the parts of a program that are both common and non trivial.

Some things are messy (like hashing) some things are missing (like serialization) and some things would be incredible to have (like thread local heap allocation, lock free concurrent data structures, some sort of dynamic stack allocation, the functionality of something like capnproto, shared memory and memory mapping...), but in general it seems like it covers the fundamentals well.

</comment></comment></comment><comment><USER5> _Right now, C++ is less portable than Java..., that really have this 'write once, run everywhere' thing._

As someone who's currently rewriting a massive Java project in C++ _so we can port it to other platforms_ , this made me laugh.

It reminds me of that physicist joke about spherical cows. "Assume a working JVM..."

<comment><USER6> I have the migration studies for a big software base containing C++ code, Ada code and Java code (around 30% each). The migrations were from HPUX to RedHat4, then to RedHat5, then to RedHat6.

Each time, more than 90% of the migration workload was on the C++ code.

<comment><USER7> Maybe that's because C++ was used mostly for system level calls, and low level jobs.

<comment><USER8> One advantage of Java is huge standard library with basic support for important OS-specific things like filesystem, threading, GUI, time, etc. You don't get all the bells and whistles of your OS, but you can write portable code which works and does some simple things expected to be possible "everywhere".

C++ only recently is starting to go there.

</comment></comment></comment></comment><comment><USER9> I've been having so much fun writing functional programs in C++14 after spending 2 years writing exclusively Clojure code. It was amazing to me that I could return to C++ and use most of the same idioms and styles that I'd gotten spoiled by in Clojure. The ability to pass and store anonymous functions, with captures when desired, is so useful, and doing this is easy in C++11/14\. It has really changed my appreciation of the language. The algorithm library for doing things like map, reduce-style expressions is also wonderful. C++ is a rapidly moving target and they are not resting on the past.

<comment><USER10> This could be a blog post ;) What compilers do you use?

<comment><USER9> I use clang. There are a number of good c++ bloggers out there, so not sure I'd add anything worthy to the mix.

<comment><USER10> I meant the "write C++ like Clojure" part! That transition ain't common, AFAIK.

</comment></comment></comment></comment><comment><USER11> I do like C++, but I do find myself more and more finding bugs that would have picked up in another language.

"Huh. I'm pretty sure Rust would have picked me up on that bug."

Here's an example. I accidentally wrote this:

        while (getLine(pc, buffer, sizeof(buffer) > 0))

Which compiles fine. Stricter languages could detect this bug.

<comment><USER12> Most likely two bugs. The bracket one, and the fact that sizeof(buffer) will give you the pointer size, not the buffer size if buffer is a pointer rather than an array.

<comment><USER13> The first one would be caught in Rust as it has no integer -> boolean automatic conversions (similar to Java).

The second one could only arise with unsafe pointers in Rust, as safe code uses slices, combining the base pointer and the element count in a single value.

<comment><USER14> > The second one could only arise with unsafe pointers in Rust, as safe code > uses slices, combining the base pointer and the element count in a single > value.

OTOH the point here is to pass a preallocated but "uninitialised" buffer to the callee, which Rust wouldn't allow with slices, unless you created a slice from a raw allocation (I don't know if that's defined behaviour, though I guess you could do that safely by passing in a Write rather than the slice itself, but then you're Write-ing to a slice which has… interesting behaviour)

</comment></comment></comment></comment><comment><USER15> I've given up on finding another C++ programming job for the foreseeable future. The problems I have is not with the language itself it is the other C++ programmers I have issues with. Not to say that I don't think the language doesn't have issues. With proper care you can work around the issues and avoid overcomplicating the code. But occasionally you have other C++ programmers who just makes things too complicated and don't realize that they have done so.

<comment><USER16> In my personal experience, C++ suffers from a surfeit of programmers who don't have a perspective on just how unproductive C++ is, and fall into the trap of considering themselves as an elite based on the complexity of their language of choice. I'd recommend C++ programmers learn how other languages have moved far beyond C++ in usability, because that will help them in writing C++.

<comment><USER4> Can you give an example of a language that goes beyond C++11/14 in both speed and usability, including tools?

</comment></comment></comment><comment><USER17> It's easy to bash anything, to find only bad things in something. And to let go, give up and get frustrated and write blog posts like this.

Sure, most of this stuff is correct, like the header madness, but still C++11 especially is pretty nice these days. There just isn't any other way to do cross-platform, performant code, while having the compatibility with all the C/C++ libraries out there.

I feel C++11 could use some kind of new approach, like "Lean C++11" which drops all the legacy crap that is holding back adaption for new developers, who now have to go through maybe 15-20 years of legacy coding styles in order to find the modern way of doing things.

But this would break backwards compatibility, so maybe better focus on Rust or something else that is set to do things correctly.

I still like C++, although it is more difficult to write in. Add in a scripting language like Lua to C++ and you have a very performant and nice stack of scriptability and close-to-the-hardware stack that feels super powerful.

</comment><comment><USER18> _Most C++ IDEs have problems, probably because C++ is a difficult language to fully parse. I've only ever used Visual Studio and KDevelop._

That's me, about seven years ago. Then I tried Qt Creator. Now I'm an evangelist. It just works. It parses all your code in seconds and you get autocomplete and syntax coloring that's very close to perfect. The interface is as clean as it gets. And yes, you can use it without ever touching Qt (the framework) at all.

The only thing is, try to avoid versions > 3.2.2 since they are a bit buggy.

Edit: fixed typo.

<comment><USER19> I want to use QT Creator but I find some things frustrating such as finding out how to change compiler options in a reliable way. Sometimes it is QMAKE_CXXFLAGS or some other option in the .pro file. In every other IDE it is a tick box in project settings. Yes yes I know a tick box sucks but it sure makes things easier to remember how to do rather than yet another cryptic bit of text in a config file, I have enough of that anyway.

<comment><USER20> This can be avoided by using CMake as QtCreator supports it as a project type. CMake isn't exactly a bastion of simplicity however.

<comment><USER19> To be honest I am just very lazy and would appreciate a simple GUI to make the build and project files. I guess Visual Studio has made me lazier ;)

</comment></comment></comment></comment><comment><USER21> C++ is fool's gold.

Its complexity is inefficient and this gives the sensation of power and accomplishment, when all we have done is waste energy on translating abstract thought into a fragile foam of symbols. Then finally there is a sad degree of orthogonality between the meaning and structure of said foam and our original thought. But it sure feels like we did something. We slaid that dragon good eh!

</comment><comment><USER22> Brian Will says that that whole OOP concept is bad (not to say about C++ which is OOP in the ugly way): [https://www.youtube.com/watch?v=QM1iUe6IofM](https://www.youtube.com/watch?v=QM1iUe6IofM)

</comment><comment><USER23> I am interested on your views about Portability. While Boost and STL are portable in terms of static compilation Boost gives you very painful bugs at runtime :(. I also would like to know why you say that Java is portable on paper ?

<comment><USER20> I've used parts of boost extensively on embedded platforms and cross-platform projects without ever encountering painful runtime bugs. What issues did you have?

</comment></comment><comment><USER9> My own take on the original article that this author is responding to:

>C++ IDEs suck. Big time.

I find Xcode quite a pleasure to use. The autocompletion, debugging, the quick moving around the interface, splitting files side-by-side.. I haven't used other IDEs besides emacs, but nothing about Xcode is getting in my way.

>It's an unmanageable language.

Compared to a dynamic language or a weakly-typed language (I'm looking at you C, and a few others), I'd say the strong typing of C++ alone helps in code manageability. And, unlike Swift or Clojure or other languages, I find putting an API in a header file and an implementation in a translation unit really helps me reduce time later on. It's an automatic API summary without needing to review your implementation. When I move on from one part of a program to another, I don't want to study my source code just to remember what the access is. Just show me the header. I miss header files in other languages.

>It's a counterproductive language.

and

>STL sucks.

The tools in the STL are serious time-savers. Sure you can choose not use them or implement your own, but in either scenario, you will likely spend a lot more time writing code than working on your actual problem or idea. In that regard, I'd say C++ and its standard library are very productive. And all the new multithreading and async primitives in C++11/14 take this productivity to a new level.

>namespace stupidity

Without namespaces, you have to work harder to name your stuff and to debug name clashes. Every good language that I've worked with uses namespaces. I consider them a requirement for any language that will handle a large project.

>The language sucks. It sucks because it's so complicated.

C++ is probably the most complicated language I will ever use. I'm not sure why that makes it suck, though. Unlike many other languages, where it is wise and expected that you can keep the whole language in your head and understand entirely how it works, C++ is a different thing altogether. Nobody on this planet probably understands 100% of C++ -- including its creator, who has said that he gets maybe 80% there. In C++ you can use a small and ordinary part of the language and choose to go to the complicated stuff only if you really _want_ to, but rarely do you _need_ to. Yes, complex metaprogramming is mind- bending in what you can do -- and also, you cannot do a lot of it any other language. But you don't have to do any of that, and most people probably shouldn't, until they want to have some fun and really see how deep C++ can go. And a lot of the most complicated stuff that was important to understand in the past is no longer required reading for new programmers to the language, since the latest standards handle many things for you automatically. I.e. just writing "new" or "delete" and deciding when and how to do so are no longer required and actually discouraged thanks to smart pointers.

<comment><USER24> > I find putting an API in a header file and an implementation in a > translation unit really helps me reduce time later on. It's an automatic API > summary without needing to review your implementation. When I move on from > one part of a program to another, I don't want to study my source code just > to remember what the access is. Just show me the header. I miss header files > in other languages.

`make doc` (maybe as part of your build process even), then view the autogenerated API documentation. This is at least a feature or extension of most languages. C++ even has a number of documentation suites (e.g. Doxygen, IIRC).

Furthermore, if you're using a "good" IDE, I would expect it to be able to provide you the same basic information you get from header files (i.e. method signature & names). It could at the very least have a "collapse function implementations" hotkey to allow you to view a source file as if it were essentially a header file.

I don't know, the fact that it's somewhat trivial to actually generate a .h file _given_ a .c or .cpp file (look up LZZ - Lazy C++; it's not maintained, but it did exactly this) makes them seem pretty much useless to me.

</comment></comment><comment><USER25> C++ is the new Cobol

<comment><USER26> Nah, PHP is the new COBOL

<comment><USER27> Nah, Java is the new COBOL. Billions of LOC that will never be replaced, running on arcane infrastructure. In this case the arcane infrastructure isn't mainframe hardware or OSes, it's J2EE bean containers, XML configged ORMs, and Ant build systems.

<comment><USER26> You are right, of course. Maybe PHP is the new VB?

</comment></comment></comment></comment><comment><USER28> "I agree it's complicated, but that's not necessarily a bad thing. You really don't need to understand the whole thing to start using it. And when you've been using it for a while and start to understand the intricate details, it becomes very, very powerful."

To be honest, this is a corporate sales pitch. It's trying to justify the injustifiable

It doesn't need to be full of "features" that most people don't use. Granted, some of them are needed regardless

C++11 and 14 have simplified some parts, which is good. Still, a lot of other languages do more with less complexity

Some things that are painful

\- String formatting in STL is a joke

\- "Smart pointers" are still an add-on and clunky to use

\- No reflection. Manual setup of getters/setters/copy constructors

<comment><USER29> What's wrong with std::string though?

<comment><USER9> Compared to how strings are handled in many other languages or libraries, std::string is pretty limited. It works, though, and I use it. But when you have to do something basic like a trim, you find yourself wondering why it's not included.

<comment><USER4> [https://github.com/imageworks/pystring](https://github.com/imageworks/pystring)</comment></comment></comment></comment>


Ask HN: Is the architecture of programming tools historical accident? - <AUTHOR> It seems like if we were to build the first program editor/compiler now, with modern software engineering knowledge, it would be natural to use  generic 'program models', which would be used to generate source and machine code as 'views'.
The more I've thought about this, the more benefits to structuring things this way appear (e.g. you could have multiple source views for single programming languages, and easier language feedback from tools)
Is there some intrinsic reason that the basic concept behind our program authoring tools is parsing text into ASTs? Is it just historical accident + inertia now? The only concrete thing I can think of is for program exchange, pasting snippets on Stack Overflow or whatever—but there are solutions for that.
I'm thinking about building some kind of editor based on generic program models, but would like to save myself the waste of lots of time and energy if there are fundamental reasons this is a bad idea. I've written in much more detail on the architectural variation I'd be employing here: http://westoncb.blogspot.com/2015/06/how-to-make-view-independent-program.html —and more on the problem/motivation here: http://westoncb.blogspot.com/2015/06/why-programming-languages-dont-have.html
To be clear, I'm NOT advocating visual languages here—it could open up the grounds for different source representations, including those with visual elements, but the architectural change I'm contemplating is independent of those sorts of decisions. I'd still want 90% text personally.
Thanks for any suggestions. <comment><USER2> It's a shame the Intentional Software crew have been nearly silent for the a decade or so they've been in business. They've been doing projections-of-ASTs based programming for a very long time. They bragged a lot about it early on and I haven't heard much of anything since.

Here are a couple of demo vids from well over 10 years ago: [https://www.youtube.com/watch?v=tSnnfUj1XCQ](https://www.youtube.com/watch?v=tSnnfUj1XCQ) [https://www.youtube.com/watch?v=ZZDwB4-DPXE](https://www.youtube.com/watch?v=ZZDwB4-DPXE)

Here's an interview from 2009 where one of the crew members talks about an annotated S-expression as the core code representation (IIRC, it's been a long time since I listened to it) [http://www.se- radio.net/2009/12/episode-151-intentional-soft...](http://www.se- radio.net/2009/12/episode-151-intentional-software-with-shane-clifford/)

<comment><AUTHOR> Interesting! I'll have to try and figure out what happened with it—sounds very similar to what I'm thinking of. Thanks.

</comment></comment><comment><USER3> There are a lot of historical accidents in computing, but OTOH there are also a lot of ideas that seem good but aren't. Non-textual programming has been tried a bunch of times and never really took off but I'm not familiar with the details.

</comment><comment><USER4> Yes it's a historical accident. But so far no one has offered anything better, visual programming sucks.

As far as inter operability go, nothing beats text.

<comment><AUTHOR> I don't mean to advocate visual programming. This is more a question of whether text is used to produce a model, or if the model is used to produce text. In any case, it would enable a wide middle ground of languages that incorporate visual elements and richer interaction, while still being largely (or totally) text-based. Or just variation in text views: for instance, it would be pretty easy to just toggle using curly braces or white space depending on user preference.

For interoperability, the program models could also be text, or there could be a canonical text view for particular languages (when you copy a program segment, it copies the corresponding text from the canonical view).

</comment></comment><comment><USER5> You're overfitting to your knowledge of MVC.</comment>


E-Waste recycling innovator faces prison for trying to extend life span of PCs - <AUTHOR> https://www.washingtonpost.com/news/true-crime/wp/2018/02/15/eric-lundgren-e-waste-recycling-innovator-faces-prison-for-trying-to-extend-lifespan-of-pcs/ <comment><USER2> _> >Microsoft filed a letter seeking $420,000 in restitution for lost sales_

Lost sales because they might have bought a new PC with Windows? Odds are that the PCs already came with Windows, so maybe he installed a newer version of Windows....

<comment><USER3> Microsoft appears to be arguing that since the restore disks were missing, there is no way to restore windows and access the license that the computer already has.

Therefore, microsoft wants the recycler to buy a fresh copy of windows, with a new license at full price. And it's these lost sales which they appear to be complaining about.

Maybe the fact that these computers already had licenses got lot at the original trial.

<comment><USER4> It didn't "get lost". Microsoft deliberately obscured it.

[Microsoft] "testified that a free restore CD was worth the same price as a new Windows operating system with a license. … This was false and inaccurate testimony provided by Microsoft in an attempt to set a precedent that will scare away future recyclers and refurbishers from reusing computers without first paying Microsoft again for another license. … Anyone successfully extending the life cycle of computers or diverting these computers from landfills for reuse in society is essentially standing in the way of Microsoft's profits."

</comment></comment></comment><comment><USER5> This sounds like an overzealous legal department. Perhaps if this case would become more visible, somebody from Microsoft would insist on dropping charges.</comment>


Undercover reporter reveals life in a Polish troll farm - <AUTHOR> https://www.theguardian.com/world/2019/nov/01/undercover-reporter-reveals-life-in-a-polish-troll-farm <comment><USER2> 'It would be great if you posted positive comments about the government's subsidy for TVP and the television licence fee,' is not a troll farm, its a PR firm.

'company's rightwing accounts would then oppose the leftwing accounts, generating conflict and traffic' reads like something straight from Douglas Adams works.

If you are really looking for an internet troll farm in Poland you dont have to look far [https://translate.google.com/translate?hl=en&sl=pl&u=http://...](https://translate.google.com/translate?hl=en&sl=pl&u=http://www.polskieradio24.pl/5/1222/Artykul/2359247,Farma- trolli-w-inowroclawskim-ratuszu-K-Brejza-zapowiada-pozew&prev=search) City hall turned into black PR and political attacks factory by a current parliament member representing failed party (PO, the one whose members recently voted pro censorship in EU)</comment>


Ask HN: Family photo cloud - <AUTHOR> I am so frustrated with all the cloud options out there. Currently I am using iPhoto with iCloud and my wife and I have to have seperate accounts in order to have files automatically save to the cloud. Which isn't that big of a deal. I just uploaded the 5G of photos she had on her phone to my computer so  that I could free up enough space to upgrade her phone to iOS9. I then logged into iCloud.com using her credetials and started uploading everything into iPhoto. But wait: only the JPG files will upload. Why can't I upload .MOV or .PNG?
Dropbox won't work because I can't do any type of a family sharing type thing and I don't want to have to pay for two pro accounts and have each one use 5 Gig. The other problem is that I want my cloud to save the originals in the cloud and have the client store low res photos and dynamically load the high res when I am browsing or request for the original (similar to iPhoto).
Does anyone know of a good photo cloud solution? Or am I going to have to spend a week building my own? <comment><USER2> This almost outlines a new business idea. Have you tried using Google Drive, making a virtual drive on your device? Then you either save the photos directly on the drive (e.g. G:/) or move it.

</comment><comment><USER3> Go to the website www.joyflips.com and you will find your answer. Feel free to call 415-860-9720.</comment>


Removing a recursion in Python, part 1 - <AUTHOR> https://ericlippert.com/ <comment><USER7> A more stable link would be [https://ericlippert.com/2018/12/03/removing-a- recursion-in-p...](https://ericlippert.com/2018/12/03/removing-a-recursion-in- python/)

</comment><comment><USER8> This seems like a very verbose, kinda-sorta continuation passing approach. Except that he's building the eventual continuation as a list of primitive functions instead of a complex function.

<comment><USER8> Too late to edit that.

Ok, so a CPS transform starts by adding a new parameter, c, which I read "myReturn" or more likely, "returnapotamus". Then, you find the returns in the function and look at the expressions therein. An expression inside cost(...) is left alone, but the expression outside the application of cost is turned into an expression and then to a function that includes a call to returnapotamus, c:

        def cost2(s, c=lambda s: s):
          if s <= 1:
            return c(0)
          elif s % 2 == 0:
            return cost2(s // 2, lambda s: c(s + 1))
          else:
            return cost2(s - 1, lambda s: c(min(1 + s, 5)))

The initial continuation is just the identity function. cost2 works the same as cost, but it doesn't solve our recursion problem. To do that, we can take Lipport's approach of a pseudo-function built from a stack of primitive functions:

        def cost3(s):
          cont = [ lambda s: s ]
          while s > 1:
            if s % 2 == 0:
              cont.append(lambda s: s + 1)
              s = s // 2
            else:
              cont.append(lambda s: min(s + 1, 5))
              s = s - <USER6>
          result = 0
          while len(cont) > 0:
            result = cont.pop()(result)
          return result

On the other hand, it's possible to build the continuation as a function, as we go, but it gets a little complicated:

        def cost5(s):
          cont = lambda s: s
          while s > 1:
            if s % 2 == 0:
              cont = lambda s, c=cont: c(s + 1)
              s = s // 2
            else:
              cont = lambda s, c=cont: c(min(s + 1, 5))
              s = s - <USER6>
          return cont(0)

An explanation of what's going on here is beyond the scope of this comment.

</comment></comment><comment><USER9> The article doesn't explain the problem of converting recursion to iteration fully. There is a lot more detail.

Most recursion can be implemented using a loop and a stack. If the recursive expression is self contained in the return call, then you don't need a stack.

For example:

      def somefunc(x):
          if x <= 0:
              return 0
          return somefunc(x-1)

is equal to:

      def somefunc(x)
          while x > 0:
             x = x - <USER6>
          return x

But if the recursion isn't self contained:

      def somefunc(x):
          if x == 0:
              return 0
          return somefunc(x-1) + 1

then the iterative version looks like this:

      def somefunc(x)
          stack = []
          while x > 0:
             stack.append(x)
             x = x - <USER6>
          while len(stack) != 0:
             x = x + stack[-1]
             stack = stack[:-1]
        return x

During Recursion your program will use an internal stack to keep track of previous context. This is called the call stack. Whether or not you use iteration or recursion for the last example you will need a stack.

The last example is actually less efficient than the recursive version because you are moving the call stack to the heap. The heap is slower than the call stack but the heap essentially has no limits so you won't encounter stack overflow.

In the first example of recursion you will actually benefit from conversion to iteration because you get rid of the stack all together in the iterative example. Some languages will be able to recognize this type of recursion and do an optimization step called "tail-recursion optimization" in which the compiler actually gets rid of the need for a the call stack. Python does not do this, however.

The story doesn't end here, however. There are examples of recursion where you cannot create a straightforward iterative version.

For example:

      def somefunc(x):
          if x <= 0:
              return 0
          return somefunc(x-1) + somefunc(x-2)

The straight forward conversion using an explicit stack looks like this:

      def somefunc(x)
          stack = []
          while x > 0:
             stack.append(lambda: somefunc(x-2))
             x = x - <USER6>
          while len(stack) != 0:
             x + stack[:-1]()
             stack = stack[:-1]
          return x

You will note that the straightforward conversion doesn't get rid of recursion. The reason is because the previous context is basically another recursive call.

You will note that the recursive version of this function actually does the same multiple recursive calls twice which leads to unnecessary repeated calculations. It is possible to optimize this repetition using something called memoization. However memoization requires and does not get rid of recursion.

It is not possible to imitate this "inn-efficiency" in an iterative form. The only way to do it is to do an optimization step similar to memoization before iterating. This step, however radically changes the way you think about the problem. It literally reverses the recursion from a top down approach to a bottom up approach. Here is what the iterative form looks like:

      def somefunc(x):
          store = [None for _ in range(x)]
          store[0] = 0
          for i in range(1, len(store)):
             store[i] = store[i-1] + store[i-2] if i-2 >= 0 else 0
          return store[-1]

This method is called "Dynamic programming using the tabular method."

You will note that this version of the function still allocates storage to the heap with "store"

There is still a further optimization step you can do here as well. This optimization is basically noticing that you don't need to memorize the entire store in the algorithm. You only need the previous two values.

      def somefunc(x):
          store_i_minus_1 = 0
          store_i_minus_2 = 0
          for i in range(1, len(store)):
             result = store_i_minus_1 + store_i_minus_2
             store_i_minus_1, store_i_minus_2 = result, store_i_minus_1
          return result

You will note that the the new example has no allocation to the heap and is the full efficient iterative version.

Although my final example was applied to a recursive function that called itself twice in a single expression. The final technique I showed you can be applied to all forms of recursion to yield an iterative version WITHOUT the need to create an explicit stack in the heap. It is the ultimate optimization step in a procedural language.

One thing to note is that the final optimization can only be done in a procedural language. For a Functional programming language you will need to utilize another method.

<comment><USER10> > The heap is slower than the call stack

Is this true in Python? I thought the call stack was on the heap as well.

<comment><USER9> woah. You're right. Learned something new. Why ever would they do that?

<comment><USER10> This is how most interpreted languages work. The actual hardware stack (e.g. what $rsp points to) isn't really relevant to the Python program being executed; it's used by the native code in the interpreter itself. Pushing a Python stack frame intermingled with a hardware stack frame would be odd (and would likely be hard to do, and weird from an ABI perspective). It's just easier to push the call stack to a dedicated section on the heap; the Python program doesn't know the difference anyways. Plus, you can have a much larger stack by heap allocating it.

</comment></comment></comment></comment><comment><USER11> Thanks, this is very interesting. I am enrolled in a CS Bsc. (night courses) and while we learned about the different techniques of recursive programming, we never learned how to convert a recursive solution into an iterative one.

<comment><USER12> I remember when I was at college it was the same, and it doesn't make any sense. I can't recall any instances where I've needed to convert an iterative solution into a resursive one, but there have been countless times I've done the reverse. I belive that the mindless emphasis on resursive programming in college courses has lead to poor practices, where people are using recursion to just make their code more elegant where an iterative solution wouldn't much more complicated but a lot more robust. The result? Down the track, an unforseen use cases resulting in max stack size exceeded errors, causing needless headaches.

<comment><USER13> I think the prevalence of recursion might be attributable to mathematics. A lot of mathematical analysis of algorithms is more natural to express in terms of recursion (partially because of proof by induction), so you often see algorithms stated that way.

It's also worth noting that there are plenty of instances where (IMO), recursion is much more natural. For example, traversing trees recursively. I agree, though, there should definitely be more time spent teaching how to convert between the two.

</comment></comment></comment><comment><USER14> Am I the only one who read this and thought: hmm, for any number 32 or higher, the minimum cost would always be 5? Who cares about recursion when it's such a constrained problem? :)

<comment><USER15> You are not the only one who thought that; see the comments to my post. As I note in part two, the point of the article was to show the general method; there are of course many ways to solve the original problem more efficiently. The specific problem is trivial and unimportant.

</comment></comment><comment><USER16> I don't really get the point of this. As far as I can tell, the code is doing the same thing as before but has become (at least to me) much harder to understand.

<comment><USER8> If the argument to the original function is too large, the function runs out of stack space for the recursion. The function at the end of the post handles much larger arguments.

The presentation is very complicated, though.

<comment><USER17> In the end we still have a stack of afters though no?

<comment><USER8> Yes, and have to go through and evaluate them. But they are less memory limited than the stack.

</comment></comment></comment></comment><comment><USER18> I'm pretty sure that the words "tail recursion" or "tail call" should appear somewhere in this article - see e.g. [https://en.wikipedia.org/wiki/Tail_call](https://en.wikipedia.org/wiki/Tail_call) which also explains in a remarkably simple way how tail recursion relates to iterative constructs (as are found, e.g. in Python). Why do people write 'introductory' articles that don't even _mention_ common terminology?

<comment><USER19> Because the cost() function OP posted isn't doing tail calls and can't be converted into tail call form.

<comment><USER8> Not with that kind of attitude. :-)

Converting to continuation passing does result in tail calls.

<comment><USER19> Is there an equivalent of call/cc in Python?

<comment><USER8> No, you have to do it manually. I suppose you could write a code-transformer.</comment></comment></comment></comment></comment>


The (practical) End of Bitcoin - <AUTHOR> http://blog.fraserharris.com/post/6553721422/the-practical-end-of-bitcoin

<comment><USER2> What people who argue argue bitcoin don't seem to get is that you don't need the participation of banks at all.

If an individual offers any good or service in exchange for bitcoins they can get bitcoins so long as the people with bitcoins wants that good or service. There was a perfect example here on HN the other day. Someone would purchase electronics products from Newegg for HNers in other countries in exchange for bitcoin. The cost in bitcoins was equal to the cost of the product in USD converted to bitcoins plus an operating margin.

The flatter the World gets the more likely that bitcoin is likely to have utility.

All the naysayers keep harping on about how bitcoin will never gain mainstream acceptance in the US. They're partially right. The mainstream US is not the target market. Bitcoin will probably enjoy some mainstream acceptance in the US, but it will probably be a long time from now and occur well after it enjoys mainstream success in some foreign market.

The key global feature that makes bitcoin viable is a functioning and reliable postal service. Beyond that all that is necessary is a robust reputation management system.

With those two features, you can transact easily and simply with anyone in the World without ever dealing with US banks. That's the key piece to get here. In the long-term, regulation of US banks prohibiting bitcoin will hurt banks more than bitcoin, because it just means that they won't be able to participate.

The key to a functioning bitcoin economy is not the middlemen such as banks. The key are enough endpoints so that there are enough goods and services you want to buy in bitcoin that uses charge in bitcoin and then maintain the currency until they spend it on a good or service they want.

Everyone focuses on the banks and intermediaries, but it's the quantity and diversity endpoints (buyers/sellers) that truly matter.

<comment><USER3> While bitcoin is designed to be a currency, it is not yet a currency. It is rather a commodity. If it is to be a currency it must be able to be used to buy any commodity - in particular, dollars. If someone has to think about what they can't "buy" it may be useful to them but it's not as a currency. A currency has this property of universal exchange (and security, stability, ...) Bitcoin is questionable on many counts, thus is likely to remain a tradeable commodity only.

<comment><USER4> You hit the nail right on the head. I can buy some stuff on Newegg, and have someone in another country mail me gold. Or ship me oil. Or coal. That doesn't mean oil or coal is a currency, they're just a commodity. And I'm just engaged in trading.

Bitcoin is more _like_ a currency than oil or coal, because it mechanically works a lot like one. But just because you say 'this is a currency', doesn't mean it actually is one. You are missing all of the higher level stuff. There is a reason a dollar backed by the US government is far more useful than a random coin 'backed' by a government of an island nobody recognizes.

My uncle is a mechanic, and has traded his time fixing commercial vangs for goods. We've had plenty of parties cartered in exchange for fixing the restaurent's delivery fan, or borrowed plenty of heavy equipment from contractors that need their truck fixed but don't have cash. Does that mean a tray of chicken marsala and a plate of bakery cookies are a currency? Of coruse not. Trade/bartering existed long before currency existed, and it still goes on today. Commodities existed long before currency existed. Being able to trade one commodity (bitcoin) for a good or service doesn't make it a currency.

We've learned this lesson over the last 200 years but a lot of people seem to ignore them. Most of the people pushing bitcoins harp on the fact that dollar keeps getting devalued, but they are ignoring the history showing that is a far better problem than a deflationary currency .

<comment><USER2> Bitcoin has greater fungibility than oil, coal or gold and can be exchanged electronically with anyone in the World.

Is bitcoin competitive with the Dollar, the Euro or the Yen? No, it isn't competitive with those currencies or many other currencies. If, however, you abandon a developed country centric viewpoint, there are plenty of secondary and tertiary markets where bitcoin is competitive with the domestic currency.

If you've ever lived abroad you know that you simply don't have access to the same goods and services that people in the US and Europe enjoy. It's a huge pain to purchase US goods and services from abroad. The transaction costs are very high.

Increasingly individuals want to be able to trade as if the world is flat and it's very difficult and banks siphon off lots of money with unnecessarily high fees. This makes some goods entirely unpurchasable because the fees become a significant part of the cost.

That right there is a great example of a buy-side willing to spend bitcoins.

For bitcoin to gain traction in the US you need a buy-side here. This is where the US War on Drugs makes bitcoin attractive. Drugs will always be in demand. Always. Anyone who tells you otherwise is full of it. You now have a medium of exchange which makes trade much much safer for individuals involved in clandestine activities.

Personally, I'm neither for or against these activities. I'm just making an observation. I actually and for a Portugal-style approach that treats drugs as a social problem and not a criminal problem. So long as drugs remain a criminal problem you will have a buy-side here in the US.

Now, if those at the top of the drug pyramid start seeing significant benefits from trading in bitcoin, they will start adopting it. Bitcoin is safer because it eliminates the money laundering risk from their business, which is pretty much the only activity that is truly centrally observable by a government. On top of that, money laundering is a significant cost of doing business and AFAIK is probably comparable to the fees Apple charges developers for in-app subscriptions.

If bitcoin demand moves down the drug distribution pyramid it only becomes a matter of time before dealers are going to start wanting to collect at least a portion of their costs in bitcoin.

As I said, I'm neither for or against these activities, but this is a sufficiently large and stable market to eventually help stabilize the value of bitcoins and make it tradable in other contexts in other countries.

If Square can be successful in helping individuals transact with other individuals, then so can bitcoin ... eventually.

The moment you abandon a Dollar or Euro centric viewpoint it become far more obvious how bitcoin can gain legitimacy in other contexts. As far as the US is concerned the bitcoin will probably remain a currency for illegal activities until it becomes so commonplace for those activities that it starts crossing over to the mainstream among drug purchasers. Keep in mind that 47.1% of the US have used illegal drugs.

</comment></comment></comment></comment><comment><USER5> This article is short but nails the biggest bitcoin hurdle I can see at the moment.

The intrinsic value of currency is given by the services and tangible products it can buy.

With a USD (or EUR or GBP or whatever) you can buy virtually everything (except, maybe, love and happiness :)), while it it wasn't for the possibility to exchange bitcoins for "actual" money, the amount of things you could buy with them would be virtually nothing, as of today.

Want to buy an Ipod from an Apple store ? You can't. Renew your WoW account ? You can't. Buy at Amazon ? You can't.

The only way to do that is to either go through middlemen that offers the same, or similar, products/services secondhand or exchange bitcoins for cash. And both services will disappear in a blink, if they will find they can't exchange their bitcoins for cash.

The only way I can see bitcoins to take off indefinitely is that its economy of services/products you can buy with them will grow to a point that its intrinsic value will be enough for the people to stick with them, regardlessly of the possibilit to exchange them.

But we are talking years, I doubt they will be given such breathing space.

</comment><comment><USER6> For all the short blogs, there are very few, if any short options written or listed at bitoption.org. I made a little bit of money on mild shorts there this week, essentially betting against major price increases, but I just don't see any like $2 puts being listed for end of the year.

</comment><comment><USER7> This whole thing reminds me of Daemon/FreeedomTM and the darknet credits.

<comment><USER8> Yes, I agree, and "Anonymous" reminds me a lot of the daemon network. The only thing we don't have is Hari Seldon, er I mean Matthew Sobol. Daniel Suarez is awesome.

<comment><USER7> Funny that you bring up Hari Seldon - you have to kind of suspend a lot of disbelief to be convinced that someone could basically single-handedly foresee everything that could potentially happen.

But I guess that's why it's fiction.

<comment><USER9> except

\- he knew he _couldn't_ foresee everything, hence the line of similarly trained followers, all of who worked to expand the science

\- he was wrong anyway. Things happened that he didn't/couldn't have forseen

<comment><USER7> I think you're talking about Seldon for this one, and you're definitely right - the Mule was unforseen, and unforseeable, and he did have spiritual successors.

I don't think Sobol really did - definitely not in the Daemon novel, anyway, every operative was following the AI's instructions. The darknet became (or at least, was shown to be) more self-sufficient later on, when there was less focus on murdering people and more on building communities.

I just didn't think it was particularly realistic to skip from A to B without everything falling apart in between - especially considering that there wasn't anything like psychohistory in Suarez's book to wave your hands around.</comment></comment></comment></comment></comment>


Biology 2.0: A special report on the human genome - <AUTHOR> http://www.economist.com/node/16349358?story_id=16349358

<comment><USER2> Not to belittle any individuals work and not to say that it isn't important for government to step and and fund important things, but I find comparing public sector expense and private sector expense to be somewhat like comparing apples to oranges. Government spending compared to private sector spending has a habit of being much looser.

 _The genome sequenced by the International Human Genome Sequencing Consortium (actually a composite from several individuals) took 13 years and cost $3 billion. Now, using the latest sequencers from Illumina, of San Diego, California, a human genome can be read in eight days at a cost of about $10,000._

That being said, I remember I was in high school when this was completed. Definitely recall it being exciting news in my molecular bio class.</comment>


Ask HN: What's your way to keep being productive day by day? - <AUTHOR> Interested in initiating a discussion about what worked for you to keep your productivity up. What'd you learn about yourself working for so far and what'd you think most of us are doing wrong? <comment><USER2> I used to beat myself up a lot when I would have an unproductive day for whatever reason (because I was tired, depressed, anxious, distracted, etc). This would then carry over to more days where I needed to be productive, thus hurting my focus and productivity further. Then I realized that, at least in my job, things won't fall apart if I just have an off day. Now when I have one of those days I'm easier on myself and remind myself that tomorrow will be a new day where there will still be plenty of challenges to tackle and I don't need to be working at 110% capacity every single day of my life. I now find it a lot easier to just write those days off so that I can come back the next day and focus.

Sometimes we need days where we aren't "productive" to rest, recover, or process so that we can do our best on the days where we are able to be productive.

I'll also say that for me having a good, supportive team makes a huge difference. If you have other people who can help you stay motivated and accountable who are also empathetic it's a huge boon for staying focused and productive.

<comment><USER3> The "Growth Equation" is growth = rest + stress. (Peak Performance, 2017)

Going at 110% capacity is what helps you to improve. Rest is what lets you go at 110% capacity, rather than being tired and slogging on at 80% capacity. More often than not, we have inadequate rest.

</comment></comment><comment><USER4> This week I've had some success using something like the Pomodoro technique. Though I've tried it a few times before I never quite got it to stick. Some thoughts / changes I made:

\- Doubled the length of time to somewhere between 45-80 minutes, loosely based on the perceived complexity of the task

\- Didn't time my breaks. This sounds counter-intuitive but they never lasted more than 5-10 minutes for me anyway, but having an open-ended "breathing- session" helped psychologically

\- No notifications during this period, at all. Phone and laptop on DnD, no messaging apps running - I really mean all notifications.

\- Having the "guarantee" that I'll see missed notifications during my break, with some sane max delay (1-2 hours) instead of an indefinite amount of time helped my brain unplug considerably

\- Working with no notifications is incredible

\- You have to believe you won't be interrupted to do deep work.

<comment><USER4> Also, if it's interesting; a writeup of all my habits which I think keep me decently productive

[https://jborichevskiy.com/posts/healthy- living/](https://jborichevskiy.com/posts/healthy-living/)

</comment></comment><comment> q-base Getting enough good quality sleep. No amount of stimulants, productivity systems or external motivation can overcome a tired mind and body. You will be trying to ice skate uphill.

<comment><USER5> Good quality sleep is hard to come by. I've found alcohol abstinence throughout the week to be similarly rewarding.

<comment><USER6> Try alcohol abstinence for a prolonged period of time. I am 6 weeks in and it is awesome.

</comment></comment></comment><comment><USER7> The mind craves novelty. Part of why problem solving is satisfying is that it gives us new perspectives or new results. When we're bottlenecked by knowledge or resources it's easy to become burned out and to 'cheat' with a wandering mind seeking information feeds or hobby interests.

I get best results starting with the hardest problems first thing in the day, and as complications or dead ends manifest, calculate if it is best put off until something gives (or the mind thinks up something randomly in the commute or shower), and move on to intermediate issues, repeating until the end of the day are small trivial tasks and maintenance.

This is the daily grind though, project deadlines or resource intensive efforts are going to skew individual results.

</comment><comment><USER8> Disclaimer: I in no way make any claims of success.

1\. Find a reasonable tracking and logging system. I've trended strongly to paper/pen systems, heavy on index cards (POIC / Zettlekasten inspired), Bullet Journal, and 43 folders / tickler-file based.

2\. Be gentle with yourself. Project focus is much like meditation. Allow your mind to still and focus on the task at hand. If it wanders, guide it gently back. Know when you've had enough.

3\. Know when you've had enough. There's only so much focus you have, attempting to prove more is all but certainly counterproductive.

4\. The role of play and diversion, even in adulthood, suggests something primal about these. It may be freedom for the mind to wander without consequence.

5\. Reassess goals. Change or discard the ones which no longer suit a purpose.

6\. One trick for maintaining the _apearance_ of productivity is to have a list of goals far longer than your ability to meet them. Creative procrastination (slacking on task A by tending to task B) may give outsiders the illusion you are infinitely productive. You will see things differently.

(The outsiders' view is the correct one.)

7\. If you possibly can, seek a supportive environment. This means a space, tools, resources, and most of all, _people_ , which and who support and facilitate your goals. I say "seek" because odds are strong you won't find this, or at least not in any single or rapid manner, but consider "a better productivity environment" a goal in itself. Working early or late, regular hours or irregular, clean or messy, seems to matter less than _having agency_ over your working conditions.

Saps to productivity -- environmental, resources, or, most of all, people -- are the biggest impediments to progress.

8\. You are your own worst enemy.

Be gentle with yourself.

9\. Start now, or soon. It's never the right time, it's never the right place, you never have the right books or information. Start with what you have, do the best you can.

10\. I honour virtually all of this advice in the breach. What we do wrong is in thinking there's a single method. There are many paths.

Have some method. Note what you want to accomplish, how you attempt to do so, what succeeds, and what does not. Don't forget to ask yourself if what you think needs doing actually does or not.

</comment><comment><USER9> I really need to pay attention to my sleep. My ability to do anything goes down severely when I don't sleep enough (which for me is less than 8 hours a day). So much so that it's enough of a reason to not have kids (I suspect I'd lose my job and/or go crazy), at least not until I'm financially independent.

Apart from that, it's mostly all in your head - i.e. at least in my case, motivation/demotivation largely depends on whether my internal self believes that the effort is actually worth it. So, for eample if the project is actually pointless (will likely not deliver value to anyone on completion), I will be demotivated. Also, if my effort is unrecognized, this will be demotivating as well. Having to deal with completely preventable bullshit every day (general corporate incompetence spilling over my particular area of work) is also demotivating.

</comment><comment><USER10> For me, what works best is to kickstart the day by checking something out of my todo list. Every morning, I choose a small task which shouldn't take more than 2 hours to complete, trying to have something to show for. The rest of the day using flows naturally afterward.

<comment><USER11> This is the thing that works best for me, though I define a smaller task as much smaller than that... ideally something that takes <15 min and doesn't necessarily require a lot of brainpower. I'm in the midst of starting a business, so I have a lot of paperwork that fits the bill nicely.

If I don't have any task like that, I just make myself work on something for ten minutes. 90% of the time, I continue to be productive after that. The 10% that I don't, I either give up and take a break until I feel productive (if that's feasible) or just force myself to work on anything that absolutely must be done now.

</comment></comment><comment><USER12> I keep a regular schedule. Wake up, get kids to school, work out, eat, get to work.

I maintain lists of things to think about and to do. My style of bulllet journeling.

I usually stick to the rule of threes. Three things I need to do this am, or today,or this week, this sprint...

If I don't need to read something now, it goes in my list and the tab is closed.

The biggest problem for me is that I am a morning person and there is not enough morning. I am most productive from around 5 or 6am til somewhere between 10am or noon. During that time, I need to get kids off to school, work out, and eat. I could shift working out, but if I skip it in the morning, I'm very likely to skip it over lunch or in the evening.

</comment><comment><USER13> I've never found a way to make sure every day is guaranteed to be productive, I have stretches of being non-productive. It's ok, within reason. The most important thing, to me, is to reboot sooner rather than later. If you let it become later, you can lose a lot of time and not notice initially (the days will seem to slide by rapidly in hindsight). I treat it mentally like a small vacation, then tell myself to get back to proper work mode.

To do that, I pick small, easy wins, then roll from there until I'm back into a good day to day work routine of productivity. I've found making sure I do something early in the morning as part of being productive, makes a big difference in breaking slack patterns. Not letting the morning get away without doing something meaningful toward whatever I'm working on. I'm strongly a night person and I still find that to be critical. In my observation of low-productivity periods of time throughout my life, my mornings were always mediocre for productivity. As I've gotten older (closing in on 40 now), the value of being productive early in the day has gone up considerably (it's an energy conservation and utilization thing).

</comment><comment><USER14> Productivity increased greatly for me after ditching my smartphone for a dumb phone and using a bullet journal when I'm away from the computer. That plus a disciplined regimen of daily planning, execution, and migrating tasks to the next day if not finished; learned from "Time Management for System Administrators" by Tom Limoncelli.

<comment><USER15> Do you have any examples of what you would put in a bullet journal? I don't think I've ever heard of it.

<comment><USER8> Not OP, but I've found BuJo incredibly useful.

It's less any one element of the concept than the fact that it's _immensely_ negligence-tolerant. Sort of like quitting smoking: you can do it a thousand times, but it's so easy to pick up again.

That and the notion of an index, which is IMO key to the whole concept, moreso than the bullet notations and other organisation.

Longer discussions here:

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

Also here:

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

After resumability and index: _spreads_. Basically, an idea hits you, take a two or four-page section, title it, _add it to the index_ , and collect thoughts on That Thing there.

One early spread I did (and still maintain) is "How to organize BuJo" (or words to that effect). Pages wanted, management ideas, etc. List things you _might_ want to manage, figure out how to do that, and then ... Just Do It.

I make a practice of starting from the front _and_ back of the journal, with more-fixed references (frequently-called numbers / email, reference information, hours of operation, Significant Other details (dates, measures, etc.) in the _back_ , whilst various projects tend to hit _where they occur to me_ in the course of a year.

(And yes, I've been starting a new journal each year, a bit of housecleaning / stop-lossing.)

The manual overhead (numbering pages, adding month overviews, etc.) is slightly tedious, but also a practice-of-presence and/or awareness that helps focus the mind and encourage review.

The Bullet Journal site itself is pretty good ([https://bulletjournal.com](https://bulletjournal.com)). There are numerous _very artsy_ BuJo videos on YouTube. I tend to _discourage_ those -- BuJo is a _functional tool_ , but also a _personal tool_ , and the notion of competitive BuJo strikes me a bit like competitive yoga: spectacularly missing the point. If your muse says "glitter-gun and washi-paper All The Things", then great. But if not, a well-used but non-artistic BuJo beats the pants off one that would feature well on Instagram or Pinterest.

</comment></comment></comment><comment><USER16> Other than the obvious, like sleep and eat better, I would say getting rid of long, recurring, useless meetings was a big change. Status meetings in particular I find to be quite useless. Having my day broken up by a few meetings is a lot less productive than one fully open day.

<comment><USER3> Status meetings are often best replaced by a system like Trello.

</comment></comment><comment><USER17> I listen to my emotions. Often times when I'm frustrated or lacking motivation there's a need or desire I'm not paying attention to. Productivity is not a win-lose, it's a win-win for both conflicting sides of my self.

</comment><comment><USER18> I work in an open office plan and one thing that can really help me to focus is to go to a conference room to work for a few hours. (At my workplace we have some "conference rooms" that are not bookable.)

</comment><comment><USER19> Subscribing. I find I tend to very easily forget the projects, ideas and endeavors that keep me inspired. I occasionally find about them again in my notes, bookmarks or chat history, and then productivity might go up again.

I guess the current environment for many people (at least for me) contains too many distractions that so easily washes away all the good ideas I've been pondering on.

Being organised by keeping a daily todo/journal has helped a lot, unless I forget to use it, which happens from time to time.

</comment><comment><USER20> I take time to do something not related to work to free my mind. I tried sports, but for it turned out for me it's cooking. I spend roughly 3-4 hours a day cooking, may it be actually cooking, chopping, cleaning, scouting of ingredients, sharpening knives. It's meditative and I get to eat better (and less) food. And it's a challenge, you fail, and you get better. It's a bit like programming actually.

</comment><comment><USER21> This goes hand in hand with waking up early for me.

I plan something fun to work on for ten minutes at 7am every day. Usually I already know what I'm doing to do.

Then I get ready and go to work.

Waking up late for me I realized was due to not looking forward to the day. This helped.

I also time everything. It games your mind. I'll set a timer for ten minutes to write a unit test or something, and try to get it done in that time.

</comment><comment><USER22> This is specifically for coding productivity, but I find it helpful to write out summaries of what I'm seeing in the code base when I'm working on a tough problem. It helps to keep my mind focused as I'm reading through thousands of lines of code. I may do the same thing if I need to dive into documentation for some API or programming language.

</comment><comment><USER23> Above all else, work on something that you're truly passionate about. It may take you a while to get there (either by finding the right employer or starting your own company), but it is the single biggest motivator I have found.

<comment><USER8> That's one approach.

Another is to occasionally take a break from your own interests, and help someone (or something) else. Making a difference _where you are not directly and personally involved_ can itself be its own kind of rewarding.

</comment></comment><comment><USER24> I have a dedicated office

I have a really solid desk setup - tray, mac, ultrawide, nice speakers. Ergonomics are important too.

</comment><comment><USER25> Manageable chunks, intermediate milestones and small rewards after each goal all help go forward without too much stress.

</comment><comment><USER26> Bullet journal or any similar organizing system

</comment><comment><USER27> [https://crushentropy.com/](https://crushentropy.com/)</comment>


Seth's Blog: Easy to type - <AUTHOR> http://sethgodin.typepad.com/seths_blog/2008/10/easier-to-type.html <comment><USER2> huh. ok on a general term yes people do say it is very easy to say sorry now after you have screwed up.

But why is this on HN ? Irrelevant (this ought to be a public response to someone who said that) or am I missing something?

<comment><USER3> I _think_ this is supposed to be what Joel talks about in section 4 here: <http://www.joelonsoftware.com/articles/customerservice.html>

But I'm not sure, and Joel's version is definitely better written.</comment></comment>


A Single Autonomous Car Has a Huge Impact on Alleviating Traffic - <AUTHOR> https://www.technologyreview.com/s/607841/a-single-autonomous-car-has-a-huge-impact-on-alleviating-traffic/ <comment><USER2> Watching the video, it looks to me like the key result here is "leaving a big gap in front of you helps smooth out phantom traffic jams", because that's basically all the autonomous car did when the traffic jams appeared.

It's also not clear from this video if this actually helps with "real" traffic jams. The simulated jam here has a very important difference from real ones, which is everybody's going in a circle, so once a car hits a phantom jam, they'll keep hitting the same jam repeatedly as it goes around the circle until the jam is cleared up. But in real traffic, once you hit a phantom jam, you'll never hit the same jam because it proceeds behind you and doesn't wrap around.

Which is to say, an autonomous car might be able to smooth out _future_ phantom jams once it hits the first one, if there are a sequence of jam "waves" instead of just one big one, but in that first one it doesn't have the buffer in front of it yet. It might still be able to help a little by building a buffer as it proceeds through the jam in order to reduce the need for cars behind to keep accelerating and braking, but it won't be able to kill the jam.

And actually, come to think of it, there's another key difference here with a real traffic jam, which is traffic jams generally occur on high-occupancy roads, which generally means multi-lane roads. So if an autonomous car builds a big buffer in the middle of a jam, cars from other lands are just going to merge in front of it, eliminating the buffer and preventing the autonomous car from actually doing anything useful.

<comment><USER3> Yeah, not sure what the big news is here... "traffic waves" actually have been talked about for a long time... I remember reading "the science hobbyist" pages almost 20 years ago (!), about this. I think besides the fact that the car is autonomous, and maybe more consistent than a human driver would be in this situation, there is nothing really new here.

[http://trafficwaves.org/](http://trafficwaves.org/)</comment></comment>


We are investigating a small portion of our users unable to access the site - <AUTHOR> https://twitter.com/githubstatus/status/1039495837611696129 <comment><USER2> It has been hitting me all morning, intermittent access to the site via the web interface, same with CLI.</comment>