Better HN
topnewbestaskshowjobs
Log inSign up

throwawaylinux

3,517 karma · joined Jul 23, 2021 (5y ago) · 2,823 submissions

Submissions

comment 5y ago · link · parent

No, I'm saying it's not better that a relatively wealthy country like China continues to increase its usage in the cheapest and dirtiest fuel rather than much poorer countries.

comment 5y ago · link · parent

On the same call you could also tell them not to worry about the nuclear capable hypersonic intercontinental cruise missile that's on the way.

comment 5y ago · link · parent

> Yes, I was writing about launch-on-warning posture although I can now see I could have been more clear. As far as I know no country is presently assuming that it is able to detect, interpret, and authoritatively decide to enter full-scale nuclear war within ~25 minutes of enemy ICBMs' launch. (Leaving say ~5 minutes to implement the decision.)

Do you have a source for that?

The sibling comment says Russia and USA have a prompt alert which can launch in under 15 minutes. Other articles say the US president could be contacted and approve in under 30 seconds, not sure how the Russian chain of command goes.

The decision process does not begin when nukes are detected of course, that's the end of the process. Pre agreed criteria have already been met. Quite likely there is no decision about entering a full scale nuclear war because they are already in one.

comment 5y ago · link · parent

Well that's really what I was getting at with my question, so if that's also what you were suggesting then we're both questioning the previous poster's idea that they can just happily "spam" nuclear missiles at all of America's carriers around the globe, let alone even a single one operating near China's waters.

comment 5y ago · link · parent

It's not surprising, it just isn't exactly proportionate (well it is by one definition of the word I suppose). That strike would cause China to retaliate against the US homeland, wouldn't it? And the retaliation for that would aim to dismantle China's military and industrial base.

If that's the case then I can't see how isolated tactical nukes against carriers makes sense for China. They might as well throw everything they have to begin with.

comment 5y ago · link · parent

> No, armies do not have their finger on nuclear trigger with a time horizon of 30-ish minutes.

> We are not in the 1960s when at times it was literally true.

You are claiming that not only China, but the US and Russia don't have the capability of launching strikes from 30 minutes? (i.e., well beyond the time to respond to ballistic missile launch detection)? Do you have a source for this?

This doesn't appear to agree with you:

https://www.mitpressjournals.org/doi/pdf/10.1162/ISEC_a_0021...

  Launch-On-Warning
  One source of ambiguity in the implementation of China's no-first-use policy is the ongoing debate in China regarding the pursuit of a launch-on-warning posture. Recent doctrinal publications and Chinese interlocutors indicated that the debate has yet to be resolved. On one side, some members of China’s strategic community argued that a launch-on-warning posture would ensure the survivability of its nuclear deterrent if its opponent has robust targeting intelligence. The Science  of  Military Strategy states that a launch-on-warning posture "is in accordance with China's long-standing no-first-use policy, and may effectively protect China's nuclear forces from sustaining even greater losses, improving the survivable nuclear counterstrike capability of China’s nuclear missile forces." China's first priority should be to prevent its adversary from precisely locating its missile launch positions. If China is able to reliably ascertain that an adversary has already launched nuclear missiles at China, however, China could quickly launch its nuclear missiles for a counterstrike "before the enemy has been able to actually inflict nuclear destruction." Launch-on-warning would therefore provide China with an option for nuclear retaliation if a nuclear adversary were able to overcome Chinese efforts at concealment, deception, and mobility to ensure that its forces survived a first strike.
This touches on what I was talking about too. The next few paragraphs interestingly provide a counter-point that disagrees China would take this posture, but not because they don't have the capability to retaliate quickly enough, but for other reasons.

comment 5y ago · link · parent

I don't know exactly how the game goes. I'm sure there is no one single solution to it.

If China detected nuclear capable missiles heading toward their country then they would have to consider the possibility their second strike capability is not a sufficient deterrent (including being compromised in various ways such as their subs being all located) so there seems like a large incentive to retaliate before missiles land.

Would there be enough time for them to watch and wait it out and see if it approached their missile installations? If it was a very stealthy missile, could they be sure they had detected them all?

comment 5y ago · link · parent

> One Ohio class sub could legitimately end the world.

Not even close. It carries about 200 low yield warheads. Not even enough for 1 each for 1/3rd of the cities in China if you could spread them out that far. There have been over 500 atmospheric tests, many with vastly higher yield and fallout, the biggest tests had yields equivalent to all 200 warheads combined.

One could strike a huge blow to China's capability to carry on war by destroying many of its large ports.

comment 5y ago · link · parent

What is a proportionate response if most of China's army and navy are on the mainland? Nuclear strikes on the mainland?

comment 5y ago · link · parent

> This would likely mean the weapon hits its non-mainland target prior to the other side taking notice for a retaliatory strike. In the event the other side did notice - it's likely they wouldn't treat it as a nuclear incursion unless the weapon was heading inland towards missile silos or other infrastructure that would motivate a nuclear retaliation.

Why not? If it was carrying a nuclear payload and was destined for strategic sites on the mainland, it could be too late to retaliate if they waited to see where it is going, particularly if it was aimed inside the first island chain.

comment 5y ago · link · parent

> It's worth noting that at these speeds a "long" period need only be ~1 hour to reach a target from launch. A flight from Hawaii to Taipei would be 1.3 hours at Mach 5, and 54 minutes at Mach 7.

> These weapons represent an ability for both the US and China to conventionally intervene from their mainlands to any location within the Pacific.

Is that the kind of range these have? Almost 9,000 miles from LA to the South Western most corner of the Pacific. If you meant the North Pacific then even the western edge of the US to the yellow sea is over 5,500 miles.

Ballistic missiles of course have these kind of ranges and can carry conventional payloads.

comment 5y ago · link · parent

Yeah probably good advice, I try not to waste my time in the mud but I've been trying to make a point to call out this anti-intellectual bullying, which has been growing at lot recently.

comment 5y ago · link · parent

Same as the incentives for other countries to move to solar when it becomes cheaper. We're talking about buying coal power station technology (and likely construction and quite possibly operation) from China, or buying solar generation from them.

> I don't agree that China has that bad a track record, they seem to be very willing to take dramatic actions if they feel it is in their self interest (recently, bitcoin for instance).

Oh they definitely have a horrible track record on carbon pollution (as well as a lot of other things like ocean plastic pollution, over fishing, endangered animal trade, illegal CFC emissions, and all sorts of horrible things. They are by far the biggest carbon polluter on the planet, larger than the entire western world combined, and yet they still plan to vastly increase carbon pollution and demand concessions in international carbon agreements. They're horrible.

comment 5y ago · link · parent

I can kind of see what you mean, but if you make branches do more then it's also quite possible the common actions become more tedious to factor into common code. And I don't think it's good practice to read control statements like that (obviously indented loops can't be assumed optional either).

  int pow2(int v, int pow)
  {
    int result;

    if (pow >= 0)
      result = v << pow;
    else
      result = v >> -pow;

    return result;
  }
Looking at this, both sides of the if/else perform a multiply by 2^pow, you can't take the operation to possibly not happen.

So I agree factoring common operations can be a good thing, but I think it's really a case by case basis and my code is fine.

I would also caution against assuming something may not happen elsewhere in a function just because you see it inside a conditional block. This happens frequently to various degrees and I've never encountered a style policy preventing it or any compiler or linter warnings for it.

comment 5y ago · link · parent

I didn't say there would be no positives or negatives to either side, I said there were lies from both sides. Which there clearly were.

I just find it strange that people think one side has the high ground because they didn't lie to the public quite so much, according to people who lied to the public.

comment 5y ago · link · parent

Weren't there a lot of fearmongering whoppers of budget black holes, economic collapse, shortages and famine, increased risk of war, etc., coming out of remain? How do you judge which side lied more?

comment 5y ago · link · parent

How does the 'else' confuse what is happening?

comment 5y ago · link · parent

Well I'm a bit skeptical whether they would or whether it would be better to suggest actual structured courses for me. But either way I don't see how that justifies regular 1:1 when I don't get said coaching. Send a message mentioning their thoughts and ask if I'd like some help with it, and if they think they are the one to give it and other team members would not benefit, great organize a regular call for a few months or do it over slack or whatever.

As I said, I have no problem with a call for a said purpose with an achievable goal. "1:1" is not a goal though, nor is "talk about <x>".

comment 5y ago · link · parent

> Does your organization not offer internal or external group training opportunities?

It does.

> They’re great, but I’m not sure why you’re presenting them as mutually exclusive with individual coaching.

I'm not, it just sounded to me like time management and prioritization were skills better taught in training courses or group sessions.

I'm still not clear on what this coaching really looks like, or why it is appropriate for a regular 1:1 call.

comment 5y ago · link · parent

No it's not reporting task status. Some times a high priority issue that he was asked about in some other meeting by a project manager for example that I haven't made good progress on, he'll just mention it. Or just a friendly "how is <this> project going?" how is "<that> interesting feature you are working on going?" chat. Which is fine it but not necessary to be in a 1:1.

I'm not one to believe I can't be taught anything new or training has no place (technical or non-technical), but I don't really see how a 1:1 is an appropriate place for it. Shouldn't it be offered as some training, perhaps even in a group setting to maximize use of time (which is how we organize informal training sessions between the team on topics one might know a lot about), perhaps even offered as a formal training course run or paid for by the organization?

So I don't see what the 1:1 itself is achieving in any of this.

comment 5y ago · link · parent

Manager is very open and always asks me to bring any issue I have, asks me about it on the calls etc. I do bring things to talk about when I have them. Which is not very often because most things I have can be done far quicker and more precisely with a written record I can refer back to on slack.

I am not the one who schedules these 1:1 meetings though. Manager is. Cardinal rule of meetings should be only schedule them if you have an achievable goal for them which is not better achieved with email or IM. And the goal can't be "talk about X".

I don't have a strong desire to push back against it. My schedule is not one that is full of meetings, and most of the ones I do have are interesting and enjoyable technical ones. And the manager is a nice person who means well and probably gets pressure from above to schedule them. And blabbering on for 30 minutes per week isn't terrible. It's just not at all productive or useful for me to be spending that long on a 1:1 as far as I can see.

comment 5y ago · link · parent

Look at the complete schedule for the week. Almost their entire working hours are totally packed with meetings. Discussions and stand ups and status updates and briefings.

Let's assume all those meetings are productive and necessary and the results could not be achieved in much less time with emails or slack or fewer/shorter meetings. Then he is not putting enough time into each meeting. He has almost no time to prepare, to think about things, to go away and investigate issues with technology more deeply, to make plans, etc. It's just meeting after meeting and thinking by the seat of his pants.

If he is not in a position to seriously participate to the point of making productive input, and asking serious questions or making important decisions in meetings (which he clearly is not given the amount of time he can possibly put into them), then he does not need to be in them. He can skim through minutes to stay generally up to date about those things if he needs/wants.

comment 5y ago · link · parent

I rarely get anything from my 1:1 which is one hour every two weeks.

Most reasons for the call could be replaced just by emailing agenda items to me, and allowing me to respond with any issues, then based on that and what is on the agenda we could decide to have a call but most of the time we wouldn't. And if we did to get past something in particular, it would be like 10 minutes not 60.

My manager is not technical though and can't really coach me about much. It seems strange that 1:1 time would be used to coach and develop technical staff -- what do you mean by this exactly? Some kind of training?

comment 5y ago · link · parent

I don't think testing is close to useless, I think it has a lot of value but trying to prove general correctness with your test cases is a fool's errand. Adding test cases intelligently for tricky cases in the specification and/or implementation, hard-to-hit error conditions, or adding tests for bugs you previously fixed, etc is perfectly reasonable without doggedly chasing 100% coverage or 100% correctness.

And yes I'm aware of formal methods, and agree they seem like the better way to go for proving.

comment 5y ago · link · parent

I know that's the idea, what I haven't seen is any real data showing that is a significant improvement in testing. You pick a few things, there are a lot more that can go wrong, off-by-one can come up in comparisons easily, shifting left or right can happen easily, assortment of bitwise operations can happen. And that's just integers. When you get into floats what are you going to plug in all common math constants as well as a range of values around each of those, various products and summations and factors of those things? No of course not. It's perfectly reasonable to simplify the test based on what the function is supposed to do.

I'm not saying don't test any integer corner cases, I'm asking for the reason why the original poster says including those is good (and listing only 9 of possible 25 combinations to boot). In any case, why is that set of tests the golden one? That was just asserted as fact without any real reasoning I could see.

If you tell me those 25 are the right set of tests, I can say you're wrong because 2 is also very common in computing so 2 and possibly -2 should be tested as well. My 49 tests are clearly superior. Then someone comes along and says well 10 is common in scientific or business logic, so better add 10 in there as well. Using the same arguments as you did to reach 25 we can now get to 81. And so on. Apply it to a function with 5 arguments and we're up to 60 thousand tests. Not reasonable.

comment 5y ago · link · parent

I'm not sure that it is reasonable. It doesn't scale up to anything but the most trivial functions. It also does not prove the function is "actually correct", that is a fallacy. If you want that, you have to use formal.

The problem is not this one particular function, it's transferring this methodology to something more complex. A reasonable set of tests that does not aim to prove correctness is quite entitled to assume a reasonable implementation. You wouldn't have to arbitrarily re-run all your test cases with values incremented by 42 just in case someone incorrectly subtracted 42 somewhere, for example.

comment 5y ago · link · parent

Right but you could also accidentally mistype it as 'b == 1'. Or 'a == b*b'. Or '(a == 0 || a == 1 || a == maxint) && a == b'.

I'm not saying more tests can't catch specific bugs you might come up with, I'm asking how you can choose numbers that have fundamental edge cases for this specific requirement without looking at the actual implementation. I don't think you really can. maxint/minint/0/-1/1 are generally common choices but only because they do tend to catch signdness errors or inequalities or division by zero or whatever, they aren't really fundamental to the requirement of this function though. If we just wanted to blindly blast those numbers in, it would be 25 individual test cases for all permutations. Doesn't seem to be reasonable.

comment 5y ago · link · parent

Not to disagree with the idea that you generally need more test cases than control flow paths to really test correctness well. Just a question about your example -- let's say your requirement is a function that does this:

  void fn(int a, int b)
  {
    if (a == b)
      printf("equal");
    else
      printf("not);
  }
What are the 3 test cases you would write? What are the 9?

  fn(1, 1) -> "equal"
  fn(1, 0) -> "not"
What more useful tests are there here? Other than just picking arbitrary numbers, maxint/minint/1/0/-1/etc are not significant edge cases here.

comment 5y ago · link · parent

If the reason is to reduce competitive demand for cheap fuel by preventing poorer countries to have access to the most cost effective coal technology, so that China can have cheaper energy [which is just my conjecture], I don't think it is a great outcome at all.

China has a horrible environmental track record, they cause more carbon pollution than the developing world combined, and despite being a rich country they are still massively increasing their carbon outputs.

The fact they are a communist dictatorship doesn't inspire any confidence that they might one day suddenly start to value the environment any more than they do now. They will move away from coal as soon as it become economically advantageous to do so and no sooner, which is not all that different to how poorer countries will deal with their coal generation.

1
838485
95