B Before A - <AUTHOR> https://billwadge.wordpress.com/2016/01/08/b-before-a/ <comment><USER2> I remember when I was little, I wanted to learn piano, and everyone recommended simple pieces for me to play. They all looked kind of boring, so I printed off the sheet music for Liszt's Transcendental Etude No. 10 and started practicing.

I can't say that my skill is anywhere close to that of a concert pianist, but I also can't say I would have ever stuck with piano if I was forced to practice that other stuff first.

<comment><USER3> As someone who is kind-of sort-of learning piano, in more-or-less this way, thank you for giving me hope! I wasn't sure, based on anecdotal evidence, if just sitting and learning 'too-hard' pieces (and all the scales and arpeggios) would actually get me anywhere.

</comment></comment><comment><USER4> I had a friend who went to Michigan State. This was back when computers were a new thing. As a freshman, he signed up for a graduate level comp sci class. Had a hard time convincing the prof he should be let in the class. As time went on, it was clear he was the star student. The next semester he was a TA for the class.

</comment><comment><USER5> I've been struggling with this concept in the context of teaching someone web development. There's just _so much_ you "have" to know and it all seems so interrelated. Do you start with HTTP since that drives the web? If you do, do you first need to cover computer networking, IP addresses, routing? HTML and CSS aren't terrible to get started with, but are ultimately limited and [generally] aren't enough to build "some cool app". Then you have the beastly JavaScript, which you'll probably use on your front-end but only might use on your backend - there are so many other options. Python and Django? Ruby and Rails? Any of the dozens of PHP frameworks? Oh, right, now we might need to get into SQL. And builds and deployments and sysadmin-y tasks. Don't forget security. Or we could build everything serverless or on some PaaS, but how much understanding do you really have of what's going on there.

Having gone through undergrad and grad school for CS, I think part of it comes not truly realizing or accepting just how much knowledge you get from taking ~45 college courses . It's taken years for me to learn a reasonable breadth and depth of this subset of computer science, (and there's way more I don't know than I do know) and I struggle with the fact that I seem unable to boil all of that into the "a-b-a-b" pattern the author describes. Start doing the thing you want to be doing (e.g, making a web app), and learn just enough of the bits you need to keep on that path. But it's much easier said that done when you're starting from scratch.

It's like the pervasive interview question of "What happens when you type google.com in your browser and hit enter?"[0] Well, a lot... where do you start?

[0] [https://github.com/alex/what-happens-when](https://github.com/alex/what- happens-when)

<comment><USER6> Just go learn whatever it is you immediately need to progress on whatever project you've picked. In time you'll have enough puzzle pieces filled in that you can stand back and get a sense of what the domain looks like. Then you can start targeting what you want to know more about and in time you'll feel like an expert.

</comment></comment><comment><USER7> This is probably the biggest thing that lead me towards self learning, I always felt like I was stuck with gatekeepers in the way.

</comment><comment><USER8> Is it not unreasonable to believe that some things worth knowing or doing (A) are worth the prerequisite work (B)? If your class on data mining requires fundamentals in advanced databases why is it unreasonable to require people have taken that course to ensure the whole class is on the same page? Besides in most colleges you can sometimes skip those prerequisite courses if you can demonstrate adequate knowledge in those prerequisite.

<comment><USER9> Did you not read TFA?

The issue is that a) it can be greatly discouraging or impossible to fit in the subject's schedule, b) a waste of time and effort if the requirement isn't that hard, c) there may be a better way: the a, b, a, b pattern, which is to say: do A until you need to do some of B, then go back to A until you need more of B, and so on.

The a,b,a,b pattern is the right answer in at least some cases.

<comment><USER10> I think it's important to realize that you're optimizing for different things. "a, b, a, b" optimizes for, let's say, "attention span", while "B, A" optimizes for some sort of efficiency. Not everyone's attention span or need for efficiency are the same.

<comment><USER11> > while "B, A" optimizes for some sort of efficiency

What sort of efficiency do you think this optimizes for?

<comment><USER10> A perception of less time spent overall, perhaps. Or less loss/dropout from not being able to achieve A (for lack of B). I personally prefer "a, b, a", so I have to imagine.

<comment><USER9> On the other hand, if B-before-A is discouraging, then it may be very inefficient. It could act as a filter, but not so much for skill or any particularly useful personal attribute so much as "enjoys B-before-A well enough", which isn't particularly indicative of anything.

In general I do think that B-before-A is a very useful approach, but it cannot be the only approach. For one, it doesn't scale, not as the chain of Bs grows longer over time. We teach a lot more math to students today than 100 years ago, but almost certainly we're taking shortcuts that essentially amount to a,b,a,b -- how else can we manage the otherwise ever-growing cognitive burden of the sum of our knowledge?

</comment></comment></comment></comment></comment></comment><comment><USER12> The choice of A and B here seems designed merely to frame the conversation as unnecessary prerequisites versus if you say "you must do A before B" it just sounds more agreeable to begin with. In practice though, whether a prerequisite makes sense or not is highly contextual and is not done justice by a reductionist abstraction.

</comment><comment><USER13> One of the many things I enjoyed about MIT was that I could register for almost any class as long as I could convince the professor I wouldn't be a drag on the progress (this was in the 80s). Let me take all sorts of interesting classes on subjects not part of my degree program (Optics! Machining! Nuclear strategy!).

Sometimes I ended up spending as much time running to keep up (lots of b,bmb) as I did following the class itself (A). But the system tolerated it.

</comment><comment><USER14> My son wanted to play electric guitar. Being all responsible about it, I suggested starting with acoustic first. Now he's not playing any guitar.</comment>


BreakSafe Magnetic USB-C Power Cable - <AUTHOR> https://griffintechnology.com/intl/breaksafe-magnetic-usb-c-power-cable <comment><USER2> You know what I just realized? Apple could have made the power port simply be recessed a bit...that way you could either plug in a USB-C device or a cable like this and not wind up with a wart (that the laptop can still fall on and thus break the actual USB-C solder points)</comment>


Some fun with Redis Cluster testing - <AUTHOR> http://antirez.com/news/69 <comment><USER2> I think this is a great lesson on testing. I'm excited to see what else he finds.

<comment><USER3> Why is this a great lesson?

The test is not repeatable. There was a power outage. Random machine configurations on random network conditions. These are all great ways to stress redis-cluster, which is still young, but they are not repeatable tests.

They are not great tests. Great tests would be a script that can run every 24 hours over a group of servers, simulating or creating similar events and network conditions. Then when a code change is made, you can actually observe if it made things better.

Driving a car across the Sahara Desert can be a good event, but it shouldn't replace Crash Tests in a Lab environment.

<comment><USER4> Hi pquerna, what you describe is exactly what the Redis Cluster standard test will be (the one that will implement unit tests, not just fuzzy testing like the one I did now). Probably to make it easy to run in different platforms, what is needed is direct partitions simulation support into Redis Cluster, what I mean is, an explicit API to filter at higher level specific nodes and clients.

However I believe that I'll still do the kind of tests described in the blog post since the fact itself that these tests are so "home brew" and cheap make the conditions extremely random and are good at spotting actual real-world deficiencies.</comment></comment></comment>


Full Stack Design Pattern for HTML5 apps - <AUTHOR> http://www.insprinto.com.au/blog/full-stack-design-pattern-html5-angularjs-apps

<comment><USER2> I'm unfamiliar with how Angular works: would you need to duplicate model logic on the front and backend with this model?

<comment><AUTHOR> You could keep the model logic on the back end, then expose it via a service. It wouldn't be necessary to duplicate model logic in both the front and back end.</comment></comment>


DyNet: The Dynamic Neural Network Toolkit - <AUTHOR> https://arxiv.org/abs/1701.03980 <comment><AUTHOR> I like the idea of a NN library with a focus on very fast graph construction.

Reading about this makes me want to use the library for model-selection in the beginning; and switch to TensorFlow later once a good model is found. The Chainer library mentioned also looks interesting; I think I've seen a few other people using it.

I like that it shares some of TensorFlow's backend, though I wonder if it's only for CPU:

"In order to achieve efficient execution of arithmetic operations,DyNet relies on the Eigen [28] library, which is also used to provide the backend for TensorFlow"</comment>


"This week marks the beginning of my 4th year at Facebook" - <AUTHOR> https://www.facebook.com/ry/posts/10151494199879822 <comment><USER2> It's funny how people are so interested in the development practices of Facebook as if that's how it should be done.

It's a bit like the halo effect, where if the company does one thing right (get lucky and dominate the market by being first), then everything else they do must be right too.

If you ask me, they could take what ever approach to development, hiring, training and firing they like and they'd just be as successful.

But, none of that stuff is what made them successful. Therefore, I'm actually not that interested.

</comment><comment><USER3> > This week marks the beginning of my 4th year at Facebook. My > experience > here has been incredibly transformative: I joined > Facebook after dropping > out of college having never faced the > challenges that I've seen during my > time here. At this point, I've > worked through these challenges for longer > than 4/5 of the people at > the company and thought I would share some of my > insights in hopes > that other engineers who are joining might find it > useful.

This marks the beginning of my 17th week of unemployment* after being fired from Facebook after about a half a year working there. My experience being fired has been incredibly transformative. I worked through challenges for longer than 1/10 of the people at the company and thought I'd write this alternative viewpoint in hopes that other engineers who might want to join Facebook find it useful.

In what follows, I will attempt to only share true stories without any interjection of my own opinion. Though, being fired -- after being enticed with a high salary, accepting a large bonus to move to Silicon Valley, and taking out a lease that you can't afford without a high paying job -- does cause a fair bit of emotional dismay.

As a little backstory, I was asked to interview for Facebook by one of their recruiters. I was already employed, but thought it was time to grow professionally. I interviewed with Facebook, and did very well, and was quickly offered a cool salary. Less than a week after relocating interstate to my new home, I started work. After doldrums and threats, which I will discuss briefly below, I was let go, without notice, stuck with a six-month lease in location with a hyper-inflated real estate economy.

> As an engineer, your job is to build things that solve > problems. When you > first join the company, you're assigned small > tasks and you solve them.

As an employee, your job is to make the company money.

You are given a variety of disparate tasks to solve, with the ultimate goal that after six weeks, you find the area and team you want to join.

But don't get me wrong, you actually are pushed in the direction Facebook would prefer you to go. There are high priority teams and low priority teams. Unless you have a good reason, you better choose a high pri team.

> As you grow professionally, the domain of these tasks becomes > larger. It > is a mistake to constrain the increase in domain to > larger or more > frequent diffs. Code is a tool you have for solving > problems.

Weird. Aside from being juggled around as an employee, being given work on front-end, back-end, low-level, and high-level tasks, I was lectured on Facebook's rules of the road: Generate lots of diffs! Bang out code fast! But make sure it's right first time! As I'll discuss next, you also should minimize your interactions with engineers during the code review process. Facebook actually prefers to treat it as a "Code Acceptance (otherwise you're failing)" process.

> If you were gardening, you might plant flowers or pull > weeds. Increasing > your scope does not mean planting more flowers or > pulling more weeds > (though you should expect to be faster and more > proficient at that as you > become more experienced). What it really > means is looking up from the > ground at the garden in its entirety, > considering how your section fits > in, and eventually helping to > decide the whole garden's plan.

A nice idea.

The way my manager personally handled personal growth of his subordinates is by threatening them. Well, me, at least. If I didn't complete some odd tasks he assigned me by a certain date, I'd be sure not to have a place at Facebook after that date. This occurred on more than one occasion.

Despite meeting these demands, it was fruitless, and I was told during a meeting that my bags were packed and waiting for me in the lobby, and to hand over my badge and laptop immediately.

> In order to do this effectively you need to have agency. Agency is > the > capacity for a person to act in the world. As a hacker, having > agency over > your world is critical to fully explore the boundaries > of problems and > find how to best leverage your solutions. I'm > referring both to the code > that you write and to the interactions > you have within the company.

I was given these sorts of platitudes often.

I loved exploring code. But I was told to just hone in on the issue I was supposed to solve, not worry about the bigger picture, and to just solve the problem. In theory, the above sounds nice, but in practice, I was told the opposite.

Regarding interactions with other people in the company: I was ultimately told by my manager that I should reduce interactions with other developers, and eventually, I was told I was not allowed to speak to other developers at all, apparently to "gauge my performance." After several weeks of complying with this rule, the relationships I developed thus far in the company weakened and essentially evaporated.

<comment><USER3> [Continuing because of HN's length restrictions]

> In the code base that you live in, you quickly develop an > understanding of > how the components fit together. Use this > knowledge: instead of only > fixing a bug you're assigned, consider > how you can prevent that class of > bug from ever happening > again. Instead of implementing a new feature, > consider how you can > create a common abstraction between the new and old > ones and share > 80% of the code. This might take more effort now but gives > vastly > greater results in the long run.

This is a very beneficial thing to do, but it led to ugly code reviews. I was given a task, and solved it to satisfaction (code was written cleanly, tests passed, etc.) but was told, in review, that the code was not satisfactory, because it did not clean up code completely unrelated to the task -- even if such clean up actually didn't solve any old or new problems.

I was severely penalized for this.

> At a higher level, take ownership over the entire company. Don't let > your > coworkers be less than the best that they can be. Understand > the trade- > offs being made and the factors that led to them; > understand temporary > solutions and the priorities that necessitate > them, but don't accept a > decision that you feel is wrong without > raising the issue and getting a > better understanding. This is your > company (your garden) and if you let > people pull in the wrong > direction the entire plan will fall into > disarray. Make sure that > you encourage changes and that you're confident > that the changes > happening are the right ones.

This sounds entirely ideal, but when someone new goes up against someone who has been in the company for a while, the new guy is the one who is looked down upon and usually disagreed with, with the reason that the guy with tenure surely knows what he is talking about.

The part left unsaid is that there is no process for appeal. If you disagree with another developer, and your manager ultimately disagrees with you, tough luck.

I did not see democracy and debate. I saw tenure and social capital deciding issues by default.

> It's easy to fall into the mindset that you don't know everything, > > everyone around you is smarter and more experienced, and that if you > say > something incorrect you'll be judged by your peers. This isn't the > case. > When you have an idea, share it with your team, even if you > aren't > confident it's the right idea. Wrong ideas are often stepping > stones to > right ideas, both because they help define the real > boundaries of the > problem that you're facing and because you can > iterate on a wrong idea to > reach a right one.

Saying incorrect things, in my experience, actually does have repercussions. During "bootcamp" at Facebook, you'll go through essentially a second set of interviews with managers and team members. If you ask the wrong things, or make seemingly incorrect statements, you _will_ be judged, and as a result, they will not want you on their team.

Aside from the questions you ask and the interest you display, the number of questions you ask also is a form of penalty. I was informally rejected from a team because I was told I asked too many questions. Basically, since I asked too many questions, I allegedly did not have the competence to solve problems that team faced on my own. Even though it was the team I dreamed of being on, and the one I could make the most impact on, I was told by my manager that my reputation was irreparably befouled. Maybe if I tried again in a year.

As another anecdote, I was judged negatively for sharing my ideas without confidence (I'm the new guy, I don't want to be presumptuous!), and being indirect with criticism. Instead of telling another team member that he was wrong, I shared an experiment and results to demonstrate so, in order to minimize argumentation.

Even though I ended up being right about my assessments of the problem at hand, I was actually told that I should have been more assertive because of this, and my overall performance was deemed poor.

> It isn't immediately obvious how important it is to meet and > maintain > relationships with people at the company who are outside of > your team. > Find a random person with whom you haven't worked in > months and have a > quick chat with them. It can provide a fresh > insight into problems you're > facing and may even give a solution > that another team already has that you > can use. FYI groups do a good > job of giving you a broad overview of the > company, but talking to a > ground-level engineer from a different part of > the code can yield > new ideas, new solutions, and new opportunities to > combine forces.

True enough. Though, "joining forces" usually means "do something for the company on your own time, and if the idea is good enough during a hackathon -- also on your own time -- then it might lead to a new opportunity". You can shoot the shit with other developers, but there's no 20% time to take anything to the next level.

> I'm only just starting to learn some of these lessons. I hope this > note > helps to inspire you to step up, take ownership, and lead your > team in the > right direction. Enjoy your years at Facebook; I know I > have.

Good.

Overall, I did not enjoy my time at Facebook, and I was reminded of the value in having a good, experienced manager, and the futility of trying to retain professional dignity in the face of an incompetent one. It was something that could have been repaired, but there was no avenue to do so.

My tale also underlines the way at-will employment can be exploited as "endless probation". Food for thought for anyone seriously trying to build a tech career.

* Actually, I am glad to say that I am now happily employed.

<comment><USER4> I can confirm the same experience as a non-engineer.

I worked in a group that was not engineering, and had the same schizophrenic experience with respect to what I was told was the culture, what was expected and what the reality was.

The culture of facebook is that of a pretentious enclave of people who think that simply their being at facebook is validation of their any actions or motivations.

While the benefits of the company are amazing, the actual actions and methods of teams is utterly broken.

I was accused of not providing information in a timely manner, even though I was simply statusing other employees and teams on their activities. After multiple escalations regarding not receiving status from said teams, I was ultimately held responsible for those that literally ignored every request for an update, inclusive of escalations to both my and their managers.

I was accused of overstepping my bounds by looking into information required for various projects and interfering in other teams responsibility even after being explicitly asked to gather this information on thie behalf. I was told by my manager that I should document all requests in email to ensure that I was not perceived as being encroaching on their area. I complied, and was praised for covering for that team, then denigrated by my very manager for overstepping into their area....

I was accused of spending too much time in the social scene at FB, while I joined a total of ~5 groups within FB and only posted a total of ~10 times between all groups.

The fact is that there is a ruthless political system within facebook that ruthlessly seeks out people who are too active and cuts them as early as possible.

When I was fired, jsut minutes before I was assured by my manager that all was good and that the person who was difficult was just someone I was supposed to get to understand.

Then, all my colleagues disappeared from our desk line and I received a call that I needed to leave the building. It was the most cowardly and disgusting company exit I have ever experienced.

<comment><USER5> Wow, quite a few similar stories. I wonder how indicative they are of fb as a whole, or just particular teams. Does anyone have any positive experiences to relay?

<comment><USER6> Gotta love a social company run by a kid that was so incapable of making friends he had to build a website and make everyone want to be there.

<comment><USER7> I think this is a bit unfair. I'm not sure you know Mark well enough to know that.

</comment></comment></comment></comment></comment></comment><comment><USER8> "Understand the trade-offs being made and the factors that led to them."

As a user of Facebook, this quote explains a lot. I run a Facebook page with 90k+ likes, and have grown to expect it to simply not load completely without refreshing it multiple times. I've long suspected we were the victim of some type of 'trade-off.' It appears my suspicion were correct.

We also spend five to seven thousand dollars a month on advertising. I wonder how much more effective our campaigns would be if our page loaded 100% every time.

<comment><USER9> >It appears my suspicion were correct.

The text in your post doesn't support this conclusion (which tradeoffs are causing the behavior?). Just because something isn't working right doesn't necessarily mean it is because of tradeoffs; it could just be a bug (Edit: that they aren't aware of).

Also, it seems strange that you are experiencing that problem since many pages have more likes (for example Barack Obama's page has over 35 million likes) and yet load quickly; perhaps the problem is unrelated to the number of likes?

Edit: Of course if it is a bug and Facebook is aware of it but hasn't fixed it yet then the reason for not fixing it yet may be due to tradeoffs.

<comment><USER10> I have experienced the same problem. It happens randomly to random pages and not all of them are high profile pages. I would chalk it up to it being a bug.

<comment><USER11> Who is your ISP? What type of connection (DSL/cable/fiber/radio)?

I have a flaky* DSL connection of 2.6Mbps and I notice the AJAX calls to facebook crap out.

* During wind or rain, cuts out for a minute about 4 to 6 times per hour.

<comment><USER10> I am in SE Asia, its a WiMax connection. The rest of the internet works as it supposed to.

The problem I am referring to (not loading completely and sometimes loading completely but not showing all the entries of a page) doesn't happen all the time, but happens often enough to notice.

<comment><USER12> I have the same experience in the US. Seems like it might be a problem with the admin panel on a page (since other pages don't seem to have the issue).

</comment></comment></comment></comment></comment></comment><comment><USER13> Thanks for posting, patangay! I wrote the post if anyone has any questions :)

<comment><USER14> Thanks for the post! I understand from my interview process with Facebook that every engineer screens candidates. What are some things that have impressed you the most of anyone you have recommended for a position?

<comment><USER13> I think the most impressive candidates have a mix of 3 qualities: raw ability to program, ability to map real problems into programming problems, and ability to work effectively with other people. I don't expect the ideal candidate to be an ICPC winner or red-rank TopCoder, but they should be able to manipulate code effectively and reason about their programs well. Knowing what non-technical requirements mean in technical terms (i.e. how to build what the customer wants) and what technical restrictions mean in non-technical terms (i.e. what alternatives you can propose when presented with restrictions) is core to being able to build software that solves problems. And since we're talking about hiring people to join a team of other people, obviously I need to be confident they'll succeed in that environment.

<comment><USER15> I know there are many red-ranked TopCoders and ICPC winners working on big companies like FB, in your experience does this ability translate well into "real world" programming?

<comment><USER13> I'm not really able to look at performance versus TopCoder rank (partly because I don't know my peers' TC rank because I'm not that into TC), but if I had to guess, I would think that there is no correlation. It's simply a matter of where one puts one's developmental efforts.

<comment><USER16> Given the same amount of time spent on TC, you'd definitely have the expected correlation (with the usual IQ common cause if nothing else). But I agree that once someone gets reasonably competitive in an area (esp. one w/ game-like mechanics and public recognition), they're at risk for overspecialization.

</comment></comment></comment></comment></comment></comment><comment><USER17> It seems that it's more of a product oriented (solve problems) culture than an engineer oriented (create something cool) one. Not necessarily a bad or good thing but it's consistent with the impression I got from Facebook in the last couple of years.

<comment><USER18> I had the impression that Google was engineer oriented but I wonder if this is still the case with their recent refocus into a small number of key products.

With that in light, how would we (to the best of our knowledge) characterize some of the big/promitent software players? (FB, GOOG, AMZN, MSFT, NFLX, RAX, DBOX, etc.)

<comment><USER19> I wonder why AAPL isn't ever mentioned in these discussions. They may be chiefly hardware focused, but they do plenty of software.

<comment><USER18> I intentionally left them out since imo their software serves to augment their hardware and the nature of the beast seems to be a bit different from others.

</comment></comment></comment></comment><comment><USER20> I didn't really see what's so specific in this post about Facebook? The same could be said like "it's my X year on social network Y". I expected something specific in the context of Facebook in the post, but I didn't find it there. I'm not a Facebook user though, so may be I didn't understand some implicit assumptions of the OP.

<comment><USER13> The post was written with my younger coworkers in mind but I felt like it was of general interest to all new programmers so I made it public. I don't think you need to understand anything about the Facebook product or company in order to understand my post.

The original title here was "FB engineer reflects on his job" but I guess it got changed because that phrase didn't appear in the linked page? I think the other title set context that wasn't needed on Facebook but is in this environment. Apparently an editor disagreed. (Editor, if you're reading, I'd title this "My advice for newgrads joining software companies".)

<comment><USER20> Thanks, this clarified the point of the post :)

</comment></comment></comment><comment><USER21> Nice reading

This is a good explanation (of what it is to tackle bigger problems):

"As an engineer, your job is to build things that solve problems. When you first join the company, you're assigned small tasks and you solve them. As you grow professionally, the domain of these tasks becomes larger. It is a mistake to constrain the increase in domain to larger or more frequent diffs. Code is a tool you have for solving problems. If you were gardening, you might plant flowers or pull weeds. Increasing your scope does not mean planting more flowers or pulling more weeds (though you should expect to be faster and more proficient at that as you become more experienced). What it really means is looking up from the ground at the garden in its entirety, considering how your section fits in, and eventually helping to decide the whole garden's plan."

</comment><comment><USER22> _understand temporary solutions and the priorities that necessitate them, but don't accept a decision that you feel is wrong without raising the issue and getting a better understanding. This is your company (your garden) and if you let people pull in the wrong direction the entire plan will fall into disarray._

i'm interested in hearing experiences about what happens when you actually achieve this level of control. I love my garden so much, and have been given sufficient responsibility over it, that I care very much when people pull in the wrong direction. Refusing to accept incorrect decisions -- decisions that will absolutely cause technical debt, overtime, and significant stress and a smaller bonus for us all later in the product lifecycle -- can lead to some interesting and complex social dynamic and this is the biggest thing I struggle with today. Its actually even more complicated because while I feel I am usually correct (who doesn't), there are times when I'm wrong and there are other times where I don't realize I'm wrong.

<comment><USER23> This is something I've often struggled with before I joined Facebook, and it's something I occasionally grapple with there too. Like you, I felt I was usually correct, but had come to the realisation that not only was I occasionally wrong in short-term hindsight (just after the fact), but sometimes only in longer-term hindsight (ie, after I'd learned some lessons further down the road).

Ultimately, it comes down to trust and teamwork. I had a much longer post, but:

a) Make sure you are doing what you believe to be the right thing for the company as a whole, and that you're armed with as much information as is easily obtainable about it to inform your strong opinion.

b) Then, if you are able to believe that the people around you are doing what they believe to be the right thing for the company as a whole (even if you might need to remind them that they should do that) based on the information (and you might need to help them understand what you have discovered) and experience available to them, then your life will be a lot less stressful than if you're the guy that feels they always need to steer the ship.

It's also something I've learned more and more about leadership and mentoring:

a) It's hard to learn lessons if you're not making mistakes. Telling people how to avoid mistakes in one case doesn't help them learn how and whether to try avoid them in future.

b) Choose your battles - expend your influence capital on the most important thing, and don't transform from that person that's been a great help in the past to that person who just tries to meddle in everything.

</comment></comment><comment><USER24> I find it interesting that a Facebook engineer would openly compare the company to a "garden", given the criticisms they regularly face.

</comment><comment><USER25> Given a 4 year vesting cycle it is the end of the fourth year that is of the most interest :-) Although I've noticed things are a bit more 'shares every year' kind of thing these days to maximize retention.

</comment><comment><USER26> If we had a minimsft type blog on the major players in tech, I suspect we'd see that they all provide roughly the same type of positive AND negative experiences.

It's cut throat out there.

</comment><comment><USER27> @CGamesPlay how did you get a job at Facebook being a college dropout and why did you drop out of University of Central Florida?

<comment><USER13> After doing an internship at Facebook in college, I received a full-time offer for after I graduated. I never really felt like college was for me and so I asked if they could extend me an offer immediately rather than waiting until graduation.

<comment><USER28> Does internship to employment transformation imply easier interview process overall? i.e. rather than apply to full-time position directly.

Another concern - does this also imply the offer with a below average compensation?

<comment><USER13> > Does internship to employment transformation imply easier interview process > overall? i.e. rather than apply to full-time position directly.

Not necessarily easier, but having 12 weeks of experience working with me gives the company much more context on my software engineering skills than 4 hours of interviews does.

> Another concern - does this also imply the offer with a below average > compensation?

I don't think so. Anecdotally, I've heard that recruiters have pretty fixed packages for newgrads and that I was given a newgrad package.

</comment></comment></comment></comment><comment> o0-0o How many people have cheated on their spouse or committed suicide because of facebook today?

</comment><comment><USER29> Very positive attitude and good advice.

</comment><comment><USER30> time to quit and do something real.

<comment><USER31> Say what you want, but I left my entire, close-knit family behind in Ohio when I moved to San Francisco for better opportunities on better engineering teams. Nothing in my life keeps me connected with them the way Facebook does. Nothing else draws together an audience as broad. From my teenage age cousins who use FB their way, to my Baby Boomer parents, to my Greatest Generation grandparents. They're all there in one place.

Also, they've faced enormous engineering challenges. Yes, Facebook style problems have great fanout results. You can _almost_ accuse it of being easy in that way. But at their size and with their growth rate, nothing is easy.

I'm not a big facebook user. I didn't touch it until i moved away and my family over time started using it. But your slur here is absurd. Facebook has given a lot of great engineering back to the community. Thrift. Cassandra. Open Source networking hardware, etc.

<comment><USER32> Yes the Facebook product has some utility. And they do have big engineering challenges, and have contributed to open-source.

These are not unique to Facebook, and if these are the criteria for working there, I can think of a lot of other places to work at that:

a) Have products that my friends and family would enjoy/use. b) Have interesting engineering challenges that a new employee can work on. c) Allow employees to contribute back to open-source and maintain their open-source projects on company time, with significant engineering resources.

The OpenCompute project is pretty unique to only Facebook, so if hacking on data center hardware is your thing, Facebook is pretty unique in that regard. Would be curious to know how many people are in that group though... I imagine it's pretty small compared to their general software engineering workforce. You can do similar work at Google, but they don't let you release your work Open Source. :-) Trade secrets and such...</comment></comment></comment>


A Desirable-Future Haiku - <AUTHOR> https://medium.com/message/a-desirable-future-haiku-ff01d63c93c6

<comment><USER2> "Nicotine and sugar are Schedule I and II narcotics" That one statement tells me that all your dreams will come to naught and your future will a hellish dystopia beyond your wildest imagination. And you will never understand why.</comment>


Sample Efficient Evolutionary Algorithm for Analog Circuit Design - <AUTHOR> https://bair.berkeley.edu/blog/2019/09/26/circuits/ <comment><USER2> Fascinating.

We've been working on an internal project for layout of digital circuits using stochastic search and ML and have been having good results. ML and AI in general will likely have a pretty big impact on circuit design in the near future, excited to see other work in this area ^_^

<comment><USER3> Board level EE here of about 15 years here. Right now the most advanced PCB layout tool is Allegro which can route up to 20 positive layers. BUT, the autorouter is unusable. Wonder why Apple/Google/LAB126/MSFT maintain an army of "eCAD" engineers. If you can point me in the direction of any publication that your "internal project" has contributed to that would be great. IMHO, PCB layout is the most underappreciated engineering task in product development right now. At the speeds of PCI-E Gen4 the traditional lumped elements theory no longer hold good. So, interested to see whats coming my way so that i can be ready to pivot when "computers can actually make computers themselves".

<comment><USER4> _> BUT, the autorouter is unusable. Wonder why Apple/Google/LAB126/MSFT maintain an army of "eCAD" engineers._

Because:

1\. They're working on the cutting edge of miniaturization and autoroute functionality just doesn't cut it at that level. You need a human understanding of the end product as in consumer electronics you have to plan in advance several (often for lower cost) revisions of the same product for the future.

2\. All the ML/AI experts are expensive and they have much lucrative fish to fry such as getting you to buy or click on things rather than optimize PCB aoutoroute for some eCAD company that can't justify their expense as most of their customers will still route by hand since the hardware business is very resilient to change.

3\. PCB layout is done(in Western Europe at least) mostly by technicians, not engineers, and their labor costs are cheap as technical high-schools churn hundreds every year. You don't need a university degree and sometimes the company will pay your training for the eCAD tool they're using. In my area, a city with lots of hardware industry, it's basically a blue collar job.

Source: FW dev in the consumer electronics business

<comment><USER5> Also from my limited experience in Eagle, the autorouter output is terrible. I mean, it works, but it makes it very hard to "read" the layout and tweak it if necessary. Sometimes it helps do some percentage of the work, but you almost always end up ripping it all out and redoing most of it. Or running it multiple times until you get something that is semi-usable.

Perhaps some kind of GAN approach could be used to force an optimizer to perform autorouting with a bias towards "human-like" circuits that actually readable and understandable.

</comment></comment></comment></comment><comment><USER6> This looks just like the simulated annealing work AI researchers were using on chip design and verification in the 1980s.

<comment><USER7> I think the trick is here:

 _" In our proposed method, we devised a model to predict the performance before simulation and only simulate those samples which have better predicted performance."_

In other words, build a model for the system, use that for (cheap) sample point evaluation, occasionally check (doing an expensive circuit simulation) and adjust.

P.S. back in 80s the guys doing simulated annealing were not claiming to be AI researchers, and the actual AI researchers were doing other stuff (neural networks and knowledge-based systems, among others).

<comment><USER8> Surrogate modeling techniques have been around for a while. They come standard in many optimization software e.g. DAKOTA.

[https://dakota.sandia.gov/](https://dakota.sandia.gov/)

</comment></comment></comment><comment><USER9> I'd love to see some sample circuits evolved -- I feel like humans might get stuck in known patterns, and I'm curious to see more 'random' circuits that still work.

<comment><USER10> There's Tompson's famous work with evolving circuit design on physical FPGAs[0] where the algorithms exploited analog properties of the discrete circuit elements, something no human would have done.

[0] [https://static.aminer.org/pdf/PDF/000/308/779/an_evolved_cir...](https://static.aminer.org/pdf/PDF/000/308/779/an_evolved_circuit_intrinsic_in_silicon_entwined_with_physics.pdf)

<comment><USER11> Discover Magazine had a very approachable article on this work: [http://discovermagazine.com/1998/jun/evolvingaconscio1453](http://discovermagazine.com/1998/jun/evolvingaconscio1453)

<comment><USER10> He asked to see some evolved circuits. The linked slides do (well, FPGA schematics), the magazine article does not.

<comment><USER11> What motivates somebody to make a comment like this, out of curiosity? Was my link to an article that some people might find interesting hurting the discussion?

</comment></comment></comment></comment></comment><comment><USER12> Bad news for Qualcomm?

This makes me wonder, what if the algorithm finds a patented circuit, would it be allowed?

Another thing I wonder is if instead of starting with a fixed topology, you start with a complete graph, would the algorithm automatically find the correct topology (where e.g. resistors that are dropped simply become very large). Or would it get stuck in a local minimum?

</comment><comment><USER13> Assuming the AI work perfectly, it will only be as good as the circuit simulation it can do. Unfortunately, there are some many things the start-of- art circuit simulation software cannot do. I really doubt the claim the author made here.

Back in time around year 2000, Scientific American had published an article about using genetic evolution algorithm to create circuits. 20 years later, the same idea keeps pop up again and again, but no commercial product has really claimed they were generate by algorithm.

<comment><USER14> Because all such projects are purchased by cadence and other biggies and killed. The workflow is also completely different that it takes time for engineers to trust the new workflow. The difference between 20 years and now is the computing power. ( I have worked on such an automation tool )

</comment></comment><comment><USER15> So circuit design can be similar to certain software patterns. I wonder if this can be adapted to produce AST's and/or logic gates such that it can be run in some language. Interesting, will need to read through.</comment>


How I Overcame Bipolar II (and Saved My Own Life) - <AUTHOR> http://www.forbes.com/sites/michaelellsberg/2011/07/18/how-i-overcame-bipolar-ii/ <comment><USER2> This is a dangerous article. A dangerous, slightly manic article.

Someone close to me is affected with bipolar, which drags me into that universe. People who self-medicate - such as the author - are very common with this disease. There are a million people who claim they've "overcome" it, some through alcohol or street drugs, some through nutrition and lifestyle changes. The danger is that when you're manic, you are your own blind spot - you're in no position to self-assess, you think things are great when they clearly aren't.

It's been three years since the end of his "challenge", and from the sound of it, three lovely years. Meeting a new love, getting married, positive things. How will the unmedicated author react when, say, a parent dies? Or the marriage ends?

There's nothing wrong with trying to understand the disease, its effects on your body, and the effects of alternative therapies - I commend the author for that. However, the claim that he's "overcome" bipolar this way is reckless and frankly dangerous. There are countless bipolar patients out there who struggle every day with their medications; the costs, the terrible side effects, and who fight a battle of willpower to stay on them despite feeling "cured". One article like this, one claim to the opposite, is all it takes to break them.

I'd love for this article to be true. I'd love it if my friend didn't have to spend thousands on medications that are slowly killing her, but somehow I doubt this is the answer.

 __Edit __: What great feedback! It's interesting hearing people's different experiences with various forms of treatment. I think the lifestyle changes the author recommends are sane and sensible, helpful changes. They just aren't a "cure". You _manage_ these diseases and you must be very careful when tweaking that management.

I highly recommend that anyone who's involved with - or interested in - a mood disorder read An Unquiet Mind, by Kay Redfield Jamison. It gives you an excellent understanding of the subtleties and trickery this cunning disease exhibits.

<comment><USER3> I can relate to this article, having being diagnosed with bipolar I, and having had an extended manic phase (with psychosis) in which I was actually trying to save myself:

\- eating well \- todo lists \- self discipline \- sports \- stopping drugs / coffee / alcohol

I'm kind of "scared" of these things now, but also realize that they are, while not the complete solution, necessary ingredients to living a "normal" life. It took me 28 years to realize that you could have a regular sleep schedule and daily routine for example. It's these kind of "symptoms" that I find very hard to share with "normal" people, who just can't see how that is that big of a problem.

The funny thing is that all of this further fueled my mania, but on the other hand, it also made me check in with a psychiatrist. I'm now on lamotrigine, which makes living seem so easy now.

Yet I can skip a day of pills, and drink maybe a bit too much coffee and sleep badly, and it's all there again. Only now I have a baseline I can come back to. I don't think the article sounds too manic. I'm a bit wary of the new agey "that's what all people should do with our method" thing, while it really is a "common sense" that is shared by pretty much all cultures on the planet (eat healthy, sleep, exercise, don't worry too much), but it's cool.

while I didn't have much one-on-one therapy, I went to a "psychoeducation" group about bipolar with about 10 other afflicted individuals, and basically, the most important thing really is to have these checklists: eat healthy, sleep healthy, don't drink alcohol, don't drink coffee, try to sleep more than 4 hours a night, try to sleep less than 12 hours a night, and write yourself reminders so you won't forget them.

<comment><USER4> I'm curious about the coffee part. What happens with coffee?

<comment><USER5> It's the caffeine and its side effects. It can cause sleep disorders, anxiety, and so on. Of course, not everyone encounters these problems with their coffee-drinking. See the Wikipedia entry for caffeine if you want more details though.

<comment><USER3> yes, mostly sleep disorder, the intense crash and burn of coffee compared to a more mellow effect of for example green tea, and the tummy problems.

especially the crash/burn + sleep problems though, which lead to anxiety, which leads to either depression, or in my case a kind of jittery angst-fueled hyperactivity.

</comment></comment></comment></comment></comment><comment><USER6> The literary editor on page 2 had the author completely pegged:

"Mr. Ellsberg's writing is not strong enough to overcome the simple fact that he is not a very likable person. Sorry, but there it is."

It's true of this article, too. I don't want to play armchair psychologist, but this individual has an enormous ego and shows shockingly little empathy. I think there is more wrong than he is letting on.

<comment><USER7> My thoughts after plowing through this, were that it's a shame the conclusion was at the end of such a hard-to-read article.

If ever there was an article that could benefit from a solid abstract, this is it.

</comment></comment><comment><USER8> From the submitted article: "In later Internet research, I found several articles suggesting that—for unknown reasons—bipolar II is one of the most lethal of mental conditions, possibly more lethal than major unipolar depression and even bipolar I, with a suicide rate estimated up to 20%. (One Medscape article, for example: 'bipolar II depression. . . carries the highest suicide risk among all subtypes of major mood disorders.')"

This is some of the most important information in the article. Just before the quoted paragraph, the author notes that it is unusual for people in the hypomanic phase or manic phase of a mood disorder to seek treatment, because most people in that mode state feel great. Treatments vary for mood disorders between those with manic and hypomanic phases and those without, because of course many treatments that elevate mood can cause vulnerable persons to switch into hypomania or even mania from depression.

It's a bit early (over the course of the author's lifetime, and in terms of the number of patients who have tried to apply his advice) to conclude that what he thinks helped him function better would work for a lot of other patients. He sometimes concedes that, in his own words in his article, but seems to end with a flourish and announcement that he has found a general answer. Anyone dealing with this issue would be well advised to do what the author advised in one part of his article and check with an experienced M.D. before figuring that self-treatment will do the whole job.

<comment><USER9> What about the countless people that likely suffer from __some __form of problem like that described, that will never go see a psychiatrist, psychologist, or any other doctor about the problem because of __whatever __reason? Or, how about the people that have tried, and found the experience to be less than satisfying? How about the people that simply suffer, maybe cognizant of the fact that they aren't completely normal, but have lost hope? Maybe, for these people, the article will provide some hope. Maybe not, but certainly worth considering.

</comment></comment><comment><USER10> I just started reading the book he swears by (The UltraMind Solution: Fix Your Broken Brain by Healing Your Body First by Dr. Mark Hyman) and I am appalled at how sensationalist and unscientific it is. It mixes well-proven facts (e.g. exercise, diet, sleep, and relaxation promote mental health) with absurd claims like "Just as brain problems all stem from the same root causes, they all have the same solution - The Ultramind Solution". Has anyone else read the book?

<comment><USER11> I'm all for this recent trend in understanding how nutrition affects us in many ways, but both Mark Hyman and his book looked dubious to me. Googling revealed this Salon article, which is worth of read after reading the Forbes article. <http://www.salon.com/2009/03/12/mark_hyman/>

<comment><USER3> I agree he's pretty much a self-healing new-age self-promotion marketeer. the books he suggests are just populistic ramblings. also, reading up about psychological disorders on the internet is even worse than reading up on "normal" diseases. just don't do it, either you will persuaded that you have a disorder while you don't, or be supported in whatever delusion you can come up with, as there probably is a whole community built around it. HN is no exception in this regard, as a lot of the "self-help" articles on here are just a ripe breeding ground for mania :)

</comment></comment></comment><comment><USER12> I am impressed by Michael's willingness to talk about his personal experience with bipolar disorder. People don't realize how prevalent it is, as those affected are often too embarrassed by past behaviors from when manic, too unsure when depressed, or rightfully concerned about the stigma from outing themselves to want to share their experiences with others. That's why you don't know how many of your acquaintances have it and that's why the stigma persists.

So kudos to Michael for sharing.

Michael's piece reads like many others I've read on reddit's bipolarreddit subreddit. A 20 something self-diagnoses themselves with bipolar II and lets the world in on their ability to self-control the disorder without medicine (in many posters' cases, without a medical support team).

In most cases I'm glad for them, and the provided advice is usually what any book on bipolar will tell you to change about your lifestyle. Sleep 8 hours, cut out stimulants, cut out inebriates, exercise and meditate.

My concern is that the subtler message of "just overcome your brain disorders with pure will power" might mislead readers to dismiss medication as one-size- fits-all tranquilizers/stimulants and provide their fragile egos one more reason not to seek help from a health care professional.

When I encounter clearly manic or psychotic individuals online I reach out, gently. I've made friends on TF2, Reddit and via YouTube. I've watched helplessly as many who categorically eschewed all medical assistance eventually slipped into psychotic states, evidenced by incoherent, often angry messages about their delusions in my inbox. It's not always fun reaching out but in a number of cases you can get the message across early enough and they successfully get help.

I was diagnosed with bipolar disorder a couple of years ago and worked with a doctor to find a combination of low-dose medications that has squashed any sort of noticeable irrational moods without any noticeable side effects. It took nearly a year of experimentation to find the right combination. It's frustrating, especially on the downswings, but worth it in hindsight.

Thanks Michael for the interesting piece and if Michael's story resonates with you, consider investing in a visit to an experienced provider. Be patient.

And if you have experiences with bipolar disorder I urge you to suppress your ego and share them. Only with widespread sharing can the stigma be quashed, and people will be more comfortable seeking treatment early.

</comment><comment><USER13> Wow! Thanks so much for sharing this. It is unbelievable how much medicine and nutrition is separated in this country. Nutrition ABSOLUTELY affects you in so many ways. Eating healthy is soooo important, but unfortunately most people prefer to take a drug for any problems they have instead of making the effort to eat healthy.

</comment><comment><USER14> i have bipolar 2 myself, and although i wouldn't say i've 'overcome' it, i've made a lot of progress.

keeping regular routines, eating healthy, and avoiding drugs have all be great for me. i tried these many times in the past, and kept failing to stick with them. it wasn't until i underwent intensive psychotherapy five times a week before i was able to start helping myself better. because i feel my emotions so strongly, for the longest time i was terrified of any form of introspection; all i knew was that if i thought too much about how i was feeling, i was likely to end up in tears.

after a bunch of failed relationships, several suicide attempts, and months of a worsening drug addiction, i finally found a therapist who was able to work with me.

i'm no longer so afraid of being a terrible person that i let people walk over me. i'm no longer so resistant to think about other people's feelings because i've learned how to do that without getting swept away by them. i can even look people in the eyes without feeling like i'm intruding on their privacy.

most importantly, though, i've learned how to understand my own feelings, by talking to them and asking how i can help them, rather than trying to suppress them or running from them in terror, when they do things like convince me that i'm starting the singularity and have become a telepathic warrior monk. even though that can be pretty fun, it usually doesn't end well.

</comment><comment><USER15> I could never have expected this article was about quitting sugar and coffee. On the other hand i'm not sure if the big change in his life has to do with sugar levels affecting mood or the fact that he took a decision and follow it to the end, strengthening his will in the process.

</comment><comment><USER16> Michael Ellsburg (the author) also just posted this article ([http://www.fourhourworkweek.com/blog/2011/09/29/8-steps- to-g...](http://www.fourhourworkweek.com/blog/2011/09/29/8-steps-to-getting- what-you-want-without-formal-credentials/)) which is somewhat related, and an excellent read.

</comment><comment><USER17> my favorite part:

 _'Based on what I told him, Dr. Hoffman ran a number of alternative diagnostic tests on me: glucose tolerance (which tests fluctuation of blood sugar levels in response to sugar intake), food and chemical sensitivities, vitamin and fatty-acid levels, and heavy metals toxicity.

The most relevant test appeared to be the glucose tolerance test. If I recall correctly, I appeared to be highly sensitive to sugar: after eating sugar, my blood sugar spiked higher, and then crashed lower, than most people's.

Dr. Hoffman told me there is mounting clinical evidence linking moodswings to blood sugar issues, and that in his experience bipolar patients respond well to cutting out refined sugar, and coffee and alcohol (which affect blood sugar) from their diets. "You should stop eating refined sugar altogether, and stop drinking alcohol and coffee," he told me.'_

<comment><USER7> The sugar thing certainly tallies with my experience. I've never done a glucose tolerance test, but something about sugar highs, followed by deep crashes, sounds very familiar.

I ended up largely eliminating refined sugar from my diet. I still eat some, very hard to avoid entirely, but I try to eat mainly scratch cooked food, wholewheat bread, lots of bulky starches and proteins.

</comment></comment><comment><USER18> I've been wondering about the connection between mental illness (specifically bipolar) and start up life now that I work at one, and find the experience very bipolar. The way I see this article (as someone who knows bipolar people and what they go through): if changing you diet helps (I've only seen it help friends of mine a tiny bit if at all), great, if not, please seek some other kind of assistance if you end it. I also give props to him for sharing, I wish there were more positive role models that suffer from mental illness.

</comment><comment><USER19> Because Michael Ellsburg's (the author) new book has just been launched we get this pretty old article on the first page of HN... sort of crap.

The article itself is interesting, though.

</comment><comment><USER20> I couldn't get through the whole article. I tried, but it was too long-winded and the author still seems like he has an inflated sense of self-grandiosity.

However, the resultant comments here on HN have been superb, and my hope is that many people share their own stories.

</comment><comment><USER21> so, drinking nescafe gold decaffeinated is a safe choice of coffee, right? because im drinking it for the taste only, without sugar but with milk...

coffee was definitely not helping with my ADD / ADHD... im on ritalin / concerta 54mg for 2 weeks now, stopping for the weekend and it works great so far with a slight sleeplessness and a little loss of apetite which i perceive as normal apetite actually, since im over weight. i have more inclination for riding the bike too.

IF u have

\- focus problems

\- sleeping issues at home or at work

\- lots of great projects which u haven't finished for months or years

\- fluctuating work / sex performance

\- alcoholic or drug abusing parents / grand parents

i would highly recommend to learn a bit about ADHD via Dr. Edward Hallowell's "Delivered from Distraction" book ( [http://www.drhallowell.com/books/delivered-from- distraction-...](http://www.drhallowell.com/books/delivered-from-distraction- getting-the-most-out-of-life-with-attention-deficit-disorder/) ), because you have a high chance to seriously suppress these problems with some medications OR simply life style changes.

in my case i have pretty high sensitivity to sugar and certain carbs. i feel so sleepy after eating rice or drinking a liter of even no-added-sugar fruit juices, as if my head wants to fall off. my mother is diabetic, btw.

<comment><USER12> I am interested to follow how your progress with your ADHD medication goes -- are you keeping a log anywhere?

Have you been able to get a full 8 hours of sleep every night?

</comment></comment><comment><USER22> I think that the prevalence of manic-depressive (bipolar) illness among software entrepreneurs is many times greater than that of the general population. Many of the symptoms characterizing manic or hypomanic behavior are possibly extremely helpful for software entrepreneurs and I would argue that founders exhibiting manic-depressive characteristics have a higher rate of success than those without such traits.

However, success is really dependent on founders being careful to manage their symptoms to avoid the 'burn-out/depression' cycles that generally follow the manic and hypomanic cycles. It IS possible to have some measure of control or regulation of these cycles by some combination of medication, careful diet, proper sleep, CBT (Cognitive-Behavior Therapy) or Psychoanalysis. And there are lots of books on Amazon discussing these topics (but very very few reliable online websites). But this is more of an ART than a science and it can take a very very long time to figure out the proper balance.

The main main issue for all software entrepreneurs with manic-depressive illness is that they need to avoid having their entrepreneur lifestyle trigger their mania/hypomania episodes and run out of control.

And I would wonder if the caffeine-fueled programmer paradigm actually leads to stress-related brain damage that makes software entrepreneurs more susceptible to full-blown manic-depression. A kind of entrepreneur PTSD.

The article is good if it spurs people to do more research on their own and to seek out professional evaluations (from people very experienced with bipolar/manic-depression. not just anyone please...) if they have a sense that something about their moods just might be a bit _off_.

The average time from onset to diagnosis of manic-depression/bipolar is approximately 10 years. An entire decade lost. Greater awareness of manic- depressive illness and its causes might help entrepreneurs create companies that are more conducive towards promoting mental health. How many companies have utterly failed after a co-founder or key programmer hits a depressive cycle and is suddenly completely able to perform their jobs?

I'm speaking from my own experience here: I only sought out help after starting and having only marginal success with 3 startups. After a decade of these failures I had the sinking feeling that something was wrong with me and I couldn't justify placing the blame on my co-founders and _poor market conditions_. And then after eliminating sugar and white flour from my diet and take small doses of lithium I finally realized how _off_ I had really been all this time.

I think it'll take a few more years at least before I have a full understanding of the illness and how to best manage it. It'll be expensive to see all these specialists, etc. but the alternatives are severe depressive, likely financial ruin and a high chance of eventual suicide.

A few books that helped me learn more about manic-depressive illness (and made me feel like there was actually hope...):

\- Touched with Fire: Manic-Depressive Illness and the Artistic Temperament by Dr. Kay Jameson \-- Documents how creativity and manic-depressive illness are linked, and discusses the prevalence of mood disorders among the most famous artists and writers in Western culture.

\- An Unquiet Mind: A Memoir of Moods and Madness by Dr. Kay Jameson \-- The author is a clinical psychologist and wrote this breakthrough memoir revealing her own battles against manic-depressive illness.

\- Loving Someone with Bipolar Disorder by Julie Fast \-- This is extremely useful for founders who may have a member or their team or company that does have or seems to have manic-depressive illness. It helps explain how to communicate with manic-depressive friends/loved-ones in a way that they can hear you, particularly when they are in the midst of a manic/hypomanic cycle. And it will help you learn how to avoid triggering manic/depressive episodes.

Nutrition-related resources are a bit more complicated and if you have the resources I would suggest consulting with a professional with training in Orthomolecular Psychiatry. These types of people are MD's so they can prescribe medications and know a lot about medications, and they also know about nutrition and its interaction with medications and mental health. The combination of these skills is extremely important when you are dealing with serious medications like lithium and also changing your diet, since medication and diet interact with each other in complicated ways. But the people who possess both types of knowledge are very rare, and there aren't too many of them around. If you are in the Berkeley area I would recommend seeing Dr. Michael Lesser. If he doesn't have open appointment times he can probably refer you to reliable colleagues of his.

But in the meantime the basic advice that he gave me is:

\- try and completely eliminate white sugar and white flour from your diet. \-- Switch to using honey as a sweetener and 100% whole wheat bread.

\- reduce caffeine intake to around 1 cup of coffee in the morning or switch to tea instead if that works for you.

\- Make sure to get as much high-quality sleep as your body really needs. \-- this is the hardest one for me... still working on it.

<comment><USER23> _Switch to using honey as a sweetener_

Not such a great idea. Honey is full of fructose -- this indeed gives it a lower glycemic index than sucrose, but causes other problems. Watch this (long but very interesting) video: <http://www.youtube.com/watch?v=dBnniua6-oM>

My takeaway from this talk is that it's best to avoid all sugars, but if you must eat something sweet, eat it with plenty of fiber to slow the absorption of the sugar. Of course, the easy way to do this is just to eat fruit.

<comment><USER22> I'm definitely not the expert here and the suggestion to use honey as a sweetener was given to me by an Orthomolecular Psychiatrist. The context was that if I want to use a sweetener in my tea or coffee, I should use something like honey over white sugar or cane sugar.

Honey may have other issues, which definitely reinforces my feeling that it's really best to consult an expert when attempting to regulate mental disorders by using a special diet or vitamins. However as a common sense solution it seems that using honey to sweeten tea or coffee is a reasonable alternative to white sugar, and it is a situation where fruit simply won't substitute. For a quick snack, fruit is a great idea and I would definitely prefer it over some kind of honey snack or a candy bar.

googling: "honey bipolar refined sugar" leads to a bunch of links comparing white sugar with honey, but again my experience with internet research for vitamins and mental disorders is that the information is extremely unreliable and all over the place. This is an area (similar to searching for information about cancer online) where I think that the most reliable information comes out of books written by qualified professionals and directly from qualified specialists.

</comment></comment></comment><comment><USER9> re: Cutting out refined sugar: Anyone have any good links for a balanced and nutritional daily food intake that is reasonably cost effective and doesn't take long to prepare?

<comment><USER24> You may have heard of Ray Kurzweil, who's very involved with the singularity theory of technology. I read a book of his that is co-authored with Dr. Terry Grossman called "Fantastic Voyage." If you take the time to read this book, it gives many eating choices along with supplement suggestions for excellent mental and physical health. It's definitely worth the read.

<comment><USER9> Thank you!

</comment></comment></comment><comment><USER25> You know, I was gonna write this on Forbes but I didn't want to sign up for it, so here goes, Mike:

According to your Forbes bio, line one, you "shatter limited thinking." Dude, you just shattered my limited thinking about bipolar disorder. You've turned "hypochondriac needs a girlfriend" into a heroic journey of self- discovery...like Woody Allen without the humor. Just the heart. You've delivered a tour de force through the causes of this widely misunderstood and under-diagnosed syndrome; you've given a whole new generation of overstimulated hackers a whole new disease to research on the internet; and you've left humanity with an earth-shattering, blow-by-blow account of what it really _feels_ like to experience spoiled-manchild melancholy, all the way from a loft in Williamsburg back to your parents' basement, by way of Buenos Aires. I don't know which you deserve more -- a medal, or a decent lay -- but at least now that you've honestly expressed to half the western world which one actually matters to you, you'll surely get the credit you deserve.

</comment><comment><USER26> TL;DR;

"I gave up sugar, coffee, and alcohol".

It was a good read.

<comment><USER27> I suspect that you'll not get many upvotes for that comment but you can have one from me. I'm well aware that my abuse of sugar, coffee and alcohol are bad for my health but it really does seem that these things are tied into my lifestyle quite strongly...

</comment></comment><comment><USER28> Paste this in the address bar if you want to read a forbes article in a single page:

javascript:(function(){if(window._wait)return;window._wait = true; var i = 2; var max = $(".page_links a").length + 1; function all(){$("<div>").appendTo(".body:first").load(i+"/ .body",function(){i++;if(i>max)return;all()})};all();})()

EDIT: Tags?</comment>


IT Outsourcing: Key Insights, Benefits, & 3-Step Procedure - <AUTHOR> https://mlsdev.com/blog/it-outsourcing <comment><USER2> It was interesting to read. I also found this article ([https://ivypanda.com/essays/outsourcing-in- china/](https://ivypanda.com/essays/outsourcing-in-china/)) about outsourcing. It can be a good addition to yours.</comment>


Venezuela Declares Every Friday a Holiday to Save Electricity - <AUTHOR> http://www.bloomberg.com/news/articles/2016-04-07/venezuela-declares-every-friday-a-holiday-to-save-electricity <comment><USER2> Let's never forget what socialism is actually like. Historically speaking, running an entire economy is very hard to do. The more you nationalize, the worse it all gets.

They need to just start charging more for electricity. There will be less waste for sure. If people still use a lot and pay more, it means they need it and the money goes to building power generation. Very, very basic capitalism.

<comment><USER3> > Let's never forget what socialism is actually like.

The term socialism has no clear meaning, and trying to group failures together is just as unhelpful as trying to group successes.

The key is to find a balance. Europe has had some success with socialising things that make moral sense (e.g. healthcare) while leaving everything else to the private industry. That's still socialism, it just isn't absolute socialism.

Even China is experimenting with the levels of socialism they want. They've been moving towards a more capitalist-style market and they've found a more workable balance.

Socialism is a dirty word in the US, but is a complex word everywhere else. Hopefully with a self-proclaimed "democratic socialist" running for your highest office we'll see people's understanding of socialism expand.

<comment><USER4> A more correct name for what happened in Western Europe is Social Democracy: [https://en.wikipedia.org/wiki/Social_democracy](https://en.wikipedia.org/wiki/Social_democracy)

<comment><USER5> It's also the term Bernie Sanders should be using instead of socialism. Strange that he doesn't.

<comment><USER6> Bernie Sanders specifically identifies himself as a Democratic Socialist:

[http://www.thefiscaltimes.com/Columns/2016/01/26/Bernie- Sand...](http://www.thefiscaltimes.com/Columns/2016/01/26/Bernie-Sanders-Says- He-s-Democratic-Socialist-Here-s-What-Means)

</comment></comment></comment></comment></comment><comment><USER7> Just saw Maduro on tv telling women to avoid hairdryers, or at least, to use it in case of _emergency_

<comment><USER8> so , you had the _TV_ powered on...

</comment></comment><comment><USER9> Bloomberg's headline leaves out the condition "in April and May."

At least it states the reason why in the first paragraph: hydro-generation is at risk because of a prolonged drought.

<comment><USER10> As I understand it, bad government is the reason; the drought just turned it into a crisis.

The chief reasons are artificially low pricing (it's almost free, so people have no incentive to conserve power, and the utilities are starved of funds for maintenance) and poor administration (this has been a long time coming -- brown outs and black outs have been endemic for some time).

<comment><USER11> I think you hit the nail on the head. Mismanagement, driving out the professionals, lack of investment and corruption have turned a very promising South American economy into a subsistence economy.

They are simply running the country into the ground thru mismanagement and negligence.

<comment><USER12> The unfortunate part is that due to the prevailing opinion on 'running a country', they're essentially forced to assume a "control everything" position. I.e. Each subsequent failure / worsening of the conditions makes "control" or intervention _more_ necessary in their eyes.

The option to let things happen (by removing regulation / price-controls, etc), or for scrapping and starting fresh appear to never be on the table in any meaningful respect.

<comment><USER10> We have a party in the US that thinks "running a country" means cutting taxes and increasing corporate welfare until the government goes bankrupt.

<comment><USER11> And there is a party that doesn't. And the country is not seeing lines for basic goods and professionals and the educated class are not being forced out of the country and we don't have a majority of officials pocketing money and you're free to express disapproval, etc. etc.

We're not a basket case economy in any stretch of the imagination. Compare and contrast.

</comment></comment></comment></comment></comment></comment><comment><USER13> What I don't understand is why they are so dependent on hydroelectric power. Venezuela sits on a shitload of oil and have a history of practically giving it away to their citizens.

<comment><USER14> That's pretty much exactly the problem. The usage of oil (gasoline) has been subsidized to ridiculous levels, which has squandered the country's natural resource wealth.

We all need to view our natural resources as a fixed and limited asset, to be used to boost ourselves up to sustainable energy production methods. But that is not politically expedient.

</comment></comment><comment><USER15> I don't understand the economics of this at all. Can't the country buy power from a neighbor? Or does that infrastructure not exist? Wouldn't the productivity supplied by those days recoup the cost of electricity?

<comment><USER16> Electricity is sold to consumers at a price lower than that at which it can be bought from other countries. This of course is the source of the overuse and failing infrastructure.

The country is communist, so the government has direct control over prices, and of course set them this low because it was politically expedient, not because it was sane.

<comment><USER17> One of the reasons. The other: nationalized industries are rotten with corruption.

<comment><USER18> Monopolies are rotten with corruption. Nationalized industries are monopolies, and often headed by non-industry people so the nature of the corruption tends to be more catastrophic, and correction is much, much harder than in the case of a corporation with a monopoly.

</comment></comment></comment></comment><comment><USER8> Is this all because of the recent oil slump? Even taking that into account, Venezuela has the world's largest oil reserves. How can this happen?

<comment><USER19> the vast majority of their reserves are "heavy" crude. Which is much more expensive to refine. The oil slump certainly didn't help, but Chavez nationalizing the oil company and replacing competent engineers with cronies is what really fucked them. That and the general socialization of most of private industry.

<comment><USER20> "competent engineers with cronies is what really fucked them"

That' cannot be emphasized enough. This isn't the type of oil coming out of Texas or ND. It requires more money, infrastructure, and expertise to refine properly. Canada has this problem with the oil sands, but they have all three to deal with it.

<comment><USER21> They also have all of the professionals that left Venezuela.

When I consulted up there, most of the reliability engineering organizations were Venezuelans. Canada should send Venezuela a big thank you card for the amazing people they got due to Chavez driving out professionals.</comment></comment></comment></comment>


Linking to infringing content is probably illegal in the US (2006) - <AUTHOR> http://www.webtvwire.com/linking-to-infringing-content-is-probably-illegal-in-the-us/ Summary: There have been 3 court cases in the US where sites were forced to take down links leading to infringing material on external sites. The sites were found guilty of 'contributory infringement' for simply linking. <comment><AUTHOR> I think that if there were laws against framing[1] and hotlinking then Google would be the biggest offender.

[1] [http://webdesign.about.com/od/legal/a/aa030507.htm](http://webdesign.about.com/od/legal/a/aa030507.htm)</comment>


The Ur Programming Language Family - <AUTHOR> http://impredicative.com/ur/ <comment><USER2> I worked with in the same lab as the author adam chipala two summers ago. He's a brilliant hacker/computer scientist, and any work he does is worth taking seriously.

To quote from the manual: The signature (ed: the type or interface) of the standard library is such that well-typed Ur/Web programs "don't go wrong" in a very broad sense. Not only do they not crash during particular page generations, but they also may not:

• Suffer from any kinds of code-injection attacks

• Return invalid HTML

• Contain dead intra-application links

• Have mismatches between HTML forms and the fields expected by their handlers

• Include client-side code that makes incorrect assumptions about the "AJAX"-style services that the remote web server provides

• Attempt invalid SQL queries

• Use improper marshaling or unmarshaling in communication with SQL databases or between browsers and web servers

Thats pretty cool, and it looks like the language is able to statically catch that all using the type system (the types are presumably mostly inferred by the compiler), and presumably the error messages do or will provide informative information about the location of errors.

It is also worth noting that when you compile an Ur/web program, the executable you get is a web server dedicated to serving the page that is described by the programmer! So presumably, aside from setting up the compiler toolchain, the actual server setup is easy!

Kudos! -Carter

edit: <http://adam.chlipala.net/papers/UrPLDI10/> is the link to the paper the focuses on the research novelty elements of the system.

edit2: also you got to love that the theres a formal semantics for the language and the types which makes it clear to those with the right background that theres a formal proof that the type system also prevents bad stuff from happening! :)

</comment><comment><USER3> While it would be nice to imagine something like this catching on, somehow I suspect that any language whose reference manual gives a _specification of semantics using sequent calculus_ before discussing the _standard libraries_ is unlikely to gain much use.

Fast, expressive, flexible, with static analysis that can prevent entire classes of common bugs? That sounds great! Oh wait, no, it uses words that sound like math, obviously that makes it unsuitable for the real world. Sigh.

<comment><USER4> I find that the deal-breaker for most languages is just a case of missing "production gloss." Things like seamless installations, breadth of packages, language interoperability, platform compatibility, documented quirks.

Take, for example, Ur vs. Python. Python has a plentitude of frameworks, template libraries, protocol implementations, dev tools, packaging and deployment mechanisms. Ur has just started, thus it has little to offer in any one of these categories. The raw language advantages of safety can't be justified in a commercial environment where speed of deployment is mostly contingent on having the ecosystem there - if you plow ahead without having them in place, you're going to tack on weeks or months building and refining new implementations of those things.

Fortunately, it's entirely possible for language designers to bootstrap the entire ecosystem. It just takes a long time and lots of dedication to do so. The author indicates that he is eager to make this language worthy in these ways, so I'm wishing him the best. :)

</comment></comment><comment><USER5> Compare: [http://impredicative.com/ur/demo/Demo/Form/handler?B=there&#...](http://impredicative.com/ur/demo/Demo/Form/handler?B=there&C=1&A=1)

[http://impredicative.com/ur/demo/Demo/Form/handler?B=there&#...](http://impredicative.com/ur/demo/Demo/Form/handler?B=there&C=1)

[http://impredicative.com/ur/demo/Demo/Form/handler?B=there&#...
I get the first 2, but what's up with the 3rd one?

</comment><comment><USER6> I'm trying to run the demo, and it keeps starting up emacs in order to compile html templates. It doesn't use -nw or -q, so for each file, it creates a window, loads my init files, runs a tiny bit of elisp to expand a template (or something), writes it out, and closes down emacs (running everything in kill- emacs-hook).

I could just move my emacs directory temporarily or add some reasonable commands to the process (even use emacsclient!), but I'd rather complain about it here.

<comment><USER7> Try setting the EDITOR environment variable to /bin/true for a bit.

<comment><USER6> buhhhh...really?

<comment><USER7> Well, it will exit very quickly and not open 38 Emacs frames. It's a hack, and I don't want it to be necessary, but it will accomplish the desired goal.

</comment></comment></comment></comment><comment><USER8> I'm going to design a language called Original. The Original programming language.

</comment><comment><USER9> Does this use lazy or eager evaluation?

<comment><USER10> Eager. I think it compiles via C generated from its own compiler/typechecker, written in OCaml.</comment></comment>


Are We Running Out Of Scientific Geniuses? - <AUTHOR> http://www.popsci.com/science/article/2013-01/are-scientific-geniuses-extinct

<comment><AUTHOR> Link to abstract of underlying commentary article published in Nature:

[http://www.nature.com/nature/journal/v493/n7434/full/493602a...](http://www.nature.com/nature/journal/v493/n7434/full/493602a.html)</comment>


Male breast cancer: Developing drugs for treatment - <AUTHOR> https://www.fda.gov/regulatory-information/search-fda-guidance-documents/male-breast-cancer-developing-drugs-treatment <comment><USER2> I can't help but feel we need a lot more research into fasting as a Cancer treatment. There's definitely enough evidence to indicate a need for further study. But, nobody makes any money when you prescribe, "don't eat or drink anything with calories."</comment>


Mongodb - "grep" through a database - <AUTHOR> https://github.com/blowhacker/mongohelper Helper functions for the mongodb shell
1. db.grep() -Search through all fields in all collections in a database for a value. By default it searches only indexed fields. To include non-indexed fields, specify the second parameter as true.
2. db.collection.fields() -list all keys in a collection -by default, it only checks 10100 documents to get an exhaustive list, if you document varies across the collection, do: db.collection.fields(true)
https://github.com/blowhacker/mongohelper <comment><USER2> I just ran collection.fields() on a collection of books. Surprised to find keys that I didn't even know existed.</comment>


A Hole-in-One Idea (The Story of Geox Shoes) - <AUTHOR> http://online.wsj.com/article/SB20001424052748703630404575053433814783918.html

<comment><USER2> Oh, my goodness. I've been looking for something like this for a long time.

Thank you HN!

</comment><comment><USER3> I like my Geoxen. Definitely good for the hot-of-foot.</comment>


Ask HN for Help: Please help me find an iPad Safari scrolling expert - <AUTHOR>

We've got a very high profile client with a scrolling bug in an iPad-focused HTML5 site - and despite a lot of work, my team just can't solve it.
The client is getting desperate.
I'm to the point of begging for help on HN. I'm looking for someone who really knows their Mobile Safari stuff to do a bit of consulting on just one scrolling bug.
Of course we'll pay hourly for your help. Contact info is in my profile. <comment><AUTHOR> I hate to clog up HN with this kind of request, but it's the best place I can think of and I'd like to think I've contributed enough over the past few years to call in a group favor. :)</comment>