Recent submissions

Comment · 10 months ago
The workers sit idle for n-1 out of n time slices. As n gets larger, amount of work being done approaches zero.
Comment · 2 years ago
I got this >>

To determine the winner, we need to calculate the time it takes for each car to complete the 100-mile race.

For Car A: Speed = 10 miles per hour Distance = 100 miles Time = Distance / Speed = 100 miles / 10 miles per hour = 10 hours

For Car B: Speed = 5 miles per hour Distance = 100 miles Time = Distance / Speed = 100 miles / 5 miles per hour = 20 hours

However, Car B has a 10-hour headstart, so we need to subtract that from its total time: Adjusted Time for Car B = 20 hours - 10 hours = 10 hours

Both cars take 10 hours to complete the race, so they tie.

Comment · 2 years ago
Was there ever any consideration given to building a "testing harness" to physically simulate the F35 landing? Something like the "dead load" testing that the EMALS undergoes. Just in reverse. Anyway, that was great read.
Comment · 2 years ago
A different comparison would be the following (from the manufacturers sites)

----

  Ford Lightning Pro: $50K
    240 Mile EPA-Est. Range – Standard-Range Battery and RWD171
    0-60 MPH in 4.1 seconds - Standard Range Battery\*
    Wireless Integration with Apple CarPlay® and Android Auto™
    12-inch Touchscreen
    Mega Power Frunk

  CT Rear-Wheel Drive: $61k
    Available in 2025
    250 MI. Range (EST.)
    6.5 sec. 0-60 mph
very similar ranges and specs, but and CT is 10k more. Also, ships in 2 years.
Comment · 3 years ago
Mearsheimer was prescient when he advocated Ukraine be allowed to keep a strategic nuclear stockpile in the early 90s when the US admin was pushing to disarm Ukraine, post breakup of USSR.

  The Case for a Ukrainian Nuclear Deterrent

 Most Western observers want Ukraine to rid itself of nuclear weapons as quickly as possible. In this view, articulated recently by President Bill Clinton, Europe would be more stable if Russia were to become "the only nuclear-armed successor state to the Soviet Union." The United States and its European allies have been pressing Ukraine to transfer all of the nuclear weapons on its territory to the Russians, who naturally think this is an excellent idea.


  President Clinton is wrong. The conventional wisdom about Ukraine's nuclear weapons is wrong. In fact, as soon as it declared independence, Ukraine should have been quietly encouraged to fashion its own nuclear deterrent. Even now, pressing Ukraine to become a nonnuclear state is a mistake.


  A nuclear Ukraine makes sense for two reasons. First, it is imperative to maintain peace between Russia and Ukraine. That means ensuring that the Russians, who have a history of bad relations with Ukraine, do not move to reconquer it. Ukraine cannot defend itself against a nuclear-armed Russia with conventional weapons, and no state, including the United States, is going to extend to it a meaningful security guarantee. Ukrainian nuclear weapons are the only reliable deterrent to Russian aggression. If the U.S. aim is to enhance stability in Europe, the case against a nuclear-armed Ukraine is unpersuasive.
[1]

But, he does give Putin a pass on the invasion itself. Couldn't Putin have won the desired concessions with just sabre-rattling and having a skirmish on the border instead of a full on invasion, which is slowly destroying both Ukraine and Russia.

[1] https://www.mearsheimer.com/wp-content/uploads/2019/07/Mears...

Comment · 3 years ago
Remote is ok if your personality doesn't mesh with an office. And you are the CEO. This should do wonders for feeling of "ohana" at salesforce.
Comment · 3 years ago
10 micron tolerance on body panels sounds like a typo. Coefficient of thermal expansion of steel is 6.5 microns/in/F. So, a 2 degrees F change in temperature will put parts over an inch out of spec. Imagine a 3 foot (36in) body panel going from a 80 degree stamping area to 75 degree assembly area. It will be out of spec by over 1000 microns!
Comment · 3 years ago
The total cost($) vs total runtime(s) graph doesn’t look correct. Longer runtimes should cost more, so the dots should cluster in the top right quadrant.
Comment · 3 years ago
I would encapsulate the set of supported operations in a class along with the rounding mode and scale.

Something like: ------

   class MathOps{
    public MathOps(RoundingMode mode, int scale) {
       this.mode = mode;
       this.scale = scale;
    }
   ....

    public BigDecimal add(BigDecimal x, BigDecimal y){
     return x.add(y).setScale(scale, roundingMode);
    }
   ....
    public BigDecimal divide(BigDecimal num, BigDecimal denom) {
       return num.divide(denom, scale, roundingMode).setScale(scale, roundingMode);
     }
   ...
   }
----- You can then either create a new instance when you need to perform a math operation or just create a singleton instance if scale and rounding mode are always the same.

For financial calculations in US, I would recommend using RoundingMode.HALF_EVEN. From the docs "Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor. Behaves as for RoundingMode.HALF_UP if the digit to the left of the discarded fraction is odd; behaves as for RoundingMode.HALF_DOWN if it's even. Note that this is the rounding mode that statistically minimizes cumulative error when applied repeatedly over a sequence of calculations. It is sometimes known as "Banker's rounding," and is chiefly used in the USA. "

Comment · 3 years ago
Take a gigabit network switch over to your friends house and connect both the machines to the same switch. Use windows to discover the shared folder on your friends computer and copy it to yours.
Comment · 4 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton