Ben's profileNo Brain, No PainPhotosBlogListsMore ![]() | Help |
No Brain, No PainThe never-ending list of excuses why I haven't finished my Descent code yet ;-) |
|||||
|
July 28 Better gas mileage with a clean air filter, right? Read on..."Install a new air filter to maximize your gas mileage!!!" I swear I hear that at least a couple of times a week these days. It's on YouTube. Auto parts stores suggest it. Even the government advise you to do it.
But it turns out, they're completely misguided.
I can almost hear you thinking, "The hell you say?!?!?! Of course a clean air filter will help with fuel economy, since it's obvious an engine would have to work harder to draw air through a dirty filter as compared to a clean filter."
Now, there was a time when a new air filter would improve fuel economy. Back in the days of non-feedback carburetors, the amount of gas metered into an engine was dependent on the absolute pressure differential between the carburetor venturi and atmospheric pressure. Anything that would lower the pressure in the venturis--the most obvious example being the choke on top of the carburetor--would case the air fuel mix to go rich very quickly. And a dirty air filter acted identical to a partially closed choke. I don't think it would be unreasonable to see an MPG decrease of 10-20% with a dirty air filter.
But that was a loooong time ago; the last open-loop carburetor car I drove was a 1979 Trans Am. Since the 80's fuel systems have gone to closed-loop, which simply means they continually sample the exhaust gas in order to calculate how much fuel to inject into the engine. The pressure of the air upstream of the throttle no longer affects the amount of fuel metered into the engine.
Ah yes, the throttle--that's the part people always forget about when they're trying to envision their engine struggling to pull air through the dirty air filter. Because if you think it's hard to pull air through a dirty piece of paper, imagine how tough it is to pull air through a solid plate of metal! And the vast majority of the time you're driving down the road, the throttle plates are just partially open--that is what's limiting the amount of air entering the engine, not the dirty air filter.
It turns out it doesn't matter where in the intake tract the restriction happens--throttle, dirty air filter, a narrow piece of intake tubing--they all have an identical effect. Basically, as your air filter gets dirtier, you'll compensate by opening the throttle more. But since the amount of gas metered into an engine is determined by the exhaust, you'll still end up with exactly the same engine power output and identical fuel consumption. Nifty, eh?
Actually, I'd contend that the dirtier your air cleaner gets, your fuel economy will improve! Crazy? Well, a dirty air filter has the same effect as a throttle that doesn't fully open. Think about this: would you get better mileage if you drove around full-throttle all the time? Or if you never opened your throttle more than halfway? This actually explains why people say devices like "the Tornado" improve gas mileage. It's not about swirling the air entering the engine, it's about putting a restriction in the intake tract that effectively prevents the driver from going full throttle.
So, is there any downside to a dirty air filter?
Just one that I can think of: it absolutely, undoubtably reduces full-throttle power.
Anyway, something to think about next time someone tells you that you should change your air filter to maximize your fuel economy. July 02 Software entropy, revisitedDreaming in Code had a great story about Apple's legendary Bill Atkinson and using lines of code (LOC) as a productivity metric. In summary: Bill rewrote a section of the Quickdraw code to be faster and more efficient, but in the rewriting process he reduced the total lines of code by 2,000. So, when he filled out his weekly management form, he entered -2000 as the number of lines of code written. So much for using LOCs to measure productivity!
Obviously Bill's new version was better than his old version. But how do you quantify that objectively? LOCs certainly doesn't work, but as I continued to think about the problem, I kept returning to the concept of software entropy as a potential solution. So here's some continuations on my original thoughts; the concept still isn't fully flushed out yet, but I think I'm making some progress. Consider this:
Now, here comes the heavier stuff:
In other words, if two functions generate identical output for identical inputs, either could be used by a calling program with no change in functionality. Seems intuitive, no?
Given all of these, I propose the following statement:
Therefore, func0() is more efficient that func3(), even though equivalent, entropy-wise.
I think that if you were to apply these principals to Atkinson's revised code, you'd find the efficiency of his new functions objectively higher than that of the original ones.
Certainly, there's still a lot of work to be done--namely, I still need to figure out how to calculate absolute entropy values for an arbitrary function or statement. But I think I'm heading in the right direction.
Ben
May 14 Dreaming in Code and some thoughts on processRecently I've been reading Dreaming in Code, which is billed as "the first true successor to Tracy Kidder's Soul of a New Machine." I really enjoyed Soul of a New Machine, so I figured I couldn't miss with Dreaming in Code.
Both are written in the same style, with a relatively non-technical author watching and writing about a group developing a product; the main difference is that Soul concerns a hardware project (Data General's first 32-bit machine) while Dreaming is about a software project--namely Mitch Kapor's open-source Chandler PIM.
For what it's worth, I enjoyed Soul of a New Machine more than Dreaming in Code. It might be because the former was about hardware development, something I'm not familiar with. But I think more likely it's because at the end of Soul, they actually had a solid, finished computer whereas at the end of Dreaming, they had (at best) a buggy, slow, barely useful piece of software.
Regardless, one positive aspect of Dreaming in Code was that it touched on several topics on which I have strong opinions, so it was a good catalyst for me to revisit how software could be built better. So, hopefully over the next week or so I'll post a few entries giving my take on what was presented in the book.
First up: Software development processes.
What's funny is that I bet if you spoke to most people I've worked with, they'd say, "Oh yeah, Ben, he hates any formal development methodologies!" But that's really not the case at all--conversely, I'm convinced that process is a huge key to building better software faster and cheaper. The problem that I see is that most of the development processes out there tend to do the opposite--they slow down the development cycle while not improving the quality, features, or performance of the software being developed.
Don't believe me? How many times have you heard a discussion about software process where someone says, "we need to make sure that we don't start skipping the process when crunch time comes"? Whenever I hear that, I see a huge red flag going up--why would someone skip the process in order to get something done faster? Wasn't that the purpose of the process in the first place?
For example, Henry Ford brought the concept of the assembly line to auto production in order to improve the speed and consistency of building cars. I can't believe that if the Ford factory was struggling to meet production numbers, the workers would start saying, "wow, this assembly line idea is stupid! I'm just going to start building cars one at a time like we used to, because it's faster." Instead, everyone quickly realized that the assembly line was a far superior way to build cars, and to do anything else would slow them down.
Yet the opposite is the norm in the software world. People are resigned to thinking that all development processes invariably slow down the development cycle, with the benefit of some esoteric payoff at some point in the distant future. This drives me absolutely nuts--a good process should speed up the development process, with obvious payoffs in a relatively short timeframe (days or weeks, not years). Anything else is doomed to fail. April 23 Things that make me chuckle, part IIII can't count the number of people I've encountered who bemoan web service performance, typically attributing the problem to the use of SOAP over HTTP.
Google search results are returned to the user using essentially the same transport mechanism (HTML over HTTP).
Yet I have never run in to anyone saying, "Google searches are so slow! It's all that damn HTML markup overhead and HTTP headers"
Hmm... April 21 WWF... er... IRL at Twin Ring MotegiJust to set the record straight: I am neither a Danica basher, nor a Danica lover. I think she's a very good driver, not as good as the best in the IRL, but certainly much better than guys like AJ Foyt IV, Marty Roth or "Special" Ed. So, to me, it was just a matter of time before a bit of luck on her part and a bit of misfortune for the competition spelled a victory for her. Which seems to be exactly what happened last weekend.
Now, I don't watch the IRL races because I personally believe that a race car should be beautiful to look at and listen to, and the current Dallara is 1) possibly the ugliest open-wheel car ever and 2) sounds like half-ass ARCA wannabe. But during the Long Beach race broadcast, they showed a clip of her pass on Helio.
I couldn't believe it. Helio just moved over and let her through... I mean, no attempt at all to defend his position, he just got out of the way and, judging by how fast she went by him, let off the gas.
Hmm... My personal take is that he wanted to make it absolutely, positively, crystal clear to everyone watching that he let her by.
Then, in an interview with him after the race, my wife picked up on an interesting comment he made: "She won fair and square". Gosh, why would he have to say that? I mean, unless he was concerned that people might think something fishy was going on?
Something did seem a bit fishy to me. That wasn't quite the same Helio I remember on the pole for Hogan Racing at Milwaukee, trying his heart out as the car failed underneath him. Yes, he was low on fuel. But to not make any attempt whatsoever to hold his leading position? Am I watching open-wheel racing or a friendly game of Checkers in the park???
During the Long Beach race, Scott Goodyear commented about Graham Rahal and Danica winning the last two IRL races: "They [the IRL] couldn't have written a better script." No, they couldn't have. And he said "script", not me.
Then I thought back to the race prior to Motegi... Normally I'm not much of a conspiricy guy, but wow, what were the chances that a young, American 2nd generation driver would win in his first race ever in the IRL? Especially with a team with no experience with the Dallaras, heck, not even enough time to paint their car. There's no doubt that Graham's a fantastic driver with a great future, but he wasn't able to win last year (although he came mighty close at times) in a series where Newman/Haas/Lanigan was certainly the class of the field. Now, in a completely different car, against muiltiple first-rate teams with years of experience with the Dallara, he pulls off his first win?
Possible? Obviously. Likely? Not very. Convenient for the IRL? Absoutely!
I mean, what could possibly be better than a win by a young American driver with a famous name, no less from the competing series that just merged into the IRL?
The answer: A win for Danica.
Hey, hey, guess what?
I'm not calling BS quite yet, but I will say this: The absolute next best thing possible for the IRL would be a win by Marco. Then the speedway could bill the next Indy 500 as the battle between the three American young guns, two with famous names and the third the first female to win a major open-wheel race. It has to be mighty, mighty tempting for the IRL: going into Indy, a more perfect scenario couldn't be imaged.
Other than that, perhaps, the ruse is revealed. |
Thanks for visiting!
Danielwrote:
I read your little articles. I never knew you were having so much trouble with your jetta. You want to drive it off a cliff? Hahahahaa! See ya later.
-Daniel
Oct. 12
|
|||
|
|