Sunday, May 31, 2020

Areas of Knowledge and Education

There are many topics I'm interested in learning about but they fall into five categories:
  • Theoretical topics (e.g science) - It's interesting to learn about the world even if I probably won't make new scientific discoveries myself. This category is the main focus of schools, but usually without checking whether the students are interested in learning them.
  • Practical relevance to world (e.g politics) - learning these topics isn't something I can practically use, but it can affect how I vote, and one individual can influence other people. Even one blog post can have an impact!
  • Practical skills - These can be a specific skill relevant to one's career (e.g software development) or generally useful skills (e.g. typing). This could also include general-purpose abilities such as thinking rationally. 
  • Interpersonal skills (e.g public speaking) - these are also the subject of many self-help books
  • 'Intrapersonal' skills - this includes practical areas like time management and learning techniques, as well as skills for living a happier or more meaningful life, such as Stoicism or meditation. This could potentially include being a good person more generally.
Schools focus on theoretical topics but have very few classes dedicated to Interpersonal and Intrapersonal skills. Most people don't manages to pick up all these skills on their own so it's something a good education system could potentially help with.

Note that many subjects can contain topics in multiple categories. For example you can learn algorithms to practically apply them and also learn the mathematical theory behind them. While some theory may be always be required, a good education system would let people choose to focus on more practical areas if they prefer.

In future posts I'll outline actual topics in more detail and what I'd like to learn more about them. While it will be a personal list, these outlines could also serve as a potential topics that educational systems could offer.

Wednesday, May 27, 2020

Silver Bullets in Software Development

No Silver Bullet
In the 1986 Essay No Silver Bullet, Fred Brooks argued that nothing would provide a tenfold improvement in software development within a decade:
But, as we look to the horizon of a decade hence, we see no silver bullet. There is no single development, in either technology or in management technique, that by itself promises even one order-of-magnitude improvement in productivity, in reliability, in simplicity. 
He divided software development into essential and accidental difficulties:
  • essential ones are required due to the complexity of the problem itself - the software needs to satisfy a "conceptual construct" in a precise manner
  • accidental ones (like determining the correct syntax) are incidental to the problem and can become simpler with better hardware and software techniques.
Accidental difficulties had been reduced to such an an extent by 1986 that Brooks argued most software development dealt with essential complexities that could not be removed. While incremental progress would be possible, revolutionary "silver bullets" were impossible. Brooks reiterated his claims in 1995, but it's worth revisiting again. Have there been any silver bullets since then? How much of software development today deals with essential vs. accidental problems?

Silver Bullets. Photo Credit: Money Metals, Flickr

Software Development Today
On one hand there has been a tremendous amount of progress in speeding up development and in focusing on the essential problems:
  • Google and StackOverflow let one quickly find answers to questions
  • Open source libraries allow for broad code re-use
  • Cloud services like AWS make it easier to launch in production
  • Frameworks like Ruby on Rails provide default assumptions so the engineer can focus on defining the product
On the other hand it seems like much of engineering work today, particularly at large companies, deals with complex issues not connected directly to defining a product:
  • As products grow to encompass multiple teams, applications may be split into sub-applications for each team, but integrating them together adds additional layers of complexity
  • Integration tests involve so many systems that they're a constant point of failure, and often adding or updating a feature can require more time dealing with tests than with the actual code
  • As products grow larger and scale to more users, engineers spend more time on smaller optimizations
The move from desktop applications to the web also added new layers of complexity:
  • Application logic needs to be replicated on both the server and client side 
  • Every language and framework needs to be converted to Javascript, an unusual choice for an "assembly" language
  • Since application data isn't generally stored on the client, latency becomes a constant issue
Depending on where one draws the dividing line, these problems can be considered either essential or accidental. While they do not deal with specifying the product itself, they arise from the size of the teams or from the technologies involved. Software development still deals with both the essential aspects of specifying a product and the many nuts and bolts of making it work correctly in the real world. 

A Silver Bullet 
There is a silver bullet that has completely revolutionized development - machine learning. Brooks had specifically dismissed AI as a silver bullet since back then AI meant "heuristic" or rule-based programming, where each product would still need all its details specified:
The techniques used for speech recognition seem to have little in common with those used for image recognition, and both are different from those used in expert systems. I have a hard time seeing how image recognition, for example, will make any appreciable difference in programming practice. The same problem is true of speech recognition. The hard thing about building software is deciding what one wants to say, not saying it. No facilitation of expression can give more than marginal gains.
Enter machine learning (ML), particularly deep learning with neural networks. Now the same overall techniques can be used for both speech recognition and image recognition. One no longer needs to decide precisely what "one wants to say", one just specifies a goal and given enough data, the neural networks will figure out the details. Systems that involved years of coding before can be replaced with a machine that learns on its own. For example, AlphaZero was able to learn chess by playing itself for a few hours and then it beat the best existing chess software. Programmers had spent decades improving chess software with hand-written heuristics, but machine learning outplayed them all. 

What's next
Despite the amazing progress of ML, most areas of software development do not have enough data to truly benefit from it, so they still have the same overall structure and process as years ago. What then are the next areas of progress?
  • Assisted programming - generating a program from a product definition has always been a dream (even mentioned by Brooks), and there's been recent progress. For the near future, humans are still needed to specify the nitty gritty details in code. But online resources like StackOverflow and Github (besides company's internal codebases) contain enough data that search and ML algorithms will be able to assist in this process. A significant part of programming can be finding an example and modifying it for one's purpose, so even a better search alone will speed up overall development.
  • Much of programming consists of plumbing - connecting databases to an application, determining how to summarize the data, deciding how to display it in a UI. Since some of this is very standardized, companies can choose to use "low code" tools to build them, using products built for that purpose (e.g. from Salesforce) or even just advanced spreadsheets (Airtable). While visual programing does not contain the power and flexibility for building large applications, some products have much smaller scopes.
  • Some application plumbing will no longer be necessary for other reasons - ML will take over optimizing certain goals from humans, so a user interface will no longer be needed. For example, when an ad campaign runs on ML, much less knobs and dials need to be created for users. The system just takes in a budget and perhaps a goal to optimize for. In some cases, developers may still create tools for users to interface with the ML system, but in other cases the system will be a fully automated blackbox. Developing user interfaces might remain the same, but what interfaces are needed will change.
In short, software development will continue to make incremental progress in some areas and add accidental complexity in other areas, while some areas will be completely revolutionized by ML.





Sunday, May 24, 2020

Bryan Caplan on Who to Blame for Poverty

Bryan Caplan spoke today at an online SlateStarCodex / LessWrong meetup about his upcoming book Poverty: Who To Blame. Here's a brief summary of his talk and book, with my comments in italics. (Note: I think this summary is mostly accurate but I missed some of the Q&A and may have missed or misunderstood other parts.)

He first discussed consequentialism:
  • He recognized that his rationalist audience is mostly consequentialist / utilitarian, but he doesn't think anyone actually lives like that; in practice people care about what others deserve. If your friend needs help, you'll help them more if they didn't bring the bad circumstances on themself, people care about "just deserts".
    • It seems this could be factored in to a consequentialist framework as a way to encourage better behavior from your friends.
  • In discussions of policy, consequentialists often just focus on the [short-term] outcomes and don't care about the value of letting people help themselves. While consequentialists could in theory care about this, in practice they don't.
    • Why are people being too consequentialist in practice now when they weren't in the last bullet? I think Caplan thinks people are too short-termed consequentialist when it comes to public policy, but not in their own lives. If this short-term thinking is a real issue, maybe consequentialists should adopt virtue ethics for its better consequential outcomes. ~
He then discussed the topics from his upcoming book.
  • Corporations - People think that third-world countries suffer from the exploitation of international corporations, but in practice there isn't that much formal employment in poorer countries overall, and even less from the large companies. Instead, most employment is "incompetent self-employment" where people run their own business even though they don't have the skills to do so. (Interesting data, though maybe it could be called "sub-optimal self-employment".) In reality, large companies help a country since they pay more wages than people would otherwise earn and provide better job security. Most of the progress in the last 50 years is from normal economic development, not philanthropy. 
  • Housing regulation - people know how much regulation affects costs in the Bay area, but there's similar issues throughout the world. Even India (which has high rates of homelessness) over-regulates housing. The iron-fisted governments prevents people from helping themselves. There should not be zoning laws that prevent tall buildings or multifamily homes. Some cities are getting so expensive that people are moving to cheaper less productive cities.
    • Caplan thinks that neither cities nor countries should restrict who can move in. It seems reasonable to reduce many zoning restrictions in cities, though there can be collective risks from concentrating so many people in one area. For example, New York has not fared well in this pandemic, imagine if they were even more crowded.
    • Expensive cities aren't necessarily more productive, they often pay higher wages for the same output due to higher cost of living and market conditions. If remote work continues to grow, it's possible that cities (and even countries) may not continue to have as disparate wages in the future.
  • World poverty - As discussed in his book "Open Borders", the first world makes poverty worse in the third world by not letting people immigrate freely to the first world. When someone moves to the US they can make 10x more and be 10x as productive. If you focus on why a person is poor, you'll often find it's laws that caused it. If a father favored his son in a competition, people think it's unfair, why do they allow countries to favor their own citizens. Kuwait is better than the West in this matter, they let people immigrate, they just don't give them benefits.
    • A father can favor his son for his own company, so it seems reasonable that a country can favor their own citizens for the country's own resources. While a pure effective altruist would treat everyone in the world the same, people generally favor their own citizens over citizens of other countries (just like people generally care about "just deserts"). One could even argue that if countries weren't responsible for their own citizens, it would create the wrong national incentives since governments could offload their troubles elsewhere (though this would depend on what benefits the other countries provide to immigrants.)
    • Liberal democracies would feel uncomfortable not giving benefits like welfare to legal immigrants, but Caplan the libertarian has less qualms about it, and here it seems his position would help the poor more. But realistically Western countries are unlikely to create separate classes like Kuwait, and otherwise the math of paying for all the benefits can't work out.
He then discussed the most controversial part of his book, the responsibility the poor themselves have.
  • When you bring up blame, people say you're blaming the victim, you're blaming the poor. But much of his book blames government regulations, not the poor.
  • However, one reason for poverty is irresponsible behavior from the poor themselves: The poor have the highest percentage who are out of the workforce, i.e. not even looking for a job. They have more irresponsible sexual behavior and more dangerous alcohol and substance abuse.
  • What should you do about people causing their own poverty? At minimum you should prioritize other people who are not causing own problems. But also you don't need to feel guilty for people who are messing up own lives.
He didn't discuss that many in the audience might not believe in free will so they would still think that you should help people who made poor choices. Regardless of one's views on free will, certainly individuals have different natures and nutures and some might struggle to succeed when other people find it easy. While it's fair to factor in how things like welfare can distort incentives to work, it seems extreme to not actively help the poor. 



Friday, May 22, 2020

Coronavirus - Evidence and Restrictions

  • When learning topics of theoretical interest, one should learn from established science. There's enough established science that's interesting, why bother with the speculative stuff? However, when something is practically relevant but the facts are not known, you can't just wait for things to be proven. You need to use the best info and probabilities you have and act accordingly. This is something many people fail to realize.
    • For example, the WHO initially said there was "no clear evidence of human-to-human transmission of the novel coronavirus". Even if there had been no solid evidence, it would still make sense to suspect human-to-human transmission and take proper precautions instead of "not recommend[ing] any specific health measures for travellers" and being "against the application of any travel or trade restrictions on China" (link).
    • The WHO recommendations about masks was even more "radically conservative". They continued to insist for months that there was no evidence that wearing masks would help prevent the spread of the virus. But one can't wait for a double-blind study to test whether masks work. One needs to look at the empirical data available, such as the reduced spread of the virus in mask-wearing countries, or the best arguments available, such as the plausible reduction in the spread of droplets when people wear masks.
  • If people had acted earlier in those cases, many lives could have been saved. But it doesn't mean we should now go the opposite extreme and recommend everyone remain in total isolation for months.
    • There is reasonable evidence that the virus primarily spreads from being indoors with someone for a while or from things like shouting and singing (besides coughing and sneezing of course). People who are careful could still meet outside in certain cases.
    • Many people who live alone are both very unlikely to have the virus and very unlikely to spread it to the elderly or other high-risk people. Such individuals shouldn't feel like they're in solitary confinement but should be able to meet with specific individuals in a careful manner. 
    • Governments should not just add every restriction possible and think this will keep people safe. There's a Talmudic statement "כל המוסיף גורע" - "whoever adds [restrictions], detracts" since people will treat all restrictions in the same manner and not be careful even for the important ones. Government policies need to focus on strongly enforcing important restrictions while allowing other low-risk activity to resume.

Monday, May 18, 2020

Science - New or True?

  • People often quote news articles about recent developments in science as if a new Truth was discovered. Health studies are a particularly popular topic.
    Studies show ad lib
  • However, most studies are false, and most news articles (particularly headlines) misquote or exaggerate them, and most people misquote or exaggerate the news article or headline. The probability the person is saying something true is low, say 40% * 40% * 40% = 6% (± 5%). 
  • If one wanted to learn about the world, it would be better to learn more established science that is very likely to be True.
  • While books and courses are a good way to learn knowledge, people are often interested in short tidbits instead. For example, see all the blogs and magazines that just publish the same thing about cleaning your house or being productive.
  • It's less common that media or people discuss established facts in science. But people should feel free to publish, share and discuss interesting things they've found out about nature. While it may not be new it's more likely to be true.

Sunday, May 17, 2020

Book Review: Meditations

  • Meditations by Marcus Aurelius (Penguin Edition) is the personal diary of Marcus Aurelius, Roman emperor from 161 to 180 CE. It's interesting how an emperor from over 18 centuries ago could still be considered relevant today. He was a follower of the Stoic philosophy of life and much of the book consist of his exhortations to himself.
  • I wouldn't recommend this book as a practical guide to Stoicism however. While the Penguin translation is OK, translations can sound stilted especially when the original text is from 1800 years ago. Some of the book's examples can be hard to relate to today, and other times there are no examples at all. Since the book was just written as notes to himself, it's often disorganized and repetitive.
  • To get a gist of the work, you can just read excerpts from it, such as Chapter 2 or 9. If you don't care about using a more modern translation or footnotes, you can get free translations online (such as the MIT version). To get a modern take on Stoicism, I recommend A Guide to the Good Life: The Ancient Art of Stoic Joy.
  • Themes
    • Marcus had some doubts about his religious beliefs but argues that his principles are true either way. For example, he often mentions the question of whether nature is unified/intelligent (as the Stoics argued), or random atoms (as per the Epicureans).
    • The key principle of Stoicism is that external circumstances cannot determine how you feel, your own mind is in charge:
      > Today I escaped from all bothering circumstances - or rather I threw them out. They were nothing external, but inside me, my own judgements.
    • Another related principle is that nature is good and there's no reason to be upset about what happens, that's just the way things are. Marcus mentions this often about death, and the final chapter focuses on this topic.
    • He often mentions how you shouldn't get too upset about things since in the grand scheme does it really matter? Zoom out and see how small everything is. Also, everyone will be dead soon anyways, and forgotten. But don't worry about that since that's just the course of nature.
      In man's life his time is a mere instant, his existence a flux, his perception fogged, his whole bodily decomposition rotting, his mind a whirling, his fortune unpredictable, his fame unclear. To put it shortly: all things of the body stream away like a river, all things of the mind are dreams and delusion; life is warfare, and a visit in a strange land; the only lasting fame is oblivion.

      What then can escort us on our way? One thing, and one thing only: philosophy. This consists in keeping the divinity within us inviolate and free from harm, master of pleasure and pain, doing nothing without aim, truth, or integrity, and independent of others' action or failure to act. Further, accepting all that happens and is allotted to it as coming from that source which is its own origin: and at all times awaiting death with the glad confidence that it is nothing more than the dissolution of the elements of which ever living creature is composed. Now if there is nothing fearful for the elements themselves in their constant changing of each into another, why should one look anxiously in prospect at the change and dissolution of them all? This is in accordance with nature: and nothing harmful is in accordance with nature. (End of Ch. 2)
       (Review also posted on Goodreads)

Thursday, May 14, 2020

Google picking

  • P-hacking is fishing around in data until you find a "significant" p-value so you can find an exciting claim, publish your paper and get tenure
  • Let's define Google-picking as trying out different Google searches until you find a result that says what you want it to say
  • To deal with issues like P-hacking, some institutions now require publication of all experiments and analysis performed or pre-registration of the proposed studies
  • If someone cites an obscure internet result to support their claim, they could be suspected of Google picking and should be required to "publish" what searches they performed
  • In all cases, the claim needs to be evaluated on it's own merit (and one's own searches) regardless of how the data backing it was discovered

Wednesday, May 13, 2020

Studies on Studies on Slack

  • SlateStarCodex published a new essay on Studies on Slack, here's a summary with some examples highlighted:
    • He discusses how competitive pressure can make things improve, but if there's some "slack" from this pressure,  an organism or organization can pursue longer-term goals.
    • Starts by discussing evolution, but then gives examples in Capitalism, history, Civilization (the game), civilization (itself), the spread of ideas, etc. 
    • Gives example of Italy vs. Switzerland to suggest that maybe a little warfare can help with ideas.
    • Gives example of Sears where apparently the CEO thought there should be more internal competition, but it didn't work out.

  • I don't think the Italy vs. Switzerland example demonstrates much
    • it's not a large sample, there were many other differences between them, and the Swiss produced stuff too
    • It would always have been better and led to more progress if countries didn't kill each other and looked for other ways to compete, like the modern Western world does (or like Isaiah envisioned)
  • Trade is great but it also has many inefficiencies since it requires negotiations to get the right price and diligence to evaluate the service done, so adding too much intra-company competition sounds like a bad idea.
    • A company succeeds in part because people work together for a certain goal without trying to cut corners at every opportunity.
    • If everything is entirely based on getting a good performance evaluation, there will be too many attempts to game it. 
    • On the other hand, if there's no evaluations and the company just relies on selfless dedication, free-riders will bring the company down in the long term.
    • An economy overall requires even more "evaluation" (i.e negotiated prices) since it's an even larger group where people feel even less commitment to the collective and where there's less implicit evaluation of one's performance. This is why communism failed, but a small startup can succeed

Tuesday, May 12, 2020

Write something each day

  • I should try to post something short and quick each day
  • It can be a random thought or something interesting I've read
  • To make it easy, I'll just aim for 3-4 bullet points in each post and 3-4 posts a week