Random Link ¯\_(ツ)_/¯ | ||
Jun 6, 2022 | » | Perspectives on Software Engineering
4 min; updated Jan 9, 2025
On the Clean Code Movement Good enough is good enough. The architectural choices and bugs in the implementation tend to be more impactful, so focus more on those. Be conservative in what you consider technical debt. It should be something that slows down current/future changes, and not code that doesn’t “feel nice”. A code base that is free if technical debt is likely over-emphasizing polish over delivery. Abstractions and indirections in the name of future-proofing tend to be wrong especially when treading new paths, where you can’t reliably predict the future.... |
Dec 24, 2024 | » | Using LLMs to Enhance My Capabilities
3 min; updated Dec 25, 2024
LLMs are increasingly here to stay despite the reservations . How can I use them to enhance my capabilities? Building complete applications, e.g., a trivia-like game with Python’s Flask web server. Makes it cheap to prototype in cases where the technology behind the prototype matters much less than the content or problem being solved. As a tutor for new technologies/framework. Although React might be new to you, it’s not new to other people.... |
Jun 9, 2024 | » | Continuous Integration Tooling
4 min; updated Jun 9, 2024
What automatic tools can I add to keep code quality high? CodeQL CodeQL is a tool that runs variant analysis on code. The idea is that we create a query from a known vulnerability, e.g., SQL injection, and then run it against a codebase to find instances of that vulnerability. GitHub authorizes the use of CodeQL for public repos, and so we are covered . ql-analysis.sh has a recipe for running the analysis locally in the repo.... |
Apr 27, 2024 | » | Markup Features
4 min; updated Apr 27, 2024
Syntax Highlighting Previously, we’d highlight code on the client by loading src/lib/highlight.pack.js, a bundle downloaded from but served from our domain, and then execute hljs.highlightBlock on demand, e.g., on page load, when showing a card, etc. This doesn’t work well with a web-component-centric design. Running hljs.highlightBlock through possible Shadow DOM boundaries is a hassle. Back in 2018 , we installed highlightjs, a shim for the official HighlightJS.... |
Jul 4, 2020 | » | On Socio-Economic Classes
13 min; updated Nov 24, 2023
#meritocracy #inequality #socioeconomics Our Lot in Life Not recognizing your blessings feeds into the dark side of capitalism and meritocracy: success is a choice, and that those who haven’t achieved success are not unlucky, but unworthy. I’m relatively lucky. I don’t know how much of the techie hubris that I bear. I have unresolved feelings about meritocracy and fairness. Race is usually used as a proxy for bridging the gap, e.... |
May 2, 2020 | » | On Learning
11 min; updated May 27, 2023
Mental Attitude While Learning Distinguish Mere Facts From Conclusions or Opinions Discriminate between mere statements of facts, necessary conclusions which follow therefrom, and mere opinions which they seem to render reasonable. There’s no need to perform an experiment to verify that the atomic weight of oxygen is 16. That the sum of the angles of a plane triangle equals two right angles is not a mere fact, but an inevitable truth.... |
Apr 26, 2020 | » | Philanthropy
4 min; updated Feb 19, 2023
Criticism/Defense Of Billionaire Philanthropy Taxes will probably not go to the same causes, e.g. reforming the bail system, grassroot efforts for migrants, etc. Admittedly, these are things that the government should be doing, but it seems that the government doesn’t do enough. Furthermore, some of these issues so politicized, e.g. immigrants, that government support can be fickle. Foundations are more effective than governments as they do their due diligence, e.... |
Jun 15, 2021 | » | Thoughts on Academic Research
7 min; updated Dec 3, 2022
Going to a talk is difficult for everyone because nobody understands the whole thing, but it’s especially difficult for undergraduates because they still expect to. is a rich resource for understanding scholarly literature. Browse it. Some of the listed items are familiar, e.g. Google Scholar, SCImago, Sci-Hub, but it’d be informative to zoom out to the larger picture, e.g. good alternatives to Google Scholar. Why Even Read Papers?... |
Jul 5, 2020 | » | Of Code Smells and Hygiene
10 min; updated Nov 30, 2022
#code-hygiene Pick up from: IEEE’s International Conference on Software Maintenance Improving Code: The (Mis)perception of Quality Metrics Springer’s Software Quality Journal On Abstractions If you find yourself adding more parameters and if-statements to an existing abstraction, is the abstraction still apt? Why not remove the old abstraction and re-extract a new [more apt] abstraction? Devs frequently succumb to the sunken cost fallacy thinking that there must have been a reason that the code was written in a certain way.... |
Feb 12, 2020 | » | Financing the Disadvantaged
4 min; updated Nov 29, 2022
Short Term Loans A common narrative for loan providers is financial inclusion. 69% of global adult population is not covered by credit bureaus. Using non-traditional data (e.g. text messages, location, contacts, call logs), more people can get scored. If only \(x\%\) of people pay you back, then \(\frac{x}{100}(1 + r) \ge 1 \) suggests \(r \ge \frac{100}{x} - 1 \). If \(75\%\) tend to pay back, \(r = 33\frac{1}{3} \%\).... |
Nov 28, 2022 | » | C++ Meta-Programming
4 min; updated Nov 28, 2022
Clang, LLVM, GCC, and MSVC LLVM is an umbrella project, with several sub-projects, e.g. LLVM Core and Clang. LLVM Core libraries provide an optimizer and code generator for different CPUs. Clang is an “LLVM native” C/C++/Objective-C compiler which aims for fast compilation, useful error and warning messages, and a platform for building source-level tools. The Clang Static Analyzer and clang-tidy are examples of such tools. So if I were to create a programming language, I can define a transformation into LLVM intermediate representation (LLVM IR), and that will make use of LLVM core to optimize it?... |
Jun 11, 2022 | » | Testing Your Code
8 min; updated Nov 19, 2022
Why Write Tests Helps catch bugs in the code, and in the programmer’s mental model of what the code does. The later a bug is caught in the development cycle, the more expensive it is to fix it. A good test today is a future debugging session saved. The test is the first client of your code. It uncovers sub-optimal design choices, tight couplings, missed cases, etc.... |
May 21, 2018 | » | Bad Blood [Book]
(27 items)
00. Prologue; 01. A Purposeful Life; Bad Blood [John Carreyrou]; 02. The Gluebot; 03. Apple Envy; 04. Goodbye East Paly; 05. The Childhood Neighbor; 06. Sunny; 07. Dr. J; 08. The miniLab; 09. The Wellness Play; 10. Who Is LTC Shoemaker?; 11. Lighting a Fuisz; 12. Ian Gibbons; 13. Chiat\Day; 14. Going Live; 15. Unicorn; 16. The Grandson; 17. Fame; 18. The Hippocratic Oath; 19. The Tip; 20. The Ambush; 21. Trade Secrets; 22. La Mattanza; 23. Damage Control; 24. The Empress Has No Clothes; Epilogue; |
Apr 24, 2020 | » | On Data Science
1 min; updated Sep 18, 2022
Data Science: Reality Doesn’t Meet Expectations Execs frequently ignore data science research when making decisions. Data is often dirty, or insufficient to make decisions about majority of the users. Sometimes the infrastructure is poor - SQL queries take hours. Data Scientists are usually the only ‘data person’ on the team. Tons of request from teams, and most of the work is repetitive and ‘easy’. Measuring impact is hard - especially on dollars that were hypothetically saved but never spent.... |
Apr 11, 2020 | » | APIs Are Not In the Efficiency Business
3 min; updated Sep 5, 2022
CityFlo Reduces Google Maps API Bill by 94% Google Directions API limited their free tier . CityFlo uses this API to calculate ETAs. Initially, CityFlo queried the API every time a stop was registered. This was the problem. The number of API calls should be dependent on the stops themselves, not the buses. For an MVP, sure - make that query - but if you’re running a growing business, those calls add up!... |
Jan 3, 2021 | » | Writing for Software Development
3 min; updated Sep 5, 2022
MUST and MUST NOT; On Writing Documentation Revise documentation, many times, and on separate days to catch confusing parts. Beware of ambiguities, e.g. X may not do Y. Refer to definitions, e.g. RFC 2119 . Put yourself into different roles, e.g. the person just looking for samples, the person who wants to read up on every nook and crany, the person who has no technical background etc.... |
Jan 3, 2021 | » | Information Retrieval Medley
3 min; updated Sep 5, 2022
Pagination with Relative Cursors Exposing pagination through URLs like example.com/items?page=25&limit=100 leads to SQL like SELECT * from 'items' LIMIT 100 OFFSET 2400;, which inefficiently goes through 2,500 records and discards the first 2,400. With relative cursors, we have URLs like example.com/items?limit=50&lastID=XXX, which leads to SQL like SELECT * from 'items' WHERE 'id' > XXX ORDER BY 'id' ASC LIMIT 50, and this is more efficient, assuming there are indexes for id.... |
Jun 15, 2018 | » | U.S. Files Criminal Charges Against Elizabeth Holmes and Ramesh Balwani [WSJ]
2 min; updated Sep 5, 2022
U.S. Files Criminal Charges Against Elizabeth Holmes and Ramesh Balwani. John Carreyrou. www.wsj.com . news.ycombinator.com . Jun 15, 2018. (Ask HN) Holmes has 200 Patents. If tech didn't work, why not noticed? news.ycombinator.com . Jun 18, 2018. Theranos Lessons. Morgan Housel. www.collaborativefund.com . Jun 19, 2019. This CEO is Out for Blood. Roger Parloff. www.fortune.com .... |
Jun 25, 2018 | » | IBM Watson's Health Saga
2 min; updated Sep 5, 2022
Layoffs at Watson Health Reveal IBM’s Problem with AI. Eliza Strickland. spectrum.ieee.org . news.ycombinator.com . Jun 25, 2018. Jefferies gives IBM Watson a Wall Street reality check. John Mannes. techcrunch.com . news.ycombinator.com . Jul 13, 2017. IBM acquired Phytel, Explorys and Truven for their troves of healthcare data and proprietary analytics. From 2010 to 2015, IBM has spent +$15bn and Watson is still not profitable.... |
Apr 18, 2020 | » | Miscellaneous Topics
1 min; updated Sep 5, 2022
Personalizing Your Shell Put all of your scripts in the ~/bin/ directory, and add ~/bin/ to your path. Beware of conflicting with system commands. One alternative is to prefix your commands with a comma. References Start all of your commands with a comma. Brandon Rhodes. rhodesmill.org . news.ycombinator.com . Aug 18, 2009. |
Apr 18, 2020 | » | Economics in the Real World
3 min; updated Sep 5, 2022
Protectionism vs. Globalization Prestige Ameritech is America’s #1 maker of surgical masks. In outbreaks, demand peaks, but when it’s all over, hospitals go back to exclusively buying cheaper masks from China. Reduced demand makes Ameritech lay off workers. Ameritech is pushing for a federal contract to stabilize demand over time. India’s Foreign Exchange Act of 1973 gave Coca-Cola an ultimatum: hand over 60% of the local subsidiary to Indian partners and the syrup recipe.... |
Apr 29, 2020 | » | Free Speech in Cyberspace
6 min; updated Sep 5, 2022
Should Platforms Be Neutral? Facebook banned praise, support and representation of white nationalism and separatism, because the two concepts cannot be meaningfully separated from white supremacy and organized hate groups. Furthermore, people that search for related terms will have “Life After Hate” suggested to them. Part of me is uncomfortable. Sure, Facebook is trying to do the right thing here. What if Facebook was replaced by some tyrannical government that censors opposition?... |
May 6, 2020 | » | COVID-19
3 min; updated Sep 5, 2022
Contact Tracing “Apps” in this context means contact tracing apps released by public health authorities to do contact tracing. The APIs are limited to them. Big Picture Release APIs to enable apps to interoperate between Android and iOS devices. Bluetooth-based contact tracing baked into Android and iOS, such that no app is needed for broadcasting/listening. This ensures broad adoption, but will be on an opt-in basis.... |
Jul 5, 2020 | » | Startup Ideation
4 min; updated Sep 5, 2022
How to Get Startup Ideas Err on the side of having competitors, but make sure that you have a thesis that everyone else is overlooking, e.g. Google wasn’t averse to users leaving google.com ASAP. The Startup Idea Matrix, ( B2B Edition , B2C Edition ) is a good start for knowing who to google. Big companies tend to be slow at changing their approach.... |
Dec 15, 2020 | » | Politics Potpourri
3 min; updated Sep 5, 2022
State Surveillance In the aftermath of the Capitol insurrection, FBI was contacting people whose cellphones pinged cell towers near the Capitol during the riots. #state-surveillance A powered mobile phone always sends signals to one of the closest base stations. Given multiple base stations, the angle and time of arrival, and location signatures of each cell location can be used to locate a mobile device. The higher the density of cell towers, the more precise the calculated location.... |
Dec 18, 2020 | » | Lean Startups vs. VC Money
2 min; updated Sep 5, 2022
20 years later, JetBrains is valued at $7b without taking VC money. HN users praise JetBrains for being user-focused, and the prevailing argument is that VC money comes with growth-hacking attached. Is the Lean Startup Dead? Katzenberg (Paramount, Disney Studios & DreamWorks) has raised $1.75b for NewTV, a startup banking on consumers wanting a subscription for 10-minute programs on mobile. They renamed to quibi.com/ . At least that makes them more searchable on Google.... |
Jan 4, 2021 | » | Privacy on the Web
2 min; updated Sep 5, 2022
One can use curl -v <url> to see all of the redirections and cookies set. found that generating a tiny URL for Zoom links gives a URL that first goes to redirect.viglink.com. I tried this on https://tinyurl.com/yyte6pqv, which points to https://www.c13u.com/socioeconomics/2020-11-21-experiments-in-social-economics/, but didn’t observe any 3rd party cookies. tinyurl.com did set a cookie, but that’s probably expected. proposes Federated Learning of Cohorts, which aims to enable ad-targeting based on people’s general browsing interest without exposing the exact browsing history.... |
Oct 12, 2021 | » | Evolution
3 min; updated Sep 5, 2022
Why Birds Can Fly Over Mount Everest uses a captivating narrative style to elaborate on a complex question. The exposition makes the scientific parts memorable. features a good anecdote of insight favoring the prepared. On a jog in London in January, probably primed by reading Nick Lane’s Oxygen, he noticed that there were some bar-headed geese. These geese migrate between India and Kazakhstan/Mongolia, necessitating a flight over the Himalayas, sometimes at 28,000 feet.... |
Oct 28, 2021 | » | Socio-Economic Equity in Tech
7 min; updated Sep 5, 2022
When it comes to STEM diversity goals, Asian American and Pacific Islander (AAPI) tends to be excluded from the URMs under discussion, e.g. . However, AAPI as a blanket term obscures the struggles of member groups, e.g. \(62\%\) of AAPI adults aged 24 and older have an associate’s degree or higher, compared to 28% of Native Hawaiians and Pacific Islanders of the same age. AA comprises \(\approx 50\) ethnic groups, while PI has \(\approx 20\).... |
Dec 24, 2021 | » | Projects That Never Made It
5 min; updated Sep 5, 2022
Startups tend to fail more often than they succeed. However, a lot of startup advice is given by those who made it, and therefore prone to survivorship bias. Hearing from founders that gave it their all but never succeeded should be enlightening. I expect reasons like misunderstanding the customer, sunk costs, running out of money (especially with societal pressures like a family to fend for), wrong time, etc. I’d categorize my flashcards web app as a project that never made it.... |
Jan 22, 2019 | » | Privacy in CS and in the Law
4 min; updated Sep 5, 2022
Incomplete List of Information Privacy Properties Control/consent, e.g. Cambridge Analytica exfiltrating FB users' data Discussion on Cambridge Analytica Anonymity, e.g. Snowden leaking NSA docs without revealing his identity Limits on data collection, e.g. laws restricting government surveillance Limits on data use, e.g. US Genetic Information Nondiscrimination Act of 2008 Under GINA, health insurers must not use genetic information of the clients (or clients family) to inform their policy.... |
Feb 14, 2020 | » | Signal Is Finally Bringing Its Secure Messaging To the Masses [Andy Greenberg]
3 min; updated Sep 5, 2022
Signal Is Finally Bringing Its Secure Messaging To the Masses. Andy Greenberg. www.wired.com . it.slashdot.org . news.ycombinator.com . Feb 14, 2020. Attracting the Masses Brian Acton (WhatsApp cofounder) injected $50m into the Signal Foundation, allowing them to grow from 3 to 50 full-timers. You’d think that at Signal’s dominance, getting $$$ shouldn’t be a problem. But VCs expect a multiple return and Signal doesn’t look like it will monetize soon.... |