• 0 Posts
  • 11 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2023

help-circle
  • C++:

    int i = 5;
    i ^= printf("The initial value of i is %d\n", i)^
    printf("i=i+1; // this increments i\n")^
    printf("Trigger very obscure FPU bug %c",(int)((float)8.5953287712*(double)8.5953287713-'?'))/10;
    printf("i has now been incremented by 1 : %d\n", i);
    

    Output:

    The initial value of i is 5  
    i=i+1; // this increments i  
    Trigger very obscure FPU bug  
    i has now been incremented by 1 : 6
    

    I didn’t test other values but they’re probably OK.


  • Instead of dropping a system on her that she can’t/won’t use, try asking her what she wants to do. You can explain why passwords need to be different, but you can simplify it by sharing passwords across sites that don’t matter. So someone gets her BBC password and finds they can also use it on the Daily Fail, whoop-de-doo. Different pw for the bank.

    Simplify your own life. You have to do free tech support for your Mum, and to be fair she changed your nappies for years, but everyone else is expected to trade, especially if they expect you to pay for their services when you need them.

    Of course tinkering with something makes it your fault any time anything goes wrong, and the lesson we learn from that is …?


  • Well don’t write 600 lines of code without hitting compile then! You’re not writing an essay that has to be handed in once.

    The only time I ever “write” more than a few 10s of lines at a time (dev since the 1970s, pro since 1991) is when I’m scaffolding a new application with a code generator, and that usually compiles first time. And source control is revolutionary. Check in stuff that works, then no matter how bad things get you can always just roll back to the last good commit. Unpicking the last few hours without source control is horrible. Been there, done that way too many times.

    And even when you do get 700 errors just look at the first few. The rest are most likely junk caused by the compiler not being able to resynchronise with the remainder of the code.



  • Muslims hated us first though and some of them (that currently live here) want to destroy our civilisation in favour of their barbaric medieval religion, and their continuing growth causes me some concern about when there are enough of them around, and someone has started a sharia party, and all the imams go “you must all now vote for sharia” how many of them will follow that decree (and how many non-muslim useful idiots will too).

    Not enough concern for me to start hating or discriminating against them on an individual basis, but everyone’s different and some are further down that road than I am.