July 13th, 2016 — hardware
I wrote a post on embeddedrelated.com about hardware bugs - places where they're rarely to be found, places which they inhabit in large quantities, and why these insects flourish in some places more than others.
It's one of these things that I wish I was told when I started to fiddle with this shit – that while a chip is monolithic from a manufacturing point of view, from the logical spec angle it's a hodgepodge of components made and sold by different parties with very different goals and habits, tied together well enough to be marketable, but not enough to make it coherent from a low-level programmer's point of view. In fact, it's the job of the few low-level programmers to hide the idiosyncratic and buggy parts so as to present a coherent picture to the many higher-level programmers - the ones whose mental well-being is an economically significant goal.
June 30th, 2016 — OT
I wouldn't spam you with these job offers if didn't work :-) So, we're looking for senior IT people to work at our Jerusalem offices – managers and hands-on people alike. We have rapid growth, "Big Data" (it definitely is crash Excel - in fact, at one point it was close to physically crashing through the floor due to the storage servers' weight, but luckily that's been handled), "HPC" (biggish server farms, distributed build & tests, etc.), and many other buzzwords . I don't know where IT ends and DevOps starts but I guess a good candidate could have either in their CV, so there.
If you have qualified friends looking for a challenging, well-paying job at a fun place, send their CVs, the sooner the better – we're in a hurry (rapid growth!), so early birds are more likely to get the can of worms. As always, "challenging" is a downside as much as an upside (a place where IT means Exchange, SAP and little else might pay very well for a more predictable and less demanding job.)
We value experience in building and maintaining non-trivial systems, and technical reasoning (X happens because of Y, Z is most efficient if you use it to do W, etc.) We also value experience in higher-level areas such as management and purchasing, and business reasoning (don't hook X and Y together since their vendors compete and will sabotage the project, Z beats W in terms of total cost of ownership, etc.) We do kinda lean towards thinking of technical aptitude as a cornerstone on top of which solid higher-level expertise is built. (We've seen managers snowed by vendors, reports, etc., which is a perennial problem in tech at large and isn't restricted to IT.)
If you'd like to hear more details, please email Yossi.Kreinin@gmail.com
 what we don't have is a heavy-duty web site/application, which might make the position less relevant for some.
June 24th, 2016 — animation
First of all, I proudly present a 2-minute short that I animated!
…And the same thing on YouTube, in case one loads better than the other:
One thing I learned making the film is that my Russian accent colors not only my words, but any noise coming out of my mouth. So I'm not the most versatile voice actor.
Anyway, we certainly have a debt crisis, and easy credit policies keep producing still more debt. I don't think interest rates have ever stayed so low for so long, everywhere.
Economists argue both for and against debt expansion , as they argue about everything.
My own take is as simple as my sparse knowledge ought to make it:
- Unprecedented conditions produce unprecedented outcomes.
- Booms are usually gradual, and busts are sudden.
No unusual boom has gradually arisen from unusual monetary policy, and it's been a while. But something unusual ought to happen in unusual conditions! Thus one expects a sudden, unusual bust down the road.
That's it. It's like a physicist's proof  that one's attractiveness peaks at some distance from the observer. At the distances of zero and infinity, visual attractiveness is zero (you can't see anything.) Therefore, attractiveness as a function of distance has a maximum somewhere in between. True, kinda, and it didn't take a lot of insight into the nature of attractiveness – much like my peak debt proof doesn't require an understanding of the economy .
Will today's "Brexit" trigger the global downturn predicted by Yossi Kreinin's Rule of Unprecedented Conditions? Probably not by itself. I think it's a symptom more than a cause , and the big bad thing comes later.
In the meanwhile, here's to hoping that my little film (started when "Grexit" was a thing, completed just in time for Brexit) was funnier than the average forward from grandma .
Happy Brexit! And if you follow people on Twitter, there's a strong case for following me as well.
 Bibliography: Nobody Understands Debt except Krugman; Does Krugman Understand Debt?
 I think a particular famous physicist said it, but I forget who.
 …and I can't say I have any understanding of the economy. That said, I've owed and paid off a lot of debt, and got to negotiate with many bankers. And I can tell you that "debt is money we owe to ourselves", Krugman's catchphrase, feels unconvincing to creditors – as many people and whole nations have found out.
 In fact, I just got an email from an asset manager saying that it's good for the UK in the longer run, elevating Brexit from a symptom to a cure. But he didn't say "good for everyone", and then I'm not sure his crystal ball is better than yours or mine.
 I linked to /r/forwardsfromgrandma since, regardless of the politics of either its members or their grandmas, I ought to give credit for the brilliant term – it's definitely funny because it's true. I've watched many relatives acquire the habit of forwarding various wingnut stuff as they age. Most frighteningly, my own urge to email such things gets harder to resist every year. I can sense my own ongoing grandmafication; between you and me, an animated short about debt might be a part of "it." Scary, scary stuff.
June 1st, 2016 — wetware
Now you see that evil will always triumph, because good is dumb.
– Dark Helmet
Evildoers live longer and feel better.
My writing has recently prompted an anonymous commenter to declare that people like me are what's wrong with the world. Oh joy! – finally, after all these years of doing evil, some recognition! Excited, I decided to share one of my battle-tested evil tips, which never ever failed evil me.
Don't work on "easy" things
An easy thing is a heads they win, tails you lose situation. Failing at easy things is shameful; succeeding is unremarkable. Much better to work on hard things – heads you win, tails they lose. Failure is unfortunate but expected; success makes you a hero.
Treat this seriously, because it snowballs. The guy working on the "hard" thing gets a lot of help and resources, making it easier to succeed – and easier to move on to the next "hard" thing. The guy doing the "easy" tasks gets no help, so it's harder to succeed.
Quotation marks all over the place, because of course what counts is perception, not how hard or easy it really is. The worst thing to work on is the hard one that's perceived as easy – the hard "easy" thing. The best thing is the easy "hard" one. My years-long preference for low-level programming results, in part, from its reputation of a very hard field, when in practice, it takes a little knowledge and a lot of discipline – but not any outstanding skills.
(Why then do many people fear low-level programming? Only because of how hard it bites you the first few times. People who felt that pain and recoiled respect those who've moved past it and reached productivity. Now you know why people take shit from the likes of Ken Thompson and Linus Torvalds, and then beg for more.)
The point where this gets really evil is not when a heroic doer of hard things decides to behave like a Torvalds. That's more stupid than evil. You'll get away with being a Torvalds, but it always costs some goodwill and hence, ultimately, money. So the goal-oriented evildoer always tries to be on their best behavior.
No, the point where this gets really evil is when you let them fail. When they come to you thinking that it's easy, and you know it's actually very hard, and you turn them down, and you let them fail a few times, and you wait until they come back with a readjusted attitude - that's evil.
Here, the evildoer needs to strike a delicate balance, keeping in mind The Evildoer's Golden Rule:
- You can only sustain that much do-gooding; however,
- Your environment can only take that much evildoing, and you need your environment.
Here's the rule applied to our situation:
- Working on the hard "easy" thing – all trouble, no credit – is going to be terrible for you. You'll get a taste of a do-gooder's short, miserable life.
- However, if this thing is so important that a failure would endanger the org, maybe you should be the do-gooder and save them from their misconceptions at your own expense. Maybe. And maybe not. Be sure to think about it.
The upshot is, sometimes the evildoer gets to be the do-gooder, but you should know that it's hazardous to your health.
Making easy things into hard ones: the postponing gambit
Sometimes you can't weasel out of doing something "easy." An interesting gambit for these cases is to postpone the easy thing until it becomes urgent. This accomplishes two things at a time:
- Urgent things automatically become harder, a person in a hurry more important. The later it's done, the easier it is to get help (while retaining the status of "the" hero in the center of it all who made it happen.)
- Under time pressure, the scope shrinks, making the formerly "easy" and now officially "hard" thing genuinely easier. This is particularly useful for the really disgusting, but unavoidable work.
But it is a gambit, because postponing things until they become urgent is openly evil. (Avoiding easy things is not – why, it's patriotic and heroic to look for the harder work!) To get away with postponing, you need an excuse:
- other supposedly urgent work;
- whoever needing this thing not having reminded you;
- or even you having sincerely underestimated the difficulty and hence, regrettably, having postponed it too much – you're so sorry. (This last excuse has the drawback of you having to admit an error. But to the extent that urgency will make the scope smaller, the error will become smaller, too.)
One thing you want to prevent is people learning to remind you earlier. The way to accomplish it is being very nice when they come late. If people feel punished for reminding too late, they'll come earlier next time, and in a vengeful mood, so with more needless tasks. But if they're late and you eagerly "try to do the best under the circumstances", not only do you put yourself under the spotlight as a patriotic hero, you move the forgetful culprit out of the spotlight. So they'll form a rosy memory of the incident, and not learn the value of coming earlier – precisely what we want.
One thing making the postponing gambit relatively safe is that management is shocked by the very thought of people playing it, as can be seen in the following real-life conversation:
Babbling management consultant: A lot of organizations have a problem where they only work on urgent things at the expense of important, but less urgent ones.
Low-ranking evildoer manager (in a momentary lapse of reason): Why, of course! I actually postpone things to get priority around here.
Higher-ranking manager (in disbelief): You aren't serious, of course.
Low-ranking evildoer (apparently still out to lunch): I am.
Higher-ranking manager (firmly): I know you aren't.
Low-ranking evildoer finally shuts his mouth.
See? Sometimes they won't believe it if you say to their face. So they're unlikely to suspect you. (Do people reporting to me play the postponing gambit? Sometimes they do, and I don't resent them for it; their priorities aren't mine. But at the worst case, you should expect a lot of resentment – it's practically high treason – so you should have plausible deniability.)
To a very large extent, your productivity is a result of what you choose to work on. Keep things perceived as easy out of that list. When you can't, postponing an "easy" thing can make it both "harder" and smaller.
Happy evildoing, and follow me on Twitter!
May 19th, 2016 — OT
Unlike most positions mentioned here, this one includes the possibility of working remotely (certainly from Europe and I think from elsewhere, too), with occasional visits to Jerusalem.
Functional safety experts with automotive experience are generally rare and in demand, meaning that
- they're probably gainfully employed, and
- I'm not counting on one of them reading this blog.
However, I imagine that a friend of a safety expert might be among my readers. If you're that reader, you can tell your friend the safety expert that we're very eager to hire them, and will go a long way to make an attractive proposition.
We particularly value experience at the chip/ASIC side of things (translating ISO 26262 requirements to actionable guidelines on hardening the design in question, together with a verification methodology and the required safety documentation.) We also value recommendations from designers who had to follow the expert's guidelines, as well as experience in presenting safety cases to customers.
May 13th, 2016 — wetware
The whole "passionate about work" attitude irks me out; save your passion for the bedroom. This is not to say that I'd rather be ridiculed for being a nerd who works too hard.
In fact, personally I'm in a strange position of a certified programming nerd with a blog and code on github, who nonetheless does it strictly for the money (I'd be a lawyer or an i-banker if I thought I could.) I'm thus on both sides of this, kinda.
So, in today's quest to change society through blogging, what am I asking society for, if neither passion nor scorn for work please me? Well, I'd rather society neither encourage nor discourage the love of work, and leave it to the individual's discretion.
From a moral angle, I base my belief on the Biblical commandment, "love thy neighbor", which I think does not dovetail into "love thy work" for a reason. From a practical angle, again I think that one's attitude to coworkers (also managers, customers and other people) is a better predictor of productivity than one's attitude to work.
People talk a lot about intrinsic vs extrinsic motivation – passion vs money - but I think they're actually very similar, and the more important distinction is personal vs social motivation.
Why? Because whether I work for fun or for the money, it's a means to my own personal end, which in itself precludes neither negligence nor fraud on my behalf. What makes you do the bits of work that are neither fun nor strictly necessary to get paid is that other people need it done, and you don't want to fail them.
Perhaps you disagree with my ideas on motivation. If so, here's an idea on boundaries that I hope is uncontroversial. Telling me how I should feel about my job infringes on my boundaries, which is to say that it's none of your business. If however I do a shoddy job and it becomes your problem, then I'm infringing on your boundaries, so you're absolutely entitled to complain about it. Here again requiring respect for coworkers is sensible, while requiring this or that attitude towards the work itself is not.
- Someone's attitude towards work does not predict the quality of their work
- Inquiring reports and potential hires about their attitude towards work is a minor but unpleasant harassment
- A corporate culture of "we're doing this thing together" beats both "we're passionate to change the world by advancing the state of the art in blah blah" and "we're laser-focused on fulfilling customers' requirements on time and within budget"
P.S. Which kind of culture do managers typically want? Often they're schizophrenic on this. They want "passionate" workers, hoping that they'll accept less money. On the other hand, the same person often doesn't care about the actual work in the worst way (he sucks at it and not having to do it anymore is management's biggest perk to him.) But what he cares about is deadlines, etc. - so he encourages a culture of shipping shit in the hope that it sorts itself out somehow (these are the people that the term "technical debt" was invented for, of course nobody is convinced by this pseudo-businessy term if they weren't already convinced about the underlying idea of "shipping shit is bad.") Of course a truly passionate worker is going to suffer mightily in the kind of culture created by the same manager who thinks he wanted this worker.
January 31st, 2016 — hardware
I've often read arguments that computing circuitry running at a high frequency is inefficient, power-wise or silicon area-wise or both. So roughly, 100 MHz is more efficient, in that you get more work done per unit of energy or area spent. And CPUs go for 1 GHz or 3 GHz because serial performance sells regardless of efficiency. But accelerators like GPUs or embedded DSPs or ISPs or codecs implemented in hardware etc. etc. – these don't need to run at a high frequency.
And I think this argument is less common now when say GPUs have caught up, and an embedded GPU might run at the same frequency as an embedded CPU. But still, I've just seen someone peddling a "neuromorphic chip" or some such, and there it was – "you need to run conventional machines at 1 GHz and it's terribly inefficient."
AFAIK the real story here is pretty simple, namely:
- As you increase frequency, you GAIN efficiency up to point;
- From that point on, you do start LOSING efficiency;
- That inflection point, for well-designed circuits, is much higher than people think (close to a CPU's frequency in the given manufacturing process, certainly not 10x less as people often claim);
- …and what fueled the myth is, accelerator makers used to be much worse at designing for high frequency than CPU makers. So marketeers together with "underdog sympathizers" have overblown the frequency vs efficiency trade-off completely out of proportions.
And below I'll detail these points; if you notice oversimplifications, please correct me (there are many conflicting goals in circuit implementation, and these goals are different across markets, so my experience might be too narrow.)
Frequency improves efficiency up to a point
What's the cost of a circuit, and how is it affected by frequency? (This section shows the happy part of the answer – the sad part is in the next section.)
- Silicon area. The higher the clock frequency, the more things the same circuit occupying this area does per unit of time – so you win!
- Leakage power – just powering up the circuit and doing nothing, not even toggling the clock signal, costs you a certain amount of energy per unit of time. Here again, the higher the frequency, the more work gets done in exchange for the same leakage power – again you win!
- Switching power – every time the clock signal changes its value from 0 to 1 and back, this triggers a bunch of changes to the values of other signals as dictated by the interconnection of the logic gates, flip-flops – everything making up the circuit. All this switching from 0 to 1 and back costs energy (and NOT switching does not; measure the power dissipated by a loop multiplying zeros vs a loop multiplying random data, and you'll see what I mean. This has implications for the role of software in conserving energy, but this is outside our scope here.) What's the impact of frequency on cost here? It turns out that frequency is neutral - the cost in energy is directly proportionate to the clock frequency, but so is the amount of work done.
Overall, higher frequency means spending less area and power per unit of work – the opposite of the peanut gallery's conventional wisdom.
Frequency degrades efficiency from some point
At some point, however, higher frequency does start to increase the cost of the circuit per unit of work. The reasons boil down to having to build your circuit out of physically larger elements that leak more power. Even further down the frequency-chasing path come other problems, such as having to break down your work to many more pipeline stages, spending area and power on storage for the intermediate results of these stages; and needing expensive cooling solutions for heat dissipation. So actually there are several points along the road, with the cost of extra MHz growing at each point – until you reach the physically impossible frequency for a given manufacturing process.
How do you find the point where an extra MHz isn't worth it? For synthesizable design (one created in a high-level language like Verilog and VHDL), you can synthesize it for different frequencies and you can measure the cost in area and power, and plot the results. My confidence of where I think the inflection point should be comes from looking at these plots. Of course the plot will depend on the design, bringing us to the next point.
Better-designed circuits' optimal frequency is higher
One hard part of circuit design is, you're basically making a hugely parallel system, where many parts do different things. Each part doing the same thing would be easy – they all take the same time, duh, so no bottleneck. Conversely, each part doing something else makes it really easy to create a bottleneck – and really hard to balance the parts (it's hard to tell exactly how much time a piece of work takes without trying, and there are a lot of options you could try, each breaking the work into different parts.)
You need to break the harder things into smaller pipeline stages (yes, a cost in itself as we've just said – but usually a small cost unless you target really high frequencies and so have to break everything into umpteen stages.) Pipelining is hard to get right when the pipeline stages are not truly independent, and people often recoil from it (a hardware bug is on average more likely to be catastrophically costly than somewhat crummier performance.) Simpler designs also shorten schedules, which may be better than reaching a higher frequency later.
So CPUs competing for a huge market on serial performance and (stupidly) advertised frequency, implementing a comparatively stable instruction set, justified the effort to overcome these obstacles. (Sometimes to the detriment of consumers, arguably, as say with Pentium 4 – namely, high frequency, low serial performance due to too much pipelining.)
Accelerators are different. You can to some extent compensate for poor serial performance by throwing money at the problem - add more cores. Sometimes you don't care about extra performance – if you can decode video at the peak required rate and resolution, extra performance might not win more business. Between frequency improvements and architecture improvements/implementing a huge new standard, the latter might be more worthwhile. And then the budgets are generally smaller, so you tend to design more conservatively.
So AFAIK this is why so many embedded accelerators had crummy frequencies when they started out (and they also had apologists explaining why it was a good thing). And that's why some of the accelerators caught up – basically it was never a technical limitation but an economic problem of where to spend effort, and changing circumstances caused effort to be invested into improving frequency. And that's why if you're making an accelerator core which is 3 times slower than the CPU in the same chip, my first guess is your design isn't stellar at this stage, though it might improve – if it ever has to.
P.S. I'll say it again – my perspective can be skewed; someone with different experience might point out some oversimplifications. Different process nodes and different implementation constraints mean that what's decisive in one's experience is of marginal importance in another's experience. So please do correct me if I'm wrong in your experience.
P.P.S. Theoretically, a design running at 1 GHz might be doing the exact same amount of work as a 2 GHz design – if the pipeline is 2x shorter and each stage in the 1 GHz thing does the work of 2 stages in the 2 GHz thing. In practice, the 1 GHz design will have stages doing less work, so they complete in less than 1 nanosecond (1/1GHz) and are idle during much of the cycle. And this is why you want to invest some effort to up the frequency in that design – to not have mostly-idle circuitry leaking power and using up area. But the theoretically possible perfectly balanced 1 GHz design is a valid counter-argument to all of the above, I just don't think that's what most crummy frequencies hide behind them.
Update: here's an interesting complication – Norman Yarvin's comment points to an article about near-threshold voltage research by Intel, from which it turns out that a Pentium implementation designed to operate at near-threshold voltage (at a near-2x cost in area) achieves its best energy efficiency at 100 MHz – 10x slower than its peak frequency but spending 47x less energy. The trouble is, if you want that 10x performance back, you'd need 10 such cores for an overall area increase of 20x, in return for overall energy savings of 4.7x. Other points on the graph will be less extreme (less area spent, less energy saved.)
So this makes sense when silicon area is tremendously cheaper than energy, or when there's a hard limit on how much energy you can spend but a much laxer limit on area. This is not the case most of the time, AFAIK (silicon costs a lot and then it simply takes physical space, which also costs), but it can be the case some of the time. NTV can also make sense if voltage is adjusted dynamically based on workload, and you don't need high performance most of the time, and you don't care that your peak performance is achieved at a 2x area cost as much as you're happy to be able to conserve energy tremendously when not needing the performance.
Anyway, it goes to show that it's more complicated than I stated, even if I'm right for the average design made under today's typical constraints.
December 31st, 2015 — wetware
The fish rots from the head down.
– A beaten saying
People generally don't do what they're told, but what they expect to be rewarded for. Managers often say they'll reward something – perhaps they even believe it. But then they proceed to reward different things.
I think people are fairly good at predicting this discrepancy. The more productive they are, the better they tend to be at predicting it. Consequently, management's stated goals will tend to go unfulfilled whenever deep down, management doesn't value the sort of work that goes into achieving these goals.
So not only is paying lip service to these goals worthless, but so is lying to oneself and genuinely convincing oneself. When time comes to reward people, it is the gut feeling of whose work is truly remarkable that matters. And what you usually convince yourself of is that the goal is important – but not that achieving it is remarkable. In fact, often someone pursuing what you think are unimportant goals in a way that you admire will impress you more than someone doing "important grunt work" (in your eyes.)
You then live happily with this compartmentalization – an important goal to be achieved by unremarkable people. However, nobody is fooled except you. The people whose compensation depends on your opinion have ample time to remember and analyze your past words and decisions – more time than you, in fact, and a stronger incentive. And so their mental model of you is often much better than your own. So they ignore your requests and become valued, instead of following them and sinking into obscurity.
- A manager truly appreciates original mathematical ideas. The manager requests to rid the code of crash-causing bugs, because customers resent crashes. The most confident people ignore him and spend time coming up with original math. The less confident people spend time chasing bugs, are upset by the lack of recognition, and eventually leave for greener pastures. At any given moment, the code base is ridden by crash-causing bugs.
- A manager enjoys "software architecture", design patterns, and language lawyer type of knowledge. The manager requests to cooperate better with neighboring teams who are upset by missing functionality in the beautifully architected software. People will tend to keep designing more patterns into the program.
- A highly influential figure enjoys hacking on their machine. The influential figure points out the importance of solid, highly-available infrastructure to support development. The department responsible for said infrastructure will guarantee that he gets as much bandwidth, RAM, screen pixels and other goodies as they can supply, knowing that the infrastructure he really cares about is that which enables the happy hacking on his machine. The rest of the org might well remain stuck with a turd of an infrastructure.
- A manager loathes spending money. The manager requires to build highly-available infrastructure to support development. People responsible for infrastructure will build a piece of shit out of yesteryear's scraps purchased at nearby failing companies for peanuts, knowing that they'll be rewarded.
- A manager is all about timely delivery, and he did very little code maintenance in his life. The manager nominally realizes that a lot of code is used in multiple shipping products; that it takes some time to make a change compatible with all the client code; and that branching the entire code base is a quick way to do the work for this delivery, but you'll pay for the shortcut many times over in each of your future deliveries. People will fork the code base for every shipping product. (I've seen it and heard about it more times than the luckier readers would believe.)
And so it goes. If something is rotten in an org, the root cause is a manager who doesn't value the work needed to fix it. They might value it being fixed, but of course no sane employee gives a shit about that. A sane employee cares whether they are valued. Three corollaries follow:
Corollary 1. Who can, and sometimes does, un-rot the fish from the bottom? An insane employee. Someone who finds the forks, crashes, etc. a personal offense, and will repeatedly risk annoying management by fighting to stop these things. Especially someone who spends their own political capital, hard earned doing things management truly values, on doing work they don't truly value – such a person can keep fighting for a long time. Some people manage to make a career out of it by persisting until management truly changes their mind and rewards them. Whatever the odds of that, the average person cannot comprehend the motivation of someone attempting such a feat.
Corollary 2. When does the fish un-rot from the top? When a manager is taught by experience that (1) neglecting this thing is harmful and (2) it's actually hard to get it right (that is, the manager himself, or someone he considers smart, tried and failed.) But that takes managers admitting mistakes and learning from them. Such managers exist; to be called one of them would exceed my dreams.
Corollary 3. Managers who can't make themselves value all important work should at least realize this: their goals do not automatically become their employees' goals. On the contrary, much or most of a manager's job is to align these goals – and if it were that easy, perhaps they wouldn't pay managers that much, now would they? I find it a blessing to be able to tell a manager, "you don't really value this work so it won't get done." In fact, it's a blessing even if they ignore me. That they can hear this sort of thing without exploding means they can be reasoned with. To be considered such a manger is the apex of my ambitions.
Finally, don't expect people to enlighten you and tell you what your blind spots are. Becoming a manager means losing the privilege of being told what's what. It's a trap to think of oneself as just the same reasonable guy and why wouldn't they want to talk to me. The right question is, why would they? Is the risk worth it for them? Only if they take your org's problem very personally, which most people quite sensibly don't. Someone telling me what's what is a thing to thank for, but not to count on.
The safe assumption is, they read your mind like an open book, and perhaps they read it out loud to each other – but not to you. The only way to deal with the problems I cause is an honest journey into the depths of my own rotten mind.
P.S. As it often happens, I wanted to write this for years (the working title was "people know their true KPIs"), but I didn't. I was prompted to finally write it by reading Dan Luu's excellent "How Completely Messed Up Practices Become Normal", where he says, among other things, "It’s sort of funny that this ends up being a problem about incentives. As an industry, we spend a lot of time thinking about how to incentivize consumers into doing what we want. But then we set up incentive systems that are generally agreed upon as incentivizing us to do the wrong things…" I guess this is my take on the incentives issue – real incentives vs stated incentives; I believe people often break rules put in place to achieve a stated goal in order to do the kind of work that is truly valued (even regardless of whether that work's goal is valued.) It's funny how I effectively comment on Dan's blog two times in a row, his blog having become easily my favorite "tech blog", while my own is kinda fading away as I spend my free time learning to animate.
December 25th, 2015 — wetware
…or at least an attempt at a balanced approach.
Do your own math
Dan Luu has recently published a great piece arguing that working for a big company will on average net you more money than working for a startup. If his math makes sense for you, so does his conclusion.
For me personally the math is different. I live in Israel, where a programmer's salary is very unlikely to surpass $150K/year, and $100K/year is pretty good. On top of that, taxes are higher, while prices aren't much lower overall, AFAIK. Based on Dan's numbers, a senior engineer working for Google at their Mountain View site might be able to save $3M in 10-12 years. His colleague at the Tel Aviv site might take 30 years to save that amount. And while a startup might pay less than Google, the difference will be much less than 2x, and nothing near the 3x-5x multiples mentioned in Dan's post.
Did I land at a startup because I figured the stock options were valuable? No, definitely not. In fact, while I was granted some laughable amount of stock options, I had no idea how it all worked – strike price, vesting, I didn't even know those words. How did I end up with the job then? I'll tell you how.
At the time nobody, and I mean nobody, would hire me. In hindsight, the reason was as obvious as it was misguided. They wouldn't hire me because I projected a large degree of mental imbalance. They were misguided because in terms of performance/price, I was solid gold. I'd work as hard as you can imagine for peanuts, and, nuttiness of youth aside, I knew my shit. I often wonder if today's me would hire then's me. I know I should, but I'm not sure I would.
6 months passed, and not a single job offer. To cheer myself up, I'd send SMSes to friends which supposedly parodied my missives to potential employers, along the lines of "Hi, my name is Shitface McArsefuck. Do you happen to be in need of a programmer?" And so it went from bad to worse, until EB called.
EB was among the tiny number of people I "networked" with in the university. I originally contacted him to get advice on building a 3D scanner from a commodity camera and clever software that reconstructs 3D geometry from images. (He immediately explained why it wouldn't work. Then I somehow convinced him to spend the next 3 months on a failed attempt to do this.)
And now he recommended me to this startup which he just joined. And I passed the interview, nuttiness and all, no doubt because of that recommendation.
My point being, maybe you just happened to land at a startup because it so transpired. Maybe you didn't pass the interviews at the big companies for some transient reason, maybe you'd pass them a year later but right now you didn't. Maybe the startup is right near your home and your friends work there. Whatever the reason, right now you're there.
The question now is, should you ignore the equity part of your compensation? And the answer, of course, is…
Do your own math
Here are some points to consider:
- A lot of the problems with equity are solved by getting more equity. It doesn't help if the stock ends up completely worthless. But dilution, a long time spent waiting for the IPO, a high strike price, and, in some scenarios, liquidation preferences – all of these problems are helped a lot by having more equity.
- They call stock options a lottery ticket. I call it insurance. It sucks to have worked at a startup which did make it big and to not have made anything off it. Incidentally, I know quite a lot of people who either forfeited their stock options or sold them very cheaply, on the theory that equity is worthless. Trust me, if you're working for a startup, this is the one accident you want to be insured against.
- Who has invested in this company at the latest round? VCs often lose their entire investment. On the other hand, investment banks like Goldman Sachs tend to make money, and so do investment management firms like BlackRock. Sounds obvious – and yet I knew people with more financial literacy than myself who'd say "how much more can this stock go up?" after GS or BlackRock invested in the company. The right answer is that now it will most definitely go up, albeit perhaps by a smaller percentage than in previous rounds. Which brings us to the next point:
- Percentages are not absolute amounts, and you care about the latter. If the stock goes from $1 to $10 (a "large" 900% increase), you get $9 when you exercise the option. If it goes from $50 to $70 (a "small" 40% increase), you get $20. Sounds obvious – and yet I knew people who're way better at math than me, who preferred tiny cash raises to sizable stock options grants, right after an investment round involving firms which rarely lose money, on the theory that "the stock is too expensive already."
- These days it takes companies a lot of time to go public. As an employee, it largely works to your advantage. It gives you time to become valuable and to then ask for more equity. To a private company, even one with serious late-stage investors, equity is still pretty cheap, and there are few enough employees for some to have gained significant bargaining power. So it might be sensible to initially ignore equity and mainly ask for cash raises – the company is too likely to tank at this stage, while your bargaining position isn't good enough to get enough equity for it to matter anyway. Later on, when your salary gets closer to the ceiling, and the stock becomes more valuable, and you will have become more valuable to the company, ask for equity. (The downside of asking later, of course, is that they give increasingly less of their increasingly more valuable stock over time. But the difference in bargaining position might be larger than this unfortunate effect.)
- To actually negotiate more equity, to a first approximation, you must be ready to leave over this point. Leaving might mean losing whatever stock options you already have. This is where the advice of people who tell you to ignore equity paradoxically comes in handy! (I do know people who managed to find an outside investor who helped them buy their stock options; whether you can legally do this in your particular case is a question to a lawyer.)
- The variance in options-based compensation is vastly larger than the variance in salary. One reason is that stock options are very cheap for private companies, and it's therefore their preferred way to motivate their favorite employees. I suspect that another reason is, you getting 10x my salary tends to piss me off much more than you getting 10x the stock options. Right now you can't spend the stock options, so there will be no changes to your lifestyle signaling to me that you're better off than me, and then even if I knew, I might not care as much about stock options, which might, after all, be worthless. The upshot is, if you want to increase inequality in the world by getting an outsized compensation for your supposedly outsized contribution, stock options are your #1 route.
One point on equity negotiations
All the usual advice on negotiation, of which I'm hardly a good source, applies here. But on top of that there's one specific point when it comes to equity and it's this.
Suppose the party line is, this company will be worth $50B, but you think it'll be worth $20B (right now it's valued at $10B.) And let's say you want to ask for enough stock options to net you $1M.
The wrong thing to do is argue that the company will be worth $20B, and ask for an amount netting you $1M on that theory. They'll tell you that you're wrong, that it'll be worth $50B, and here's 1/4th of what you ask for, and it'll net you your $1M.
The right thing to do is tell them you want to end up with $4M (or better yet, $8M) and ask for an amount netting you that, according to their $50B theory – in the hope of getting half of what you asked for, and then 1/4th the capital gain they predict, overall $1M.
Why? Because it's much, much easier to argue that your contribution is worth $8M and that you can make it elsewhere than it is to argue that the company isn't worth what they tell everyone it's worth. Of course your common sense cries foul at this: "but you can't make $8M elsewhere! And the company might end up worthless, for all we know! Surely arguing that it's not worth $50B is more sensible than arguing that you are worth $8M, because it isn't, and you aren't!"
Well, common sense is wrong, because common sense is not a salesman (in fact, it's a salesman's worst enemy.) "We're both unusually valuable" simply sells better than "neither of us is". So do go for the former.
Stock options have expiration dates. With the time it takes companies to file an IPO these days, yours might expire earlier. Don't miss that moment, and make sure they extend the date (a private company can easily do it.) Make sure to ask for the extension as early as possible – you never know what things will look like at a later date. While all is well, it's a trivial request. But not all is well at all times.
From competent programmers to terrible investors
It might well be that, having worked your ass off, and having negotiated a nice chunk of equity, you'll sell it at some early liquidity event for a fraction of the IPO price or some such. With this shit, trading skills/luck might dwarf the rest of your skills. A bit depressing, that. But don't get depressed. Here, I'll cheer you up. My name is Shitface McArsefuck. Do you happen to be in need of a programmer?
There are many schools of thought with respect to trading strategy. I recommend the following method:
- When you can, sell enough to get a sum of money that buys you something important. Something so important that, if you won't buy it now, and you won't get another chance, you will have a hard time forgiving yourself. That something can be a house, or enough money for some crazy trip you dream about, or enough money for "financial independence" according to your definition, whatever.
- If you're left with stock and selling it does not buy you something important, keep it, or sell in little bits, so that you spread out the selling of the whole amount over a long period of time.
- Try to not be fully vested at all times (your employer should be willing to help you with it), so that these rules don't result in the selling of everything at what in hindsight is a low price.
The point of this approach is to think hard about what you really want, and not miss a chance to get it. I expect it to net worse results on average than a strategy aiming at maximizing the mean profit, because it does not try to maximize the mean profit. What it does attempt to do is minimize regrets, and unlike maximizing strategies, it takes your personal priorities into account.
(Incidentally, the differences in personal priorities might make the best strategy for me a terrible strategy for you. The question isn't where the price will go – and BTW nobody can answer that, anyway – but what you need the money for. I wish I understood that before giving people what in hindsight was bad trading advice.)
I strongly recommend to refrain from selling everything upon the first opportunity under the assumption that diversified risk is always better than concentrated risk. People who understand the "rationality" of this argument should also understand that it's somewhat rational to spread the selling over some period of time, because stock prices tend to be volatile and you're rather likely to have sold at a bad moment.
More importantly, people underestimate their own irrationality. Yes, it's crazy to put a large amount of money in a single stock, but it does not follow that it's equally crazy to hold that stock. Stock analysts understand this, which is why they have a Hold rating – don't buy this stock, but if you already have it, don't sell it. Holding a position that you wouldn't buy makes perfect sense for a human, because a human tends to get very upset if they sell it and then the price goes way up. I say, unless selling it all right now is your way to buy something that you absolutely must buy, don't.
Are stock options worth it for employers?
Absolutely. It does nothing to motivate most but it does wonders to motivate some, and then it's really cheap for the employer.
Overall, if you're at a startup and there's no compelling reason to leave (as there might be if you can make $3M in 10 years at a big company, or start your own business, whatever), make sure to maximize your equity. From a regret minimization perspective, it's not a lottery ticket, but an insurance policy. If the company makes it, you will not be the one who came out with nothing. If it doesn't make it, at least you took a shot.
September 30th, 2015 — wetware
There's this guy I work with who has a head the size of a small planet. In that head, dozens of design decisions big and small are made every day. Hundreds of options clash in his mind: which gives us the best trade-off between 3 different desirable things? Or 5 things, or 12, as the case may be?
And the thing about this guy is, he'll always make the decision, because you must, because deadlines. So not the kind of guy who just gets stuck in the multitude of possibilities, nope, not him. BUT he's normally unhappy with the decision, because you see, there wasn't time to REALLY evaluate it PROPERLY.
So we've been working with this guy, and he'd often ask me to help decide something at his end.
At first I'd ask about the details, and I'd propose solutions. And he didn't seem very happy with that, and eventually he got seriously pissed off. That was when I asked for a really big new feature, and he said it wasn't doable, "forget it."
So I said, "let's see though, what makes this so hard? Because I'm willing to throw a lot of it out and do just the most bare-bones version. Maybe then it'd be doable." So I was helping him, I was willing to ask for less, right? So I sure didn't expect the outcome, which was, he rather forcefully said he couldn't work like that any longer, with no stable specs and no real schedule and it's just him doing this after all AND…
At this point I sorta gathered from the form and substance of his speech that I should back off, RIGHT NOW. I said, "look, if you add this, all I can say is, the whole thing will be much better. But if it can't be done, fine, we can live without it. It's entirely your call and I have nothing to add."
And then he did it. Not some bare-bones, half-assed version, mind you, he did a pretty impressive full-blown thing. Then he redid it to make it better still.
So clever me thinks to myself, aha! I see, so what annoyed him wasn't how I asked for this huge feature in itself. What annoyed him was me demanding him to tell why it was hard, so I could break it up into parts, and tweak it, and basically solve this myself. He didn't really mind solving it if he did it, provided that
- It was a request and not a "requirement" – because someone like me who doesn't really understand what goes into it has no right to just require it. You're not entitled to things you can't even comprehend, asshole!
- …and I wouldn't try to "help" him by attempting to remedy my ignorance at his expense, questioning him on the details and then hastily "making it easier" for him, without thinking deeply enough whether making it easier was even NEEDED, and so tricking him into making some pale no-good version of it! And then HE, because of ME, because of my impatient superficial "help", will have done a bad job! No, he doesn't want it easy, he wants it done right, so take a hike and give him time to decide what the right trade-off is, where to work harder and get more done and where to do less.
OK, so that's how it's gonna work from now on, I thought. From then on, if he wanted me to help him decide something, I'd just ask him what options he had in mind, regardless of what I could come up with myself. And I'd say this one sounds good.
This sort of worked, but he still didn't seem quite happy. And at one point he got pissed off and demanded explanations why I thought his option A was better than his option B. And I gave my explanations, and he thought they were shit. And I said, you know, A and B are both alright. Pick whichever you like better. "What?! So why did you just say that A was better?" "I dunno, I was wrong, you convinced me, it's a tough call."
Now I finally got it! So the way it works is, he thinks something through, for hours and days. If it's still a close call, he comes to me, whom he genuinely respects, and who's got the nominally higher seniority. What he comes to me for is superior wisdom. What he doesn't realize, out of excessive humility, is that there's no way I'll be better at deciding it than him, because he's better at it than me, and he's been thinking about it for so much longer.
And he only comes to me with what to him are the hardest things, guaranteeing that I won't be able to help, not really. So trying will just piss him off because I'll necessarily be suggesting some pretty dumb and superficial decision procedure, which is like helping Michelangelo with a sculpture by lending him a sledgehammer to just remove all that big chunk of stone over there.
So from then on I'd listen to his doubts, and agree that it's hard because of this thing we can't measure and that other thing we can't know, and say optimistically that either way I think it'll come out alright but it's his call, really. And he appeared very happy with my careful supervision of his work.
Bottom line for me was, I did very little hard thinking and a pretty cool project got done, I think, and the guy was happy, at least as much as he can be in this imperfect world. What's not to like?
The thing many of us managers don't like in such cases is, we seem to have added no value. Where's my chunk of value?
"He who does not work doesn't get to eat", they taught me in the USSR. "To capture value, add value" would be the translation of this slogan into MBA-speak. "By the sweat of your brow you will eat your food", says the Holy Bible. None of this prepares you for a managerial role, where not doing shit is usually better than trying too hard.
A manager on a mission to add value usually thinks that it's his job to have all the good and important ideas. Corollary: someone else having many of the good and important ideas means you, the manager, are bad at your job. Will you accept this and suffer silently, or will you convince yourself that the report's ideas aren't that good? You don't want to find out. I say, don't put yourself in this situation in the first place, don't try hard to have the good ideas, look at your ability to not do shit in return for a nice compensation as both your new virtue and your immense luck, and relax.
If you're really addicted to making tangible contributions, I suggest to do what I've been doing in managerial roles – do some of the work yourself. Now, this is, without doubt, terribly irresponsible, because it makes me unavailable at unpredictable moments. When shit hits the fan and I must attend to it in my contributor's role, it prevents me from attending to the never-ending fan-hitting shit that the people I manage deal with.
There's also an advantage, and that is that I know how much things really suck in the trenches. And that's good, and anyone overseeing less than 50-100 people should stay current that way, I think. But don't "stay current" by working on urgent mission-critical shit (as I often do, because I suck.) Pick something unimportant instead.
Anyway, working myself is immensely better than trying to have the good ideas myself, I believe. This can result in not being there when they need me, but it never results in being there when they don't, which is worse.
If it's not the deep thinking, then what do managers do, except for sitting on their asses? I started putting it down, and it didn't come out very well, and the reason ought to be that, well, I don't really get it at this point. I'm a middling manager, whose main skill is attracting strong people and then taking credit for their work. And this one managerial skill compensates for the underdevelopment of the rest so well that they, unfortunately, remain underdeveloped.
So until my understanding of the managerial role improves, the one thing I will say here is, many people actually don't do shit most of the time and it's fine – say, lifeguards. Why do you need them? Just in case. So that's one way I think about myself - I'm like a lifeguard, except for the physique. Maybe I should use the time freed up by not having to do deep thinking to work on my pectoral muscles, so that one day I could star in "Programmer Watch", a "Baywatch" rip-off about R&D management. But I keep my hopes low on that one.
I say, quit "adding value", fellow managers. Just sit back and take credit for others' work. They'll thank you for it.
P.S. angry hamster – this one's for you.