Learn C++ with Bjarne Stroustrup's "Programming Principles and Practice" Book

  • Context: C/C++ 
  • Thread starter Thread starter Hacker Jack
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
69 replies · 12K views
harborsparrow said:
I remember arguing, years ago at Bell Labs, with a designer who wanted to leave in a design that could result in a race condition. "But it will never happen in a million years", was his reply. I considered the guy a total idiot.
Ha! I've had that argument too. Fortunately, I was senior enough that pointing out that the code would run in the real world millions of times more often than in tests was enough to make sense prevail. That, and coming up with an alternate design that avoided the race.

Btw, this reminds me of the recently-learned Brandolini's law. :headbang:
 
  • Love
Likes   Reactions: harborsparrow
Physics news on Phys.org
yungman said:
...I don't drive that much particular during this virus, stupid gas car die if you don't drive them or drive short distance. I have to make up reason to take a longer drive every other week to keep them alive.

@yungman we are having exactly the same problem with a 2015 Honda Fit. It dies if not run maybe an hour every week. but the 16-year-old Toyota Camry could sit in the driveway unstarted for 2 months and the battery doesn't run down. I am convinced that it is crappy firmware design, somewhere in the car, draining the battery while it's just sitting there. dumb. bad. it ought to be able to go longer than a week!
 
harborsparrow said:
@yungman we are having exactly the same problem with a 2015 Honda Fit. It dies if not run maybe an hour every week. but the 16-year-old Toyota Camry could sit in the driveway unstarted for 2 months and the battery doesn't run down. I am convinced that it is crappy firmware design, somewhere in the car, draining the battery while it's just sitting there. dumb. bad. it ought to be able to go longer than a week!
Possibly this is due to the parasitic current draw of security sensors, which might not be present in your Toyota Camry. It would be interesting to see how large a current draw there is for a car just sitting idle. There might also be sensors that unlock the doors when you come close or press a button on a fob.

I have five motorcycles that I don't ride much this time of year. I have trickle chargers on four of them to keep the batteries charged up. I just bought the fifth one, and it's mostly a pile of parts that I have to put together -- it doesn't even have a battery yet. I also have a trickle charger on a generator, to make sure it will start when (not if) the power goes out.
 
  • Informative
Likes   Reactions: harborsparrow
harborsparrow said:
@yungman we are having exactly the same problem with a 2015 Honda Fit. It dies if not run maybe an hour every week. but the 16-year-old Toyota Camry could sit in the driveway unstarted for 2 months and the battery doesn't run down. I am convinced that it is crappy firmware design, somewhere in the car, draining the battery while it's just sitting there. dumb. bad. it ought to be able to go longer than a week!
Check the battery. How old is the battery? I assume 5 years old originally came with the car. I've seen this symptom before that you have to start and drive the car to charge up the battery like this.

Like Mark said, check for leakage, if that's ok, chances are it's the battery. Happened to me twice before already. 5 years is a little short, but I would say 7 to 8 years is about time to change already.

When I said about gas car needed to be driven, I am more referring to the engine needs to be run and oil needs to be circulating, the fuel injector needs to be cycling gas to keep it clean and remove the water condensation etc.
 
harborsparrow said:
@yungman we are having exactly the same problem with a 2015 Honda Fit. It dies if not run maybe an hour every week. but the 16-year-old Toyota Camry could sit in the driveway unstarted for 2 months and the battery doesn't run down. I am convinced that it is crappy firmware design, somewhere in the car, draining the battery while it's just sitting there. dumb. bad. it ought to be able to go longer than a week!
I forgot to mention, you said you commute long distance to work, is that on the Fit? Those days I commuted 80 miles a day on my Ford Fiesta, I put 100K miles in like 3 years, the battery died with the exact symptom in less than 4 years. I did not know that, One time I went back to Hong Kong for 2 weeks, I had to have my friend start the car and let it idle every other day. That was stupid. I used to work on cars a lot since, but I don't anymore. I wonder do they have battery tester or something. Ask the gas station. I absolutely don't touch cars for years now, hell, one time I needed to open the hood, I didn't even know where was the release!
 
  • Like
Likes   Reactions: harborsparrow
@yungman the battery was replaced in May of this year, and the car has been driven very little since then.
 
harborsparrow said:
@yungman the battery was replaced in May of this year, and the car has been driven very little since then.
Then you must have a leak somewhere. What was the reason you replace the battery on the first place?
 
harborsparrow said:
@yungman the battery was replaced in May of this year, and the car has been driven very little since then.
That's likely the reason the battery has gone dead. My house is about 5 miles from town, and I have three cars at the moment. I usually take each of them out for at least a trip to town about once a week.
 
I don't know of any reason the battery goes dead if not driving that often, that's more for the gas engine. That's the reason I seriously consider buying an all electric car for my next one because I don't have to drive them periodically to keep it alive. We have low mileage on our cars since retirement 15 years ago, our batteries never die as we don't drive that much. My neighbor across the street have a few expensive cars in the garage, he seldom drives them, I never heard he has to charge the batteries. They can sit there for months if it is not drained.

I think in her case, it's either some abnormal leakage or a defective new battery. Since she bought the battery in may, take it back to the place that change the battery and have them test the battery. I am sure they have battery tester. That will eliminate half the possibility.