That trick uses screws (or nails) with break-off heads and doesn't always work for long as without a screw-head pulling the floorboard onto the joist the floorboard can still lift.
It is best if carpet is lifted as proper screws can be used (I usually put cup washers on the screws as well) and also they can be put close to existing brads to lessen the chance of going through any wires or pipes laid beneath the floorboards.
Pipes and wires are either supposed to be laid at a safe depth under the floorboards, or, have metal protecting plates over them in the case of wires. My experience is that neither of those safety measures are used, I've even seen floorboard nails that have grazed pipes and wires.
Sorry, I'm not volunteering, my knees don't appreciate that kind of work any longer.
In a time of universal deceit - telling the truth is a revolutionary act. George Orwell
When the debate is lost, slander becomes the tool of the loser. Socrates