Ask HN: Does anybody else feel overwhelmed while reading HN? - <AUTHOR> I've been programming for about 4 years now. During that time I've become an integral part of my team and have constantly been learning. Despite this I always read comments on HN and feel like there is SO much to learn that I'll never have the time for. I work at a big company and desperately want to leave so I have been dedicating time to prepare for interviews (pretty much just CTCI at this point). Even if I do get better at my interviews and land a job elsewhere, I'm worried that either I'll 1) not be as good as the other engineers there and they will quickly notice or 2) will basically feel the same as I do now. Hopefully the latter doesn't happen. My work environment is pretty negative right now so maybe a change of scenery will help.<p>Anyway, back to the original question. Does anybody else come on here and feel overwhelmed? Too much to learn, a lot of other people out there who are so much better than you etc. Could be just me, the Bay Area, or tech in general. <comment><USER3> Attempting to be as accomplished/skilled as the union of people you read on the Internet is a fool's errand. You have to accept you'll never know everything and that, for almost all things, there will be someone -- or a lot of someones -- much better than you.

Pretend you were working at a company with a hundred engineers. Do you understand how easy it is for _every single one of them_ to simultaneously feel like you do? The React mavens feel like they're just knocking together JS and wonder when they'll be allowed to do real engineering. The backend specialists wonder why they don't understand networking or servers better. The DevOps folks envy folks who build things. The American office wonders why they can't speak foreign languages; the German office marvels that anyone can learn Japanese; the Japanese office worries their English isn't up to the global standard.

There's nothing wrong in specialization -- it's how we stay sane. A very workable and easy to understand formula early in your career is specialize in two things; you don't have to be better at X and better at Y than everyone you meet, you have to be "better at X than anyone who is better at Y" and "better at Y than anyone who is better at X." This is very, very achievable, regardless of how highly competent your local set of peers is.

Also, unsolicted advice as a sidenote, but life is too short to spend overly much time in negative work environments. Assuming the negativity isn't coming from you, changing environments to one of the (numerous!) places where happy people do good work might be an improvement.

<comment><USER4> Reminds me of this:

"Data Scientist (n.): Person who is better at statistics than any software engineer and better at software engineering than any statistician."

[https://twitter.com/josh_wills/status/198093512149958656](https://twitter.com/josh_wills/status/198093512149958656)

<comment><USER5> That's very helpful. I was having trouble parsing "better at X than anyone better at Y" and vice versa; this is a perfect example.

</comment></comment></comment><comment><USER6> Oh, you will feel much better once you have mastered:

1\. Programming chips in binary, machine code, and C. You need a variety of chips. Try to learn at least 5 from each manufacturer.

2\. Learn at least 37 Javascript frameworks, as evenly divided between front- end and server side as you can. (Good news: angular 1 and 2 count as 2 frameworks).

3\. Learn Scala, Rust, Haskell, C, C#, Java. (Python and Ruby go without saying).

4\. Learn R, machine learning, statistics (prob and regressions), linear algebra and multi-variate calculus.

5\. Learn growth hacking (edit:) and lean startup, human centered design, and design thinking.

6\. Learn accounting, finance (go through Markowitz, to Black Scholes, Fama, CAPM, and factor models. Read the original papers only and implement everything yourself, in 2 languages).

Now you are ready to read HN.

<comment><USER7> Hardly. You still need:

1\. An in depth understanding of Physics, History, Literature, and Philosophy. You can just make up whatever you want in Economics, Sociology, and Bitcoins as fits your political leanings.

2\. Learn to resist weapons grade grammar analysis.

3\. Learn to recognize sarcasm in short, written text.

<comment><USER8> > 3\. Learn to recognize sarcasm in short, written text.

No need. This is HN. Someone's bound to have used machine learning to crack this already.

<comment><USER9> Duh, haven't you read "Automatic Sarcasm Detection: A Survey" by Joshi, Bhattacharyya and Carman?

[https://arxiv.org/abs/1602.03426](https://arxiv.org/abs/1602.03426)

<comment><USER10> And for a second there I thought that you just made that up :-)

</comment></comment></comment></comment></comment><comment><USER11> Here's the dirty secret: You'll always feel that way.

I'm in this for 30+ years now. (Yikes!). My resume is somewhat nice. I've got a deep store of knowledge and experiences. A large group of people considers me somebody you ask for advice.

And yet, every day, I still learn something new.

Sometimes because it's a new paper cycling about. Sometimes an HN article. Sometimes because some other senior person shares from their wealth of experience. And quite often because a junior does something in an unexpected way - knowledge comes from every corner.

I _still_ feel like I have no idea what I'm doing. I'll probably feel that way for the rest of my life. All my colleagues do.

So, don't worry. There's always somebody who's better than you, and that's great, because you can learn from them.

<comment><USER12> Imagine you are going for surgery and the doctor tells you 'yeah, I have no idea what I'm doing, really'.

You'd be very interested in knowing whether it's 'I just graduated from med school, I'm barely competent', or 'I've been doing this 30 years, the more you know, the more you realize how much you don't know'.

Those are not the same.

Insecurity is there for a reason - to let you know you should tread carefully and learn more.

The feeling of insecurity will go away when you're competent. The feeling of wonder and curiosity hopefully remains until you die - the author's problem is not the feeling of wonder that the parent is referring to :)

<comment><USER13> I know you used surgery/medicine as a parable, but I would argue that competency is probably a little easier to objectively gauge in those fields than in Computer Science, for instance.

<comment><USER14> Objectively, yes, but in practice, doctors sometimes work 12 to 30 hour shifts, all while the medical establishment actively tries to educate that tired driving is worse than drink driving...

</comment></comment></comment></comment><comment><USER15> I've been a professional web developer for 18 years now. I was very much on the bleeding edge of web standards, and jumping on Rails in 2005, I did everything from managing my own servers through backend, front-end and design in Photoshop. At the time the web was still a very greenfield type of place that was uncolonized by the top talent in either software engineering or in design, as a result it was possible to be one of the best web generalists with a little bit of aptitude and a lot of interest.

Fast forward ten years and every discipline of web development now goes very deep. It's still worth it to have a broad skillset, but it's no longer practical to be upper echelon across the board in web development. This generally leads to a feeling of overwhelm and regret that I can't learn all the things I possibly might want to learn, but on the bright side the playground is bigger than ever.

My advice is don't spend too much time thinking about the big picture, instead pick one practical project at a time and spend 95% of your time making it the best you can. Even if you only read HN a couple times a month, that's all you need for basic awareness of the landscape. By giving yourself heads-down time you can replace some of the overwhelm with a feeling of accomplishment, and you'll be growing your skills to boot.

</comment><comment><USER16> What you are feeling is the exact opposite of hubris. It is _good_ that you feel overwhelmed by looking at the universe of possible technologies and the pace of change within them. It sounds to me like you need to make peace with that, and then decide for yourself where you want to build expertise. You can extreme depth, extreme breadth, or something in between. According to IDC, worldwide IT spending is going to be around $2.5trillion this year. Its a big world with tons of products, disciplines, people, and very little of it is totally static. In fact, large swaths of IT probably get very little mention on HN.

To reiterate though, pick your battles, follow your interests/employment possibilities, and make peace with the fact that you can't know everything.

<comment><USER17> I think the opposite of hubris is called nemesis, or what happens after hubris.

I'd say the OP is describing humility, a quality which is essential imho

<comment><USER16> I think you may be right, however, Hubris is a "feeling" while nemesis is an "Agent". So, it is possible for you to be my nemesis, but you can't be my hubris.

Humility vs Hubris do seem to be opposites.

<comment><USER17> Good point about agent versus feeling. If my Greek friend is a reliable reference, the words originated in Greek mythology wherein a human acting in hubris would be punished by the gods, the punishment was called nemesis.

</comment></comment></comment></comment><comment><USER18> Everyone is overwhelmed by envy-stoking social media. Humanity simply did not evolve to process information from the whole world instantly.

Up to a short time ago, _most humans never ventured farther then 5 miles from their birthplaces_ in their entire lives. Before printing presses, books, and finally newspapers, all news was word of mouth...a very limited bandwidth indeed.

Even newspapers really were nothing but mostly gossip and had very limited work-related information for almost everyone, so feeling totally overwhelmed by the avalanche of targeted career knowledge is not only ok but actually totally appropriate.

</comment><comment><USER19> I think that the structure of the commenting system here at HN might contribute to this feeling.

Usernames are de-emphasized and there is no indication of karma/reputation. A trick of perception can lead one to read this forum as if the same handful of broadly knowledgeable people are participating in every discussion.

The reality is, I believe, quite the opposite. There are hundreds of us here, and we all have depth of knowledge in vastly different areas. There are developers, DBAs, sysadmins, doctors, lawyers, writers... I think once I saw someone mention that they were a welder.

Keep that in mind when reading the comments here.

<comment><USER14> FWIW, I do note the usernames comments come from sometimes, particularly if they're insightful.

Regarding the numbers here, I'd say there are multiple thousands, possibly 5 figures. The top article about Apple refusing to publicly backdoor the iPhone ([https://news.ycombinator.com/item?id=11116274](https://news.ycombinator.com/item?id=11116274)) got 5667 points. And sometimes my comments will attract a reply chain but not get upvoted, which shows that some proportion of people doesn't upvote here.

</comment></comment><comment><USER20> Specialization actually isn't a bad thing. I'm the CTO of an AI company dealing with some very complex problems. I've even written an oreilly book on deep learning. I tell you this for perspective.

I can't design for crap. I don't understand the thought process and don't even want to put cycles in to trying. It's not time well spent.

I'm also an enterprise founder. I don't mind wearing a suit selling to folks who have obscene requirements with 6 month to year long sales cycles. I don't understand B2C companies at all. I could never run one. The idea of catering to hundreds of millions of people with none of them paying you _while_ relying on VC to scale blows my mind. I feel similar about small business.

I like the idea of a smaller number of big name customers with large requirements. I also understand how they work: They are for profit organizations trying to make money or cut costs. I see consumers (despite doing a ton of data) as a blob of irrational behavior I don't want to deal with.

I also can't do marketing. I can kind of write when needed but my main focus is on technical content or specialized pitches.

Being on HN is very similar to being a founder, you see everything and wonder how the people around you do what they do. Don't worry about it! You hired them for a reason.

Hope that helps!

</comment><comment><USER21> I was overwhelmed at first. Every time a Show HN would pop up, I was amazed at how individuals could deliver on so much alone. So I accepted these things:

\- There will always be people who are better than you, in any field. I see it as a positive and a great learning opportunity.

\- There will never be time to learn everything you want to learn.

The question I try to answer is: Am I doing the best I can at the moment? Of course, this can also lead to complacency.

<comment><USER22> The internet solved discoverability but gave us the problem of consciously _avoiding_ information, learning about the right things at the right level and accepting some ignorance in favor of specialized deeper understanding.

Personally, I forward everything from HN's front page, every tech-relevant subreddit, major tech companies and software projects, roughly 30 blogs, Twitter, and blogs/changelogs for every project/service I depend on (for work or side projects)... all straight into my email.

Rules automatically curate emails into prioritized / categorized folders. Setting up those rules was my solution to information overload - <USER2> rule relevance is the same as measuring how my attention investment tracks against long-term learning goals.

One process for managing my work, personal life, and interests :)

10 minutes a day is enough to follow every personally relevant development. I do a deeper hour-long review of lower priority content at least once a week, but my email is an effectively infinite backlog of interesting-possibly- relevant information.

<comment><USER23> > I do a deeper hour-long review of lower priority content at least once a > week, but my email is an effectively infinite backlog of interesting- > possibly-relevant information.

As a zero-inbox kind of person this is terrifying. It's already enough effort to keep up with the new journal articles every day. I use my morning commute to do that and my evening commute to unwind and read the more interesting stuff.

<comment><USER22> I don't think you understand, my inbox is almost always at zero :)

This folders and rules was my strategy for balancing the need to be hyper- informed, well-organized, and not-overwhelmed... only uncategorized content shows up in my inbox.

My "High Priority" folder has subfolders for friends, family, bills, and other things that have to be kept at 0. The "Low Low Priority" folder has folders for online store emails that useful a couple times a year for discounts when I need a new shirt or something, auto-deleted after 14 days. In between is _everything_ , nicely triaged and categorized.

It's really more of a personalized private ad/tracker-free mobile and cli- compatible individual media aggregation service - perfectly managing the flow of the internet into my brain :)

<comment><USER14> So, I'm trying to do what you do, entirely using browser tabs. It concretely doesn't work.

After 200-400 suspended tabs open and a browser chewing molasses, I tend to export all URLs to a list for One Day In The Magical Future™, kill my session and restart.

So yeah, I'm very interested to find out what rule system you use - is this bespoke, or using standard email client features?

Also, what email client do you use? I've been trying to find a medium between "old computer becomes unusable after >10 tabs are open" and "fast, native information-presentation applications (like terminals) are text-only and don't support images" for 15+ years.

I use Gmail's basic HTML mode 99% of the time. It... I can't say I like it. I want something that doesn't use Qt and GTK+, because I perceive more lag with applications that use these toolkits than I did with lightweight WinAPI apps I ran on Win98/Win2K machines with half the hardware capability.

<comment><USER22> Browser tabs were a different part of the puzzle, for me anyway. This is my preferred way of managing information:

* My email pulls new information into my digital sphere of awareness. * Browser tabs/history manage active context and mid-term working memory. * Bookmarks (poorly) curate resources for long-term information retrieval. * My git-backed repository of notes tracked my own thoughts and plans.

Fastmail, gmail, and my old university Outlook account all support creating rules, however I am not aware of any RFC standards around rules. My adhoc suite of scripts for pushing content to email is entirely custom.

I like Thunderbird, but it's a pig at 300MB memory consumption... however it's open source and does what I expect.

<comment><USER24> Sieve scripts ([https://tools.ietf.org/html/rfc5228](https://tools.ietf.org/html/rfc5228)) are the standard for email rules; FastMail uses Sieve scripts internally and also allows you to write your own if you desire: [https://www.fastmail.com/help/technical/sieve.html](https://www.fastmail.com/help/technical/sieve.html).

<comment><USER22> Oh that is so freaking cool, thanks for sharing!

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER25>
       Fill your bowl to the brim
       and it will spill.
       Keep sharpening your knife
       and it will blunt.
       Chase after money and security
       and your heart will never unclench.
       Care about people's approval
       and you will be their prisoner.

       Do your work, then step back.
       The only path to serenity.

\-- _Tao Te Ching_ , Stephen Mitchell translation ([http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.h...](http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/taote-v3.html))

<comment><USER26> I need to get this carved into my steering wheel.

I need to burn it into my brain that it's acceptable to be adequate.

<comment><USER25> If that excerpt spoke to you, I can't recommend the whole thing highly enough. Mitchell's _Tao_ is beautiful -- one of the few books I can honestly say changed my life. (I wrote a bit about how here: [https://jasonlefkowitz.net/2016/08/books-love-stephen- mitche...](https://jasonlefkowitz.net/2016/08/books-love-stephen-mitchells- tao-te-ching-new-english-version/))

</comment></comment></comment><comment><USER27> HN in a way can be considered a monolith with thousands of years of combined cumulative experience in every domain and in every technology.

Of course, you, by comparison will seem lackluster. Realizing that a single person on here may be lacking in specific expertise may give you solace.

</comment><comment><USER28> As much as I love HN, it does make me feel extremely inadequate as a developer sometimes.

I often dream about building some project that would provide me passive income to no longer have to work a 9-to-5. It's not that I lack the skills to execute on it, but as a father and a husband, I struggle to find time to commit to such ideas while balancing time with my family. The only time I attempted to build my own product, I ended up getting fired from my daytime job because of performance reasons. It only discouraged me from attempting to pursue anything further.

I've learned that I just can't compare myself to others here, because it just makes me horribly depressed.

</comment><comment><USER29> There is quite a bit of braggadocio going on here too.

What may sound super bad-ass might just be a 20 year old intern riffing like a BOSS!

</comment><comment><USER12> You'd benefit from clarifying what it is that you really want.

More money, better work environment, be better at computer science, etc etc.

These are all different things and require a different approach. The sooner you figure out which one you value more, and understand that you'll have to neglect some other things in order to succeed in that area, the better you'll feel.

For example you didn't mention any education - if you want to not feel like a fraud, you'll have to educate yourself on all the things a common 4 year program teaches you. There is no way around it.

You may score a nice paying job in something like web-dev or mobile where there's a lot of demand, but you'll be blindly stitching other people's code together for a long time if you continue down that route.

The solution is to take some time to go fill in the fundamentals.

The more solid your fundamentals, the smarter and more interesting the projects you can be involved in, but you'll have to sacrifice time and money to get there.

Clarifying your real intention is important.

As for not feeling overwhelmed - by being good at your area of expertise. If you know you're better than most people at one specific thing that's in demand, you don't need to worry that someone else is kicking ass in augmented reality, big data or whatever hype phrase of the year is :)

</comment><comment><USER30> I sometimes feel the same way while reading HN.

I can usually cure it by going to a Sharepoint developers' meetup, or something similar. Running into people who there who are doing consulting work and doing very, very well for themselves while working significantly less that 40 hours a week and using almost none of the cool stuff that gets mentioned on HN.

I suppose the lesson there might be to avoid a game of one-upmanship with alpha nerds. And I don't say 'alpha nerds' in a derogatory sense. It's just that on HN, you're going to encounter lots of people who will run circles around you in one domain or another. And some people _love_ being the absolute expert in their particular technical domain.

That's okay. Good for them, actually! Everyone should do what makes them happy. You might find you're actually happier in a role that is more concerned with the business problems you're solving than with needing to be an expert in everything you see mentioned on HN. Your technical skills will be important, but not as important as your ability to use those skills to help a business 1) save money, 2) make more money, or 3) both.

</comment><comment><USER31> No, I don't feel overwhelmed. I am just happy to know of a place where it is possible to find meaty discussion that is reasonably civil.

I think this is a perspective problem. You need to stop comparing yourself to everyone in all things. That isn't what I come here for. I just come here to gratify my intellect and enrich my life. You don't need to compare to people here. You need to compare yourself to people you are in actual competition with at work or compare yourself to the work standards you are expected to meet. Don't come here and do that. It will only lead to misery.

</comment><comment><USER32> You have to accept a lot of it is noise, or effectively noise.

Some of it is wrong, some of it will never be relevant to you, some of it could relevant to you but not knowing it will never hurt you. Some of it could possibly be relevant but will be obsolete or out of date by the time you get around to using it. Some of it is nonsubstantive self-promotion. Just focus on some area you want to improve on at a given time and do it. Read what you want to read and have time to read and ignore the rest.

Just because someone puts up a nice-looking blog post with some information doesn't mean they're right, or better than you. Not that it matters if they're better than you. You could be in the top 10% and that still leaves hundreds of thousands who are better than you.

That's assuming there's some pure linear scale of developer quality anyway, which there isn't. People are fingerprints, not points on a linear scale.

</comment><comment><USER33> I strongly recommend reading the following book - [https://www.amazon.com/Good-They-Cant-Ignore- You/dp/14555091...](https://www.amazon.com/Good-They-Cant-Ignore- You/dp/1455509124)

It's a fantastic book by a now tenured CS professor that provides a good framework for how to think about your career / career satisfaction. He encourages working backwards from the lifestyle you want to the skills you need to master to where you are right now. His framework provides a lot of clarity and helps you ignore the roller coaster of announcements, updates, and new "things" you _FEEL_ like you need to stay on top of.

You can also just read some of his blog posts - calnewport.com/blog - if you don't feel like buying the book. Or check out some of his interviews, etc.

</comment><comment><USER34> Read about the T-Shaped profile mentioned on the Valve's Employee Handbook[1]. It's a nice concept on how to know when to learn something new and when to learn more about something that you already know.

And calm down: HN users are really heterogeneous. Trying to be like everyone here is impossible. Even you find someone with the same profile as you, it is a nice thing to know that there is something new to learn. A bigger problem is when you don't have anything new to learn.

[1][http://www.valvesoftware.com/company/Valve_Handbook_LowRes.p...](http://www.valvesoftware.com/company/Valve_Handbook_LowRes.pdf)

Edit: And answering your question: I feel overwhelmed when I learn somenthing new here, and there is already another article telling me that what I learned is obsolete.

</comment><comment><USER35> I'm a Sysadmin on the east coast & I feel completely wrecked every time I read the comments here. The level of brain power & swell here is beyond me. Some of you can be a little brash, though. I wonder if it's just you guys are all on a different level, cognitively, are taking drugs, or what. But the precision at which some of you respond to comments, clarify things and/or just rip apart content, is fascinating.

</comment><comment><USER36> > _Anyway, back to the original question. Does anybody else come on here and > feel overwhelmed?_

No, or at least not much. Most people have a specialization or two, whether it be front-end, back-end, mobile, application, embedded, games, etc., which limits the scope of what you really need to care deeply about.

Beyond that, it's a matter of your own personal curiosity and desire to expand your abilities; my reaction to most articles is "hmm, that's interesting; I'll remember that in case I ever need it" with just a scant few meriting a "I need to dive into that because I also want to have that knowledge / skill."

</comment><comment><USER37> Reading HN is extremely overwhelming. I'm in the data science field. So I read yet another Deep Learning article on HN and wonder how long it is till I'm unemployed and bankrupt because I barely know anything about deep learning and have no opportunities at all to use it at my job.

Then I remember the following.

1). I'm employed, my manager is happy with the work I do, and I make enough money to pay my bills, have savings, and live in a decent place in a safe neighborhood.

2). I don't have to be better than everybody else at my workplace. I just need to find an area where I can contribute.

3). When I apply to other jobs I get some positive responses. I know people who would be happy to recommend and hire me if they can.

4). I've met more than a few people who can talk about data science like they can solve any business problem under the sun, but cannot actually do much of anything except talk.

5). There is plenty of stuff I read on HN that is clearly wrong or exaggerated.

I think the key is to focus on what you need today to stay employed and have a realistic assessment of your weaknesses and where you want to go. Then figure out what you need to get there and slowly work towards that that. I don't need to know Rust, Go, and Vue.js because they have nothing to do with my job or where I want my work direction to go. If they day comes when I do need to learn that stuff, I'll learn it.

</comment><comment><USER38> I experienced much the same thing when I first discovered HN. What helped me was the realization that there's a difference between being aware of something and being an expert in it.

I've found that it's not often that I need to be as intimately acquainted with a subject as those who are feature on HN appear to be. In fact, just knowing _about_ something has been enough for me to intelligently answer an interview questions, converse with a senior engineer, or make the right decision on a project. And usually that's because what's most important is being curious and asking questions - e.g. admitting to myself that I'm not an expert.

Now, instead of being a testament to my ignorance and personal failings, HN is portal that let's me feed my curiosity.

You may want to do some research on the impostor syndrome. It's been my experience that anyone who's any good at anything is convinced they'll never "catch up."

</comment><comment><USER39> A few comments come to mind.

Yes, there's so much to learn that you'll never have time for it, even if specializing in a small area. It reminds me of a Chomsky interview. He said that he has so many books left to read in his office alone that a lifetime wouldn't be enough. You're in good company.

It may sound obvious but don't forget that HN isn't one person. The guy that knows about particle physics is usually not the one that tell you about the latest type theory research. Don't compare yourself with a collective mind.

Besides, I'm sure there are people less bright than you in all positions you can imagine. Retrospectively, I realize that there are a lot of things I didn't even try for fear of failing or because I thought I wasn't smart enough. It's only a few years later that I realized I missed so many opportunities.

<comment><USER40> > It may sound obvious but don't forget that HN isn't one person.

Honestly I think the total absence of avatars can make it quite easy to forget that HN isn't one person. "That person with their name in little grey letters is a frickin' genius, jack of all trades"

</comment></comment><comment><USER41> I used to feel this way and when I had time set aside to learn I would just sit there and waste almost all of my time figuring out what to study because there was so much. I would waste all my time doing this and not really learning very much because the breadth of stuff to learn was overwhelming.

Eventually I just forced myself to choose one thing and focus on it. When I get to the point where I feel competent in it, whether that's a day or 3 months, then I allow myself to move onto something else.

Don't get stuck in your head. Just choose something and commit, no one knows everything, the posts are by hundreds of people, each with skills in different areas. Know one knows it all.

</comment><comment><USER42> I too feel this way. But somehow all my superiors in my work has so much confidence about how much they know about the project and can even project themselves as know what they are taking kind.I am sure they do not know as much as they think, because they are very confident in my area of work more than i ever will be.

       The irony is the more i know the lesser confident i get and i reflect it in meetings. I dont know how to avoid it. I am really looking for a mental framework on how to not look like a complete idiot in meetings although what i say is totally factual.

</comment><comment><USER43> Take a break.

Try cutting the cord for a few days. It's refreshing.

</comment><comment><USER44> I also feel overwhelmed while reading HN. Being surrounded by so many great and smart people, I feel like I know nothing and like my entire career until now was a waste of time and resources. I am also becoming addicted to HN. I left Twitter behind and now HN is my primary source of information. I am reading HN anywhere: in subway when I commute to work, in car while I stay in traffic jam, before I got to sleep, at work, etc. Thank you all for making HN such a wonderful place.

</comment><comment><USER45> I feel this way about frontend technologies that people talk about, but I concluded a long time ago that trying to keep up with the latest churn in that space is pointless. I have a few technologies which are stable and work well for what I need, so I focus on keeping up with that. Every time I've tried to chase the latest and greatest frontend fad it usually turned out it was an immature reinvention of a wheel someone else already built better.

</comment><comment><USER46> I simply accept and take advantage of the fact that HN is filled with many people much smarter, much more accomplished, much more driven, much more successful than me. I've never felt overwhelmed by it - that seems like it would take a personal choice to put yourself in competition with the best of HN, which seems a little silly to me (especially if the end result is not something productive).

</comment><comment><USER47> I am a cognitive neuroscience post-doc. In my work I have to be an expert or at least competent in: cognitive theory relevant to my specialty, brain science relevant to my specialty, neuroimaging methodology, non-trivial statistical methods, as well as a competent paper writer, grant writer storyteller, and talk giver, I regularly need to write bash and python scripts, administer and operate a linux compute cluster. I also need to be a good dad and husband, and that takes practice. I read HN and am impressed with all the expertise and competence and also feel overwhelmed. I'd like to try some ML on my imaging data, but I'm stretched too thin already. Maybe someday. Or I'll partner up with someone. I have the urge to do it all, but I'm not smart enough and I don't have superpowers to manipulate time. I'm aging. Time is running out. Oh my god.

Pause.

Take a walk.

Do what you can.

It is ok.

</comment><comment><USER48> Absolutely. It's much worse if, instead of HN, you follow a niche area like machine learning because the pace of progress is so fast plus each paper / project that gets released is so _dense_. It took me a couple of weekends just to set up an old box with Linux and the proper drivers for a GPU, learn python virtualenvs, etc; Meanwhile, it's absolutely discouraging to look at reddit.com/r/machinelearning and see the flurry of _productive_ activity.

I think a sense of resignation is actually useful here. Just resign yourself to the fact that you'll never be as good as them and that it will take you 10 years to be able to just follow instructions under a Google or Facebook AI scientist (, say). And continue to trod on like the tortoise in the tortoise vs. hare story :-)

</comment><comment><USER49> "During that time I've become an integral part of my team and have constantly been learning." First off, this sounds like you know a lot more than you give yourself credit for!

Second, think about what kind of site HN is. This is a site whose DAU are mostly highly educated (either formal or otherwise) from very diverse backgrounds in tech, machine learning, etc., etc.. It should come as no surprise that for any given topic there will be a ton of high quality and interesting points of view.

As for the statement 2): "will basically feel the same as I do now." To be completely honest, you probably will. Every new opportunity in life presents you with a chance to learn and while learning most people often realize how little they actually know. But that is why you are learning in the first place!

</comment><comment><USER50> I can see how this would happen, so I doubt you are alone. There's so much stuff and s o little time to consume it. My browser tabs and pocket account seem to grow and grow and I seem to spend as much time organizing and moving information as I do actually consuming it. I have trained myself as I've gotten older to just let some of it go. Not everything has to be seen.

I think this is one of the (probably many) reasons feed readers failed and chat came to beat email: the feeling of something incomplete. I had to force myself to ignore unread counts to stop myself from going crazy, but Twitter, HN, Reddit, etc. did away with outward signs that there were things unread, and that's a good start.

</comment><comment><USER51> No, because you can't expect to learn and use every new technology - sometimes, it's better to know "proven but boring" than "new but broken"!

I appreciate more the insightful conversations than view a link to the latest JavaScript framework.

</comment><comment><USER52> Yes and no.

Yes that I realize I have a lot to learn and I should keep removing distractions/bad habits and toxic people/situations out of my life. Yes that I realize there are Ivy Leaguers in here and also people who work at the world's largest companies.

No also because there is also a fair amount of hubris here. There are also a lot of people who miss the forest for the trees. There is still a lot of room for innovation in certain markets and the means of fulfilling human needs are ever evolving even if the needs themselves are still the same.

I take breaks from time to time. Also I've recently deactivated my facebook and unfollowed a lot of people on Twitter/Quora/Instagram. Feels great.

</comment><comment><USER53> In my case, no. I don't know everything, but I know enough; I'm good at what I do. I'm confident I'm contributing.

Sounds like you need to change jobs, if you're at the point of acknowledging that your work environment is negative.

</comment><comment><USER54> Yeah there is a lot out there. I've been doing this for a while and tech changes all the time. Don't worry about not being an expert at everything, enjoy that there a lot to learn.

I don't worry too much about it, as long as what I'm building works and can be maintained I'm happy.

The good news about tech changing all the time is if you wait there will be some new language or framework so you didn't waste your time learning something obsolete !

"An expert is someone who knows more and more about less and less till they know everything about nothing" \- from a Murphy's laws on technology poster..

</comment><comment><USER55> Keep in mind:

\- Most solutions posted here probably won't just work for your problem, you have to work it into your needs - concentrate on what works for you not necessarily whats new.

\- Many really cool things took someone years to develop, you are just reading a lot of different people's long-term accomplishments not a small group. And most of those people were sticking to things that worked instead of chasing the shiniest technology.

\- Theres more than one way to do anything, just because they may be currently more successful doesn't mean you can't find new solutions, don't forget to try your own thing.

</comment><comment><USER56> You don't get good by worrying. You get good by loving to learn. I went to college at ten years old to learn to program. I had a job when I was 14 working on invoicing software for telephone companies. At 18 I went to university to learn engineering (structural). I lasted 8 months in industry after graduating because of how bored I was not learning. It's not a bug its a feature that there is so much to learn in CS. Embrace it. You're able to pay the rent in under a year and the sky is the limit to how much you can learn.

<comment><USER57> I see nothing in this comment that would require a downvote.

</comment></comment><comment><USER58> The greatest thing about a resource like Hacker News is that you get exposed to a lot of ideas. It's up to you to figure out which one of these ideas you're going to explore more.

Nobody explores all of them.

Figure out what's interesting to you and then go deep on that. Keep an eye on the stuff that's not interesting to you just to develop contextual knowledge, then when/if your interests/responsibilities change and you do need to go deeper on stuff you didn't need before, you can get started more easily.

</comment><comment><USER59> I've felt this way too in the past but gradually realized that's it OK not to know everything. Specialize in one area, make it your 'home base', and then test the waters of other tech from there. Once you find something new that you like you can gradually chip away at it and expand your skill set. I've got several things on my radar right now, but still put my specialty first. With this state of mind, I don't feel overwhelmed, but still have lots to look forward to.

</comment><comment><USER60> I'm guessing there's a few factors at play that lead to your perception:

(1) HN covers a lot of areas of software development; more than any one person can really be expected to know. But each reader is ignorant regarding _how big a fraction_ of the covered technologies are well-understood by the other readers.

(2) HN stories often involve technologies related to web-development, containers, or virtualization. Those technology areas spawn inordinate numbers of tools, frameworks, etc. This exacerbates issue (1).

</comment><comment><USER61> Try doing DL research these days -- just skimming through new papers takes most of your day. :-)

The thing that helped me the most was to realize that you _have_ to specialize, at least to some extent. It's impossible to know and do everything, no matter how much you would like to.

Pick "your thing", and worry about staying up-to-date on it. Everything else skim through just to understand what's going on. How broad "your thing" should be depends on how much time you're willing to spend.

</comment><comment><USER62> Tech in general is a fast moving target.

Don't try to master everything all at once. Just learn what you need, or what interests you and then on to the next thing. There is no "done".

<comment><USER63> I think there _has_ been an explosion in potential distractions the last couple of years though. Everywhere you look, new frameworks, platforms and languages, as far as the eye can see. So much shiny stuff. And it just keeps coming. (I do think something has changed in like just the last five years or so. Github has been an important part of it, I think.)

<comment><USER64> Does this change also appear in usage numbers, is real large scale use in the industry much more divided among tools since before 5 years ago ?

</comment></comment></comment><comment><USER65> That's one way to look at it. The other way is to gaze in wonderment to how much there is in the world to learn. And learn just for the sake of it. The day I look at the world and don't find enough interesting stuff for me to learn about is the day I'd really be afraid.

Your work situation can be remedied. Lots of companies require good engineers who're willing to learn stuff rather than pre-know stuff.

</comment><comment><USER66> Just have a look at: [http://n-gate.com/hackernews/](http://n-gate.com/hackernews/)

:)

<comment><USER67> It actually is quite useful, I sometimes find interesting stories there which I missed when they were submitted.

</comment></comment><comment><USER68> The old adage of not comparing your life to somebody else's highlight reel is valid for HN as well.

You'll never master everything. No one does. Take it easy. You say you've become an integral part of your team and that you're constantly learning. You seem to be on the right path.

</comment><comment><USER69> Even if you assume every comment you read is written with good authority, bear in mind that each time you read a comment on a different topic it is in all likelihood written by someone else; the two authors couldn't have written each others' comments.

</comment><comment><USER70> Life is all about learning new things. Feeling overwhelmed is part of our life. You should break it down into small chucks and start learning one thing at a time. Just learn one new thing everyday, you'll endup knowing a lot in a year from now.

</comment><comment><USER71> You'll realize everyone is only good at 1 thing. Taking everyone against you certainly makes you feel overwhelmed but after you realize 4 years is nothing and you are financially stable, you'll feel better.

</comment><comment><USER72> There is a lot out there, you don't need to be an expert in every new thing.

Strive to be a helpful, open, honest team member, with a thorough understanding of core patterns and practices. (e.g. SOLID principles)

</comment><comment><USER73> The only people who comment on the technical posts are the experts in that domain/topic. Most readers just read silently and don't have the knowledge/context to comment

</comment><comment><USER74> 4 Years is not much.

HN starts to fall in pattern as a lot of stuff you do. There are those new cool hip stuff, papers, a few deep inside blogposts and it repeats itself.

Enjoy HN as long as it holds :)

</comment><comment><USER75> Yes, I do feel overwhelmed while reading Hacker News, 'cause it is the only community where I feel free from getting absurd ads. :)

</comment><comment><USER76> Find comfort in the fact that broad mastery takes a very long time, but there is always room for apprentices and journeyfolk.

</comment><comment><USER77> Yes it may feel overwhelming at times, but the trick is to be focused and selective what you read.

</comment><comment><USER78> And I just found out there's so much smart people here. Seriously.

</comment><comment><USER79> Have you been learning from your team? Although HN is nice to find about interesting things, there's nothing that can give me more experience than focusing on my team's goals. Focusing on execution is the most important and most translatable skillset you can have besides interviewing.

</comment><comment><USER80> I feel underwhelmed...

<comment><USER81> Yeah, exactly. Sometimes I open HN and find no new things that are interesting to me. I guess I'm opening it too often :D

</comment></comment><comment><USER82> no</comment>


Curved Widescreen (2880px x 900px) LCD Display - <AUTHOR> http://www.necdisplay.com/Products/Product/?product=34f0e2d4-795b-4c4c-964d-da99e85a39fa

<comment><USER2> It's not an LCD display, it's a CRT. Check out pictures from all angles here: [http://gadgets.boingboing.net/2009/06/04/necs- massive-43-cur...](http://gadgets.boingboing.net/2009/06/04/necs- massive-43-curv.html)

<comment><USER3> It's not an LCD or a CRT. It's a quad-DLP display with LED backlighting manufactured by Ostendo Technologies (<http://www.ostendotech.com/>).

<comment><USER4> Hmm. Right you are. Now why would NEC call it an LCD? That is false advertising as far as I am concerned. Of course, since this display uses Osram LEDs for the backlight, rather than expensive short-lived Halogen bulbs, I doubt that most consumers will care.

</comment></comment></comment><comment><USER5> I saw one at MacWorld this year. The display quality (brightness, sharpness) weren't up to par.

And, you could see the breaks in the panels.

</comment><comment><USER6> 900px high? No thanks.

Neat concept. $8,000 this year, $500 next year.

</comment><comment><USER7> "Native Resolution 2880 x 900"

I guess you're not supposed to sit very close to it..

</comment><comment><USER8> Didn't Alienware demo one of these a while back? Is it the same one?</comment>


Python's For - Else - <AUTHOR> http://book.pythontips.com/en/latest/for_-_else.html <comment><USER2> The word else implies something different to what it does (IMHO at least). In and if/else clause, the else happens when the primary/expected thing doesn't happen. I would expect that for a loop, an else clause would happen when the loop does _not_ finish normally, or if they loop is empty. I'm sure it's a useful clause in certain cases, but the meaning of the word used is reversed. It might be better use 'then' or something like that:

      for i in l:
         print(i)
      then:
         print("iteration finished without breaking")

<comment><USER3> I'm a strong python advocate and rarely use for/else for this exact reason. It makes _more_ sense to me for it to be the other way (your way) around. I always add a comment on the else when I do too, to ensure that future readers don't make the same mistake.

<comment><USER4> I agree. It's seldom something I've used in my scripts/small projects for this exact reason.

It should also be noted that there is a `while-else` compound statement as well, wherein using a `break` immediately exits the loop, without executing the `else` clause [1].

[1] [https://docs.python.org/3/reference/compound_stmts.html#the-...](https://docs.python.org/3/reference/compound_stmts.html#the- while-statement)

</comment></comment></comment><comment><USER5> I love Python's for-else feature. I've used it on a number of occasions, and have found it to be useful and to cut down on code.

However, I agree that the use of "else" is horribly confusing. When I teach "for-else" to students in my Python courses, they are often surprised by the functionality, and doubly surprised that the word "else" is used. I often joke that it would be a great feature, if only they had chosen something a bit more intuitive and memorable instead of "else", such as "if_we_exited_the_block_without_encountering_a_break". Slightly more seriously: While I realize that adding a keyword to Python isn't in the cards, a word such as "nobreak" would be easier for people to understand, and would stress the point of the functionality.

The fact that Emacs always tries to indent the "else" of a "for-else" to align with an "if" inside of the loop, rather than the "for" with which it matches, speaks volumes. I mean, if Emacs is confused, then how are we mere mortals supposed to remember?

So when I use "for-else", it's almost always in code that I am writing for myself, and that I don't expect others to read or maintain.

Don't forget that there's also "while-else", although I can't remember the last time I saw that actually used.

<comment><USER6> I would definitely expect a human to understand code intent (and indent) better than Emacs. Machine learning has some ways to go still. ;-)

<comment><USER7> Emacs is really not a reference in terms of code indentation. I expect classic IDE to be much more robust at it, since emacs uses regex most of the time to determine indentation (the javascript mode is the only exception I remember), whereas I imagine a full-blown python IDE will actually parse the code.

</comment></comment></comment><comment><USER8> Yes the for...else is useful but for years it didn't do what I expected, which is execute when the sequence was empty. After reading the docs a half dozen times I finally internalized that the else actually means "not broken," aka "not found."

So now when I use it, I always put a comment next to it for myself and the next person:

        for item in items:
            if found:
                break

        else:  # no-break
            print('not found.')

<comment><USER9> Honestly, I would just not use it wherever possible. It's a wart on the language, and there are plenty of semantically superior alternatives. I would rather wrap in function + use return over break, use a sentinel value, or raise an exception over using the else block.

If there's anything I've learned, it's that just because a language has a feature, doesn't mean it should be used.

<comment><USER10> Function + return seems like a good solution, but I'd rather not keep additional state or use `raise` (ie socially acceptable GOTO) when the language has a primitive for this.

You shouldn't use a feature just because a language has it, you should use it because it's a simple, well-defined primitive that's less complex than alternatives.

</comment></comment></comment><comment><USER11> [https://twitpic.com/4a52sh](https://twitpic.com/4a52sh)

A survey on this feature was done at Pycon 2011. Maybe things have changed since then, but at the time, most people didn't understand what for/else did.

I think it's a bad construct because, as many have mentioned, a lot of people make the commonsense interpretation that the else block will only execute if the for block did not.

Note, the link above come via Jeremy Avnet in the comments of this blog post.

[https://nedbatchelder.com/blog/201110/forelse.html](https://nedbatchelder.com/blog/201110/forelse.html)

<comment><USER12> > the commonsense interpretation that the else block will only execute if the > for block did not

That is exactly what it does. So when you explicitly break, the for body was executed. As for the poll, the first answer is not wrong. It's first option even, the question is vague enough. I wouldn't read that much into it, 33+24+9 (66%) people gave correct answer.

<comment><USER11> I think you're mistaken on both counts. The first answer is what I call the "commonsense interpretation" and it is incorrect about what python's for/else does.

<comment><USER12> I don't know what to tell you...

For break to be called explicitly it has to enter the loop body - there is no other way. The break only works in the loop body.

And the first answer is correct in the sense that it is not wrong (try it). The poll is simply flawed.

</comment></comment></comment></comment><comment><USER13> I've used the loop -> else construct sparingly - there are times when it is really convenient.

But it is VERY confusing.

Its very confusing, and poor design - IMHO - because the presence of an "else" block, in the typical case, generally indicates that the preceding block was never executed.

When it comes to while/for blocks in python, the keyword literally indicates the opposite - that the preceding block executed without hiccups - and so also execute this block.

Its a great feature - but there should have been another keyword for it: "also" (or something like that)

<comment><USER14> Hold up. Stop. Read the parent closely.

This is a case where the right answer is only obvious once it's been stated.

> Its a great feature - but there should have been another keyword for it: > "also"

SmirkingRevenge - !@#$ing brilliant. You've stepped outside the box and presented an answer that will click as soon as it's read.

Someone make a PEP.

<comment><USER15> "nobreak" also makes as much sense. Even Raymond Hettinger has suggested that, but getting a new keyword at this point in python is going to be really difficult.

<comment><USER13> "nobreak" also works, and arguably has less ambiguity than my suggestion.

And I agree getting a new keyword for such a limited use-case feature would be difficult and doesn't feel likely.

</comment></comment></comment></comment><comment><USER16> The fact that so many commenters here are confused or surprised by what it means or how it works sort of proves to me that it is a bad idea to use this in your code-- especially if anyone else might need to work on that code. I always prefer the clearer, obvious approach, even it is slightly longer.

<comment><USER17> It is true that this is confusing for people who come across it for the first time, but it is easy to understand/remember once you know this feature.

<comment><USER18> A counter-intuitive feature is not worth using even if 9/10 python devs know about it. Which they don't seem to. [https://twitpic.com/4a52sh](https://twitpic.com/4a52sh)

Seems like bad usability.

</comment></comment></comment><comment><USER19> Oh, that didn't do what I expected at all.

I was expecting this to be similar to:

        if list: for x in list:
           # Some code
        else:
           # else clause

which would have been quite useful to have for general iterators. But apparently it's a statement that triggers _unless_ you use 'break' to end the loop, which just seems like a really weird use case, and smells like a goto.

<comment><USER20> It is useful when the "normal" flow is to terminate the loop early with a break. For instance, in a linear search algorithm:

        for x in li:
          if x == to_find:
            print("found")
            break
        else:
          print("not found")

Logically, the "else" matches with the "if" introducing the "break" and means "if none of elements cause the break branch to be taken".

<comment><USER19> Yeah I get that it can be useful, but I just don't like ending a loop in two different ways. It just seems too easy to end up writing something like:

        for x in sorted_list:
            if x == to_find:
                print("found")
                break # we've found a match
            elif to_find > x:
                break # match is not possible
        else:
            print("not found)

<comment><USER21> Funny, I actually like for-else because it can _simplify_ loop exits.

First of all, the core of a linear search loop always has two exits: the break and the normal (unsuccessful) loop exit.

But in a lookup-or-insert pattern, a regular for loop has two possible states that the system can be in at the end of the loop. With a for-else loop, you can put the or-insert part into the else block, so that there is a simpler invariant: after the loop construct, the element always exists and has been found.

I was honestly surprised by all the negativity in this thread. To offer an alternative opinion, there have been plenty of times when I missed having for- else while writing C.

<comment><USER22> I feel the same way. For-else is one of those things that make me miss Python when I'm working in another language, alongside things like list/set/dict comprehensions, Python's object model and it's way of dealing with generators and iteration.

</comment></comment></comment></comment></comment><comment><USER23> I hate adding syntax but you know what's really useful? Django's `for .. empty` template syntax.

I would like to see this in Python:

      for i in []:
        print(i)
      empty:
        print("Sequence was empty!")

<comment><USER2> Write up a PEP! It's a great idea. Syntax can be good if it makes sense and makes code easier to read and write.

<comment><USER8> Won't be accepted. Recognized as a problem, but now set in stone.

<comment><USER2> Maybe in python 4...

<comment><USER8> Nope, been discussed many times on the lists, neither planned.

</comment></comment></comment></comment></comment><comment><USER24> I've been using this for years and never thought twice about it, I'm shocked by all the negativity.

It's great for controlling iteration in a nested loop:

      for item in report():
          for event in in item['events']:
              if event in events_we_care_about:
                  break
          else:
              continue
          act_upon(item)

I realize it's a trivial example that could be written without a nested loop, but there are often good reasons for nested loops and littering them with control variables and if statements gets messy quick. I have always found for- else to produce more elegant code.

Your criticisms may be quite valid, I just wanted to share my surprise.

<comment><USER25> I may be missing something... but how is that clearer than

      for item in report():
          for event in item['events']:
              if event in events_we_care_about:
                  act_upon(event)
                  break

<comment><USER24> It's a trivial example. Just to demonstrate how for else helps to control an outer loop from within an inner loop.

</comment></comment></comment><comment><USER26> To me, the else isn't intuitive if you haven't encountered it before. It's a nice feature, but perhaps better naming could improve code readability.

How about for-finally? It's a hard thing to name correctly, but to me this seems to be slightly more intuitive if you've never seen the feature before.

<comment><USER27> You can't use "finally" because that implies an expression that runs regardless, which this does not (it only runs if the loop never breaks).

<comment><USER26> Yeah, that's a good point. To me it's a little more clear than 'else' but there might be a better name still that doesn't suggest this code always runs. Naming is hard :)

<comment><USER28> Perhaps `for...lastly...else`? `lastly` being the current meaning of `else` (something that happens after the iteration has completed), `else` being the thing I wish it meant (something that happens when the iterator was empty).

</comment></comment></comment></comment><comment><USER29> I had my first legitimate use of for else last week after knowing about it for years and it (the keyword) never making much sense.

I had to call an API for it to load data into a cache, but sometimes this wouldn't work so I made it try up to 3 times, otherwise it would show an error. So something like:

        for i in range(3):
            if load_cache():
                log("success")
                break
        else:
            log("failure")

Else made total sense here.

</comment><comment><USER30> Nearly everybody seems surprised by what it does, which would appear to constitute a fairly strong violation of the "principle of least surprise" that is one of the most cited guiding principles employed by the designers of Python. As such it would seem better to be described as an "anti-tip" or something like that.

<comment><USER31> It was a feature van Rossum added in the earliest days of Python, on 14 Oct 1990, back before he fully developed his design sense.

As I recall, he said added it because the implementation structure of the "for" code matched the implementation structure of the "if" code, and he felt that 'for' could use an 'else'.

</comment></comment><comment><USER17> It is worth noting that the else clause can also be used with while loops.

[1]: [https://docs.python.org/3.6/reference/compound_stmts.html#wh...](https://docs.python.org/3.6/reference/compound_stmts.html#while)

<comment><USER32> Seems a bit useless since

        while x < 2:
            ...
        else:
            print('>= 2')

is the same as

        while x < 2:
            ...
        print('>= 2')

unless you use a break. Just seems unnecessarily confusing to me. I have used for ... else though.

<comment><USER33> I think that the subtle difference is that in the second example "print('>= 2')" is always executed whereas in the first example the print statements is executed only if no break was executed in the while loop.

Quoting documentation: "A break statement executed in the first suite terminates the loop without executing the else clause's suite."

<comment><USER32> I did say "unless you use a break". I don't think this is very useful.

</comment></comment></comment></comment><comment><USER27> While this is a great capability to have, the tendency to have an indented "if" preceding a not-indented "else" just always seems like somebody might have made a mistake.

I would rather something that captures the loop state itself as an operable object, such as:

        with for as loop:
            for x in my_list:
                ...
            if not loop.broken:
                ...

<comment><USER34> Interesting how people's intuitions differ. For me hiding yet another . method that requires discovery is more burden on the human. I'd rather reach for map/filter => processing.

</comment></comment><comment><USER35> One thing that for-else is very useful for is implementing an elegant and easy-to-understand retry mechanism:

      for _ in range(3):
          success = do_something()
          if success:
              break
      else:
          raise FailedToDoSomething

I generally like this feature of the for loop and it would be a shame if it was removed.

<comment> cup-of-tea Indeed I have use this idiom a lot. The alternative is to store a state variable indicating success which isn't very nice.

</comment></comment><comment><USER36> I find this pattern very much better expressed with functional programming:

      item = next((item for item in container if search_something(item)), None)
      if item:
          process(item)
      else:
          not_found_in_container()

instead of as suggested in the blog post:

      for item in container:
          if search_something(item):
              # Found it!
              process(item)
              break
      else:
          # Didn't find anything..
          not_found_in_container()

<comment><USER22> Your suggestion contains bugs, though. To make it fully equivalent to the code in the blog post, it would need to be:

      sentinel = object()
      item = next((item for item in container if search_something(item)), sentinel)
      if item is not sentinel:
          process(item)
      else:
          not_found_in_container()

... because item could be None or another falsy value.

</comment></comment><comment><USER37> Since Python doesn't have goto statements, this removes one of the situations where a goto statement is the best tool to use in a language like C++.

<comment><USER38> In a sense, raise/except is a goto.

Go-lang decided against exceptions in part because they are equivalent to gotos.

<comment><USER39> But Go does have a goto statement...?

<comment><USER40> And like many languages that do, it's an extreme code smell to use it, whereas most(if not all?) languages that have exceptions recommend to use them. Though technically, Go does have exceptions (under the name "panic"), just not a very easy to use "try/catch" block (the "try/catch" stuff is function level, so you have to do anonymous functions to "emulate" other language's try/catch). Also, Go's goto has restrictions.

<comment><USER37> It's not really a code smell. They just don't let newbies use it in CS 101 because they want them to think in a structured manner about loops and such.

</comment></comment></comment></comment></comment><comment><USER41> This is strongly advised against in the book Effective Python as the semantics are opposite to what one is used to. The else clause will always be executed unless there's a 'break' in the for-loop.

</comment><comment><USER42> Now I feel like I have to rewrite every single Python script I ever wrote.

<comment><USER43> Please don't bother. Obscure, very rarely used language constructs like these often don't really enhance the code's maintainability. On the contrary; would you have understood the very same code yourself _before_ reading this article if someone _else_ had used the construct?

<comment><USER44> I think if you read it, you'd read it and get it.

</comment></comment></comment><comment><USER45> Well, that's a dumb feature. Very counterintuitive, requires you to stop and think, and there's a high probability that it'll be misunderstood at first glance. I hate things like this - you'll read it, think you understand it, experience a bug, spend hours debugging, then finally look up the documentation for 'else' and see that it means something different from what you thought.

</comment><comment><USER46> I write quite often something like that:

        for i in range(10):
          for j in range(10):
            if condition(i,j):
              dosomething
              break
          else:
            continue
          break

It's a pattern that ensure that dosometing is run at most once by "propagating" the break to the outer loop.

The alternative is use a function and do a return.

Any though of this ?

<comment><USER47> I'm not a python programmer but I find the last 4 lines rather hard to read. Unless there is a performance reason to not do so, I'd argue that you are iterating over _pairs_ (i,j) here and I'd make the code clear. There are 100 pairs, and once you find one that satisfies the condition you are done. Again, not a python programmer but it might look like

      (x, y) for x in range(10) for y in range(10)
         if condition(i,j)
            dosomething;
            break;

Edit, ("zip" is not the outer product... )

<comment><USER48> The relevant function is itertools.product() [1]. It can give the Cartesian product of arbitrary iterables, but if you have the same iterable more than once, as in this example, you can take advantage of the repeat= optional parameter to simplify the call a little bit:

        for x, y in itertools.product(range(10), repeat=2):
            if condition(x, y):
                dosomething(x, y)
                break

Alternatively, you can use Python list comprehensions:

        prodlist = [x, y for x in range(10) for y in range(10)]
        for x, y in prodlist:
            if condition(x, y):
                dosomething(x, y)
                break

Overall, I still prefer refactoring into a function and using return, as the GP comment suggested.

[1] [https://docs.python.org/3/library/itertools.html#itertools.p...](https://docs.python.org/3/library/itertools.html#itertools.product)

</comment></comment></comment><comment><USER49> I'm in favour of writing simple python that even a junior dev can read rather than using niche syntax tricks. Guess that depends on whether you think a junior should know this syntax.

<comment><USER50> This is a weird response. You can definitely argue that it's bad syntactic design because people seem to expect it to do something different, but if the argument is just that some category of programmer doesn't already know what it does, you're pretty much arguing against introducing any new language feature, syntax or library that wasn't taught in your imagined CS101 or whatever.

<comment><USER51> > you're pretty much arguing against introducing any new language feature, > syntax or library that wasn't taught in your imagined CS101 or whatever.

But there clearly is a body of knowledge which you can discover yourself: you can interview candidates, read discussions on SO, read library code, and you will find some techniques are commonly used, and some are rarely used.

That distribution of what's known is changing over time regardless of what we do, because our peers are constantly learning and studying at different rates.

This feature has been around for years, and is so rarely used that only language mavens know about it. Thus, you can observe that this is a failed feature and avoid using it.

We can always reevaluate if people understand it later on, since that could change.

<comment><USER21> On the other hand, when you do run across this construct in the wild, it is trivial to look up what it does and learn. I imagine that's how most people learned about it, since it doesn't exist in other languages.

In a way I find your comment contradictory: on the one hand, you appreciate and embrace that the body of common knowledge can change. On the other hand, you use the current state of common knowledge as an argument against doing things that can improve the common knowledge.

<comment><USER40> As a counterpoint, a similar syntactic construct exists in several templating languages, and behaves radically different...

</comment></comment></comment></comment></comment><comment><USER52> I can't see this ever being used. As a non-python programmer, if I ran across this it would be very confusing. If it's simple enough to write the same code without the else block and have your code be more readable, why not do that?

</comment><comment><USER53> I much more frequently wish that I could express 'or do this if zero iterations' than I use for-else as it is; I do so wish it had the former semantic.

That and the absence of do-while are the cause of a good deal of non-DRY python around loops.

</comment><comment><USER54> The `else` clause follows the same general pattern wherever it supported: `for`, `while` and `try` are consistent. It usually makes code shorter or at least leads to narrowing concerns when used with `try`.

For some reason I often forget to use it though.

</comment><comment><USER55> I would never include this in my code. It's a construct most devs have never seen in Python and it differs from anything I've seen in other languages.

Always KISS.

</comment><comment><USER56> I'm curious why people are interested in this. No way I would have predicted it would get to the top of HN.

</comment><comment><USER57> Or maybe it was a terrible "or else" pun that does not deserve much discussion.

</comment><comment><USER58> Else is a bit of a confusing name for the keyword IMO.

How about "ifcompleted"

</comment><comment><USER59> Pretty convenient feature.

</comment><comment><USER60> I hate it when code uses weird niche features that are not obvious, are impossible to look up and add 0 value aside from saving a couple of lines of code.

<comment><USER61> [Mistake, a moderator please delete this comment! Completely agree with the parent comment now. for...else is dumb and unintuitive. I misunderstood its function, which proves the above point to me.]

<comment><USER62> > The symantics of for...else are immediately obvious

The code in your example is how it reads, but that's not how it works. The "obvious" reading is wrong, so it's obviously not "immediately obvious".

This is what it's actually doing:

      found = False
      for l in get_list():
        if ...:
          found = True
          break
      if not found:
        ...

</comment></comment></comment><comment><USER63> This is coincidentally my highest rated Stackoverflow answer ever. :)

[https://stackoverflow.com/questions/9979970/why-does- python-...](https://stackoverflow.com/questions/9979970/why-does-python-use- else-after-for-and-while-loops)

Tl;dr my highly opinionated opinion is that one should never use the construct

</comment><comment> cup-of-tea For-else is nothing. The really weird one is the Try-else.

The For/While-else does exactly what I expect. I'm not sure why others find it confusing.

The Try-else does make some code more readable but is quite rare I would say.

<comment><USER40> Well, for one thing, a few templating engines have a "for each item, print x, else if there are no items, print y". (for instance: [https://handlebarsjs.com/builtin_helpers.html#iteration](https://handlebarsjs.com/builtin_helpers.html#iteration))

<comment> cup-of-tea That's not intuitive at all. That's equivalent to:

        if len(items) == 0:
            print(y)
        else:
            for item in items:
                print(item)

Which means there's a whole extra implicit if. The for in Python is really this:

        it = iter(items)
        while True:
            try:
                item = next(it)
            except StopIteration:
                print("else")
                break
            print(item)

Where that try/except is like "if there is a next item do this, else do this", hence:

        for item in items:
            print(item)
        else:
            print("else")

<comment><USER40> Never said intuitive, but that construct is EXTREMELY useful for things like "no results found" and such, when a list of items is empty. Therefore, it is usually explained quite early and used often in template languages that have it. This is the first time I've seen python's, after dealing with several large codebases written in python.

</comment></comment></comment></comment><comment><USER64> Never use this in the real world please.

</comment><comment><USER65> This is discussed as item 12 in Effective Python. The author argues that you should avoid "else" blocks after "for" and "while" loops. The main argument is that the behavior is not intuitive and could be confusing upon reading given its somewhat obscure usage.

He suggests using a helper function with an early exit or setting a result variable and using a break in your loop instead.</comment>


Researchers discover gene mutations linked to longer lifespans - <AUTHOR> http://www.biologynews.net/archives/2008/03/04/einstein_researchers_discover_gene_mutations_linked_to_longer_lifespans.html

<comment><USER2> Upvoted!

<comment><USER3> Got your voting rights back?

<comment><USER2> no</comment></comment></comment>


Don't buy the IEEE edition of my book - <AUTHOR> https://plus.google.com/+PeterSuber/posts/bpLMka3QC7y

<comment><USER2> This doesn't surprise me. The whole academic publishing side of things is a royal pile of shit. Glad someone is calling them up on it.

Recently I snagged a copy of "The Art of Electronics" for reference. This has a retail whack of about £40 here in the UK even with Amazon's smackdown and second hand value on top of it. Decided screw that and bagged a copy on eBay. What turned up was an affordable edition destined for Sri Lanka, Pakistan, India with a big warning not to sell outside those areas stamped on it.

I paid £5 including delivery.

Going back to when I did my EE degree, I paid out £340 on textbooks in one semester.

Ugh it's pitiful and pisses me right off.

<comment><USER3> > ... with a big warning not to sell outside those areas stamped on it

Can they legally do that? I mean, it seems to be against the first-sale doctrine to limit what retailers or subsequent buyers of the book can do with it.

<comment><USER2> I think it's mainly aimed at distributors who decide to sell affordable edition copies to the wrong markets. You can sell it quite happily second- hand.

I've seen in many books here in the UK, in the front covers usually, a minimum sale price and a demand that all future sales are credited to the publisher.

They can shove it of course :)

</comment></comment></comment><comment><USER4> And I thought the IEEE's most irritating feature was shoveling life insurance scams (& other snailmail spam) at its members every month.

<comment><USER5> IEEE also actively lobbies against any kind of patent reform.

</comment></comment><comment><USER6> protip: I've found IEEE Xplore becomes much more reasonable when you hide a Sparc IPX in the ceiling at MIT.

<comment><USER7> it's funny to consider trying to hide one of those bricks

<comment><USER2> It's pretty easy to lose one. A company I worked for had a SPARC LX (similar chassis) as the internal primary DNS server. It stopped working one day and they couldn't find it. Turns out someone had pulled a cable hard inside the back of a rack and it had fallen down behind some switches inside the rack.

Lovely machines, until you fire up Oracle 8i's Java front end (the name of which escapes me). Took 7 minutes to start.

</comment></comment></comment><comment><USER8> Peter Suber's book on Open Access is really great, but I think it lacks perspectives on the use of the Open Access movement to fight bibliometrics. If you speak French I recently wrote a detailed introduction to the Open Access movement which points out the relationship between the two movements and how Open Access can help to go in the right direction wrt fighting bibliometrics. It available at [http://pablo.rauzy.name/openaccess/introduction.html](http://pablo.rauzy.name/openaccess/introduction.html).

</comment><comment><USER9> I think the only people who access IEEE Xplore are though who have library subscriptions. Otherwise these per-chapter prices don't make any sense.

<comment><USER10> In grad school I once saw $8K+ for an introductory chapter of standards document. Even if my lab was willing to pay that price, I considered that price to be unacceptable by any standard. So I instead found the same document on a public FTP server of some professor in Brazil. The internet is a wonderful place.

</comment></comment><comment><USER11> After two years of learning to code I have spent in total about £30 on books. It would not have been possible without the WWW.

</comment><comment><USER12> And we yelled at Amazon and Apple for inflated ebook prices. Heh.

</comment><comment><USER13> Why did the author license IEEE to sell the book in the first place if he didn't want them to use their exploitative pricing model?

<comment><USER8> The first sentence of the post is "In January 2013 the IEEE Xplore digital library began hosting digital copies of 400+ books published by MIT Press". I don't think he personally agreed to anything, the publishers IEEE and The MIT Press must have decided to do something with some books which they didn't need author consent for.

<comment><USER13> Yeah, I saw that too, the trail is still there - he's no fool and, as his book testifies, knows copyright in depth. You'd think he might stipulate with his publisher that he had some say in sub-licensing or set some sanity limits on sales or something?

My guess at the first response to my answer above would be "MIT Press wouldn't take it on then". But then it becomes a case of "my price for the copyright in this book allowed MIT Press to do this", which is fine but means that he sold the license still that enabled this.

Incidentally the economics aren't entirely clear to me. The author says IEEE charge $15 per chapter. But it's MIT Press's book (effectively), how much are they getting? How much is the author getting. Is the story here [just] "authors have bad contracts with their publishers".

It's almost like a malicious joke - "This OA guy wants to sell his book for $11 and use a CC license, so we're going to sell it for 20-times that just to screw with him. The kicker, it's not even open access! Lol! That'll teach him.". You'd think the first line of this guys publishing contract/license would read "all version of this book, sub-licensed or otherwise must be OA without exception".

<comment><USER13> So, authors have perfect contracts? Or, he shouldn't bother controlling exploitation of his works? Or, he shouldn't know as a copyright expert how to deal with such issues? Or, IEEE aren't really acting exploitatively?

All, none? What then?</comment></comment></comment></comment>


War, space, and the evolution of Old World complex societies (2013) [pdf] - <AUTHOR> http://peterturchin.com/PDF/Turchin_etal_PNAS2013.pdf <comment><USER2> Preparing the datasets for this sort of work is an interesting problem: [https://www.youtube.com/watch?v=IghlCQpJl80](https://www.youtube.com/watch?v=IghlCQpJl80)

</comment><comment><USER3> I like the approach, and I like Peter Turchin's books as well. It would be nice, however, to have access to the code used for the simulation.</comment>


Ask HN: How do I pick between Microsoft and OPower? - <AUTHOR>

I am a CS major who will be graduating in May 2012. (I would be starting full time work in Fall 2012.) I have a number of job offers, but the two I'm most interested in currently are Microsoft and OPower (http://opower.com/). I really have no idea how to pick between the two.
Microsoft - Windows Phone Team
__Pros:__
* Much higher compensation
* Working in C++ may make me a stronger coder
* I am passionate about Windows Phone
* Based on previous internship experience, I know most people there are quite smart
* Microsoft may look better on my resume (but that doesn't feel like a great reason)
* I've lived in the Seattle area my whole life, and know that I like it
__Cons:__
* C++ can be a pain to work with
* Despite being reviewed well, Windows Phone has a tiny market share
* I interned on Outlook in Summer 2010 and had a hard time socially connecting with my team
* I've lived in the Seattle area my whole life, and may want to try something new
* Push code to users every 6-12 months is slower than I'd like
* Is Microsoft stagnant?
OPower
__Pros:__
* Stock options could end up being worth a lot
* Java isn't the greatest, but it could be more fun than C++
* Push code to users every 3 weeks!
* Rapidly pivoting teams/priorities could nicely fit my desire to work on a wide range of projects
* Quarterly Hackathons
* Nice office with plenty of natural light and scooters
* Goofy, laid-back culture
* Arlington / DC could be a cool area to work
* OPower's 21st century approach to energy reporting / analytics is wonderfully refreshing after the horribly user-hostile traditional bills I get
__Cons:__
* Stock options could end up being worthless
* The interview questions were significantly easier than those at Microsoft - does that mean the quality of people is lower?
* Customers are utility companies instead of consumers, so it may be harder for me to relate
* Number of people who actually pay attention to the stuff OPower produces could be even smaller than the number of people who use Windows Phones.
Maybe if I worked at OPower, I could express my passion for the Windows Phone by continuing to develop 3rd party apps.
Both companies felt like a good culture fit - I enjoyed the people I got to meet during my on-sites.
I've interned at Microsoft and Google in the past, and I eventually want to work at a startup / maybe found my own. One friend suggested that I work at Microsoft for a bit so I can save enough cash that taking a risk on a startup is easier.
I have no idea what to do. I suspect I could be quite happy at either. I also suspect that as a new grad, I don't even know what the right questions to ask are to assess how happy I'd be at each of these places. Can you share any wisdom? <comment><USER2> Well, from this post you don't seem to love OPower. My personal thought is that if you join a startup or a small company, you should really love it.

To me Microsoft seems like the clear bet. Higher pay, and smarter people. Spend your first 2-3 years gathering industry knowledge, learning from the smart people, and building yourself a nice nest egg. If you end up enjoying it, you can climb the corporate ladder. If not, you should find it much easier to interview for a new startup with Microsoft on your resume as it holds more street cred. It is also easier to return to corporate (in the event your startup fails) with prior corporate experience.

The only danger of going corporate first is that you get too comfortable and don't want to leave your paycheck. You get used to having money unlike in college when you had none. If you make $100K/yr at corporate and need to downgrade to $70K for a startup, you really feel the bump. Just be ready for that.

I speak from experience. I graduated, took the corporate job and saved up a ton of money over 2.5 years and I never regret my decision. I saved up, built some corporate connections, and recently quit. In fact, people expected me to quit (I was always hacking on side projects and keeping my knowledge up to date), and they said to me "Good luck. If things don't work out look us back up.", no bridge burned.

EDIT: I just realized a con was "hard time socially connecting at Microsoft". This is actually a red flag in my book. Can you elaborate? Why would they offer you a job if you didn't get along socially?

<comment><AUTHOR> Re: the social issue - all the young dudes on the team were really in to Star Craft, which is great, but not something I can really have a conversation about. They offered me a job because I was still a perfectly cordial / competent person. I just didn't bond with my teammates beyond a very superficial, professional level.

<comment><USER2> Well, now it is straight up "the grass is greener" problem.

I'd wipe away the cons list at this point, and just look at the pros, and just pick which pros make you can more envision yourself waking up to every day. Don't worry about corporate street cred -- it will stay with you through your MS/Google internships.

I still have bias towards choosing corporate as I personally wanted a nest egg so that when I did go to startups I would be financially worry free, and it worked out for me. I was able to save almost 50-60% of my salary every year (lived at my folks house).

</comment></comment></comment><comment><USER3> \- I interviewed at OPower way way back, 2 things: The interview process was hair brained, I was explicitly told devs were expected to work 65 hrs/wk. I've been told these things have changed since, but interesting culturally nonetheless. On the whole I did like everyone I interviewed with and what they had to say about the company.

\- I live in DC, and can tell you it is a great place to be a young person with some money.

\- Don't sweat the stock options. If you aren't the cofounder or employee #1-3, you should be getting paid market rates and viewing the stock options as a lottery ticket with a drawing so far in the future it is likely not to matter. I'd be willing to bet money that after 3 years you'd do better participating in the MS ESPP, if they have one.

I think the clear choice is MS, for me. More money, better resume fodder, Windows Phone would be an incredible product to work on.

</comment><comment><USER4> Personally, I'm a fan of a lot of things from Microsoft (WP7, .Net, Xbox) so I would jump at any opportunity to work there. I actually have a couple of close friends who work there and they love it! They work on various .Net/VS related frameworks. I paid them a visit just last year and fell in love with the Seattle area. You live in quite an amazing city. The Redmond campus was pretty awesome too.

<comment><AUTHOR> The Seattle area is definitely great, but I may want to try something new.

<comment><USER5>
      but I may want to try something new

Do you or don't you? We can't decide this for you.

</comment></comment></comment><comment><USER6> If pay at both places would be zero - where would you rather work? Pick that answer.</comment>


Ex-Googler's E-Commerce Site Valued at About $15B - <AUTHOR> https://www.bloomberg.com/news/articles/2018-04-12/ex-googler-s-e-commerce-site-is-said-valued-at-about-15-billion <comment><USER2> in China, in other words [https://www.forbes.com/sites/markhughes/2018/03/30/review- th...](https://www.forbes.com/sites/markhughes/2018/03/30/review-the-china- hustle/)</comment>