HN user

davidcuddeback

1,516 karma

My name is David Cuddeback. My email address is <my-first-name> DOT <my-last-name> AT gmail DOT com

Or in BNF if you prefer:

    email      ::= <full-name> "@" <domain>
    full-name  ::= <first-name> "." <last-name>
    first-name ::= "david"
    last-name  ::= "cuddeback"
    domain     ::= "gmail.com"
Posts9
Comments468
View on HN

Would you use the Builder pattern if the language had named variables in arguments?

Yes, absolutely. I see it all the time in the Ruby ecosystem and have used it myself in Ruby. Many times it gets called by a different name. I've seen it in Python and Elixir too.

Sure thing! I'd reframe this as a nearest neighbor search over (start time, duration) tuples. KD trees are what I'm most familiar with for that problem, but there are others that would fit. Check out chapters 1 ("Multidimensional Point Data") and 3 ("Intervals and Small Rectangles") of Foundations of Multidimensional and Metric Data Structures: https://books.google.com/books?id=vO-NRRKHG84C&pg=PR9&source...

R-trees are more generic in that they can store intervals, shapes, volumes, etc, but (start time, duration) tuples are point-like, and that opens more possibilities. The ordered map is going to give you good memory locality. It might be that you'll only beat that when searching for larger durations (that require you to iterate over more of your ordered map). There will probably be an inflection point somewhere, depending on the distribution of your data and queries.

Hope that helps!

Elsewhere is the thread, it sounds like your range queries with inequality constraint might actually be a nearest neighbor query with inequality constraint. I'm not sure off the top of my head how feasible that would be with a priority search tree.

"Nearest gap" doesn't sounds like a range query to me. It sounds more like a nearest neighbor query. It sounds like you have (start time, duration) tuples and want to search for nearest neighbor on start time with an at-least-X constraint on duration. (start time, duration) is more point-like than interval-like (as far as data structures go), so anything that can handle nearest neighbor on point-like data would be a candidate. If this is an accurate mapping for your problem, you might check out KD trees. You'd probably have to write a custom tree traversal algorithm to query NN on one dimension and >X on the other, but I think it could be done. Sounds kinda fun.

Many range queries also have a minimum duration requirement, so it could be useful if a data structure could take advantage of this to quickly exclude intervals during the search.

Check out priority search trees. They search two dimensions, one of them being half-open (that would be your minimum duration requirement). Depends if the other half of your queries fits the closed dimension of a priority tree or if you can adapt it to fit your needs.

It's really going to depend on the queries that you want to optimize. I think the best help might be to point you to a book: https://www.amazon.com/Foundations-Multidimensional-Structur...

An RTree is the first structure that comes to mind, but the way you describe the problem, it sounds like the intervals never overlap, so I have my doubts. Sounds like you might be looking to optimize the query "what is the first interval of at least N days?" Maybe look at priority trees. They're good at queries that are bounded in one dimension and half-open in the other.

I've looked into some workshops, including his. It's not in the cards for me now, but something I'd like to do someday. I also enjoy coming back to the central coast (I went to college in SLO). Jory did some videos on his Hollister credenza for the TWW Guild. They captured (possibly unintentionally) the laid back central coast vibe with the open doors and the birds chirping in the background.

I'm not sure about the history of these words, but astronomy also uses the noun form: "occultation" [1], for which there's not an obvious equivalent for "occlude."

Did occult mean what it does now when they started?

A word can have more than one meaning. The first definition on merriam-webster.com covers the definition used in astronomy:

occult (v.): to shut off from view or exposure: cover, eclipse [2]

The adjective form might be a source of derivation for the meaning you're alluding to:

occult (adj.): (1) not revealed: secret; (2) not easily apprehended or understood: abstruse, mysterious; (3) hidden from view: concealed [2]

And finally, the paranormal meaning that people are more familiar with today:

occult (n): matters regarded as involving the action or influence of supernatural or supernormal powers or some secret knowledge of them -> used with the [2]

Again, I don't know the history of these words. If I had to hazard a guess, I'd bet that the noun form, "the occult", is derived from the adjective form since "the occult" refers to supernatural phenomena, which is naturally hidden from view, concealed, not revealed, secret, not easily apprehended or understood, etc (because it's not real).

Edit: Another guess. If you think about the history of astronomy, it was originally intertwined with religion and astrology. Perhaps these words date back to a time when "the occult" and astronomy weren't entirely separate. Anyways, I agree. Language is strange.

[1] https://en.wikipedia.org/wiki/Occultation

[2] https://www.merriam-webster.com/dictionary/occult

Physical can be understood to mean "of or relating to matter and energy or the sciences dealing with them, especially physics." Light, temperature, and time are described by physics, so I would consider "physical" to be an accurate adjective for those units. You seem to be using a more limited definition of physical, closer to the word "spatial."

Also, btw, you might want to read the article you linked. The article is discussing a fringe idea that some scientists have. Scientists are free to explore new ideas, and they make for good click bait for science journalists. Until those ideas gain traction, they don't provide for compelling arguments, though.

A similar thing happened in my community (not historically prone to wildfire) on December 30, 2021. 1000 homes destroyed. Fortunately far fewer casualties. Similar proximate causes (100+ mph winds and historically dry vegetation). I remember some outlets making a big deal about the possibility of this becoming a new normal due to climate change. It was (to my knowledge) the first wildfire attributed to climate change.

https://www.colorado.edu/today/2022/01/25/what-marshall-fire...

My dining table. It's a trestle design, made from walnut, breadboard ends, wedged and drawbored tenon joinery for the base assembly, and large enough to fit 10-12 people around for Thanksgiving. The lumber cost $1,400 and it took over a month to build, but it really transformed our dining room.

Some day, I look forward to building a guitar and a telescope, either of which have the potential to take that title away from my dining table, but that will be several years down the road for me.

If all countries were like Bangladesh, it would cause massive issues in addition to what we have now.

Isn't that exactly what they're representing by a country's overshoot day? FTA:

A country’s overshoot day is the date on which Earth Overshoot Day would fall if all of humanity consumed like the people in that country.

Wow, no. Just no. That's not how research is done. What you're describing sounds more like writing a clickbait article than writing a research paper. Writing a research paper in that manner would damage the researcher's credibility. A good research paper does lead with a discussion of related research and methodology and is careful to not accidentally make unfounded conclusions. In fact, some papers will include a "threats to validity" section, which I think is a good exercise in skepticism.

The link you provided contradicts your comment.

From the link in your comment: "The average rate of cosmic-ray soft errors is inversely proportional to sunspot activity. That is, the average number of cosmic-ray soft errors decreases during the active portion of the sunspot cycle and increases during the quiet portion."

It's really frustrating to see most of the top comments calling out that it only looks so pretty because of exposure.

Why? That's actually true.

I've been to many truly dark sky sites. I get out to one at least once a year on average. I've photographed the Milky Way, galaxies, nebulae, you name it. Under dark skies, the milky way is an amazing site. But don't be mistaken: it's still gray in appearance to the naked eye.

Let's look at this in a few different ways:

1) The pupil of the human eye opens to about 7mm (if you're young) under truly dark skies. That is the limiting aperture that determines how many photons strike the retina. The human visual system is optimized to detect motion. The integration time for the image you see in your brain is maybe 1/30th of a second. When I photograph the Milky Way, I use a 14mm f/1.8 lens (that's a 14mm/1.8=7.8mm aperture) with about a 30 second exposure. Those two factors alone put the camera at a (7.8/7)^2 * 30/(1/30) = 1111x higher exposure level. The camera also has ISO levels for further gain.

2) The human eye has two types of receptors: cones and rods. Cones are used for color vision. Rods are used for low light vision. It takes more photons to stimulate a cone than it does a rod. So when you're looking at faint objects, you might not be able to discern their color. The reason people like me seek out dark skies is because the objects we're trying to see are at the limits of detectability and we'll take whatever advantage we can get. Even when viewing through my 4-inch telescope, most objects appear gray. And that's with a (106/7)^2 = 229x light gathering advantage over the naked eye.

3) Have you ever thought about why it's called the Milky Way? It comes from the name given to it by the ancient Greeks. It appeared to them as a streak of milk in the sky (and they didn't have modern light pollution issues). What color is milk?

Do you mean big red and not big blue with that statement?

I assume you're referring to Oracle here, but Oracle didn't invent Java either. Java came out of Sun Microsystems, whose color scheme seems to shift between blue and purple, so "big violet?" Just doesn't have the same ring to it.

If a breaker pops, it's easy. You have a box, maybe two if you live in a really huge house. Go there, look for the switch that's not quite lined up, toggle switch, done.

FWIW, you can have the same thing with GFCIs. I recently wired my garage for woodworking and installed all GFCI breakers in the breaker box, so a GFCI trip is just like a regular breaker trip (not that either of those has happened with the new circuits). The GFCI breakers cost about $50/ea [1] and protect the whole circuit.

GFCI, you gotta figure out which one popped. If the wiring's not great, it may well be in a totally different room from the outlet that stopped working.

I once couldn't operate my garage door for a few days. There were no tripped breakers in the box. Eventually, it dawned on me that the circuit was labeled "GFCI" so maybe I should go check the GFCIs in the house, and I found that the GFCI in the upstairs bathroom had tripped. The upstairs GFCI is nowhere near the garage (and in the opposite direction from the breaker box). Since then, I've talked to several people in the area whose houses are wired the same way. I guess GFCIs must have been really expensive in the 80s, when these houses were built.

The moral of this story is that GFCI breakers can save a lot of headache. (Plus, those GFCI outlets are kinda ugly IMO).

[1]: I see they're about $60/ea now: https://www.homedepot.com/p/Square-D-Homeline-20-Amp-Single-...

SEEKING WORK | Boulder, Colorado | Remote only

Principal engineer at a billion-dollar e-commerce company. Now a stay-at-home dad. I'm available to take on part-time contract and consulting work while my kids are at school.

I've done full-stack web development, but I'm most comfortable on the backend, building APIs, services, message buses, database systems and the like. My use of PostgreSQL, for example, goes beyond using B-tree indexes for everything. I'm well-suited for data-intensive projects.

I've picked up a ton of technologies in the past 20 years. Most relevant today are Ruby (Rails), Elixir (Phoenix), PostgreSQL, Kafka, C, Rust, Python, ZFS, FreeBSD, and Linux.

I can't do full-time right now, but I could be a good resource for a company looking for some help from a principal level engineer without filling a full-time position. Please email me (in profile) if you're interested. Thank you.

    Location: Boulder, Colorado, United States
    Remote: Yes
    Willing to relocate: No
    Technologies: I've picked up a ton in the past 20 years. Most relevant today are Ruby (Rails), Elixir (Phoenix), PostgreSQL, Kafka, C, Rust, Python, ZFS, FreeBSD, Linux.
    Resume/CV: Available on request
    Email: david (dot) cuddeback (at) gmail (dot) com
Principal engineer at a billion-dollar e-commerce company. Now a stay-at-home dad. I'm available to take on part-time contract and consulting work while my kids are at school.

I've done full-stack web development, but I'm most comfortable on the backend, building APIs, services, message buses, database systems and the like. My use of PostgreSQL, for example, goes beyond using B-tree indexes for everything. I'm well-suited for data-intensive projects.

I can't do full-time right now, but I could be a good resource for a company looking for some help from a principal level engineer without filling a full-time position. Please email me if you're interested. Thank you.

I haven't personally, but they were getting a lot of praise on the forums at cloudynights.com last time I researched binoculars (several years ago). I think the consensus was that the optics are good, and the image stabilization makes it feasible to hand hold at a higher magnification than without.

Citation? I think there might be a bit of "telephone game" happening here. The current science shows that avoiding allergens increases the risk of developing allergies. The hypothesis for how that happens is that if an infant's first exposure to an allergen is on their skin (e.g., peanut oil), then their body may classify it as invasive and develop anti-bodies to attack it. If they are first introduced to an allergen as food, then their body classifies it as food. By avoiding feeding allergens to infants, you increase the time window for their bodies to be exposed through the skin and classify it as invasive. I could certainly see this idea transmuting through word of mouth into the "first world is too clean" idea in your comment, but that's pretty far off.

Is there enough of a scientific consensus on how to prevent food allergies to drive policy

To be honest, this may have already happened, but it would take a generation to see the effects. There was a major breakthrough on this a few years ago. I first heard about it on an episode of Science Vs [1]. That was merely weeks after my second child was born. It was interesting to see the advice from the pediatrician a few months later. The American Association of Pediatrics updated their advice accordingly [2], and my kids' pediatrician handed out informational fliers calling out "this has changed," etc. Hopefully other pediatricians are also updating their advice and doing a good job of educating families.

Check out the Science Vs episode [1] if you want details. The gist of it is that in a controlled study, they found that introducing allergens early reduced the prevalence of allergies by 86% compared to avoiding allergens. This means old advice (what I was told with my first-born) about avoiding allergens could actually increase the risk. The Science Vs episode goes into details about what led researchers to look into this and possible explanations about the mechanism involved.

[1] https://gimletmedia.com/shows/science-vs/2ohd7e

[2] https://publications.aap.org/aapnews/news/12250/New-guidelin...