HNHacker News
TopNewBestAskShowJobs

jdmichal

6,062 karma · joined February 9, 2012

I live in Tampa Bay, Florida, US. I find problems and drive them to solutions. I'm a software engineering manager, architect, and project manager.

Hobbies: sailing, gardening, linguistics, food and cooking, archery.

Feel free to contact me; I'm on gmail.

submissionscomments
jdmichal··on Why does 0.1 and 0.2 = 0.30000000000000004?
Ah, sorry for that I must have seen the updated one.

I agree with you that switching programs that are all using the IEEE floating-point formats with the same underlying hardware implementations should result in the same answers.

jdmichal··on Why does 0.1 and 0.2 = 0.30000000000000004?
My AP calc teacher was an expert on writing tests that would trigger calculators into approximation mode. Pretty much every homework problem, the calculator could easily do an exact answer. But you better have learned, because come test time, the best your calculator is going to offer is 0.942858934759084...
jdmichal··on Why does 0.1 and 0.2 = 0.30000000000000004?
Since you're an expert, I'm sure you won't mind these corrections:

> IEEE 64 bit floats

That should be IEEE 64-bit floating-point. The name `float` is a 32-bit floating-point.

> are accurate to just past 15 decimal digits.

FOR SOME RANGE. They're called floating-point because they can modify how much scaling is devoted to either side of the decimal point. The more scale it has to devote to representing whole portion, the lower its precision in the fractional portion. At some point, a 64-bit floating-point value cannot represent any decimal digits. Past around 2^53, a `double` 64-bit floating-point value cannot even represent every whole number, because at that point the available precision is 2 or more.

jdmichal··on Why does 0.1 and 0.2 = 0.30000000000000004?
Not calculators, but I did some tests a few years ago, and I'm pretty sure the BCD instructions on modern processors are no longer implemented in hardware. They were no different than using an equivalent string of other opcodes.
jdmichal··on Why does 0.1 and 0.2 = 0.30000000000000004?
GP didn't say odd, or at least not numerically odd, but rather "ending in impossible digits".

Floats have varying precision, not uniform. The closer the number is to zero, the more precision it has. There's a point where the precision is so low that it only covers whole numbers, and then a point after that where the precision is less than whole numbers.

Given the context of pointers, it's quite possible that they were large enough to reach that less-than-whole-number-precision range.

EDIT: For 32-bit floats, that's apparently any number above 16,777,216. Which seems surprisingly small to me. For 64-bit doubles that goes to 9,007,199,254,740,992.

https://blog.demofox.org/2017/11/21/floating-point-precision

jdmichal··on Why does 0.1 and 0.2 = 0.30000000000000004?
AFAIK the IRS has always been accepting of truncating / rounding values to full dollars and discarding cents. It's certainly been that way for the decades that I've been doing taxes.
jdmichal··on Layoffs Are Cruel and Don't Work
This discussion is already in the context of layoffs, not firing for non-performance.
jdmichal··on Layoffs Are Cruel and Don't Work
Exactly this. Bleeding small numbers of people is absolutely terrible for morale. Everyone will be wondering whether it's their turn this week, and that will 100% have knock-on effects. If you have to do a layoff, your goal should be to make it deep enough to only do it once and allow the healing process to start.

If your goal is to avoid layoffs, the solution is to build a war chest with months or even years of runway. If you hit hard times, freeze hiring and attrition will help some as you burn through that runway. (But also be careful of piling on the same workload to fewer and fewer people!)

jdmichal··on Companies save billions of dollars by giving employees fake “manager” titles
My second job, I agreed on a start date having forgotten that I had a week-long cruise booked for the very next week. It had been arranged a year or so before by a friend and just was not on my mind. So I started week 3 of that job with a -40 hour PTO balance.

Companies have a lot of flexibility in deciding how the accruals work. But, as you said, the important part is that when it accrues, at that point it's a legally-obligated right for you to either receive that time or be paid for it.

jdmichal··on The pool of talented C++ developers is running dry
I feel like C++ is not just big, but in arcane ways. Like needing to know move semantics, but for being such an important concept, there's very little in the way of the language helping you understand it.

Also, it's changed a lot. I learned C++ as my first language, but haven't used it nor kept up with it for the past 15 years. I'm pretty sure that idiomatic C++ is just a different language now than the one I learned, despite the name and basic syntax staying the same.

jdmichal··on The Last Mustard Maker in Dijon
> Even modern grass-finished beef is raised mostly eating grasses.

I meant, "Even modern grain-finished beef is raised mostly eating grasses."

jdmichal··on Passenger Uses AirTags, Discovers Airline Donated Their Bags to Charity
> And one of the [DC] airports is right on the metro

As of November 2022, the DC silver metro line now includes Dulles International (IAD). So both of the major airports are now directly connected.

https://www.wmata.com/rider-guide/silver-line-extension/Wash...

jdmichal··on The Last Mustard Maker in Dijon
> Animals also eat.

I'm curious: what do you think they were eating?

Livestock was and is used to convert plants humans can't eat into milk and meat that we can. Even modern grass-finished beef is raised mostly eating grasses. Grains are really expensive compared to some grass growing in a field. I don't understand why people think it would be even close to economical for a rancher to raise an animal over 1000 pounds on grain alone. That beef would be more expensive than any wagyu.

jdmichal··on Seven years on, what do we know about the disappearance of flight MH370? (2021)
TFA has an entire paragraph covering your question...

> Even without finding the plane, a number of lessons have been drawn from the disappearance of MH370. Many of the responses to the disappearance centered on the fact that in the 21st century, commercial airliners should not just disappear. In the interest of knowing where every plane is at all times, the International Civil Aviation Organization (ICAO) began requiring that all airliners manufactured after the 1st of January 2021 include autonomous tracking devices that broadcast their location once per minute. To give greater coverage of airplanes manufactured before that date, Inmarsat (which supplies satellite relays to nearly all commercial airliners) changed the frequency of its handshakes from once per hour to once every 15 minutes. The European Aviation Safety Agency began requiring that the “pingers” on aircraft flight recorders last at least 90 days, rather than 30. ICAO also amended its guidelines to require that airliner designs approved after 2020 include cockpit voice recorders that record 25 hours of conversations (instead of the current standard of two), and that flight data recorders either stream data to a location on the ground or be designed to float to the surface after a crash. (Like all ICAO regulations, these only come into force if adopted by the member states, which may take some time.)

jdmichal··on Hackers demand $10M from Riot Games to stop leak of ‘League of Legends’ code
We already knew that. Everything is coded as a minion.

It's an geeky in-joke from the old Warcraft3 DotA and early LoL days. Please don't murder me.

https://www.reddit.com/r/dotamasterrace/comments/4pozfx/can_...

jdmichal··on Netflix's New Chapter
I agree with you 100% on that. I just disagree that Disney is well positioned to take part in consolidation. They might be able to pull off some content licensing like Netflix used to do. But right now, the only thing holding Disney afloat is the parks. And they've certainly upset some fans to make that statement true.
jdmichal··on Unapproved books now a felony in Manatee County schools
A lot of federal-law-telling-states-what-to-do is not tied to criminal punishment, but rather financial punishment. Federal taxation basically permits the US government the first share of our income. The US government then chooses to redistribute large chunks of money back to the state government, but only as long as it plays by the rules. So states can either play by the rules, or have to make up that money by essentially double-taxing their residents.

I'm sure states would love to just take that money in directly, but the federal government gets first dibs and states complete with each other on the remaining taxation. For instance, Florida is not just a popular retirement spot for the weather -- it also has zero income tax and a property tax with capped year-over-year growth.

jdmichal··on Unapproved books now a felony in Manatee County schools
The US is a big and varied place. One could certainly spend an entire lifetime here and not feel left out of much. And I say this as someone with a meager but existent share of international travel under my belt.
jdmichal··on Unapproved books now a felony in Manatee County schools
There are certainly industry-specific constraints which include legal burdens. Just a subset of ones I'm personally familiar with:

* Security clearances.

* Know Your Customer (KYC) and Anti-Money Laundering (AML) in finance.

* HIPAA in healthcare.

jdmichal··on Netflix's New Chapter
Disney is currently suffering under a load of debt from their Fox acquisition. I'm not sure going on a spending spree is in their favor.

With Netflix's low debt load and free cash flow, they should actually be in a better position for buying up competitors.

jdmichal··on CarSized: A way to visualise car dimensions
I love how obvious this makes the fact that truck headlights are perfectly placed to shine directly into the rear window and mirrors of a car. I've had to angle my side mirrors down sitting at a light with a truck behind me. They don't have dimming, and I end up just repeatedly blinding myself peeking in the mirror.
jdmichal··on Heat pumps of the 1800s are becoming the technology of the future
Interesting. But I assume it's not a separate function from cooling, right? It might just over-cool the house in order to meet the humidity target?
jdmichal··on Heat pumps of the 1800s are becoming the technology of the future
I stand corrected. Apparently 60% humidity or so is the line. That said, I live in Florida and haven't ever had an issue, but maybe that's because the A/C runs so much anyway...
jdmichal··on There’s no planet B
> ... but rather about "backing up" our species and civilisation in additional places.

It would certainly cease to by "our civilization" within a very short time frame. It could eventually cease to be our species also. Without at least faster-than-light communication, there is no keeping humanity in sync between star systems.

jdmichal··on New Sony Walkman music player
From the Rockbox devices page:

> Sansa Clip Sport / Clip Jam / Clip Sport Go / Clip Sport Plus

> These are based on an Actions Semiconductor ATJ2127 chips, with under 100KB of available memory and all audio decoding happening inside dedicated hardware. A rockbox port to these (and other ATJ2127) targets will not happen, as it would require an immence undertaking and due to resource limitations, the end result would lack most of the features that rockbox users have come to expect.

jdmichal··on Heat pumps of the 1800s are becoming the technology of the future
Unless you have a very strange setup, centralized A/C does not have humidity sensors nor run just to dehumidify. Nor does removing humidity increase the load on the A/C system. Removing humidity is just a happy by-product of how centralized A/C works. So no, you would not be increasing load for that reason.
jdmichal··on Microfeatures I'd like to see in more languages
I think missing `return` works if the language is designed around everything being expressions, so the function is just written as a single expression. I agree that in procedural type paradigms I like having the `return` keyword over things like "return the result of the last expression".
jdmichal··on Microfeatures I'd like to see in more languages
You only need dynamic dispatch if dynamic types are involved. If you can always resolve to concrete types, then you can statically resolve the required function.
jdmichal··on How do I draw a pair of buttocks? (2014)
I've seen plenty of tasteful and smart joke threads on here. What's not tolerated are low-effort and meme jokes.
jdmichal··on Notepad Calculator
If you're in VSCode already, just install the Microsoft "Polyglot Notebooks" extension and get full Markdown with a multi-language .NET runtime.

https://marketplace.visualstudio.com/items?itemName=ms-dotne...

← PreviousPage 5 of 34Next →