Ask HN: What do you do when you've lost motivation at work? - <AUTHOR> I'm woundering how do you approach this kind of feeling when you don't feel motivated at work.<p>I think that majority of people will solve it with finding a new job or maybe take a vacation. But, this is all about long term soltions. What I want to know, how to turn your motivation back right away, without changing a job or taking a vacation. Is it even possible? <comment><USER2> Small persistent holistic steps in the direction you want your life to move.

If you want more money look at where you can save money (not eating out, buying generic products, etc.) and things you might be able to do on the side to earn more.

Or if you rather start applying for jobs and seeing what else is out there. You don't have to find a job today, just start looking.

If you want to have more energy find an exercise routine that works for you and start eating more vegetables and less sugar/bread. Take time to meditate or at least relax and clear your head. It's likely there's something buried in your head that is causing you to be demotivated.

If it's your perspective that needs tuning work on rewiring your brain. Stuff like replacing "this is hard" with "this will take time" or learning to be okay with being wrong/weak and asking for help when you need it.

If your work isn't fulfilling maybe talk with your co-workers or supervisor to see what can be done to make it better. If that's not realistic, maybe your job actually does suck and you need to go back to the first paragraph.

For me personally, I find setting aside time to untangle my brain helps the most. Sitting someplace and working on a posture or breathing exercise and really just putting some distance between me and my problems for a little while.

Usually after that my problems seem much smaller and more manageable.

<comment><AUTHOR> Thanks a lot @YCode, I really like what you've said and it make sense to me.

The money wasn't prior number 1 for me, so probably it's not about the money.

What is really matters for me are people that surrounding me every day when I come to office.

Recently, we've been merged with another team. We where doing a great job before, a team spirit was so great that we where able to deliver better than others.

I literully was waking up with a huge smile on my face, because I knew that today we gonna do some awesome shit (no matter if it is bug fixing or performance improvements or new features).

Now, we have super huge team tons of projects and instead of goals that we are desire to achieve we have tasks that we have to close.

Now, I waking up with a sad face, because I know that today I'm going to "close the next issue", instead of "work on chalanging problem" that makes everyone in a team to feel proud of that.

<comment><USER3> Well, try to remind yourself that it's not permanent. Sometimes you work on things that bore you to tears, other times you work on things that are much more stimulating. There will be challenging problems to work on again in the future, I guarantee it. I would suggest unplugging from work/digital life and take part in other things that interest you that don't involve screens. Taking breaks to do other things in life will revitalize your mind and you will find motivation again. Also, you will discover that you aren't solely defined by your work.

</comment></comment></comment><comment><USER4> I might be in a unique situation to handle this (smallish company, fairly independent), but I just tend to bullshit my way through a work week when this happens.

I will talk big and vague in meetings about what I've accomplished. I'll talk about why what I'm building turned out to be more complicated than thought originally, and will take more time than allotted. If necessary will build interfaces that _look_ like I'm doing the work when in fact I'm not.

Keep in mind, I don't do this maliciously to "steal" from the company. I do this because I have a certain amount of creative energy, and _sometimes the well just runs dry_. I can't think about complicated things (much of my job is architecting systems) and I have trouble focusing. Instead of pushing myself to burn out further, I understand it as part of a boom/bust cycle and take a break at work. Sometimes this lasts up to a week (even more in a few cases).

Then one day during the bust, I'll get the wind back in my sails and start up again.

This happens once every few months, although sometimes it can be triggered by a larger project. Sometimes I'll allot a week for something, not do anything on it, and then complete it all a day before it's due. When I say "not do anything" I mean I'm not actually coding, however I think my subconscious is mulling the problem over and I'll have an "AHA!" moment when needed.

Really, it helps to get good at bullshitting and buying yourself time. Practice, practice, practice. Once again, not maliciously, but for your own well-being. Pad your days out when giving estimates to people.

Hope that helps/is applicable to your situation.

<comment><USER5> I wouldn't post anything on HN that I wouldn't want my boss to see, and frankly if I was your boss I wouldn't be that happy that:

"I just tend to bullshit my way through a work week.."

"..build interfaces that look like I'm doing the work when in fact I'm not."

"Sometimes I'll allot a week for something, not do anything on it, and then complete it all a day before it's due"

"it helps to get good at bullshitting"

Honestly, you don't sound professional. To me it's one thing to say, hey I'm burned out and I need to take a half day today. Or hey, I'm burned out, what if I worked on developer tooling for a few days to recharge my batteries.

But lying during meetings and distorting what you are working on are fireable offences, and even if you feel comfortable being that shameless and unethical on your own accord, why the heck would you give advice to someone else to do the same?

Sorry if this sounds harsh, but I'm bewildered by this post.

<comment><USER4> I specifically said it's not malicious, it's in reaction to my level of creativity. It's how I operate.

> Honestly, you don't sound professional. > if you feel comfortable being that > shameless and unethical

If you can work at 100% capacity at your job all the the time, great for you. If not, then you are either completely honest with your employers about it ("I didn't get anything done this week because I'm burned out") or you do the exact same things and are taking some sort of moral high ground in your post to feel superior.

It's fine if you don't agree with me giving honest advice, but keep the moral judgements to yourself when they are most likely based in hypocrisy.

EDIT: Also, just want to reiterate: this happens _once in a while_. I'm not doing this every day. Maybe you should re-read my post?

<comment><USER5> As I said in my comments, it's not about not being at 100% capacity all of the time. No-one is, but there are honest ways to communicate that.

What's crazy to me is strategically lying to your employers IN ADVANCE, to set yourself up to not do any work. Especially given that you are posting it under your name.

<comment><USER4> Oh, perhaps I wasn't clear. When I say I allot a week for something (5 days), that task, working at a normal pace, would probably take 3-4 days. I'm not asking for a week when it takes a day. I'm asking for 1.5x how much I think it will take to pad. Normal practice.

However sometimes, I am just not able to work on that project for a few days, and end up doing it all in one day/night after having a few days to thinking about it. For me, a good chunk of the job is thinking about it. The coding just kind of flows after that. The problem is that the thinking gets delayed =]

</comment></comment></comment></comment></comment><comment><USER6> It's not natural to love or even like your work. Trying to force yourself to do so is perilous. Being burnt out is not a failure. The only fix is to draw back from work in some way. That could be a vacation, it could be not trying so hard at work, it could be finding a new job, it could be finding a new living situation. Combining any of those with new interests, or rekindling old ones, might do the trick. Constantly trying to pep yourself up is not a good idea, you will eventually face catastrophic burnout.

The only other option is self-medication. That is only advisable if you truly have no other options but to keep your head to the grindstone, and you will have to deal with the inevitable fallout of self-medication, which ain't pretty. So only turn to that as a last resort, like if you're compelled (by legal or financial obligations) to continue, where the consequences of stopping outweigh the major drawbacks of self-medication.

This is why it's so important to achieve a low cost of living and some savings, as it expands your options when you face serious burnout (i.e. you can quit your job without having another one lined up, or take a much lower paying job, etc.).

<comment><USER7> Totally agree with this, and it's nice to see fellow tech folks understand that it's better to be honest with oneself with regards to interest and burnout, and to think of the bigger picture (your life, or your family). The cognitive dissonance encouraged by the 'I love my work' type of ethos is dangerous and counter-productive.

I like my work, and I like tech, but if I loved it, I wouldn't need to be paid to do it. Cut off my funding for it, and I'll probably continue to do it, but at a totally different path and pace as to what I get paid to do.

There's no need to love what you do, or try to get people to commit out loud to doing so.

<comment><USER8> > I like my work, and I like tech, but if I loved it, I wouldn't need to be > paid to do it. Cut off my funding for it, and I'll probably continue to do > it, but at a totally different path and pace as to what I get paid to do.

Amen, I've often joked I'd program 40hrs a week if basic income was a reality I'd just work on open source/projects that benefited people directly instead.

I don't love what I'm working on (or even like it) but I love _programming_ and so on balance I get to do something I love for money - not a bad deal most of the time.

I've done the minimum wage thing (did it for 8-9 years in my late teens-mid twenties) and the other side of the coin is pretty horrible.

</comment></comment></comment><comment><USER9> I've used one or more of the following for a quick fix:

o Force 8h+ of sleep (or at least lying flat) for a 1-2 weeks, if not permanently.

o Force daily exercise mix for 1-2 weeks, if not permanently. Each day: either short and intense OR long and slow. I avoid short and intense on consecutive days.

o Really good teeth and gum care to enhance QOL and sleep.

o Fasting (water only) while at work.

o Active vacation: 2-4 days at a resort/camp where you can simplify your day to "move or eat" for all waking hours, and sleep in a decent bed for 8+h. Might want to go "screen free" as well.

Good luck!

<comment><USER10> I just did 5 days at a resort with no working of any kind. Didn't even check email. Came back, went to the office for a day and now feel as terrible as I did before leaving.

5 days always worked for me before. Is there such a thing as permanent burn out?

<comment><USER9> Unfortunately, I've seen some people get burnout that really sticks. Some found success with a much longer break (3 weeks - 6 months). I've also heard that certain types of talk therapy can unravel the burnout drivers, so one can address them "on the fly," without interrupting work too much. Finally, something else may be going on, so you may want to check in with your personal doctor or a psychiatrist. For example, a hidden vitamin deficiency can do all sorts of wacky things to quality of life.

<comment><USER11> I can confirm, a couple months long break always does wonders for me. That's why I prefer to be a contractor, as such breaks are not compatible with full- time employment.

<comment><USER10> I sure do miss contractor life right now.

</comment></comment></comment></comment></comment><comment><USER12> 1.) Usually when I'm not feeling motivated it's because I'm hitting a wall. The pomodoro technique helps me with this a lot personally-- it forces me to take breaks and recharge my creative batteries, but it also equally forces me to sit still and keep attacking that wall during the scheduled study time.

2.) Recently even pomodoro was not helping me. I think I had a project that had poorly written specs, and was also complicated to boot. It was very hard and I struggled a lot for several weeks. I tried writing down a visual map, trying to get a better mental model of it but had trouble grasping it still. I could feel my ability to focus and be motivated starting to go down over the weeks as I got more frustrated with the project not moving forward well. I felt dumb. What worked for me is going home and programming something I cared about instead for a half day on the weekend. I also did some tutorials that I could definitely succeed at. I feel like it rejuvenated my ability to focus and got rid of my frustration, I was finally getting things accomplished again and learning new things, which is a big motivator for me when programming. I like the "achievement" of completing things and I had not been getting that for weeks. I came back to work feeling like less of an impatient idiot and finished the project rather quickly from there.

</comment><comment><USER13> Turn lemons into lemonade.

Data + Process = Results

Data is your current job.

Process is what you do with that data.

Most people will want to change the Data; that is, change job, change career, take vacation, etc.

Sounds like you're asking how to change Results without changing the Data, right?

Simple. Keep the Data the same but change the only other available variable: the Process...

Keep going to work. Keep doing the job. But change how you think about it: "How can I use this current situation as an investment toward my future?"

Consider multiple solutions to every work assignment, their way and a better way. You can still implement their way while learning a better way you can implement on the side or later.

Consider every assignment an "instance". Come up with a "class" of solutions for that instance. Instead of writing one solution, write a "mini-framework" that would solve this problem AND many similar problems. Again, you don't have to implement your elegant solution now, but once it's in your brain, it's yours forever.

Find time to talk to your users! Find out what they hate that's not being addressed (and there's probably plenty). Then work on that stuff on the side. Do it at work now and become a hero or don't do it at work now and become your own hero at another time or place.

Always be thinking, "How can I use this project to better myself?" Get creative. You may surprise yourself with the possibilities.

Most programmers struggle finding ideas. You have the opposite problem. You're surrounded by problems desperately needing solutions but not getting them. They're just not on your radar because you're so unhappy being unmotivated in your environment. Focus on the unassigned possibilities while you're in the muck. You may not realize it now, but where you're already at is the best place to find them.

<comment><USER14> Excellent post!

I hated my last job, was thoroughly miserable and finally realized that I had ended up in a state of "learned helplessness." Your approach would have helped me tremendously.

Thankfully, I've had some time for growth and introspection since leaving that company.

</comment></comment><comment><USER15> The thing that I've found that motivates me the most long term is to work on problems that I think are important to work on. Working on challenging problems is great, and motivating for a while (few years), but ultimately I need to work on something that I think makes a difference in the world. Also something where I think that my skills can uniquely make a difference to the problem, but that by itself is not sufficient.

I'll still get frustrated and demotivated at times, but I will come back to it with a feeling that I am at least trying to work on something important and challenging even when things don't go right or they get particularly hard.

As an example, I spent a few years working on ASIC design for high def video encoding and decoding (HD-DVD and Blu-Ray). Super interesting and challenging. Wow I don't care about it's impact on the world though.

<comment><USER16> I feel the same. Unfortunately i spent the first 2 years of my PhD learning this about myself. Still searching for the right problem.

</comment></comment><comment><USER17> Lack of motivation for me typically comes when I have too many things to do (and generally they are the kinds of things I don't enjoy doing). The only solution I've found is "focus on one". Sounds simple, but often it's very hard to get the clarity of mind to look at all the e-mails in my inbox or tasks on my task-list and say, "That one.". But if I do this, then I only work on that one item until it is FINISHED. The simple act of actually completing something tends to increase my level of engagement and motivation. Then I go eat a cookie.

</comment><comment><USER18> As someone with an insatiable appetite for learning/being challenged, no kids, no serious relationship, and no equity in anything, I will walk almost immediately (with notice/finish the project/etc. of course) if I don't feel properly challenged. That said I don't feel like I'm a great person to give long term advice other than this..

I operate this way, because when I've stayed at places where my motivation began to wane, invariably, it then began swiftly descend, and then plummet incomprehensibly. The worst part was never going in to the office I had come to feel less than nothing about, it was bringing the lack of motivation home, because it inevitably followed me into my personal life, and stripped me of the desire to do the things I love.

That's where I draw the line.

Everyone is different of course. I'm sure you have good reasons for staying, and I sincerely wish you best figuring it out as someone who has been shackled very firmly with some golden-handcuffs to roles that ultimately offered me nothing more than big checks, and a sense of futility.

</comment><comment><USER19> Talk to your manager about it. There's always a lot of options for dealing with this kind of problem, but when you are unmotivated and maybe feeling down, these options aren't apparent, which makes the situation seem hopeless.

\- take a break from day to day development to do some strategic research: for example, a new technology that could be helpful to the company, etc.

\- switch teams, or take on a different role within your team

\- be on the lookout for anything, even something very small, that _does_ motivate you; and figure out how to do more of that. you can't control what motivates you, but you can recognize when it is (and isn't) happening, and adjust.

Some things that have worked for me personally in the past:

\- Going through a book like SICP, 7 languages in 7 weeks, etc.

\- Organizing a hackday for my department.

\- Since I am motivated by making things more efficient, taking a week to focus on better test automation and feeling the reward of making my colleagues' lives a bit better.

<comment><AUTHOR> I've ellaborate a little on the root couse of my problem in the first comment.

Ragrdig what you've said. >Since I am motivated by making things more efficient, taking >a week to focus on better test automation and feeling the >reward of making my colleagues' lives a bit better.

That's what I exactly did last week for example. I've been building a tool for performance testing and automation and I was feeling good. Now, I'm done with this and I have to get back to my daily routines, which not making me happy. Moreover, one of my good teammate is leaving and that's just makes everything even more worse :)

</comment></comment><comment><USER20> I've noticed that burnout tends to occur when I've been doing long stretches of "just get it done" work. While that type of work is great for your employer, it can be very unfulfilling for the employee.

Programming is a craft, and one that you can find meaning and fulfillment in. Mastering your craft is an exciting and motivating endeavor if you can take the time to do it well. But if you are forced to write "just get it done" code all day it will suck the energy from your soul.

If you are in a job where you simply cannot take the extra time to write elegant, interesting, well designed code... Then it may be worth looking for a new job. Find a company where the deadline isn't yesterday, and where you can foster a pattern of writing excellent code, and improving your craft.

</comment><comment><USER21> @julianusti, I asked a similar question almost 3 years ago; it wasn't directly about motivation at work but motivation and inspiration in general:

 _Ask HN: What are your sources of inspiration and motivation?_

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

I think it is very helpful to write down your thoughts and feelings to make tangible the ideas in your head that you are consciously aware of or being subconsciously influenced by. This also may "free up" your thoughts once they are "excised" and transferred to text. If you can write down the negatives, the positives, then work on framing or using a different perspective on the scenario, you may find a new way to approach your work.

</comment><comment><USER22> I haven't had motivation to work... ever? I work only because I have to. I work as little as possible. The last 13+ years of my life seem to show this plan is a pretty good one.

<comment><USER8> Say hi to Bill Lumbergh when you see him, if you feel like it ;).

</comment></comment><comment><USER23> You're asking for a quick fix without knowing what the problem is. Lack of motivation is normally a sign of some other problem. If the problem is that you just don't like the work any more, maybe the only fix is not just a new job but a career change. If the problem is the project/manager/team then it might be possible to move to another team in the same company. If the problem is that you haven't taken any significant vacation in 5 years...

</comment><comment><USER24> Step 1: Pay your bills, look at your retirement account, your mortgage, etc. Step 2: Figure out why you're working in the first place - if it's to put food on the table and pay your bills, then there's your motivation.

If you decide that you're working in order to fill a hole in your should and get a sense of satisfaction and contentment, find it outside of work (family, church, volunteering, etc).

</comment><comment><USER25> I think it is _critical_ to figure out if this is a short term feeling (tired, burnt out, etc.) or you are just not interested in what you are doing anymore. I think being honest with yourself and not rushing the decision will help -- say, take a month and ask yourself each morning "do I look forward to going to work today?".

Depending on that answer the recommendations will likely be very different.

</comment><comment><USER26> Motivation isn't the key factor: motivation comes and goes. It's a natural part of being human--we won't always want to do what needs doing.

 _Discipline_ gets you doing what needs to be done. Discipline is more directly addressable.

<comment><USER27> The brain's ability to be "Disciplined" varies widely based on genetics. IT careers seem to attract those with executive function disorders more than most fields.

<comment><USER28> I wonder if IT careers can cause an executive function disorder.

My intuition is yes, sometimes.

<comment><USER29> "We become what we behold. We shape our tools and then our tools shape us" -Father John Culkin

</comment></comment></comment></comment><comment><USER30> I try to make the job interesting by looking at each project or task in a few different ways:

1) Can I find some way to automate it by building some interesting abstraction to the problem?

2) Can I use some new tool or technology to increase my skill set? This might even be a non-technical skill in some cases.

3) Can I write a blog about the problem and how I approached it and how I solved the problem. Doing this will help to market my skill set or help me make connections with other interesting people.

</comment><comment><USER31> Five lines of code. First thing, sit down and add five lines of code. It frequently gets you in the zone and you write a lot more. And even if not, you finish the day (or go into your status update) having accomplished _something_ , which is better than continual zero progress.

</comment><comment><USER32> Do you have secure job where you can take it easy for a while? Its a great change to work 9-5 just for the money and find other things in life to enjoy. Perhaps its spending time with family & friends, perhaps learning a hobby, maybe some physical exercise.

Think about the people you meet and if you really envy the career path or life path someone else has taken. Maybe you should follow that track?

</comment><comment><USER33> Are you demotivated because you're burned out or because you're just not interested in the actual work you've been doing? If it's burn out, you need to take more breaks and a vacation. If you're unhappy with the kind of work you've been doing, it's time to look for a new job or find aspects of your job you can be satisfied with.

</comment><comment><USER34> Right now I'm reading all over the questions/articles I can found related to this question. But I can't find a similar problem or solution to mine. So I would like to comment mine here.

In my case, I really like my job. All my teammates are great people, and I like working with them. Everything seams nicely. But my problem is that I don't work hard enough, (It's not that I'm actually working hard but want to push myself more, I would be very happy if that was the case), I really don't.

Do you have any suggestions?

</comment><comment><USER35> I had a bit of a lull after 6 or 7 years. The I got a job building an entire system from scratch, learning Django (that not only gave me a big boost in productivity after Perl and CGI, but encouraged me to become a better coder). I realize now that working on new projects keeps me a lot more motivated than keeping someone else's crappy code running. Something that only requires a small team or one developer will make you feel like its your baby,rather than a small cog in a large wheel.

Avoid enterprisey software as working with that can be soul destroying (Salesforce and Marketing cloud integrations have been the most demotivating things I have worked on in a long time).

(Having said that, I think its time for me to learn something new myself as I have been using the same tech for 6 years now - Django is still great, but I need the same sort of thing for other areas of development).

</comment><comment><USER36> I've learned not to ignore these signals (lack of motivation) but take them in stride. So I usually wiggle a little to put things in perspective and see if there's room for incremental change. If everything else fails, I don't hesitate to make drastic changes to my environment. This takes some intuition and guts. At one time or another, I've been a classics PhD student, a civil engineer, and software developer. So it helps being reflexive, opening yourself up and exposing yourself to life's forces beyond what bears on you at present, and sometimes putting yourself in a situation where there's no way but to try something new. If you're stuck in a local equilibrium, one way out may be to put some life's forces to bear on it.

</comment><comment><USER37> Drink more coffee.

Seriously, coffee is the universal motivator. Anything that can't be fixed with coffee will have to be addressed at the source. Why aren't you feeling motivated?

<comment><USER38> Coffee causes me anxiety and wreck my sleep cycle. Some people are way too sensitive to it. Not a good solution for everyone.

<comment><USER39> Yeah, dropping caffeine from my diet was a huge benefit for me.

Not immediately, mind you. Those first couple of weeks were rough.

</comment></comment></comment><comment><USER40> Changing the color scheme of your text editor might be enough of a change to your job.

Going on a weekend trip might be enough of a vacation.

<comment><USER41> I use the "change color scheme" trick and it does work.

</comment></comment><comment><USER42> Why is taking a vacation not a long-term solution? That is exactly what vacations are for... to give yourself a break, let yourself step away from your job, forget about it for a while, come back refreshed and pick it back up without being as burned out.

You only have a problem when that does not work. In that case, you need to ask yourself what is really bothering you about the job, and talk to your employer about fixing it. Often, open communications about what is wrong will work, problems can be fixed, and things will improve. And if not, maybe you do need a new job.

But finding a new job or taking a vacation is a common answer because it sometimes is the correct answer. I'm not saying it should be the first answer. But don't try so hard to avoid those answers that you make yourself miserable, either.

</comment><comment><USER43> I don't wait for motivation in general, just cultivate discipline based on the thought that I will be dead in 0 to 50*365 days and there are many things that I can do to help everybody around. Often it requires mind-numbing work but that's what the life is on this planet.

<comment><AUTHOR> man, it's super valid point ;)

</comment></comment><comment><USER44> Your resilience towards work issues goes hand in hand with your personal situation. Just saying that if you would be in a super happy place personally, this stuff might get to you less.

</comment><comment><USER45> > I think that majority of people will solve it with finding a new job or > maybe take a vacation. But, this is all about long term solutions.

Oh, wait, you're saying that a new job or going on vacation is a "long term solution" ?? No, sorry, that's really a short term solution.

You're asking for even SHORTER TERM solutions? Get drunk.

Long term but pithy answer: Love and Exercise. Make serious time for taking care of your body and connecting with others in your life. You'll feel better. Seriously.

<comment><AUTHOR> thx, I really appritiate your advice!

</comment></comment><comment><USER46> yeah, drugs. Fastest solution to all problems.

But my actual solution is basically putting my mindset in a zero position (i don't even work for this company) and imagine what I would love to do right now. Then figure out if this company can provide this activity. In my case what I want to do are startups and learning about the different aspects of a company so while I'm a developer i actually go out and sell our product. at least try to. or do some marketing. or team mangement.

</comment><comment><USER47> I leave work. I browse HN. I read news. I walk around the campus. It's tough to lost motivation at work. I have been recommended to look for a new job.

<comment><AUTHOR> yeah man, that's the thing, that leaving the work is the easiest solution. It's like your survival instincts are talking to you, to go in a way where you don't have to fight.

I feel If I leave the job I'll just follow my survival instincts and not solve the real problem.

</comment></comment><comment><USER48> Take a look at all my bills. They motivate me to earn, at least, enough.

Then take a look at things I'd like to have: bigger house, better car, funny gadgets. Then I know that I must work if I want to have it.

Finally, take a look at the grass from all around the globe. Places I'd like to visit, to live, places where I would have the same job and earn much less. Then I know if I'm in the right place or not.

</comment><comment><USER49> Find a way to take a mental break in some form. If not a vacation then embrace a new hobby. Find something unrelated to work that is different and enjoyable, and do it often enough to find enjoyment and relaxation in it.

You also might just be burned out, or bored. In which case a vacation, switching things up, or even a job or lifestyle change may be in order.

</comment><comment><USER50> I simple stop working... and take as much as possible good time to enjoy the World :) And after, I start (continue) my work again... I hope it will be helpful for you too. [http://www.vuchkov.biz](http://www.vuchkov.biz)

</comment><comment><USER51> You watch this course:

[https://www.coursera.org/learn/happiness](https://www.coursera.org/learn/happiness)

Then re-evaluate your life.

<comment><AUTHOR> thx bro, I'll.

<comment><USER52> your use of the contraction like this broke me. i had to read it 4 times before it "worked".

</comment></comment></comment><comment><USER53> I am feeling this hard right now and have been struggling with motivation for several years. Thank you for posing the question, I hope HN has some insights.

<comment><AUTHOR> My pleasure @chapium, I hope on it too ;)

</comment></comment><comment><USER54> I have some experience with this, but don't want to air grievances in public. Happy to chat privately. Email in profile.

<comment><AUTHOR> I'll thx a lot.

</comment></comment><comment><USER55> I'd look into changing jobs within the company.

</comment><comment><USER56> Read HN.

</comment><comment><USER57> > What I want to know, how to turn your motivation back right away, without > changing a job or taking a vacation.

Sometimes vacations are very demotivating. If the work situation is bad, it is nice to get away for a week, but then after a week you're right back in it again, and it can seem worse than before, in contrast to your pleasant vacation.

</comment><comment><USER58> More caffeine!

Jokes aside (or was it a joke at all?), you need a goal. Implementing a good feature and improving the software, reaching a position, earn money for a greater good, etc. Something that injects passion into your daily life.

</comment><comment><USER59> You want the short term solution? Go out binge drinking on Saturday, suffer through Sunday, and then go back to work Monday thankful that you have a way to fix your bank balance.

<comment><AUTHOR> :)

</comment></comment><comment><USER60> No one does anything. They take no action. They complain about their jobs to those who will listen, and slog on unhappily. They talk about quitting but never do.

<comment><AUTHOR> quitting is the easiest way to go, I'm trying to solve it in a different way. Which way you ask? I still don't have an answer, that's why asking here.

<comment><USER60> I'm not criticizing you nor anyone who does this. It's just a statement about what everyone does. Complaining is cathartic, not a bad thing.

Quitting is the hardest thing to do. You are not physically capable of quitting. It takes either a catastrophic event or large amounts of unhappy time to force someone to quit. People don't wake up one day and decide to quit their jobs. Facing a job search, less income, explaining to new places why you left, dealing with people when quitting, figuring out health insurance, explaining to your family, social pressure to have a job, and more, all huge problems that prevent anyone from just upping and quitting.

You aren't going to solve it, just like most other people working in tech eventually stop caring about trying to solve it. Do you think people working for garbagy startups care about that product or their jobs? In an ideal world we could all get perfect job satisfaction, but there's no way to guarantee that or optimize for that, even if you like the company.</comment></comment></comment>


Observation of Cherenkov Light Generation in the Eye During Radiation Therapy - <AUTHOR> https://www.redjournal.org/article/S0360-3016(19)33947-1/fulltext <comment><AUTHOR> Generation of Cherenkov Light Flashes by Cosmic Radiation within the Eyes of the Apollo Astronauts (1970)

[https://www.nature.com/articles/228260a0](https://www.nature.com/articles/228260a0)

</comment><comment><USER2> When I was a postdoc at berkeley I was talking to a professor (chair of my department) and he said he had done some research on this problem (if you watch the movie Right Stuff, one of the guys who goes to space may experience this due to cosmic gamma rays).

The professor said something that I still think is audacious. He wanted to resolve the issue, but couldn't get IRB approval to run experiments on students, so he experimented on himself. By looking into a synchrotron. Synchrotrons are some of the most powerful lights humans make, with broad spectrum and extremely high intensities.

He said he did a bunch of calculations to come up with filters to ensure that statistically a very small number of photons with specific energies entered his eyeball. Installed those into the viewing platform on the synchrotron, and opened the aperture with his eye in the light path.

I believe it's this paper (currently paywalled): [https://www.nature.com/articles/230596a0](https://www.nature.com/articles/230596a0) which should describe the experiment and the identity of the subject.

<comment><AUTHOR> >Abstract Hypothesized that light flashes observed by astronauts in space are caused by ionization or another form of interaction of primary cosmic particles with tissues, and that "streaks may be heavy primaries, and double points could be accounted for by 1 cosmic particle intersecting the retina at 2 points . . . . To test the validity of these hypotheses and the probability that the human dark-adapted eye may be a sensitive and unique cosmic ray detector," visual phophene phenomena produced by fast neutrons were investigated using 2 human Ss. Ss "were exposed to a beam of fast neutrons with energies between 20-640 MeV produced by a 0.64 GeV proton beam impinging on a 12 cm beryllium target." Both Ss were dark adapted over 2 hr. before exposure. After exposure, 1 S saw pinpoint flashes coinciding with the presence of the beam; the other S saw between 25-50 bright discrete lights. In another exposure in which the beam contained no protons or other particles, there were no observations of visual phenomenon during or after a total exposure of about 5,000 particles through each retina. X-ray phosphenes did not produce visual phenomena similar to bright pinpoints of light observed during neutron exposure. It is suggested that if the passage of "particles causes irreversible deterioration of retinal cells and of neurons, then in a long space flight outside the Earth's magnetosphere, a significant degree of random cellular damage might result." (PsycINFO Database Record (c) 2016 APA, all rights reserved)

source: [https://psycnet.apa.org/record/1972-25998-001](https://psycnet.apa.org/record/1972-25998-001)

</comment></comment><comment><USER3> That's really neat. But imagining higher than (material) speed of light electrons zipping through my eyes is a bit unsettling.

</comment><comment><USER4> interesting! I believe I saw patterns during an MRI, it was really interesting.

<comment><USER5> MRI does not use radiation but magnetism instead. Are you not confusing CAT instead?

</comment></comment><comment><USER6> Fascinating!</comment>


Is The USA Heading For Third World Status? (2007) - <AUTHOR> http://www.swans.com/library/art13/ga238.html

<comment><USER2> Interesting reading the comments: is denial a river in Egypt? :-)

I aree that the USA has great assets (although many have been sold to foreign investors) but there is a disturbing trend of losing our lead in technology. As an example: in the 1970s, almost al ACM journal articles were written by US authors. Pick up a recent journal and you will notice that this has changed a lot.

The quotes by Paul Craig Roberts (3 years old) are probably right on - I often read his articles and he seems knowledgeable and trustworthy. Many kids in junior high in China now get to take calculus - but not here in the USA. India has invested its resources for several decades in improving its educational system, and they are harvesting the benefits.

I think (I hope!) that our (and the UK's) downward side in economic health will take a long time, but it is probably a forgone conclusion given our huge military expenditures and debt at the consumer and government levels. So, I don't expect us to fall off of an economic cliff, but I do expect steadily worsening conditions over the next few decades for the poor and diminishing middle class.

<comment><USER2> Here is an article that I feel paints a fairly accurate picture of the risks that the USA is facing:

[http://www.moneyandmarkets.com/bernanke-running- amuck-6-3842...](http://www.moneyandmarkets.com/bernanke-running- amuck-6-38429)

There are a few things I don't agree with, but compare it in honesty with, for example, mainstream media's fudging of employment figures and playing along with our government's trying to hide the M3 figures, etc.

</comment></comment><comment><USER3> This is nonsense. Go to a real third world county and you will see a massive difference between the USA and there. This article claims any country with "a high level of debt, an income distribution concentrated in the top 1% of the population, and an economy based on export of raw materials and import of manufactured products."

most of these apply to every country in the world.

<comment><USER4> Not every country in the world can export raw materials and import manufactured products. Someone has to make the products. Who? China.

</comment></comment><comment><USER5> If under your definition the USA is a heading towards being a third world country then perhaps you should consider your definition of a third world country inadequate.

<comment><USER6> Agreed, the author lost me in the first paragraph. Sure the US imports a lot of products from (technically speaking) second world countries, however the US has major exports that no one in the world compares to. You want a computer? Show me an operating system used globally by the mass majority that _isn't_ made in the US?

The US has a tech sector like no other, if you don't count Windows, Google, Facebook and World of Warcraft as exports then you really have no clue whatsoever about the economy. The raw materials for the development of such things _are_ the luxuries we consider imported from other countries. Yes that futon a Google employee stuck in their office, that in no way contributes to their developing of Analytics, Docs, etc. Get real.

Lets be realistic here, we're all versed in computers and development here. Did any Ycombinator developer actually come up with their idea sat in a made- in-the-USA chair, at a made-in-the-USA desk working on a computer solely made- in-the-USA? No! I bet a fair percentage got the majority of their ideas like everybody else, sat on a crapper imported from Indonesia, or at the breakfast table made in China by a Swedish company, or on their commute in a German/Japanese/Korean car or an American car made from parts imported from down the road from me here in Canada.

Can we skip the naivety here? The US is switching from a physical exporter to an electronic exporter. Microsoft isn't one of the worlds biggest companies because it hauled dirt around looking for copper that could be turned into wires, it built software that everybody worldwide needs.

<comment><USER7> Actually, the US isn't a net exporter anymore. You are importing far more of value than you export (2009: +45%, 2008: +66%) and that is the problem.

How are you going to pay the people abroad that dig in the dirt for copper that you actually need? Currently, the US as a whole does pay with promises (debt).

There are at least about 10 companies the size of Microsoft missing to fill that gap.

</comment></comment></comment><comment><USER8> I don't think all the wealthy people are evil people who exploited the poor.

What about YC millionaires and other type of people who gain their wealth by producing what people want?

What percentage of the affluent is actually a bunch of parasites who is only good for manipulating government regulations to keep out competitors?

<comment><USER9> I agree. This whole exploited the poor is such an old tired marxist argument.

There is definitely a big difference between rich and poor here but there is incredible diversity amongst the rich and there are a lot of them.

</comment></comment><comment><USER10> I'm not going to claim that its impossible for the US to (eventually) fall into third world status or that there aren't serious balance of trade issues to be dealt with. However there are two things that are not being considered here:

1) The export of information and skills is very important and becoming increasingly more important.

2) A lot of the issues in economics are generally self-correcting. This doesn't mean that there won't be pain along the way in the US, but it seems unlikely to take the US all the way to third world status.

Of course, I realize that these self-correct effects tend to come with open/fluid markets, which we don't have. However, as global trade increases, markets should become more open/fluid (which, in the end, should benefit more than just the US).

Edit: Small change for clarity.

<comment><USER11> The United States will always be a first world country because that is the definition of first world. First/second/third world status never changes.

<http://en.wikipedia.org/wiki/First_World>

<http://en.wikipedia.org/wiki/Second_world>

<http://en.wikipedia.org/wiki/Third_world>

Man, I'm starting to sound like a broken record.

<comment><USER10> Interesting, I didn't know the history of the term.

However, I feel you are being pedantic. If you replace "first world" with "rich" and third world with "poor" then the statements make sense (though you can disagree on if they are true or not).

Or am I missing something? I realize that being the US or aligned with the US has large implications in global politics, economics, etc... but that doesn't seem to invalidate the statement "The US might be come a poor country if/unless <whatever you think might make it a poor country>."

</comment></comment></comment><comment><USER12> Note that the article is three years old.

</comment><comment><USER13> It makes a couple good points, but he loses credibility by fudging numbers and comparing apples to oranges, like saying we've accumulated $1.375 trillion in debt to China since 1967, when in fact that's the sum of what we've borrowed without considering what we've paid back (it's all revolving debt).

</comment><comment><USER14> Obviously the writer and poster have no idea what '3rd world' means.

</comment><comment><USER15> (1) Would you rather be poor in the US or somewhere else? (2) Which way do people want to move (on average)?

Any ordering that is inconsistent with both of those is clearly wrong.

</comment><comment><USER16> Third world countries don't have universal healthcare! Now if you lot can just adopt the metric system we'll be getting somewhere. :)

<comment><USER9> Many countries considered third world actually do offer universal healthcare. This includes many Latin American countries and I would suspect many Asian countries as well.</comment></comment>


HomeMarks v3 Launches - <AUTHOR> https://homemarks.com/posts/2014-02-26-homemarks-v3-launches Welcome to the 3rd iteration of HomeMarks! My personal bookmarking application that I hope changes the way you work on the Internet. Read the nerdy details... <comment><AUTHOR> Many of my users were friends I met at various Ruby/Rails development circles. HomeMarks is a passion project that I have strived to re-write every few years. I threw away ~7K lines of custom MV* JS (before there were any) written in Prototype.js to create this new version in Rails/SpineJS. I hope others find it useful. History here.

HomeMarks, My First Ruby On Rails Pet Project [http://metaskills.net/2006/12/21/homemarks-my-first-ruby- on-...](http://metaskills.net/2006/12/21/homemarks-my-first-ruby-on-rails-pet- project/)

Hell'OO HomeMarks [http://metaskills.net/2008/08/18/in-hell-oo-for- homemarks/](http://metaskills.net/2008/08/18/in-hell-oo-for-homemarks/)

The "AJAX Head" Design Pattern [http://metaskills.net/2008/05/24/the-ajax- head-design-patter...](http://metaskills.net/2008/05/24/the-ajax-head-design- pattern/)</comment>


Linus Gives Nvidia the Finger - <AUTHOR> http://asia.cnet.com/torvald-gives-nvidia-the-finger-over-lack-of-linux-support-62216714.htm

<comment><USER2> How many times will this be submitted?

<http://news.ycombinator.com/item?id=4121698>

<http://news.ycombinator.com/item?id=4123480>

<http://news.ycombinator.com/item?id=4124097>

<http://news.ycombinator.com/item?id=4124645>

<http://news.ycombinator.com/item?id=4125890>

<http://news.ycombinator.com/item?id=4126185></comment>


People are reporting sightings of the Tasmanian tiger, thought to be extinct - <AUTHOR> https://www.cnn.com/2019/10/16/australia/tasmanian-tiger-intl-hnk-scli/index.html <comment><USER3> There have been reported sightings my whole life ever since I can remember, and I was born here in Australia in the 1980s.

While I don't think it's impossible, I'm not sure what's new here except the fact that almost everyone now carries a camera yet we're still to get clear images ;)

<comment><USER4> In fairness, it's nocturnal and probably buggers off quickly when it spots you.

But I'm biased, I'm a moose believer (or as I like to call it, a moother) based on the circumstantial evidence, but a lot of people are skeptical a creature as large as a moose could keep a low profile that long.

[https://www.stuff.co.nz/national/103196185/new-zealands- moos...](https://www.stuff.co.nz/national/103196185/new-zealands-moose-hunt-a- centurylong-quest-for-a-forests-final-secret)

<comment><USER3> Hah, that moose one is new to me. We have a history of some big cat sightings here around Sydney and NSW. The usual story is some US military people brought it (them?) for some reason and it escaped, I think. Though there are many stories and explanations as you'd expect.

<comment><USER5> Personal story, the first I ever heard of big cats living in the Grampians, Victoria was after coming back from a lone morning hike up Boronia Peak overlooking Halls Gap. I would have been around 14 at the time and told some of the adults back at the campsite that I found really big cat paw prints on the bank of a creek.

Similar story of US Airmen releasing their mascot pumas into the wild.

<comment><USER6> Rural WA'ian here. There's plenty of rumours of a "panther" around Nannup; no US Airmen story, it was just a really big black feral cat the size of a panther.

From what I've seen personally, feral gets can get BIG. Like mastiff-sized. So I tend to believe these rumours but take their origins with various grains of salt.

<comment><USER5> The origin stories should be taken with a grain of salt, but that we have cougar-sized ferals is well recorded. There was a Gippsland feral killed and DNA tested that was half as big again as a record-sized domestic cat.

[https://www.abc.net.au/news/2005-11-28/tests-reveal-super- si...](https://www.abc.net.au/news/2005-11-28/tests-reveal-super-sized-feral- cat/750340)

</comment></comment></comment></comment></comment></comment><comment><USER7> I remember driving through the mountains of Tasmania about 20 years ago - <USER2> backwater road towards Zeehan if memory serves me correctly. I recall looking in my rear view mirror during one stretch and seeing a yellow/tan coloured dog like creature crossing the road a few hundred metres behind the car.

I couldn't see any stripes clearly in the 2 seconds in was in the mirror. I dismissed it as a dog because (a) it was daylight and Thylacine's are purported to be nocturnal (b) it was near reasonably trafficked road and they are known to be shy and (c) I don't think the population of the Tassie Tiger was very strong in the North Western part of the island where I was.

But what if?? <thinking face emoji>

<comment><USER8> I live in Tasmania, about 3km from the nearest Apple store ;)

You'd think the most obvious sign of a living Thylacine would be poop.

Poop isn't nocturnal and doesn't run away when spotted.

Is there anyone who claims to have found Tassie Tiger poop?

</comment></comment><comment><USER9> "One report last February said that two people, visiting Tasmania from Australia,"

...from "mainland" Australia perhaps.

"newly released Australian government documents"

...aren't from the federal government, but from the Tasmanian state government.

These "detailed" sightings are almost universally worthless.

</comment><comment><USER10> > One report last February said that two people, visiting Tasmania from > Australia,

Haha, Tasmania is a state of Australia and they are a little sensitive about slips of the tongue implying Australia is a separate place to them.

</comment><comment><USER11> Someday, when every man, woman, and child carries a camera, we will get a picture of this illusive creature. Someday.

</comment><comment><USER12> People also report sightings of bigfoot, aliens, ghosts. I'd love for them to not be extinct but reported sightings aren't even close to enough to go off of.

</comment><comment><USER13> I'm surprised that they don't try to set up few dozens photo-traps in the area, in Europe it works quite well for proving re-emergence of wolves in areas where they were not seen for hundred years.

<comment><USER14> They have. Here's the best result so far:

[https://www.abc.net.au/news/2017-09-06/tasmanian-tiger- sight...](https://www.abc.net.au/news/2017-09-06/tasmanian-tiger-sighting- claimed-by-trio/8877598)

It's not exactly convincing.

<comment><USER15> Ok, but what else could it be?

<comment><USER14> Anything. A quoll: [https://en.wikipedia.org/wiki/Quoll](https://en.wikipedia.org/wiki/Quoll)

Or a feral cat: [https://www.abc.net.au/news/2019-10-15/feral-cat-caught- on-c...](https://www.abc.net.au/news/2019-10-15/feral-cat-caught-on-camera- eating-entire-kangaroo-carcass/11595514)

Feral cats are capable of killing pademelons: [https://www.abc.net.au/news/2015-03-30/scientists-catch-a- fe...](https://www.abc.net.au/news/2015-03-30/scientists-catch-a-feral-cat- killing-a-large-mammal-on-camera-f/6357868)

And feral cats can grow to be quite large and feisty: [https://www.abc.net.au/news/2018-06-07/truckie-saves-pet- fer...](https://www.abc.net.au/news/2018-06-07/truckie-saves-pet-feral-cat- attack/9846240)

</comment></comment></comment></comment><comment><USER16> There have long been reported sightings of the Tasmanian tiger, and they're mostly not very credible.

The New Yorker had an outstanding article about the small group of people who think it might have survived: [https://www.newyorker.com/magazine/2018/07/02/the- obsessive-...](https://www.newyorker.com/magazine/2018/07/02/the-obsessive- search-for-the-tasmanian-tiger)

They're sort of like big foot hunters, except the animal they're looking for used to exist.

</comment><comment><USER17> People have been reporting sightings for decades - almost since the last known one died.

Similar for Moas in NZ.

Or Bigfoot, Loch Ness monster.

Hearsay of sightings should not be news. Quality video evidence is the only thing that should get to a news site.

</comment><comment><USER18> Related: [https://www.imdb.com/title/tt1703148/](https://www.imdb.com/title/tt1703148/)

<comment><USER19> That's a very good movie. It's based on a superb novel [1] by the Australian writer and director Julia Leigh. The film captures the quiet, minimalist style of the book really well.

[1] [https://en.wikipedia.org/wiki/The_Hunter_(Leigh_novel)](https://en.wikipedia.org/wiki/The_Hunter_\(Leigh_novel\))

</comment></comment><comment><USER20> Not interesting until the frequency of 'spotting dog looking like a Tasmanian tiger' is estimated, and compared with the frequency of current 'tiger' sightings. Otherwise, what's being talked about?

</comment><comment><USER21> I really wish articles like this weren't published since they're basically a call for poachers.

</comment><comment><USER22> Is always reported but never caught

</comment><comment><USER23> This is very exciting news. The Coelacanth was also extinct - for several hundred million years - until it wasn't.

Maybe Tasmanian tiger this year and Mokele-mbembe next year? Not impossible. Though unlikely.

<comment><USER24> The New Caledonian crested gecko was thought to be extinct for over 100 years until they were rediscovered in 1994. Now they're common place in the pet trade because they're so hardy.

Rediscovery of "extinct" species is common place, because of the inherent difficulty in proving that all individuals of a given species are dead. Combine this with the robustness of biology, allowing species to quickly boom under favorable conditions, and then false extinction ends up happening more often than you would probably suspect. It's normal for many healthy populations to fluctuate wildly around a given carrying capacity. r-selected organisms are particularly notorious for having like 95% of the population die off regularly, and then bouncing back in a few years.

In the case of the thylacine, it's a macro organism so it probably has a higher profile when compared to a small gecko. So the likelihood that they're still extant probably isn't quite as high, unfortunately.

[https://en.wikipedia.org/wiki/Crested_gecko](https://en.wikipedia.org/wiki/Crested_gecko)

</comment></comment><comment><USER25> Could be dogs or foxes easily also

</comment><comment><USER26> "Life will find a way"

<comment><USER27> "Life ... ummm, finds a way"

</comment></comment><comment><USER28> Pics or it didn't happen.

</comment><comment><USER29> No bones, no story.</comment>


Ask HN: Why iPhone 7 Plus' back camera doesn't show IR light? - <AUTHOR> <comment><USER2> Good cameras usually have a good IR filter. Cheap cameras usually don't, and that's why you see IR light</comment>


How do you make a great video demo? - <AUTHOR>

What should you do? What should you not do? <comment><USER2> Are you talking about a screencast of your product or are you talking about video footage cut with other things?

For screencasting: keep it under 5 minutes, use a script, read the FreshView Post: [http://www.freshview.com/thoughts/2007/05/how_we_create_walk...](http://www.freshview.com/thoughts/2007/05/how_we_create_walkthroughs_and_1.html)

In terms of presentations, you can imagine combining live-action with infographics and a product demo. This is an involved process and requires production and editing knowledge. Fuel for thought--imagine taking Jonathan Harris' presentation of 20 minutes and editing it down to less than 10 with a focus on facial close-ups, infographics, and product demonstrations. <http://www.ted.com/index.php/talks/view/id/144>

</comment><comment><USER3> Can anyone recommend screen-capture tools? Ideally, I'd like to zoom in on certain areas easily -- and post processing would be the most convenient.

Camtasia seems pretty good.

<comment><USER4> Camtasia is the de facto one for PC. I use iShowU on the Mac and produce it in iMovie. The default settings in iMovie hose it (i wrote a short tutorial here with the settings I've found to work best-> [http://www.scrollinondubs.com/2007/06/12/produce-a-clear- scr...](http://www.scrollinondubs.com/2007/06/12/produce-a-clear-screencast- in-imovie/)) I've also heard that Snapz is good on the Mac but have not used it personally.

sean</comment></comment>


Hosted Notes - <AUTHOR> http://hostednotes.com

<comment><USER2> Interesting idea. How does it differ from using Dropbox + Keepassx though? Frankly, I feel safe when using that setup.

I read your FAQ and such. I found that, for a 'security' product, it was light on the security details. Mentioning encryption once and not much else. Expanding on that might put a few people at ease.

You may also want to include a comparison/benefits sheet in contract to existing solutions(like the one I mention). People are going to be reluctant to hand over their login credentials if you can't quell those fears.

Otherwise, best of luck!

Edit: I hope the above doesn't come across as an attack, so much as a serious of unsolicited suggestions :)

<comment><AUTHOR> Thanks for the comment. I should probably add a lot more info about what we did to secure the app. I will try and add that info in the next day or so. Thanks for all the suggestions. Much appreciated!</comment></comment>


What Programming Language Should Beginners Learn in 2015? - <AUTHOR> https://www.codementor.io/programming/tutorial/beginner-programming-language-job-salary-community

<comment><USER2> Great job. I thought this is pretty good too - [http://carlcheo.com/startcoding](http://carlcheo.com/startcoding)</comment>


Study: Only 18% of data science students are learning about AI ethics - <AUTHOR> https://thenextweb.com/neural/2020/07/03/study-only-18-of-data-scientists-are-learning-about-ai-ethics/ <comment><USER2> I don't see a problem with that, ethics in technology are inherently formed through the modern lense. We would lose too much development if we argued what is and isn't ethical under the guist of uniformity and 'appropriate' usage of technology. If this were the case we would not have computers, internet, GPS, or any of their successors as they were the products of ths military — if the 'ethics' of their time said that developing for military use was unjustifiable or inappropriate, then many of our keen inventors and bringers of change would have been swayed potentially out of the system at large. Another strong example would explain how the development of the steam engine can be immoral, ill-advised, and unethical as the very technology had a history of destruction and causalities throughout its use, as well as pioneering aviation, shipbuilding, and many others that underpine the very essense of technology progress.

Responsibility and ethics are not one of the same coin.</comment>


Containers and Cloud Security - <AUTHOR> https://blog.hansenpartnership.com/containers-and-cloud-security/ <comment><AUTHOR> The author is James Bottomley, an IBM Research Distinguished Engineer and Linux kernel developer. I think it also serves the purpose of plugging (or at least preparing the ground for) IBM Nabla, "a new type of container designed for strong isolation on a host".</comment>


Human Error in Software - <AUTHOR> http://soveran.com/human-error.html <comment><AUTHOR> I really loved this post, and experimented what Michel says with my hands in the context of Redis. The Redis code base is in general not rocket science, is pretty understandable and does not use too complex ideas. I simply don't trust my ability to write complex and correct code at the same time, and so far this approach worked well, Redis is quite stable all considered. However the file implementing replication, replication.c, gained complexity very fast compared to the other parts of Redis over the years. It's 2500 lines of code, while for example cluster.c is 5000 lines of code, but even at 2x the size, cluster.c is simpler to understand. The reason is exactly what Michel says: a code that matches a mental model. How replication.c got its complexity is easily explained. Redis replication was extremely simple at start. Just streaming replication between master and slave(s). You connect, get the initial payload representing the dataset on the master, and starting from there is just streaming of write commands received by the master (from the clients) to the connected slaves. Then we added partial resynchronization. Later we added in- memory replication (called diskless replication) for environments with slow disks, chained replication, and so forth. Instead of redesigning the code in order to cope with the new complexity, I usually approach the issue in a different way: I modify what I've with the minimal set of changes to make it working. This usually is a good strategy in my opinion, since to make something _truly_ general sometimes makes it more complex than having something simpler with a few exceptions to handle corner cases. However this approach does not scale a lot, eventually the code is structured like if the problem was simpler, but has a lot of exceptions. When you reached this point, you can no longer build a mental model of how the code works. The result was that we (Redis Labs Redis core team and I) recently found a number of bugs in corner cases that could arise mixing diskless replication with PSYNC with other unexpected events. While fixing those bugs I started to refactor replication.c in order to make it structured in a way that it is possible to create a mental model about it again, so that the actual layout of the code reflects a bit more what are the moving pieces: the action of creating the initial synchronization payload, the slave attempting a partial synchronization, and so forth. There is still work to make, but in general, its very important to write code for which a simple mental mode exists _and matches_ the code layout.

<comment><USER2> Through the years, Redis has become and stayed my favorite database technology. Simple, lightning-fast, with plenty of functionality to do anything you need. This post is off topic with respect to the OP, but I just wanted to take a minute to say thanks.

<comment><USER3> I made the decision to use Redis/Ohm and Cuba for a personal project several months ago and I've never felt more connected to and in command of what I'm doing. I owe both these gentlemen a debt of gratitude.

</comment></comment></comment><comment><USER4> While I like James Reason's book and I find its discussion of mental models instructive in my code and in my life, I do have to break with him on his conclusions, which chiefly amount to the takeaway that systems at the level of complexity we're building today are impossible to run safely, and we should shut them all down. (I exaggerate, but only a little.)

A book I like which responds to Reason's is Nancy Leveson's Engineering a Safer World (free PDF from the MIT Press, even! [https://mitpress.mit.edu/books/engineering-safer- world](https://mitpress.mit.edu/books/engineering-safer-world)) which says, okay, if we don't want to shut these systems (like the Internet) down, how can we run them safely, and provides some guidance.

I gave a short talk about it at Facebook's most recent Security@Scale conference in Boston a couple weeks ago, the video of which is here: [https://www.youtube.com/watch?v=e_-n5wX8okQ](https://www.youtube.com/watch?v=e_-n5wX8okQ)

Edit: To tie this back to the OP, I think while it's desireable for software to be as simple as is reasonable given constraints, it's decreasingly possible to say that all software can be built so simply that analytic reduction works, and we need tools to help us cope with software systems which exhibit emergent complexity.

</comment><comment><USER5> "the rational behavior would be to read the code, understand what it does, and reject it if it doesn't work for their use case."

This just isn't practical in most cases. I just don't have time to read the source of every tool I use. No matter how much we strive for simplicity, the fact of the matter is that nearly any software system that is useful these days is going to be too big for every developer who uses it to read its source. You have to accept that in a lot of cases, you're going to need to use tools whose inner workings are obscure to you.

Simplicity in programming is great, but we passed the point of understanding all the software we used a LONG time ago.

<comment><USER6> The inner workings may be obscure, but I really like it when the outer workings are not. I use the Google Datastore (although Postgres would work here too), which I'm sure is super complicated internally. Externally though, it has certain properties that form a fairly simple mental model.

With that mental model, you can predict from reading some code what the possible error cases or race conditions could be, or what the state of the datastore entity would be after running some code against it. Perhaps that's not precisely "Software Complexity", but "Library Complexity" instead.

I was going to use Redis as an example, but the internal workings are probably too easy to understand.

</comment></comment><comment><USER7> 100% agree with this, particularly on the part emphasized:

"An advanced programmer can create a program that is correct, but complex and hard to understand. For the purpose of creating an accurate mental model, <emphasis>even the program's correctness is of secondary importance: code that is understandable can be fixed.</emphasis>"

<comment><USER8> That's the old Kernighan quote[1]:

"Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?"

[1] [https://en.wikiquote.org/wiki/Brian_Kernighan](https://en.wikiquote.org/wiki/Brian_Kernighan)

</comment></comment><comment><USER9> I think Go is optimized around this idea: that the average reader will have an accurate mental model. (This of course implies trade-offs with other considerations.)</comment>


They're not fonts - <AUTHOR> http://www.aiga.org/content.cfm/theyre-not-fonts <comment><USER2> I absolutely hate this sort of pedantry. This is fine if your'e sitting around joking around with your fellow designer friends, but I see this used all the time to try and make people feel bad about themselves because they're "stupid".

And actually, "what font did you use" _is_ correct you arrogant jackass, at least using the definition that you gave. Or are you designing PDFs using a letterpress?

<comment><AUTHOR> That's like saying. What source code you're using when you're using complied software.

</comment></comment><comment><USER3> I wonder if there is anything that feels this pedantic when I'm trying to carefully explain it to someone else. This is such a useless distinction in my mind.

Alas.. someone somewhere is calling their computer a hard drive and that would cause me to shudder. :)

<comment><USER4> Try explaining to someone the difference between a gigabyte and a gibibyte.

<comment><USER3> You're braver than I. :)

</comment></comment></comment><comment><USER5> The author is 100% correct -- it's amazing to me that so many techies who should be detail oriented get this wrong:

<http://en.wikipedia.org/wiki/Font>

"In typography, a font (also fount) is traditionally defined as a quantity of sorts composing a complete character set of a single size and style of a particular typeface."

Why is this important? Now that typefaces are embedded in the web we'll see the typography become more and more sophisticated. So it's important for techies to really learn the language of typography. Also since we're seeing amazing advances in screen resolution we can really start to show several weights of a typeface at a very small size.

In fact my bet is that as we see resolution increase we'll start to embrace vastly improved typography. In the old days the cut of a typeface at 72 points was different than the same typeface at 12 points -- so the typeface wasn't just auto-scaling up and down in size by stretching it. My bet is that we'll see a real revolution in the next few years in this area.

</comment><comment><USER6> A better phrasing was used by someone on a panel at SXSW (Frank Chimero, perhaps? Jason Santa-Maria?). Anyway, they were conveying the idea that a font is a digital representation of a typeface, and they used this analogy:

Song : MP3 :: Typeface : Font

I agree, though, that making a big deal out of people getting it wrong is a sign of insecurity and pretentiousness.

</comment><comment><USER7> In Polish the term for _cast metal sort_ (czcionka) has become synonymous with both _font_ and _typeface_.

I suspect the reason is the same as with _font_ in English — it's the only term that Word (and its predecessors) used for everything font/typeface related.

The battle is lost.

</comment><comment><USER8> They're not fonts... and that's why you have no friends :P

</comment><comment><USER9> Given that -- unless you're literally cutting and pasting things together -- you require a corresponding _font_ to create something in a given _typeface_ , I don't see any point in pedantically distinguishing between them.

</comment><comment><USER10> ZOMG! Them horrors. Someone is calling something wrong names. Never seen that coming.</comment>


HNotify.py: be notified when the time is good to post on Hacker News - <AUTHOR> https://github.com/Gawen/hnotify

<comment><USER2> This makes me sad. True - there are good times and bad times to post / comment on HN for the maximal karma scores. But that really shouldn't be the case...

I really started to notice it when I moved from Indiana (UTC -5) to California (UTC -8). The threads and comment scoring seem very different depending on what time zone you are in.

From the East coast, in the morning, you pick up the late UK threads and comments, and at night the late afternoon California threads. From the West coast though, in the morning you catch the East coast threads (already in full swing), and at night, things die down a bit before the few Asia posts start to pickup (I stay up late).

It's strange how one site can have a few different feels based on who happens to be awake in the world.

<comment><AUTHOR> I agree with the fact this is something we should not use.

If the point to such service is karma whore-ing, I suppose it's "lame".

The point is it's very hard to know when the service is active or not, and when something should be posted to be (potentially) read by the most, to be fully efficient for the community.

I have no doubt that if some post doesn't provide any interest, it won't be up-voted. So, even if such "tool" is used, the power of it is kind of relative.

<comment><USER3> Isn't hacker news supposed to be about "hacking" ? :) If someone finds a clever way to get better results on hacker news without cheating, I do not see it as "lame", rather inventive.

<comment><USER4> It is about Hacking. Not points. Which is exactly why this shouldn't he used. It's about news that Hackers are into. This isn't Reddit. This isn't Stackoverflow. But I fear that may not be the case in the not too distant future.

</comment></comment></comment></comment><comment><USER5> It is a fantasctic exercise for game theory ! If you have success with your post with lot of forks on github and upvotes, we may expect that a lot of people will follow it and the success of HN posts will be not following your script. I go now make an anti-script ;)

<comment><AUTHOR> Exact :) But I did a really humble job here. I just wrapped a desktop client upon the Hacker News Story Pickup Ratio website (<http://hnpickup.appspot.com/>). All the intelligence is done by hnpickup, I just get the data and displays it in another way.

<comment><USER5> Thanks for what you've down, I'll play a little with it. :)

</comment></comment></comment><comment><USER4> What a great terrible thing. I don't like the idea of using HN as yet another promotional tool and that's exactly what this does. At the same time theres a piece of me who likes the idea. Good going on making and shipping a cool thing but please shut it down?

</comment><comment><USER6> Just post good content and comments, and the karma will take care of itself. Some times are better than others to post, but when people flood those time periods with linkbait its obvious what they're doing.

<comment><USER7> not really - my experience with submitting posts to hn is that they pretty much get ignored. assuming i'm reasonably typical, and don't have an intrinsic knack for being the only person on all of hn to find something interesting, i can definitely see why some people would be driven to hack whatever external factors they feel are leading their posts to be likewise dead-on-arrival.

then again, i don't read the new queue either, so i guess i can't complain. maybe reddit's system of posting a different article from "new" in a box at the top of the page every time you refresh it would help fix the problem.

</comment></comment><comment><USER8> I don't know if you played a lot with HNpickup.appspot.com, but it goes down so much that I don't get the data loaded on their frontend exactly when I needed sometimes.

<comment><AUTHOR> Yes, it often is (down right now btw). I will add something to let the user know when hnpickup is down.

EDIT: <https://github.com/Gawen/hnotify/issues/3>

</comment></comment><comment><USER9> I've been wanting this for a while.... I have no idea how to get it to work on OSX though.

<comment><AUTHOR> I can't boot right now on MacOsX. I will update my repository tomorrow to describe how to install the script on every platform. Stay tuned.

EDIT: <https://github.com/Gawen/hnotify/issues/2></comment></comment>


Dark Side of Bill Gates' Philanthropy in India - <AUTHOR> http://thevoiceofnation.com/politics/dark-side-of-bill-gates-philanthropy-30000-indian-girls-were-used-as-guinea-pigs/ <comment><USER2> The author got Gate's wife's name wrong. Not sure what else they got wrong.

<comment><USER3> Here's a conversation on quora about it:

[https://www.quora.com/Is-it-true-that-Bill-Gates-faced- trial...](https://www.quora.com/Is-it-true-that-Bill-Gates-faced-trial-in- India-for-illegally-testing-tribal-children-with-vaccines)</comment></comment>


Chrome Is Scanning Files on Your Computer (2018) - <AUTHOR> https://www.vice.com/en_us/article/wj7x9w/google-chrome-scans-files-on-your-windows-computer-chrome-cleanup-tool <comment><USER2> Unfortunately, that Chrome scanning utility overheated my 2011 Macbook Pro and killed its graphics card. When the Chrome scan ran, it pegged the cpu at 100% and caused the fans to spin up to a very loud full throttle. However, the Macbook couldn't prevent the runaway overheating (the blue screen of striped lines from the death of AMD graphics card). Yes, the Macbooks from 2011 are notorious for having bad cooling design but everything was fine for 8 years until Chrome killed a $3000 laptop.

Fyi, the executable is _" software_reporter_tool.exe"_ and it lives in:

      C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\SwReporter\

I've disabled it on all my computers using the tips from google searches: [https://www.google.com/search?q=chrome+scan+"software_report...](https://www.google.com/search?q=chrome+scan+"software_reporter_tool.exe")

<comment><USER3> That is Macbook's issue though, no software should be able to damage the hardware, no matter what it does, unless there is a hardware flaw.

<comment> java-man An update fried wi-fi on my iPhone 4S. Sometimes physical reality interferes with expectations and idealizations.

<comment> java-man or Rowhammer

[https://en.wikipedia.org/wiki/Row_hammer](https://en.wikipedia.org/wiki/Row_hammer)

</comment></comment></comment></comment><comment><USER4> The title is alarming enough that I immediately searched for a way to block it.

Apparently, this is only specific to Chrome on Windows:

> [it] looks through your computer in search of malware that targets the > Chrome browser itself using ESET's antivirus engine. If it finds some > suspected malware, it sends metadata of the file where the malware is > stored, and some system information, to Google. Then, it asks you to for > permission to remove the suspected malicious file.

Seems fairly reasonable.. At least I'm not affected by it, being primarily on Mac and Linux.

Another comment here mentions "Chrome scanning utility" on a MacBook though. Ideally I wouldn't use Chrome at all, but I need it for developing and testing web applications.

Just wanted to mention this open-source firewall (macOS application) called Lulu, with which you can (mostly?) block Chrome and other apps/services from phoning home behind the scenes.

[https://objective-see.com/products/lulu.html](https://objective- see.com/products/lulu.html)

</comment><comment><USER5> I wonder if this happens on other platforms too...

I know that at least libreoffice on linux scans your files for some odd reason...

<comment><USER6> People could always use the snap versions of libreoffice/browsers and either limit access to the home directory or remove access to the network. It seems the easiest way of applying a Android permission based model to Linux.

Alternatively, there are also firejail profiles which could be used for restricting what these tools can do.

<comment><USER5> The snap version has some limitations but I think that is the future.

And just because we maybe can contain it, it doesn't mean libreoffice devs should be off the hook for reading private keys from my drive.</comment></comment></comment>


Why Lisp is a Big Hack (And Haskell is Doomed to Succeed) - <AUTHOR> http://axisofeval.blogspot.com/2011/01/why-lisp-is-big-hack-and-haskell-is.html <comment><USER2> Let me see if I understand this: The argument is that a hypothetical language descending from Haskell will be (a) superior and (b) more popular than Lisp as we know it today and to any Lisp that might evolve from it.

I think there's too much hand-waving going on to agree or disagree with the premise. Language popularity is notoriously fickle and driven by considerations that don't even earn a footnote in the OP.

For example, one of the most popular languages in the world today is Javascript, a language that owes a little of its heritage to Lisp and none at all to Haskell. Why is it eating Lisp's lunch and Haskell's lunch today? Because it ships as the default runtime for the most popular application in the world, the web browser.

Another language that has the same breadth of reach is PHP. Again, its popularity is due to the fact that it is a default runtime for most of the world's hosted web server platforms.

If we are to guess which language is going to gorge itself on everyone else's lunches in the future, I would suggest we spend our time thinking about which platform is going to be insanely popular and what new language might be its default runtime.

I'm not providing any fresh insight, of course:

 _Let's start by acknowledging one external factor that does affect the popularity of a programming language. To become popular, a programming language has to be the scripting language of a popular system. Fortran and Cobol were the scripting languages of early IBM mainframes. C was the scripting language of Unix, and so, later, was Perl. Tcl is the scripting language of Tk. Java and Javascript are intended to be the scripting languages of web browsers._

<http://www.paulgraham.com/popular.html>

<comment><USER3> I was only talking about (a), the language being "superior" in a very "idealistic" and fundamental sense - i.e. being "more expressive".

I do believe that the son-of-FP I hand-waved about will also attain (b), being the most popular language, but that's much further out - say 50 years.

<comment><USER2> It could happen sooner: If there are enough posts like this, someone may be developing a programmable platform of some sort and think "I know! I'll borrow some ideas from Haskell for the DSL!!"

That's all it takes.

</comment></comment></comment><comment><USER4> This is the first time I feel PG's `The Hundred-Year Language' may have answer different than Lisp. On the other hand, `a witty blogpost proves nothing', to misquote somebody.

<comment><USER3> The great thing is: if and when Haskell ever evolves as far as described in the post, we'll have Lisp again - inside "Haskell". ;)

<comment><USER5> No. Haskell has type safety which was never intended to be included in Lisp. On the other hand, Lisp has the s-expression syntax which allows for usable compile-time macros. Neither language is a subset of the other.

How useful type checking and macros are in creating real-world software is not a question I've seen answered well. Smalltalk-style languages (Python, Ruby) don't really practice either.

<comment><USER6> "Haskell has type safety which was never intended to be included in Lisp."

Racket has a dialect with static types. <http://docs.racket-lang.org/ts- guide/>

</comment></comment></comment></comment><comment><USER7> As a Haskell programmer I never feel the need to add any form of dynamic typing. In practice dynamic typing makes it harder to build programs, not easier.

I'm the first one to admit that Haskell's type system has a somewhat steep learning curve. But after a while, when you internalize it and learn to pattern match on GHC's type errors, day-to-day programming will become easier.

<comment><USER8> > In practice dynamic typing makes it harder to build programs, not easier.

OTOH, static typing could make writing some kinds of programs impossible. In an interview, Joe Armstrong of Erlang fame said that they tried hard to put a type-system on top of Erlang, but they have not been able to.

IMO, static-typing should be optional, that is: you should be able to run a static-typing checker on your programs, without being constrained by it at every step.

<comment><USER9> > OTOH, static typing could make writing some kinds of programs impossible.

Often, these turn out to be incorrect programs or programs without a good structure/architecture. It is my experience that static typing makes it slightly harder to write the first version of a program, but subsequent alterations become an order of magnitude easier. For me, this is worth it, since alteration and maintenance are the largest part of most program's life cycles.

<comment><USER8> > Often, these turn out to be incorrect programs or programs without a good > structure/architecture.

Then this critique would apply to most - all? - Erlang programs too ;-)

</comment></comment></comment></comment><comment><USER10> Last time I looked Haskell and Lisp were totally different languages, with different communities, different technologies, different application areas, ...

Why should this change?

</comment><comment><USER11> If he favors type safety and switching between modules of different type systems, Racket already has that, doesn't it?

<comment><USER3> Good point - I forgot to consider this approach. I'll have come back to it at another point.

Generally though, I think Haskell's approach of re-adding freedoms is more fruitful than trying to add bondage to Lisp. And "the Haskell movement" certainly has a different kind of manpower behind it.

<comment><USER11> >And "the Haskell movement" certainly has a different kind of manpower behind it.

Can you clarify what you mean by the words "movement" and "different kind of manpower"?

How is progress in languages like Racket different from Haskell?

Why do you think that adding "interesting" type systems in Lisp would be "heroic" and less "fruitful"?

<comment><USER3> There are probably hundreds, if not thousands of researchers, who use Haskell (and related PLs) as their vehicle for type system research. People working on "gradual" type systems like Typed Racket are probably around a dozen, which means that progress in Haskell happens much faster and with more breadth.

<comment><USER12> While i think you make valid points, i do not agree with the conclusion.

First, i don't think associating innovativity with numbers of researchers is a safe predicate since it's clearly not linear.

Second, the fact that haskell is a testbed for researchers doesn't make it the ideal language for "real world programming" in my opinion. It could be that it is, but again the correlation is less than clear.

And third, and that's the most important point in my opinion, the ideas developped in haskell are fully available to other language implementors once they exist, and the experience of researchers is available. It means that a language like typed racket or any other could possibly implement the best/most usefull of those ideas in much less time than was needed to first find them.

<comment><USER13> >Second, the fact that haskell is a testbed for researchers doesn't make it the ideal language for "real world programming" in my opinion.

Once upon a time Lisp was a language for researchers.

<comment><USER11> It still is.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14>
       Of course you have to subscribe to the idea that this
       safety and verification is something that's good and
       superior. I do.

Why is it superior? I've always believed that a superior language is one that is as close to natural language as possible. Natural language doesn't have strict type checking, and a great many things were told with 'incorrect' grammar.

<comment><USER15> To take as an example Epigram (also mentioned in the blog post). Epigram is not Turing complete, as such the language can be made strongly terminating. This means all programs are guaranteed to terminate (no Halting problem) programs are also strongly (and statically typed) meaning that when your program compiles it will be guaranteed to behave correctly (barring hardware malfunction). Essentially this means we have made the large majority of bugs impossible to be made in this language.

Of course creating a trivial language that is strongly terminating and statically typed is pretty easy. What Epigram is attempting to do is trying to add enough flexibility to create all programs we care about. Not being Turing complete we can't, by definition, create all programs. Of course if we can make all programs we want to make, the inability to create _all_ programs is irrelevant.

Now you might not think these benefits make a language superior to other languages, but I (and the blog post writer as well) do. As he mentions in post adding the ability to lessen these guarantees (i.e. make the languages more dynamic on request) then we have all upsides (less bugs!) and no downsides. Since we can adjust our guarantees down to be less strict and provide more freedom as requested. Lisp _can't_ do the same in reverse as adding the same static guarantees to Lisp is a beyond Herculean task.

<comment><USER4> If the Epigram is not Turing complete, then what kind of programs cannot be expressed in it? Is the aim of the developer to add TC at some point, or is it a deliberate design choice to remain non-TC?

<comment><USER15> EDIT: HN ate my asterisks

Disclaimer: This post contains broken pseudo syntax and pseudo type theory, feel free to make corrections if you are smarter then me.

Epigram (as of yet) is not truly aimed at being a practical language in the hacker sense. It is a research vehicle trying to establish a practical type theory for programming in (i.e. trying to find the sweet spot of how much freedom we require to write useful programs). My knowledge of the underlying theory is still somewhat limited so I don't dare say which programs cannot be written in it.

I would say the lack of Turing completeness is a deliberate design choice. Turing completeness and strong termination are mutually exclusive. Introducing Turing completeness automatically means introducing the Halting problem.

As mentioned in the blog post (one of) the theories behind Epigram is "dependent typing". I agree with the writer that this will be the most exciting thing in programing since...well, ever. What does dependent typing mean? It means the type of a function can depend on the values of the input. To abstract? Let's see if I can clarify:

Haskell currently supports types depending on types (note a lot of this won't be actual valid Haskell, but use pseudo-Haskell syntax), a classical example being the polymorphic list:

        data List a = Nil | Cons a (List a)

This is a type which depends on another type. We have "List a" for any given type a. Canonically the type of a type is called * . That is 1:Int meaning "1 has type Int" and Int:* meaning "Int has type * ". Then what is the type of List? It is of course "forall a : * . * " which you could interpret as a function taking a type and returning a new type List :: * -> * .

However, this is not flexible enough to describe somethings we want to be able to describe. For example in Haskell we have the function "head" returning the first item in a list:

        head :: [a] -> a
        head (x:xs) = x

Now, this function has a problem. What to do when we call head with the empty list as argument? Haskell right now throws an exception, but the compiler should know how long a given list is and it should know that we _cannot_ call head on a list of length 0.

Whatever shall we do? We could painstakingly verify we never call head on a list of length 0 by hand. But we programmers are lazy and hate doing these things. We could waste our lives writing TDD tests with 100% coverage to ensure we never accidentally call head with an empty list, but as lazy programmers we are also to lazy to do this. If only we could make the type of a list depend on its value, thus encoding in the type system whether calling "head" with any given list was safe or not.

Dependent types to the rescue! As mentioned earlier with dependent types the type of a list can depend on a value. Haskell as yet does not support this (partial lie, Haskell has some limited dependent typing support). In Haskell I could not say:

        data List a n = Empty | Cons a (List a n-1)

However, in a dependently typed language such a definition is in fact possible. The type of List would then be something like List :: * -> Int -> * . We can then redefine head to have a type that only accepts lists of type "List a n" where n > 0\. This means that passing a list which potentially has n == 0 is a type error.

The compiler will at compile time verify that in your code it is _never_ possible that you pass a list with length 0 to head. If it is possible this is a type error and your program will not compile, if it is not possible we have no effectively eliminated the possibility of an empty list exception form our program, without any tedious manual testing. Yay for science!

<comment><USER14> For any given Haskell Compiler I would think that I can construct a program where the Haskell Compiler won't be able to determine, in polynomial time, whether the list has length 0 or not.

<comment><USER16> Have you read the post your are commenting on? Epigram does not even try to be a complete language.

</comment></comment></comment></comment></comment></comment><comment><USER17> What we really need is for some people to turbocharge ghcjs (<http://news.ycombinator.com/item?id=1818820>), so that we can get optional static type checking in Javascript.

Haskell is great at parsing[1] and great at type checking. So how about it parse the relatively simple JS grammar[2] and do some static checking on JS code?

You could augment existing JS code with an optional accepts/return syntax to provide type annotations:

      foo = function(x) { return [x+1,x+2]}
      foo.accepts = Numeric
      foo.returns = [Numeric, Numeric]

This is similar to Collin Winter's typecheck for python (<http://pypi.python.org/pypi/typecheck/>), which has some nontrivial bugs but which is conceptually interesting.

[1] You could use Matt Might's new derivative parser if you want to have some fun while doing this (he has a Haskell implementation to boot!)

<http://matt.might.net/articles/parsing-with-derivatives/>

[2] Real World Haskell has a good JSON example that should be easily extensible to the full syntax: [http://book.realworldhaskell.org/read/writing- a-library-work...](http://book.realworldhaskell.org/read/writing-a-library- working-with-json-data.html)

EDIT:

Doctor JS by Mozilla is a (very) good start here -- maybe it already does everything we need...

<http://doctorjs.org>

</comment><comment><USER18>
      Greenspun's Tenth Rule of Programming
      Any sufficiently complicated C or Fortran program
      contains an ad-hoc, informally-specified bug-ridden slow
      implementation of half of Common Lisp.

Replace C by Lisp and CL by Haskell? Rinse, lather, repeat every few decades?

<comment><USER19> Can you please give us some historical examples where this quote could be applied? This would be interesting to know.

<comment><USER20> AutoCAD and Emacs would be literal examples of "sufficiently advanced" C programs by this definition.

My guess is that it is intended to cover any C or Fortran program that includes an ad-hoc interpreter, an ad-hoc dynamic type system, or an ad-hoc garbage collector. That would include e.g. sendmail (at least an ad-hoc interpreter) and GCC (all three).

My guess is that most C programs (I don't know about Fortran) we would intuitively call "complex" contains one of the three technologies, making it harder to come up with a clear counter-example. Some might avoid the "ad-hoc" part by linking with a generic extension language like tcl or lua. Or even Common Lisp.

<comment><USER21> Well, almost any big traditional application (not really web apps) eventually grows a scripting language for extensions and / or user macros. Basic (in Office), Javascript and Java (in web browsers), Lisp (in the above applications, and probably many more), Lua (in a lot of games), AppleScript, that C thingy in Quake ...

Lisp is relatively easy to implement, powerful, and intuitive to non- programmers (compared to OOP - Python, Perl, and Ruby are also easy but nowhere near as old); so it's a common choice.

<comment><USER22> I didn't believe this "Easy to implement" line but over Christmas I wrote my own LISP implementation on top of .NET and it comes to about 350 lines codes.

That includes all the list operations, an arbitrary precision number type and a host of the usual built in function (add, subtract, multiply, divide, and not or etc).

Eye-opening to say the least!

</comment></comment></comment></comment></comment><comment><USER23> I'm not sure that Haskell could, given time, subsume dynamically typed programming. But even if it is possible, why would it be desirable? Most Haskell people don't think very highly of dynamic typing, and the extensions to the language reflect that. They generally add more typing, e.g GADT's, multi-parameter type classes, extensible kinds e.t.c. And dependent typing is certainly not a move towards dynamic typing! Casting it as such shows poor understanding of both concepts.

</comment><comment><USER24> There's always a trade-off between the expressablity of a programming language and its complexity. I think Lisp may (still) have a slight advantage when it comes to that balance, i.e., it is more accessible for novices. And adding more things to an already complex language like Haskell doesn't sound like changing that balance in the latter's favor.</comment>