Ask HN: How do I become smarter? - <AUTHOR> my situation:
I'm 19 years old and I go to a not so great (according to Macleans university rankings) university in Canada. I would like to make a transfer to Waterloo and then go to graduate school at Stanford or MIT. These are just some of the goals that I'd like to achieve in my academic career. I would just like to prove to myself that I have what it takes and I would like to be in that academic environment (Sorry if I worded it poorly).
At the moment I know I definitely am not trying as hard as I should..I don't remember the last time I engaged myself with hard problems or where to start. I've been feeling pretty lost in what I've wanted to do with my life so I just decided to follow Paul Grahams advice and just go with what gives me the most options (http://paulgraham.com/hs.html).
When it comes to learning new things or building off old concepts, I feel like I have a poor foundation and I just don't know where to start. How can build a great foundation where I can understand the concepts intuitively?
In short, how can I become smarter? <comment><USER2> I have great news for you. The brain is extremely plastic. Read about neuroplasticity here: <http://en.wikipedia.org/wiki/Neuroplasticity>

Rest assured that your capacity to acquire new skills and knowledge is massive.

You don't just get smarter. You get smarter at something in particular. Playing chess, doing IQ tests, running the 100m dash, programming, social skills, public speaking, etc. So you need to pick a particular skill or set of skills or vocation and decide to get smarter at that.

There are some general rules for improving brain function though. Here are a few:

1\. Read books. Reading trains your brain to concentrate for long periods of time without fatigue or distraction. There is a growing school of thought that the short bursts of reading and frequent distractions we experience online are harming our ability for deep contemplation, introspection and concentration. See Nicholas Carr, The Shallows. <http://n.pr/bnAfRV>

2\. Try to get 10 hours of sleep a night. Sleep improves mental and athletic performance. <http://n.pr/9wQsXr>

3\. Maintain your cardiovascular fitness. I highly recommend running. After years of cycling, swimming, hiking, etc I've found that running gives my brain function the biggest boost and provides me with sustained mental energy through the day. A good cardiovascular system supplies your brain with plenty of healthy oxygen rich blood. It's like putting racing fuel in your car.

4\. Eat well. Cook your own food. Avoid processed or pre-prepared foods and non-organic foods (mainly due to the pesticides). Fish is awesome, but watch out for mercury.

5\. Don't drink anything stronger than wine. Don't do drugs. (just like your mom told you)

6\. Watch your weight. I find the biggest source of mental fatigue is when I've gained a few pounds.

Good luck, and congratulations on making the decision at a relatively young age to focus on your mental fitness.

<comment><USER3> #2 - Some researchers think there is wide variability in the optimal amount of sleep. Some even think that you can get too much sleep. The thing to do is to pay attention and experiment. I sleep in two sessions, one 4 hours, the second three. Getting more sleep makes me feel a little worse. The good news, is that there are cheap sleep monitoring smartphone apps.

<comment><USER4> I completely agree as a bimodal sleeper myself. If I sleep over 7 hours in one session I feel terrible, much worse even than if I would have only gotten 5 hours of sleep that night. I usually sleep 5 hours a night and take 2 and half hour nap. You just have to figure out what works for you.

</comment></comment></comment><comment><USER5> most of the words ending in "er" pretty much boil down to _effort_. Simple as that. Stronger, faster, smarter, wiser, happier, etc.

But the problem with the advice "put in more effort" is that it isn't really that helpful. But such is life. The beauty really is in figuring out answers _for yourself_.

When I was younger I was obsessed with finding out answers. I am very curious and like to learn things so of course I would read and ask people and go on the internet and try to figure things out - in short, I relentlessly pursued answers.

But as I grew older I came to realize that you can't always pursue answers from external sources, because they aren't really that helpful. I am not saying never learn, I am saying answers are only the beginning!

Answers are abundant. PG has all the answers about running a startup. Ask any nba player how to be good at basketball and you'll have tons of answers. The internet makes practically any answer ever recorded instantly accessable.

This probably sounds like a lot of nonsense but the point is, the answers you really care about and the answers that will shift your life and spur greatness, those answers do not exist in books - you have to figure them out yourself, relative to your self.

How do you do that? Be active. Keep trying, never stop, always appreciate, always learn, always read, always be humble, always be kind, be helpful, be aware, be open.

See there you go, I guarantee and I will stake my life on the fact that what I am saying is 100% the correct answer. But it doesn't help you much does it?

Be a happy, appreciative student of life, stop to say hi to your fellow humans along the way and work hard - you will be smarter my friend.

Take care.

</comment><comment><USER6> 1\. Read. Read. Read.

2\. Solve problems (anything, it can be hard or easy)

3\. GOTO 1

In all seriousness though #1 is the point that will make a big difference. My friends generally mark me as the smartest person in our group (uh, there was no "nice" way to put that). They are perfectly smart individuals; but due to my old social awkwardness and slight insomnia I spent the better part of my school years reading anything I could get my hands on, and that makes a difference.

Ok, so on a public front you simply _appear_ smart for knowing stuff about a diverse range of topics (I recall a particularly crazy conversation on a train at 1am where I met an Aussie and we discussed Scuba diving in some depth :D) - which is a bit of a fake because that is just "knowing stuff".

But knowing stuff is a path to smartness. Pick up threads you find interesting and pursue them. _Teach_ those things to people. Find stuff that excites you and makes you want to solve it.

You mention intuitive learning too; over time you can develop great intuitive learning Just follow what feels "right" in your reading and problem solving; eventually you will find when presented with a problem you can visualize it, break it down/deconstruct it and then solve for x.

(always seek an answer)

<comment><USER7> I would add that if you are the smartest person amongst your friends, try to find new friends that are even smarter that you.

<comment><USER8> That's why he is here, I would assume.

</comment></comment></comment><comment><USER9> I'd think a bit more about what your actual goals are. To me, going to an renowned school like MIT is a means to an end not a goal. Depending on what you want to do after, it may or may not be a wise decision.

From your post, it sounds like intelligence isn't the problem, but rather one of motivation. While doing well academically does require a baseline intelligence, the more important thing (like most things in life) is a matter of effort. Perhaps this comes from your lack of any concrete goals.

I found myself similarly lost when I first started my university education. Actually, I started off by going to a community college, and while at first that was disappointing, it also gave me the chance to sample a wide variety of subjects, and eventually finding out CS was what I was passionate about. By finding my passion, I was able to overcome my previous motivation problems. Perhaps if you try new things as well, you might find something that sparks your drive.

<comment><USER10> Completely agree here. Passion is what drives motivation. Paul Graham wrote extensively about that in one of his essays (Do what you love).

So I'd say :

1\. Try to figure out what you'd love to do 2\. Do it, and enjoy everyday of your life :)

The problem is, it's not always easy to find answer to point 1. To find, you must try a lot of different options, until you find what you really want to do. That's why I would suggest :

1\. Try to work as an intern in small companies (startups). You'll get a very good contact with the founders, who are usually very smart guys. In other words : find a mentor

2\. Try to be friends with people that have a passion for something, and see if you can share their passion

3\. Be curious, go out, speak with people. And travel. Travel a lot.

<comment><USER11> Passion triumphs everything.

Just remember this all times.

</comment></comment></comment><comment><USER12> Don't see 'reading' as the end of studying. You have to exercise your brain and _do_ stuff, too (work through problems, proofs etc.). Only reading is often too passive to really learn things well.

Attributed to Einstein: "Reading, after a certain age, diverts the mind too much from its creative pursuits. Any man who reads too much and uses his own brain too little falls into lazy habits of thinking."

<comment><USER13> Awesome quote, never heard that before, I'm sure my brain will be in use thinking about it for awhile (how meta!). I think the key here is the difference between passive and active reading. It seems like reading passively is the default for most people, probably because it can be so darn enjoyable, but training yourself to read _actively_ can result in even more enjoyment but, more significantly, will result in expanded brain use. Text is just a series of questions awaiting your own individual answers.

</comment></comment><comment><USER14> 'Smart' is a very loosely defined concept. Let's assume for the time being that by smart, you mean, 'being able to creatively solve problems.' This, fortunately, is a skill you can learn. Here are some pointers you might find useful.

(1) Get rid if your TV. Dumping my TV probably had the single largest impact on the effective use of my time. You will be amazed at how much more creative you can be when you no longer have an excuse to lounge about for an hour or so at a time.

(2) Don't 'study' your academics. Ignore the marks altogether and learn stuff for the sake of it being interesting to you. Study chapters outside the syllabus and ignore ones in it that might be boring. You may sacrifice results in the short run but your long term understanding and passion for the subject will be of great benefit in the long run.

(3) Be endlessly curious. Make an effort to figure out how things around you work, or why they work that way. Seriously, take a cigarette lighter apart from time to time just for the sake of solving the how. Drive a different route home just to see where it goes and why.

(4) Don't be afraid to fix things that break. Always make an effort to fix some or other mechanical thing that breaks around the house. You'll be surprised how this improves your patience and problem solving skills.

(5) Spend time with smart people. Watching them solve problems and how they think will give you something to work towards.

Being 19, you still have a lot of time to get smart - so put in the effort now and by the time you're finished college, you'll probably be nicely along the road to better, more creative, problem solving.

</comment><comment><USER15> The name of the school you go to means nothing. You need to figure out what you actually want to achieve. You want to be smarter, why? You want to go to a "better" school, why?

Going there will offer you nothing if you don't know what you're looking for. What is it that you love doing in life and how can you build on that?

<comment><USER3> Don't try to go to a better school. Try to work well with good _people_.

</comment></comment><comment><USER16> > I don't remember the last time I engaged myself with hard problems

Do that. Forget about some impossible to quantify long term goal about being smarter and set a goal of solving a hard problem that should take you a few hours.

When you solved it, do another one.

<comment><USER17> Seconded.

Also, when taking on a problem, it helps if you break it down into smaller, shorter, quantifiable targets. This single approach alone will help you see impossible problems as being a set of smaller, difficult ones.

</comment></comment><comment><USER18> I think your assumption that you should start with a foundation is wrong. Foundation is good, but the best way to it is to focus on other things.

If you have a discipline A and a discipline B, and knowing A will help you a great deal with B, but B is totally unnecessary for A, it's natural to want to study A first. But this ignores the most important factor: everyday motivation. This is a much fuzzier thing than the dependency tree model, and it's natural to find it less attractive to think about. But it's real, and it's important. It's not enough to like the idea of conquering A. You have to find the process itself satisfying enough that it perpetuates itself. In practice, this often means learning B, being frustrated by your ignorance of A, but also excited enough to keep going. Then learning A once your studies of B have shown you the power and value of A.

If there isn't anything that excites you enough to study it without putting in inordinate amount of willpower, don't feel bad. It's entirely the fault of institutions that educated you. The trick is to start with some real world problem that doesn't even seem respectable, but is exciting because it's real, and in the course of solving which you'll come in contact with other, "deeper" areas of knowledge.

</comment><comment><USER19> As an engineering student at Waterloo, I'll tell you something: While UWaterloo is definitely golden in the eyes of a lot of technical employers, there's nothing I've seen inherently special in this school. If switching is not easy for you, doing well in your particular school could serve you better. I don't think Waterloo professors or classes are any more rigorous or better than other Canadian schools. Out of curiosity, what school do you go to?

<comment><AUTHOR> I go to Carleton University. It's a wonderful school don't get me wrong, but I would love to be in the environment that Waterloo provides. This takes me back to Paul Graham's Cities and Ambition essay. My best friend who goes to Waterloo recently wrote a blog post on what type of message she thinks Waterloo sends: <http://itsallinu.com/?p=165>

<comment><USER19> Hey, I know Ashley :)

Take a look at some of Rajesh Kumar's (Nanotech Engineering 2010) essays: [http://rajesh.rapidtech.ca/archive_2009_08.html#the-case- for...](http://rajesh.rapidtech.ca/archive_2009_08.html#the-case-for- waterloo.html)

<comment><AUTHOR> small world haha. Neat blog I like his writing style. Catch 22 is one of my favourite effects that he talks about.

</comment></comment></comment></comment><comment><USER20> There is one preeminent technique shared by both students in the top programs and auto-didacts of all ages: _intensive reading._

Longer-form materials that require deep concentration are best. On hard topics, go as slow as necessary but _don't change tasks_ looking for the quick hit of some lighter reading/interaction.

You could fight your way through a textbook, going more slowly (and doing side research or seeking others' help) on the parts that are most difficult. Or grab research papers of interest, and when you hit things you don't know take detours only to fill those gaps.

</comment><comment><USER21> One tool I wish I would have known about in college is Anki. Spaced repetition lets you memorize stuff a lot faster than flashcards. <http://ichi2.net/anki/>

</comment><comment><USER22> FYI, I'm 26; anyway here is my advice.

* Don't focus on the goal: You might set some big goals, but don't focus on them too much (focus on the process instead and probably you'll be happy with the outcome).

* Change slowly: Monitor yourself, summarize what you did each day and try to change things one at a time. Changes that need time to take effect cannot be made quickly (the same way it's not a good idea to adjust water temperature quickly while you're showering).

* Know yourself: Know your limits, and what makes you tick. Monitor yourself and your friends. Figure out why those people are your friends. (It helps to understand yourself better). What are your weaknesses, what are strengths? Hint: what are the things you enjoyed doing when you were a little kid? Try to find activities / work that's similar to that.

* Learn from others: Get to know people, who you respect, and are smarter than you; learn from them. (Also a great way to keep your ego checked)

* Remember to spend time with your loved ones. Do it for them, and for you.

</comment><comment><USER23> Excuse yourself from the search for hard problems and pursue your interests. Build a foundation in subjects that captivate you.

You'll never be smarter, but that's a meaningless term anyway. You are inclined to learn more about things that matter to you. And because these concepts are fascinating your focus will exceed that of any disinterested person with a natural aptitude.

Not long from now you'll be discussing entomology or artificial intelligence or interior design with an uncommon passion and someone will wish they were as smart as you.

</comment><comment><USER24> My entire life I've know what I wanted to do. I've never been in your situation. At first I assumed that everyone was like me and that everyone has a strong direction/motivation. I was wrong, most people have no idea at 19 where they want to be. So firstly don't worry about it.

You'll get out of University what you put in and at 19 not everyone is in a position to put a lot in. I certainly wasn't. I went to a top University in the UK and basically wasted four years. I came out a lot better off but I didn't milk it for all it was worth. You may consider a gap year but that can be expensive. Taking a year out to work for charity can help you mature and see the world a little. Gap years are no panacea though.

Since you don't know your story yet I recommend that you read other people's stories. You can read Founders at Work or something by Bill Gates but first I'd recommend reading Cherry-Garrard's account of Scott's attempt on the South Pole "The Worst Journey in the World". It changed my whole perception of life. Scott's team knew there was a good chance they would die. They knew they didn't know HOW to get to the pole. They knew they didn't know how to survive at -60c. It's an amazing story and has inspired me for 10 years now. Most things in life are a mystery but that shouldn't stop you reaching the south pole. Cherry-Garrard himself was too weak and short sited for the trip but showed so much determination and courage that Scott let him join the team.

Hopefully you'll find something inspiring. From inspiration comes drive and from drive comes a determination to do something. Since most of the world is a mystery you'll have to look for that something to do but it's out there, somewhere.

Anyway, I've prattled on a little like the old fart I am :)

Good luck.

</comment><comment><USER25> "Brain Workshop is a free open-source version of the Dual N-Back mental exercise."

"A recent study published in PNAS, an important scientific journal, shows that a particular memory task called Dual N-Back may actually improve working memory (short term memory) and fluid intelligence. ...." <http://brainworkshop.sourceforge.net/>

</comment><comment><USER26> when you're passionate about a topic, want to know the answer to a question or need to solve a problem, your brain is primed to learn. Encounter the same material in a different situation and you're far less likely to learn.

And it doesn't matter how many different topics you cover. What matters is how deep you go into the topics that matter to you. You have more of a chance of actually coming up with some new and useful, instead of merely rediscovering or relearning what others already came up with.

</comment><comment><USER27> 1\. Find some people who are smarter than you and know the type of stuff you want to know.

2\. Get to a point where they see you as a peer (by reading, discussing, solving problems etc.)

3\. Go to #1

</comment><comment><USER28> The most important factor to success is hard work. It applies to starting companies as much as it applies to getting into college. You can apply to Stanford and MIT with perfect grades and a perfect SAT score, and they'll still reject you! There are more people with perfect SAT scores than there are admission spots. To trim down the pool, the college has to look outside of schoolwork. That's where the extracurriculars come into play. In most cases, whether you have something to write on that list is determined by how hard- working you are, not by how smart you are. And once they see that you spent your time doing something great outside of school, the admissions people will forgive your less-than-stellar grades. An added benefit to the school that comes from choosing hard-working people over bookworms is that once the students graduate, the hard working people will go on to build great businesses and ... wait for it ... donate to the school!

Spend a few minutes putting yourself in the admission officer's spot and think about how you'd choose the next round of students.

Personally, I recommend focusing on your perseverance first, social smarts second, and book smarts third.

PS: I guarantee you that girl on the news getting fished out of the Indian Ocean right now will be attending Stanford when she turns 18.

</comment><comment><USER29> Strictly speaking, you can't get smarter; you only gain greater knowledge.

That being said, there are numerous ways to gain more knowledge in whatever you chose. The resources are there — you just have to seek them out.

My advice: be an effective gatekeeper. You can't do everything. You can't know everything. Don't even try. Instead, select the areas that are most valuable to you personally and focus on those. Hone what you're good at; progress at what you're bad at.

One particular area to focus on is communication. Being able to effectively communicate verbally and in written form is very important. If you can speak and write eloquently, no matter the audience, you're well on you're way to becoming more academically rounded. Plus, it makes you a better human being. If nothing else, it makes you sound smarter too ;)

Also: getting into good schools is often less about your grade point average and more about you're overall resume. I'd focus less on a perfect gpa and more on building a solid resume. It's also a good idea to get involved with the school. Connect with key people and alumni. That'll definitely help your chances.

Good luck!

</comment><comment><USER30> 1\. Build stuff - start small, you need incremental achievements and 'wins' to keep motivated. It's a very long road where the highs can be really high ands the lows can be really low.

2\. Take stuff apart - its okay if it cost you 100 bucks. It's in the name of science. See how other people built it.

3\. There is art and humility in how one asks a question. Learn it and use it. It'll carry you through conversations with interesting people, where, earlier you may have gotten lost and spent a lot of time nodding your head.

4\. Learn about finance and money and economics. Most of it isn't that complicated. It's the framework on which the history of nearly everything is constructed and it will enable you to answer a lot of question on your own. History isn't a collection of unrelated random facts that they teach you in high school. History is fascinating and understanding how money travels illuminates connections between seemingly unrelated events.

5\. Remind yourself that you're living through one of the most amazing periods in the history of the world. Really. The tools at your disposal are extremely enabling.

</comment><comment><USER31> You asked how you can become smarter, but I think what you really mean is "How do I find the thing I'm passionate about?" (as some others have mentioned) When you have passion for a particular topic or field of study, learning about it very deeply won't feel like work and you'll naturally learn as much as possible. Provided you have the aptitude to actually digest and act on the information. Are you not trying as hard as you think you should because you're lazy or because you aren't studying the right thing for you? It's an important question to ask yourself. Or are you simply not smart enough to master the fields you think you want to be in? Not everyone has what it takes to be at the top of a field. When you find something you're passionate about, the intuitive understanding of how that thing/field/career works comes along with it (in my experience anyway).

</comment><comment><USER32> Being a self-taught (or to be fair, more self-taught than the average of my schoolmates); like not enrolling in private courses to understand the course, helped me a lot now.

I'm 19, just like you and the difference between me and my peers is that I'm able to understand things on my own, a lot faster and solve related problems that I encounter for the first time.

This made me smarter and more intelligent than the average. Focus on auto- learning. It worked for me well. I don't attend classes at university and instead study the subjects all myself.

I run an online business and do freelance work in the same time and my marks for this year are above the average and quite satisfying for the work I have put into (I study medicine).

The question that you should ask yourself again is: What's the advantage of MIT or Standford? (I'll appreciate if fellow HNers put their thoughts about these two universities so we have a deeper idea).

</comment><comment><USER33> 1\. Read everything you can.

2\. Show, don't tell

3\. Take advice from smart people

4\. Trust your instincts

5\. Listen

</comment><comment><USER34> I like how most of the answers here relate to effort, rather than the idea of 'born with talent'.

I'm of the same camp. Every effort you make into knowing, thinking, and processing is an accuring investment. Background knowledge that seems useless will often become relevant in some way.

The more I've learned, the more I've seen that every subject is connected in some way. There are only 'majors' and 'subjects' in school, because it's easier to learn things in isolation at first.

Be broad at lots of things, but dig deep into one or two things at a time.

Someone once asked me how Michael Phelps was so good at swimming. I answered, sure, being tall and genes was a good start. But he swims for hours a day. While you and I are eating, pooping, and watching funny videos, he's probably swimming.

</comment><comment><USER35> I have many friends who are much less intelligent than I who are attending "better" schools for infuriatingly trivial reasons. Getting good grades has as much to do with intelligence as it does with your ability to take tests-- unless you come across a really good teacher. Forget about dreams of elitist schools (for now) and find/start a project to build a knowledge base around. Make sure it's something you have the resources for and also is big enough to require you to learn new subjects. This project will serve as your point of reference for "building" new learning habits quite organically around. It will tell you what, how, why, and with whom you will learn with versus vague ideals and arbitrary academia romanticism dictating your future. However, realize the project itself is merely a crutch for your brain to grow stronger on--you will eventually outgrow it and require a new one. Walk into a professor's office, they are very lonely and love attention, and I guarantee you they are working on something you could define as a "project" and would love to point you in the right direction. Most have to in order to keep their jobs. Undergraduate students have a hard time understanding that they need some sort of internal locus and not their friends and teachers in order to be intelligent--but they eventually catch on to this like you have just now. The hardest part will be the sacrifices you'll have to make and endure in every imaginable facet of your life; you'll have to cut a lot of loose ends (bad habits/routines) off from your life. Eventually, though, you'll find _your_ path to enlightenment and it's always one with heart and is rarely found but more so stumbled upon (hint: always within close proximity of powerful computers and by path I mean nerd and by stumbled upon I mean HN). Only then, once found, will you know if you will _need_ to attend a particular school or not. (good music helps to rewire your brain and the subsequent lonely spells; cats are smart because they're curious, not the other way around; also, the smarter you get the more you laugh...muhahahah)

 _...sooner or later you're going to realize just as I did that there's a difference between knowing the path and walking the path._ \- Morpheus

</comment><comment><USER36> I feel I'm becoming smarter from reading Douglas Hofstadter's _Godel, Escher, Bach_.

It's a good, gentle introduction to some maths and logic topics that I really ought to learn about. It's also very artistic and touches on many different intellectual matters (music, painting, language...). Very thought provoking, and has already given me some good ideas for projects. Also pretty inspiring in that it shows what even a very young person can/could achieve by putting their mind to something, thinking systematically and writing expressively.

Of course the central premise of the book ("how does a mind/self/consciousness arise from inanimate matter?") is profound... and great fodder for dinner parties! (ie. showing off)

</comment><comment><USER37> The first thing you have to have in mind is being very motivated and consistent in your learning, never stop questioning, and love the details that come with your particular work.

To take someone elses opinions is mostly ok in this world, but You will start to see that your experience in a field is growing, or experience in general, and that will hopefully lead you to the fact that experience is the only teacher.

I'm doing currently an science article about semantic web data and news, for a while I felt stupid in that particular field. But as research comes along, and practice in that particular field I'm starting to feel far more confident about that then I was in the begining.

</comment><comment><USER38> Don't get too caught up in being "smart". I think the hacker community and HN overvalues this idea of inborn differences or raw brain capacity.

Clearly it matters, but for almost any real-world measure, focus, hard work and moderate brainpower will leave lazy, unfocused, and brilliant in the dust. Not only in achievements like earnings, but even in intellectual pursuits.

So, my advice is to do something hard, or something that scares you, or something that just seems creative and fun. Anything that stretches your abilities in any direction is a plus, as long as you give it your full attention.

</comment><comment><USER39> Like others said, current research suggests that being good or even expert in something is the result of the right kind of practice and lots of it.

Here are two good books about it: The Talent Code: <http://thetalentcode.com/book/>

Pragmatic Thinking and Learning by the Pragmatic Programmers: [http://www.pragprog.com/titles/ahptl/pragmatic-thinking- and-...](http://www.pragprog.com/titles/ahptl/pragmatic-thinking-and-learning)

<comment><USER40> Thanks for the second book. Just got into programming this year and the book seems like a perfect read. I'm reading a book that's just like The Talent Code now, Talent Is Overrated.

</comment></comment><comment><USER41> Find people who are engaged in things you like. Get into discussions/debates/arguments with them. Afterwards, you'll feel the need to read about the topic.

Its great for everyone involved because you all improve from this.

If you can find a discussion group in college, that might help... but its better if you can do this with friends. Sitting around with a few beers and arguing about computer science, math, philosophy, history, current events, etc... is a lot of fun and you can joke around a bit too.

</comment><comment><USER42> 1) Read a lot in an area you're really interested in.

2) Learn something interesting

3) Teach it to someone else (write something about what you've learned, sit a friend down, ring up your mum)

Repeat.

My problem is that now that I work in the area I'm interested in, and by the time I'm done with my work day my brain is completely exhausted, so all I want to do is lounge in front of the telly or similar instead of getting more into the field other than what I'm working on :( (I'm a philosophy post-doc.)

</comment><comment><USER43> Build a great foundation for learning by improving your memory. No matter how great you think your memory is today, it can still benefit from a conscious effort to improve it.

The Mentat wiki is an amazing resource for improving memory, I would recommend picking one or two of their easier methods for working on your memory as a start - you can start seeing results _today_.

<http://www.ludism.org/mentat/>

</comment><comment><USER44> In short: Do stuff just at the edge of your capability.

<comment><USER45> There's a lot of wisdom wrapped up in this small statement.

</comment></comment><comment><USER46> I went to Carleton for engineering which isn't exactly the highest ranking school. 6 years in the workforce, I found I am no less capable than any Waterloo graduate. In fact, I have hired as many bad Waterloo co-op students as I have good ones.

Make the effort to learn, and it can't be as bad as you think it is. Coming from a brand name school certainly helps, but it's not the end of the world if you don't.

<comment><USER19> As a current Waterloo eng student, I fully endorse this student. I've had the unique chance to hire students and I've seen both very bright and very substandard people from the likes of Stanford and Waterloo. It's about how well the individual applies himself, more than the school. This is especially true in Canada where almost all accredited universities are on par with each other in terms of teaching standards.

</comment></comment><comment><USER47> Hangout with smarter people.

<comment><USER48> Good schools can be very useful for this. Personally, I know at MIT, most of what I took away didn't come from a classroom (of course, some of that's my fault). The community around a school can make all the difference.

</comment></comment><comment><USER49> > In short, how can I become smarter?

Work thoughtfully and hard, and take nothing for granted. That's it.

> How can build a great foundation where I can understand the concepts > intuitively?

You're lucky, because you're in college. It's the best place to do it.

Know the material. If you can't draw a picture in 1 minute that would get the idea across to your grandmother, you don't understand it. Every time it says "Clearly," you prove whatever comes next. You close the book and put it away, and come back the next day and do the same thing.

Do all the problems. especially the hard ones at the end. You _never_ look at your notes or your book when doing them. That's the difference between getting an A on the exam, and being able to teach someone that topic five years later. Your study time (at least of fundamentals, which is most of university) should consist ~70% sitting in front of a knotty problem, with no books in sight. It's recommended to do mainly hard problems, and it's absolutely OK to take several days to do them. If you don't make progress for more than 20 minutes, stop and come back a few hours later or the next day. But make sure you come back!

Now, here's the key: you do all this _before_ the lecture on that topic. When you show up to lecture, you already know it cold. Except that you'll have so many questions. Most of your questions will start with "Why." They will be the questions that the other kids will find annoying. If you want to be smart, you need to be _that_ guy.

Teach. It's trite but true. Teach people who seem smarter than you but don't know about this topic yet. They'll help you understand what you don't know properly. Also, our retention of information processed in a live setting is roughly 9x that from just reading.

Be curious. Our brains are wired for stories rather than abstractions, and even technical fields have a narrative. Who came up with this algorithm? How or why did it follow logically from what came before? What came next? By learning these things (the best way is to chat about it during office hours with professors, or with other smart students), you'll also be getting an informal education in what smartness and creativity look like in the real world.

Focus. Do _not_ do what's above for every class, or every topic. Do it for only one topic at a time, that you're really interested in, exclusively.

Form a team. This is probably the most difficult (at least for shy people like me), but the most rewarding. If you know some other people who are also serious, and can get together and work with them in the fashion above, you will all progress much, much faster. Try to have some and discipline: you meet twice a week for two hours and work like crazy, and then go to the pub afterward and wind down (just like a sports team). If you can find a grad student or prof who's interested in "coaching" you, that will help even more. This is what grad school has that college doesn't. Create grad school for yourself in college, and you'll get smart much faster.

Play. Creativity emerges most spontaneously during play. Play means pet projects, hackathons, competitions, etc. Research projects during the summer are perfect (choose them based on coolness and/or fun). And play in completely unrelated areas, too (music is fantastic). Non-academic recreation (e.g. lots of sex) is quite important.

> .. go to graduate school at Stanford or MIT

Question: _why_ do you want to go to grad school at Stanford or MIT?

> I would just like to prove to myself that I have what it takes

That is probably not a good enough reason. It's easy to become enamored with the _idea_ of a thing. Spending all day wrestling with deep problems, letting your mind course over the beautiful edifice of ideas erected by those who came before. Unless you actually enjoy _doing_ spending most of your day and most of your nights alone working, usually in a library or cramped office - then, perhaps there are other forms of "smartness" worth pursuing.

It's a decision only you can make - but if it's just about pride, I'll save you a lot of trouble and tell you it's not worth it.

> I've been feeling pretty lost in what I've wanted to do with my life

Most people feel the same way. It will not stop you from living a worthwhile life. The majority of interesting events and true life experiences you have will be unplanned - so don't take "want to do with your life" too seriously.

Have you ever seen the movie "Yes man" (Jim Carrey)? Whatever happens, he just says yes. As far as I can tell (at the tender age of 24) this is a good strategy for a successful, rewarding life. It may sound at odds with the "Focus" paragraph above, but it's not. You focus to improve yourself - and you say "yes" when serendipity comes knocking, often disguised as drudgery.

Good luck :)

<comment><AUTHOR> Proving myself that I have what it takes was not my only reason, I apologize for making it seem like that I just want to go there because its prestigious. I stumbled upon a book that sums it up nicely. Its called The Idea Factory by Pepper White. Just a little summary of the back cover: "When Pepper White enters MIT, one of his professors tells him that it does not much matter what he studies there. What MIT will do is teach him how to think."

I want to learn how to think. For some reason this reminds me of Richard Feynman..he had such clarity in his explanations that came from a deep understanding of things. I want to try and reach that level of understanding and clarity. The way he told stories just kept me wanting more. I want to have people at the edge of their seats wanting more, I would love to teach anyone the most complex of subjects, and have them getting an a-ha! moment and just having as much fun as Richard Feynman did. You could see the joy in his face when he explained how certain things worked.

</comment></comment><comment><USER50> If your goal is to go to a prestigious school then I'm not so sure you're going to make it. The only way you're going to succeed in something that takes a lot of effort is if you find doing it fun! If you are not genuinely curious about the subject you're studying then it's not going to work.

</comment><comment><USER51> You need to define what "smarter" means to you - and also recognise that no- one is a top performer in every field. So step one is to pick an area where you want to improve.

If you don't know where to start then just start anywhere - come up with one or two concrete objectives to work towards. The most important thing is to start. Pick something that looks achievable over 2-3 months and go for it. By the time you have achieved those objectives you will have built up some momentum and also learnt a bit more, so you'll be in a slightly better place to pick your next objectives. As you get better at this you can start picking bigger targets and doing it over longer time frames.

If you're really stuck then try picking an open source project at random and commiting yourself to contributing something to that project in the next two months. That could be programming, it could be documentation, it could be something else. If you're not physically active, then pick some kind of physical challenge too. Completing a 5 kilometre/3 mile run/walk is achievable for most people in that time frame.

The more you do, the more you'll know what to do (and the more you'll realise how much is still undone).

And on a more specific level - if you want to get into a top grad school you will most like have to do well academically. Depending on your course, exams are likely to be a major factor in your grades, so learn how to be good at exams - it is a skill and if you are staying in academia for a while it is one worth learning. What follows is old advice, but not many people seem to follow it. If you're studying a technical subject, then make sure your maths is up to speed. If you are bad at maths it will make any kind of numerical/equation type of exam much harder (and also many things in the real world). During the exam, do three passes through the paper - on the first pass just read it, look for easy questions. On the second just answer stuff that you know reasonably well, don't waste time on difficult stuff. On the third pass go back to the questions you couldn't do and do as much as you can. Even if you can't answer the question write down stuff that you think is relevant, you might pick up a mark or two here and there (but don't go overboard writing down irrelevant stuff, your marker won't thank you for that). And practice, practice, practice. Get hold of old exam papers and do them (timed). Get hold of the answers to the old exams if you can and study them. Often the questions are set by the same person each year and often they aren't very imaginative at coming up with new variations.

</comment><comment><USER52> Reading "You and Your Research" (<http://www.cs.virginia.edu/~robins/YouAndYourResearch.html>) by Richard Hamming might also give you some ideas about what to do. It's an inspiring read.

</comment><comment><USER53> I'm 24 and graduating with a MSCS from Stanford this week. The last two years have made me much smarter and more comfortable with theory than I was two years ago. Of course, I also worked far harder here than I ever have in my life. Highly recommend the experience.

<comment><USER54> When you say "much smarter and more comfortable with theory", what do you mean exactly? Smarter how? Also, how are you more comfortable with theory and what does that comfort do for you? What type of role in society/IT would you say the education prepared you for? I hope you don't mind my curiosity.

<comment><USER53> >Smarter how?

I've really learned what people mean when they say that the mind is a muscle. You know when you first start working out, you can't lift that much and everything hurts, but after, say, two years you've built up some muscle and maybe you can bench your bodyweight? Well, it was a bit like that. Stanford was a very challenging environment for me at first. I feel like I get things more quickly, have more ideas, and think faster in general now than I did two years ago...to a greater degree than I could reasonably expect just from aging two years.

>how are you more comfortable with theory

I did my undergrad at Georgetown...fine school, and not totally devoid of theory classes, but the philosophy there is that you learn by implementing (which I did). But I never did a CS problem set in four years there. I could still understand theory and reproduce it on exams etc, but if you asked me to read an academic paper it would have been pretty painful. That's no longer the case, despite the fact that I've only read 1-2 papers here. If you want something more concrete - I took 224M and 225B my first quarter, and they were waaay harder for me then that taking a similar class would be now (especially 224M - <http://cs224m.stanford.edu>).

>what does that comfort do for you?

Hmmm, good question. I don't know if there's any direct, tangible benefit that I can point to.

>What type of role in society/IT would you say the education prepared you for?

Just about anything. I'm CTO of a NY startup, and will finally be full time on it once I graduate, but I could have gone on to be a PM or dev at pretty much any company of my choice, or gone to Wall St, or just about anything else you can think of. Oh, that reminds me of another benefit of being here...you'll regularly get Facebook, Google, Microsoft, Amazon, etc. emailing you and asking you to interview. Plus, Stanford is ridiculous for credibility...if you play the S-card, as some call it, people are often more conducive to your requests. That can even just mean sending an email from your @cs.stanford.edu address instead of GMail. Not sure how that is at other schools but it's a nice change from Gtown, whose CS dept is so small most people never think of it.

</comment></comment></comment><comment><USER55> Get to know your cognitive biases: <http://en.wikipedia.org/wiki/List_of_cognitive_biases>

</comment><comment><USER25> <http://www.cambridgebrainsciences.com/>

<http://cognitivefun.net>

</comment><comment><USER56> "You are a product of your environment." --Clement Stone

</comment><comment><USER57> I'd recommend a couple of books:

 _Mindset: The New Psychology of Success_ , by Carol Dweck,

 _What Is Intelligence?_ , by James Flynn.

<comment><AUTHOR> Thanks I'll definitely check them out.

</comment></comment><comment><USER58> when i was 19 even i used to contemplate on how to get smarter but ended up becoming a piece of rotten vegetable.now at the age of 25 i believe in doing volumes of work and imagining things.that's the only way of becomming smart.

</comment><comment><USER59> I'm 22 and recently graduated with a degree in Computer Science from a second- rate Canadian University. Two years into my program I went through this same phase but my GPA has never been very strong and transferring was just not a realistic option.

Actually ~10 hours ago I was just reminiscing/reflecting on the experience and my achievements of the last 4 years. It's been 3 days after convocation and one of my good buddies is continuing on with his studies while I am diving into the wonderful world of work. I woke up and read this thread during breakfast so this a happy coincidence. I hope that someone can benefit from my experience/mistakes.

If your goal is to get into a prestigious University then I have some bad news. It is much easier, (less competitive) and cheaper (courses cost money) to get your foot in the door through high school than it is to transfer in. That being said, if you are highly determined and put in the effort you will find a way to get in. *

Yesterday evening I was fiddling around with <http://www.cs.utep.edu/admissions/> . Graduate school has never been a priority for me so I would recommend doing your own research but understand that you -need- a strong GPA, especially in your CS courses. Normally I don't recommend comparing your personal development with that of your peers but it's a competitive world and a 3.3+ GPA, high GRE scores, and research experience seems to be the prerequisite for any respectable CS school these days.

As for grades I share the same sentiment as the fellow here. <http://www.stanford.edu/~pgbovine/grades.htm> Looking at the graduating class and having worked with many of my peers directly I will tell you now that there is a very strong correlation between those with strong mathematical ability and good grades. But even if you don't have the aptitude * grades reflect how well you perform what is required for a class so hard work, collaboration, and even collusion can skew results significantly. Research experience is easy to get because professors are always looking for bright students. The pay will not be very good (it's typically minimum wage where I studied) but it's more for the experience and now you can double dip and add two bullet points for your resume: One for work experience and another for a scholarship. Once again, GPA is one of the prime determinant for these research programs. (the other is finding a professor to sponsor you)

I would have liked to keep the door to graduate studies open, but I failed 3 courses in a 40 course program which is pretty devastating to anybody's GPA. (I used up nearly all my withdrawals in my first year after a stint in another faculty, but that's another story) A cumulative total of 2.99998 is not competitive for CS graduate studies. I've secured a fairly plum job which is my motivation for getting a degree but obviously I've burned some bridges. I try not to look back but for now I wonder how my life would be different if I spent more time on my studies and less programming.

tl;dr You know where you want to go. Find out how to get there. Put in the effort and you will likely achieve your goal. I'll be happy to elaborate more on my experience if you are interested but I recommend speaking with your TA's and professors. They've been there, done that and will be able to offer sound advice. Phil also has more to say about grad school but Stanford is probably more selective than most. <http://www.stanford.edu/~pgbovine/grad-school-app- tips.htm>

* A disproportionately large proportion of freshman think they are going to get double degrees, get into graduate studies or whatever. Most inevitably end up changing their minds.

* You'll know when you expend three times as much effort/time in Graphics programming than your friend, brilliant as he may be. Also many of the "distinguished" students that graduated with honors have minors in general or pure mathematics.

EDIT: Edited for grammar and coherency.

</comment><comment><USER60> Simple: Read HN every day and take fish oil pills.

</comment><comment><USER61> Others have pointed out that you need to read, challenge yourself and work hard. I'd add that this is a lifestyle change, not a quick fix - you need to treat it accordingly, or accept that this is not something you can do indefinitely.

You know those people who say "I used to ..., but then I realised that ... and now I'm much happier"? You're either one of them just on the cusp of your epiphany, or you're just wishing really hard for a silver bullet. The latter is a waste of your time.

(Mine was putting the blame for my lack of achievements anywhere but my own procrastination. I realised what I was doing, and stopped by imposing deadlines on myself, and penalties for missing them. "I'm not allowed to go to that party at the weekend unless this project is finished, completely. Either that, or accept that I'll never achieve anything because I don't put in the time". Treating myself like the naughty child I was, basically.)

</comment><comment><USER62> Study.

</comment><comment><USER40> ADHD drugs are some crazy stuff.

<comment><USER63> "The most important principle on HN, though, is to make thoughtful comments. Thoughtful in both senses: both civil and substantial."

Considering that you "Migrated from reddit" because the "quality of the comments declined way too fast.", you'll probably be interested in (re)reading the HN guidelines.

<http://ycombinator.com/newsguidelines.html>

<comment><USER40> Can you show me where the guidelines relate to my comment? I'm not sure if things are different here, but in most other places, bringing up the rules of a place by telling the person they'll be 'interested in (re)reading' them is what could be considered "introducing classic flamewar topics".

Of course we can now also discuss what is thoughtful, civil, and substantial. From my understanding of the word civil, your comment is questionable. I may be too sensitive, but your comment strikes me as one that attempted to show no respect and even try to hurt my feelings. This thought process has even more grounding with the appearance of your account being made only for this one comment. I'm saddened that you couldn't show me the respect and common courtesy of using an active account.

On to my actual comment. Your first quote is from the welcome page. The same page that appears to be quite lax and from my (admittedly biased) reading, doesn't seem to be too against my comment. The one mistake I admit to is the wording. It should have been worded better.

On the other hand, I was the first and only person to bring up 'brain- enhancing' drugs. I decided to keep my comment short so if anyone actually cared about the topic, they could reply and then I could expand. Otherwise I feared I would possibly invoke negativity from people that don't like the idea of people taking certain drugs. Negativity (not necessarily for what I had in mind) occured anyway so that reasoning is moot I guess.</comment></comment></comment>


Can Amputees Take Their Limbs Home? - <AUTHOR> https://www.snopes.com/fact-check/can-amputees-take-their-limb-home/ <comment><AUTHOR> WARNING: This link is included in the article (though not shown).

[https://imgur.com/a/Binbc](https://imgur.com/a/Binbc)

If you are like me who enjoys looking at human anatomy, click on it, otherwise, do not. I repeat, do not. But it's somewhat interesting to see the actual foot.</comment>


Churchill's disaster – Gallipoli - <AUTHOR> http://ericmargolis.com/2015/04/churchills-disaster-gallipoli/ <comment><USER2> In New Zealand and Australia, the landings at Gallipoli are commemorated with a national holiday (ANZAC day, 25 April). I've always found it ironic that what is probably our most important holiday is a commemoration of one of Britain's greatest blunders.

<comment><USER3> ANZAC day is a commemoration to those that died. Don't confuse commemoration with a party/celebratory sense, the event is usually pretty stern.

<comment><USER2> I'm well aware of the nature of, and reason for the ANZAC day commemorations. The irony was that an event that served to define New Zealand and Australia's national identities, is also one of British Empires greatest failures.

<comment><USER4> I don't think that it's ironic that Gallipoli and WW1 in general is what led to Australia and New Zealand starting to view themselves as distinct from the "Home Country" \- our experiences in WW1 made it very clear that England didn't consider us colonials to be English, even if we still did at the time.

<comment><USER5> It's estimated that between 1/4 and a 1/3 of the ANZACs were born in the "Mother Country", so their rejection as being not-British was probably a contributing factor to the passing of the Nationality Act of 1920.

</comment></comment></comment></comment></comment><comment><USER6> If you read the actual histories, including Churchill's own accounts and biographies of Churchill, your conclusion might differ from Eric Margolis'. Churchill came up with the daring plan, sure, but the execution and implementation were botched pretty much across the board by the military commanders responsible for carrying it out. They were largely unwilling to commit to the venture with the necessary speed, focus, and commitment necessary to see it through. They kept dragging their feet, ignoring Churchill's urgings to speed up and deal with minesweeping while they still could. Basically the result was a true disaster but it really wasn't Churchill's. Churchill was the only believer in the plan, basically. So the plan was doomed. Go read the histories.

<comment><USER7> An interesting add-on here from Dan Carlin's Hardcore History podcast: The initial plan to force the strait involved risking a large number of out-dated ships, judged by Churchill and co. to be expendable in the context of their utility in the war. However the admiralty, who included a number of men who had served on said ships, shared an emotional attachment to the old-war-dog fleet which they had earned their stars and stripes on. Thus they were unwilling to fully commit the necessary expenditure for the plan to work (microcosm of why the greater plan failed).

A good example of ineptitude in war. Churchill was no saint, and I couldn't get to OP's article (hug of death?), but history is always viewed through a lens and is mostly op-ed pieces.

</comment></comment><comment><USER8> The author's snipe at the United States (relative to Russia and China) is both jarring, for being woefully out of place in an essay on a WWI engagement, and unwarranted. None of these three major powers has fought another major state for at least 4 decades. The Russians have been fighting disorganized "natives" in places like Georgia, Chechnya, and Ukraine, and rarely openly. Before that, they fought "natives" in Afghanistan… and lost. The PLA has mostly been oppressing ethnic minorities within China's expanded imperial borders (Uighurs, Tibetans, Tiananmen) since it fought "natives" in its own Vietnam War in 1979. Its last combat with a major state was 1962 (India). Meanwhile the Unites States has also been fighting small states (Iraq, Afghanistan), proxy wars, and minor actions since its last major war against "natives" in Vietnam… which they lost.

Not one of these powers has fought an open war against another major state or combination of states in over 5 decades, and the Indians, militarily, probably shouldn't have counted in 1962, either. Realistically there is no one currently serving in any of these services who participated in an open war against a significant power.

That this is destabilizing would have been a fair point. That the world's major powers are probably all feeling somewhat insecure about their own military capabilities (or ought to be) is worrying and worth some analysis. The kind of error made by Churchill and the French at Gallipoli will be made again. But I do not pretend to know who will make it next. There are a lot of inexperienced commanders running around out there, and a lot of major powers that have not been tested within living memory. Singling out the United States while exalting the Russians and Chinese seems overtly political and is out of place in a historical essay without substantial modern analysis to justify the analogy.

</comment><comment><USER4> What I like about Gallipoli is how these days it serves as a national memorial for three nations - Australia, New Zealand, and Turkey - and how forgiving the Turkish are and were of people who had come as invaders.

<comment><USER9> For those not familiar... Mustafa Kemal Atatürk was the commander at Gallipoli and later founder of the Turkish republic. During the initial invasion, he famously told one of his units: "Men, I am not ordering you to attack. I am ordering you to die. In the time that it takes us to die, other forces and commanders can come and take our place." Later, after the war, he commemorated the memorial for Australia, New Zealand, and Turkey with what I still think is the most moving thing ever said about war:

        Heroes who shed their blood and lost their lives! You are
        now lying in the soil of a friendly country. Therefore rest
        in peace. There is no difference between the Johnnies and
        Mehmets to us where they lie side by side here in this
        country of ours. You, the mothers, who sent their sons from
        far away countries wipe away your tears; your sons are now
        lying in our bosom and are in peace. After having lost
        their lives on this land they have become our sons as well.

</comment></comment><comment><USER10> Tragic that in the same year we commemorate the centennial, we (New Zealand) and Australia are committing forces to Iraq at the behest of the current pseudo-imperial power, the United States.

<comment><USER11> yes and today a certain PM claimed they were "sons of ANZAC" which formally puts these two PMs in the position of the bumbling british aristocrats who caused so much death

</comment></comment><comment><USER12> Not Churchill's only disaster: [http://en.wikipedia.org/wiki/Siege_of_Sidney_Street](http://en.wikipedia.org/wiki/Siege_of_Sidney_Street)

There's a _reason_ people in the UK paid no attention whatsoever to Churchill during the 1920s and '30s. It wasn't that they disagreed with his increasingly-urgent warnings about Hitler -- it's that the only man issuing them was a "known idiot".

<comment><USER13> There is a difference between being a scapegoat and being at fault. Churchill was the former with respect to Gallipoli; his actual plan was simply not followed.

<comment><USER14> "It was a beautiful plan on paper!"

\-- every terrible manager ever.

<comment><USER15> Sure, but in a military operation there's no substitute for planning and coordination, and _execution_. The plan will always need to change, and you can find a dozen generals with famous quotes that will back that up. But the solution after the plan breaks down isn't _no plan_ , it's _the next plan_.

Only at the most tactical level can you get by with just your wits and the gear you have with you, everything else needs good planning of some sort.

</comment></comment></comment></comment><comment><USER16> History really distorts things. This story is always portrayed as a failure, and the soldiers as "fought with honor and gallantry". They were invading another country and killed hundreds of thousands of people. We wouldn't say ISIS fighters "died for no good purpose" or are "brave soldiers".

<comment><USER17> everyone who dies in any war is remembered as someone who fought with honor for the motherland, by their own.

The ISIS people regard their dead as heroes even today, they don't need 50 years.

</comment></comment><comment><USER18> It's pretty significant that this battle also served as the pre-cursor to the current, secular republic of Turkey.

<comment><USER19> It is very significant.

<comment><USER20> Exactly. This battle ended islam as a political entity, and ended the war between muslims and the west that had existed for a millenium by that point. It was an event that would be comparable to nuking Mecca would be today.

</comment></comment></comment><comment><USER21> Having read more history books than I should have, I have much respect for Churchill and English people.

</comment><comment><USER22> Singapore, Dunkirk, Dieppe...

The Allies performed terribly for most of the war, and only seemed to hang on until Hitler defeated himself.

The perfect combination of British time, Russian blood, and American weapons helped, as well.

<comment><USER23> You're thinking WWII.</comment></comment>


Why the world needs Haskell - <AUTHOR> http://www.devalot.com/articles/2013/07/why-haskell.html <comment><USER2> Because how else would you implement Agda? Hah!

The idea of managing side effects as a type (monads) still hasn't seemed compelling to me in terms of development time. Here I agree with Liskov in saying that it's a bit over the top[0]. Most of the quality I see with Haskell has to do with strict types, not the handling of I/O errors as types themselves.

Not that I want to bash it.. Learning haskell has _actively_ changed how I approach all my C/C++ development, and gotten me far far far into the weeds of now learning Agda as a prototyping language for designs/semantics[1].

The world may or may not need Haskell. However it's certainly a better place now that it has it.

[0]: She said this at a talk she gave at work.. It was similar or the same as her "The Power of Abstraction" talk, dunno if she makes the same comment in every presentation though.

[1]: [http://www.youtube.com/watch?v=vy5C-mlUQ1w](http://www.youtube.com/watch?v=vy5C-mlUQ1w)

<comment><USER3> I don't agree that managing effects is over the top per se however the use of monads feels over the top for pretty much everything!

It's always struck me as strange that value (as in a typical type system) and effects would be controlled through the same system. The type signature of a function and it's effects seem very much orthogonal to me.

If we want to be controlling side effects then we really ought to be using a separate effect system[1]. There's a scala plugin demonstrating this (although I've not tried it)[2].

With separate type and effect systems I should be able to define a pure function fib(n) and call it like this fib(getValueFromUser()) that is _without_ having to use special operators to get at the value which can only be used in certain contexts a la Haskell.

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

[2] [https://github.com/lrytz/efftp/wiki](https://github.com/lrytz/efftp/wiki)

<comment><USER4>
        x = fib(getValueFromUser())

x is not pure, but fib is. OK, the compiler can figure that out without requiring the programmer to write a special "bind" operator.

How about this:

        dofib(argumentProvider) = fib(argumentProvider())
        dofib(lambda: 1)  // pure
        difib(getValueFromUser) // effectful

Is dofib pure or not? That depends on the value of argumentProvider cannot be determined statically.

<comment><USER5> _Is dofib pure or not?_

Food for thought:

1\. The easy but limited solution is that this code doesn't compile, because argumentProvider must have a single type/effect and you couldn't have both a pure and an impure function with that type/effect.

2\. Is purity that important? Ultimately we care about avoiding our programs doing unintended things, and often effects are just fine as long as they don't misbehave in some way. Purity is a means to an end.

3\. It's fascinating to extend the ideas of generic programming from mainstream type systems to effect systems. I suspect there is a lot of potential benefit to be had if we can figure out how to do this without introducing a lot of boilerplate code, in the same way that we can write code using generic types to various degrees today but have type inference spare us a lot of keyboard bashing.

<comment><USER3> Effect inference has already been done: [http://research.microsoft.com/apps/mobile/showpage.aspx?page...](http://research.microsoft.com/apps/mobile/showpage.aspx?page=/en- us/projects/koka/)

I doubt we'll see anything like this in a mainstream language anytime soon.

<comment><USER5> That's an interesting case I hadn't seen before, so thanks for the link.

Some of the related pages don't seem to be available at the moment, but from what I could see it looks as if that approach still gets hung up on questions of decidability, and doesn't have a very powerful concept of the regions where effects apply, which has been another interesting aspect of the wider research so far. It's good to see someone else working on the field, though.

</comment></comment></comment></comment></comment></comment><comment><USER6> I don't have much experience with haskell beyond Learn You A Haskell (a book), but I wonder how beneficial the no null pointer errors are in practice.

The way haskell handles this reminds me of checked exceptions in Java. In java if you read from a file, your code won't compile unless you have a catch block that handles the possibility of an IO exception. This is called a checked exception because you have to check for the possibility or else your code won't compile.

I know many Java programmers handle checked exceptions by wrapping the checked exception in a unchecked exception so they don't have to deal with it. Don't Haskell developers end up doing the same thing with their Maybe concept?

Haskell avoids null by using a Maybe type/class (I always forget the terminology). A Maybe can evaluate to either a value or a type that represents the absence of a value. (This is an oversimplification for the consideration of people who know nothing about Haskell)

For example, you've got an associative map data type and you find an element in there. At the time of writing the code you "knew" that the element "has to be there". Haskell makes you deal with the possibility that it's not. Won't most developers just end up throwing an exception in that case so they don't have to deal with the impossible possibility? Then, x months from now when the code gets changed so that the map won't have the element there, all the sudden your code gets an error. How is this different from a null pointer exception in any other language?

(Part of me is ignorant and part of me is playing the devil's advocate.)

<comment><USER7> Gennerally when you have null pointer erros, it is because the developer did not realize that there was the possibility of having a null value at that point in code. Adding this information to the type system allows the developer to know exactly where the issue might occur (and have the compiler complain if it is not handled). Also, in terms of use, maybe has another major advantage over null. Many times in languages with null you see the pattern

if (foo==null) {return null} else {...}

This pattern is handled automaticly by maybe; If you try applying a function to Nothing (maybe's version of null), then the result of that function is also Nothing, even if the function itself was not designed to handle Maybes.

Additionally, as a matter of culture, Haskell programmers rarely throw exceptions.

<comment><USER8> > Additionally, as a matter of culture, Haskell programmers rarely throw > exceptions.

The writers of unix and other base libraries would disagree. See for example `head`. Or most functions that calls into C where the C function fails with an error. In that case Haskell blows up into your face, and you have to wrap the function invocation in a catch.

<comment><USER9> Or replace head with a better function.

<comment><USER10> Or use pattern matching.

<comment><USER11> Pattern matching is great, you can usually use it instead of head, but you want something like Control.Error.Safe.tryRead to replace other unsafe functions like read.

</comment></comment></comment></comment></comment></comment><comment><USER12> While I agree that Haskell is a great language and everyone should learn it because it's fun to play with it, I think solution to author's problems (and as a current evolution step) would be something like Kotlin.

It's Java-like language (no need to manage pointers), and it doesn't have null-pointer problem, but it's still high-level imperative OOP language.

While many people say that they're code in Haskell is easier to read, since it has this "side-effect-free" guarantees, for me it seemed as not true for some time recently. In Haskell, when your code gets complicated (and starts to have some patterns you want to omit in typing), you start writing Monads. And when you start writing monads, your code gets _harder_ to read since you need not only consider the code, but also keep (>>=) operator (all of them, if you use multiple monads combined via transformers) in your head for every pair of lines. Your code can suddenly have something like global variables (dynamic scoping) hidden in monad (as with State monad), it's flow can be changed dramatically and different other surprises.

<comment><USER11> Haskell gives you referential transparency and immutability guarantees, something you'll never get in Kotlin.

That said, I agree that Haskell code is typically dense, and suffers from readability problems.

<comment><USER12> Yeah, I'm just saying that referential transparency and immutability often turn into a lie, since this code:

[https://gist.github.com/k-bx/594a415a06fdd0fc3841](https://gist.github.com/k-bx/594a415a06fdd0fc3841)

could easily put 2 different values into `a` on each line. Of course, technically everything is still correct, and getA still returns same result for each call.

<comment><USER11> Er, but that's not the same 'a', it's two different bindings with the same name, and you should get:

      foo.hs:3:9: Warning:
        This binding for `a' shadows the existing binding
          bound at ...

when you compile with -Wall.

<comment><USER12> Yes. You're free to rename second a to b. The point I wanted to make is that it's the same getA, but anyone reading the code should understand that result binded to a and b will be different.

<comment><USER11> Depending on the monad. If you are in Reader and getA == ask, a and b will have the same value. If you are in IO and getA == getLine, a and b may be different.

<comment><USER12> The whole point I was talking about is that as soon as you're in monad, referential transparency becomes a bit a "lie", and a <\- getA, b <\- getA becomes non just analogous to a = getA(); b = getA();, but even worse in "referential transparency" sense.

<comment><USER13> Referential transparency is not a lie; _getA_ is just a value. It could be substituted for its meaning without altering the program. For example, the following program:

        foo = do
          a <- getA
          putStrLn ("Hello, " ++ a ++ "!")
          where
            getA = do putStrLn "What is your name?"
                      getLine

Is equivalent to:

        bar = do
          a <- do putStrLn "What is your name?"
                  getLine
          putStrLn ("Hello, " ++ a ++ "!")

<comment><USER12> Yes, that's exactly what I was sayint 2 comments upper this thread:

> The point I wanted to make is that it's the same getA, but anyone reading > the code should understand that result binded to a and b will be different.

So, while referrential transparency is still in place, programmer who reads the code will most likely care not about getA's result, but rather what will a and b get binded to, and in those terms it's just the same as good old

a = getA(); b = getA();

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> > It's also why ruthless testing and 100% test coverage have become so > important in mainstream languages. But even with 100% test coverage you > can't be sure that your code will work correctly if a function unexpectedly > returns nil unless you're also mocking things out or using fuzz testing.

You can write tests with 100% coverage that don't use a single assertion. Test coverage is a completely useless metric, but it is an easy one to measure and understand, which is why it is so popular in pseudo-QA and the management tier.

<comment><USER3> I frequently see people talking about an unqualified "100% test coverage". Is it safe to assume in these cases that the author is referring to statement coverage[1] rather than something more stringent like decision coverage or even MC/DC?[2]

If we're talking about statement coverage then I agree that achieving 100% statement coverage then calling it a day really isn't as helpful as it might sound.

[1] [https://en.wikipedia.org/wiki/Code_coverage#Basic_coverage_c...](https://en.wikipedia.org/wiki/Code_coverage#Basic_coverage_criteria)

[2] [https://en.wikipedia.org/wiki/Code_coverage#Modified_conditi...](https://en.wikipedia.org/wiki/Code_coverage#Modified_condition.2Fdecision_coverage)

</comment></comment><comment><USER15> I think this can be generalized to functional languages in general. Scala provides a lot of the same features in here.

<comment><USER6> Can you list those same features that it provides? My understanding of Scala's philosophy is it provides as many features as it can. A Maybe type, immutable state, separation of IO, etc. isn't very useful if my coworker can choose not to use it.

<comment><USER16> Scala is like Perl in that there is a non-zero possibility of writing non- native code. In Scala, you're supposed to favor immutability and functional constructs, but there's nothing preventing you from treating Scala exactly like Java. Same with Perl and C.

Also, if you need a language to dictate your coworker's behavior, that says something more about your coworker than the language. Why doesn't he just choose to write good code? (barring arguments regarding the activation energy of good versus bad code)

<comment><USER17> I assume by "non-native", you mean "non-idiomatic"?

Since I recently went through coworkers writing "bad" (by which I mean non- idiomatic) Scala, and repairing the situation, I can say that it was surprisingly easy to lay down "functional constructs" and the result was amazing. The code became reliable, well-structured, and easy to leverage. Switching to Scala for our projects -- including introducing procedurally minded programmers to it -- was a huge win for us.

<comment><USER15> Yeah, we discovered that for my team's projects as well. Having a scala "guru" define and teach idiomatic scala has actually increased our productivity a lot. Any non-idiomatic scala is now purely for interacting with our existing Java libraries

<comment><USER17> FWIW, the constructs with the initial biggest win for us (in converting procedural thinking) were pattern matching and option types. For pattern matching, the guidelines were

\- Don't do any processing after the pattern match within a function; break into smaller functions

\- Reach for pattern matching before if/else

\- Avoid the use of var

\- Avoid dropping through to wildcard pattern. (This tip was from Yaron Minsky of OCaml fame)

In conjunction with preferring the use of combinators over loops, and using Option (and being forced to think about None), we got surprisingly functional Scala code in a short time.

</comment></comment></comment></comment></comment></comment><comment><USER18> Haskell is a puzzle language ([http://prog21.dadgum.com/38.html](http://prog21.dadgum.com/38.html)).

I intend to learn some Haskell but I keep wondering if it might be more useful to spend some time with Clojure or F#

<comment><USER19> People who program because they like puzzles, puzzle me. I like things that are straight forward and obvious when I program.

<comment><USER20> > I like things that are straight forward and obvious when I program.

So do I, which is why I program in Haskell rather than the other languages which make me worry about a ton of irrelevant things like the global state of my program and don't let me enforce invariants of my code in the type system, guaranteeing I can't violate without making the type checker complain.

</comment></comment></comment><comment><USER21>
        boost::optional<User> get_user_by_name(string);
        boost::variant<string, User> get_user_by_name(string);

Optional is making its way into the standard library.

<comment><USER13> Right, but how does that give me any assurance that the value contained within the optional is itself not null? Haskell gives me that assurance.

If all pointers can be null, then every pointer type is an implied optional type. Haskell's advantage is that it allows us to define types which _cannot_ be null.

<comment><USER21> An optional<T> has two states: it either holds a T or nothing. There's no third state.

All pointers can be null, but unlike (for example) Java, we don't have to deal with pointers to objects all the time. C++ has value types and it's perfectly possible to pass objects that cannot be null.

<comment><USER13> _An optional <T> has two states: it either holds a T or nothing._

But T could be a pointer to a valid object or a null pointer, or am I wrong?

 _C++ has value types and it 's perfectly possible to pass objects that cannot be null._

Only if those values live on the stack. What about heap objects?

<comment><USER22> It's possible, no matter where the object lives:

        #include <cstdio>
        using namespace std;
        class Type {
          public:
            Type(int a):_a(a){};
            int _a;
        };

        Type& getType(int a) {
          Type* t = NULL;
          t = new Type(a);
          return (*t);
        }
        Type& doSthWith(Type& t) {
          //no need (and no way) to check if t is reference to proper object
          t._a=t._a+1;
          return t;
        }

        int main() {
          Type& t = doSthWith(getType(5));
          printf("%d\n",t._a);
          return 0;
        };

This can be broken of course, for example by

        Type& getType(int a) {
          Type* t = NULL;
          return (*t);
        }

But that's another matter.

<comment><USER13> Right. What makes Haskell special is _not_ that it has option types, it's the fact that most types in Haskell cannot be null. This allows us to write pure (and total) functions, knowing that the compiler will enforce it; giving us a high degree of assurance that our function will not fail.

</comment></comment></comment></comment></comment></comment><comment><USER23> Even in Haskell, you still need to test your code. The type system doesn't prevent

      double = (3*)

</comment><comment><USER24> I skimmed so perhaps I missed something, but it looks like this is just the usual argument in favor of functional programming. I don't find it convincing because there's more to programming than getting the right output. Performance and memory usage are also important, and Haskell is extremely opaque in that respect. A strict language with optional laziness makes it much easier to reason about performance.

</comment><comment><USER25> Reading Ruby code makes me happy, reading Haskell code makes me want to pull all my hair out. Enough said.

<comment><USER26> "I love playing the tumpet, but I grabbed a violin and it sounded like a cat dying. Enough said."

</comment></comment><comment><USER27> Haskell zealots are using the same nonsensical arguments that Java used, claiming to be a "safe" language where the compiler and static typing "eliminating common bugs". This is a naive meme, almost everyone telling to each other.

First of all - no static typing system, whatever sophisticated it is, could protect from incompetence, lack of knowledge of underlying principles and plain stupidity. The dream that idiots will write a decent code will never come true, no matter how clever tools could be, just because it is _impossible_ to write any respectable code without understanding hows and whys.

But, for those who managed to understand the core ideas and concepts on which programming languages were based (immutability, passing by reference, properties of essential data-structures, such as lists and hash tables) it is possible to write sane and reasonable code even in C, leave alone CL or Erlang, and the type system will become a burden rather than advantage.

So, Haskell is really good to master Functional Programming (which is much better to learn using old classic Scheme courses), to understand the ideas it rests on. To realize what is function composition, environments, currying, partial evaluation, closures, why they and _when_ they are useful and handy, and how clear and concise everything (syntax and semantics) could be if you just stop here - just skip the part about Monads - they are just over hyped fanciness to show off.

Learning Haskell _after_ Scheme/CL really clarifies one's mind with realizations how the same foundation ideas work in a alien (static-typing) world, and how, everything is clean and concise, until you're starting messing everything up with "too advanced typing".

Again, it is much better to learn the underlying ideas (why it is good to separate and pay special attention to functions that performing IO, what is recursive data structures and _why_ null-pointers do exist in the first place) instead of stupid memes like "monads are cool" or "Haskell prevents bugs".

The trick is that it is that dynamic languages with proper testing (writing tests before code) is _not_ worse than this "static typing safety", and that the very word "safety" is just a meme.

<comment><USER28> The benefit of Haskell for me is not that it allows "idiots" to write decent code, but that it allows very smart people to write decent code.

It's much harder (in my experience) for very smart people to write decent code in C, C++, Python etc than in Haskell, simply because so much of their smartness is consumed by having to constantly think about what code might break their program.

<comment><USER27> Thinking constantly is part of the craft.)

<comment><USER28> Absolutely, which is why the compiler should remove as much thinking burden from the programer as possible. Then he/she has more free brainpower to spend on additional important things.

<comment><USER27> Exactly the same rhetoric about those evil pointers and safety of static typing and compiler technology was that gave rise to Java.

Haskell, it seems, while using the same slogans, plus FP and lazyness buzzwords, is really doing the job when you follow its conventions.

Actually, that part which re-implements standard FP techniques with very clever and concise, based on familiar conventions (currying, laziness) syntax, along with ability to write "curried type signatures" is remarkable. It feels much better than SML.

It is definitely the language worth of learning _after_ Scheme/CL.)

<comment><USER29> This is an such a bone dry straw man it's liable to spontaneously combust in the summer sun.

The fact that corporate overlords selling Java made certain overhyped promises does not have any bearing whatsoever on the merits of Haskell.

Let's break it down: Java fixed memory management at a significant performance cost, but they didn't solve null references, and in practice it was a big enough of an advancement to actually get a foothold against C++.

Haskell on the other hand actually solves null references as well, so the bugspace that it actually eliminates is easily an order of magnitude bigger than Java's, and it does so without being particularly slow or verbose.

Now as to the rest of your argument, of course it's true that FP principles can be applied anywhere, and given the correct discipline you can achieve much of the same benefits through careful architecture and coding practices. However what you're dismissing is the value of the compiler guarantee, and that should not be minimized. Of course we can look at any code sample and reason about how it should be structured to minimize side effects. But the problems with mutability and null references are endemic to large systems, not isolated features. Where Haskell's guarantees start to shine is when your code base goes over 100kloc and no one person understands the whole thing anymore and the preconditions informing the design no longer apply and things have been hacked from a dozen different perspectives. In this case those guarantees have non-trivial value.</comment></comment></comment></comment></comment></comment>