Mr_P's comments

Mr_P | 1 year ago | on: Ask HN: Can calculus be taught without differentiating or integrating by hand?

Years ago, my college multi variable calculus and linear algebra courses were both taught primarily using course materials that were interactive Mathematica Notebooks.

We had access to all of the symbolic algebra tools and were even expected to use them regularly for both courses. It was great!

I'm not sure how well this would extend to introductory courses though, especially if the standardized tests still expect integration by hand.

Mr_P | 3 years ago | on: How “let it fail” leads to simpler code

For all the hate that Java tends to get, the language natively supports this distinction between:

* Expected errors - Checked Exceptions

* Unexpected errors - Unchecked Exceptions

Idiomatic Java also makes heavy use of asserts, e.g. using the Guava Preconditions library.

Mr_P | 3 years ago | on: Tension Inside Google over a Fired AI Researcher’s Conduct

I think they should have let him publish the paper.

We've seen time and again that various trends in ML turn out to have actually been dead-ends.

A few examples: https://arxiv.org/abs/2102.06356 https://arxiv.org/abs/1905.03678

That said, I've also seen plenty of competitive drama in FAANG research labs, so this story is not hard to believe. More senior engineers often will use their seniority to power-grab control of projects. It sounds like Google execs did the right thing in the end.

Mr_P | 3 years ago | on: Code quality only matters in context (2019)

This is literally the 'O' in SOLID.

The key idea is to break code into "chunks" that each do one thing.

Then, if you have to add a new feature, it goes into another chunk, instead of editing/modifying existing code.

The same logic applies to system design at different scales, whether fine-scale OOP or coarser-scale (micro)service architecture. The ideal size of an individual "chunk" is somewhat subjective & debatable, of course.

It's like Haskell-style immutable data structures, but applied to writing the code, itself.

Mr_P | 3 years ago | on: “What if it changes?”

Microservices is just OOP/dependency-injection, but with RPCs instead of function calls.

The same criticisms for microservices (claims that it adds complexity, or too many pieces) are also seen for OOP.

Curiously, while folks sometimes complain about breaking up a system into smaller microservices or smaller classes, nobody every complains about being asked to break up an essay into paragraphs.

Mr_P | 3 years ago | on: Flags Are a Code Smell (2014)

It's not so much the existence of the flag, itself, but rather using an if-statement at the deepest-level of the call stack to conditionally modify behavior.

This talk gives a great overview of why boolean flags (rather, if-statements) can be a code smell: https://www.youtube.com/watch?v=4F72VULWFvc

OP's blogpost advocates for data-oriented design (e.g. Entity Component Systems) as a mechanism for avoiding this, whereas the talk I've linked advocates for OOP. Both mechanisms are equally valid (imho) and are inline with widely-adopted industry practices for software architecture.

Mr_P | 4 years ago | on: Drawing a circle, point-by-point, without floating point support

The author titled one of the sections "Midpoint circle algorithm".

There happens to be a Wikipedia page on "Midpoint circle algorithm": https://en.wikipedia.org/wiki/Midpoint_circle_algorithm

The page claims, "Bresenham's circle algorithm is derived from the midpoint circle algorithm."

The author of this blog post even made it clear, at the end of their article, that... "many explanations of midpoint algorithm use the final, optimized version. But I added several unoptimized steps."

I think there's a lot of value in a blogpost that demonstrates how someone could re-derive a widely-used algorithm from scratch.

Mr_P | 4 years ago | on: Ask HN: What do you do when competition signs up for your service?

> unless you have some indication people are increasingly picking the competitor over you, or especially and more simply leaving you in favour of the competitor.

If this happens, you've already lost. Software development has long lead-times. By the time there is significant customer attrition, bending the curve will be immensely difficult.

Good engineering strategy requires over-reacting to the right signals, and trends in the broader ecosystem are a wonderful source of signals. Large tech companies know this, and there's a reason why they'll quickly throw billion-dollar budgets behind exploratory efforts in response to competitors.

That said, it certainly depends on the industry. Some sectors are more fast-paced and competitive than others.

Mr_P | 4 years ago | on: C++ Modules Might Be Dead-on-Arrival (2019)

There's a 2016 CppCon talk here about making C++ Modules work at scale for Google's 100Mloc mono repo: https://www.youtube.com/watch?v=dHFNpBfemDI

So, apparently it can work. I don't don't how much Google's internal Module incarnation differs (if at all) from what was ultimately published in the standard, but I'd expect it to be similar.

The article discusses a problem of resolving dependencies between compiling different c++ files. I'm no expert, but I think this dependency graph is implicitly baked into the build system, with tool-assisted user-written bazel rules.

Mr_P | 4 years ago | on: Implicit In-order Forests: Zooming a billion trace events at 60fps

If generalized to 2D (and over the unit sphere), you'd get Google's S2 library (https://s2geometry.io/).

In 3D, the same can be done with morton codes (or a 3D hilbert curve) to build an implicit octree. Some raytracing systems use this for fast BVH construction.

In either case, this approach differs from mipmaps in that the underlying data can be sparse, and is simply stored in a sorted array.

Mr_P | 5 years ago | on: TSMC and Google push chipmaking boundaries with 3D 'stacking'

I wouldn't be surprised if Google's TPU's pushed them far over the edge on this. I'd bet TPUs running inference for Ads models can basically print money for the company.

They've also already been building their own network chips for some time. So, given the scale of their datacenters, I think it's entirely reasonable that they'd outpace nvidia.

Mr_P | 5 years ago | on: Using Vim for C++ Development

CLion (and other IDEs) have pretty good vim plugins: IdeaVim, VsVim , Vrapper.

They're not perfect, but I also made the switch from vim to CLion and never looked back. With a half-decent plugin for editing text, there's not much value in using a more minimalist vim setup IMHO.

page 1