How to take advantage of developers – and make them like it!

Step one – provide food.  Consider the cost of 1 developer hour.  If you have 10 developers leaving for lunch every day for an hour, and they have an average salary of 80-100k, that means that in order to pay them to stay instead of leave it would theoretically (ignore the fact that there is no overtime for a minute) cost you 400-500 bucks.  So if you spend $50 on pizza, and get a single hour of peripheral work done during that lunch hour, you come out even.  If you promote some scheduled lunch and learn or class type activities, you might make your workforce more valuable for a lot less outlay than sending them to a conference.

Step two – provide tasty beverages.  This is the same logic as above – spend $50 on drinks that can be consumed at 5:00 + and if those 10 techies manage to wrap up just one more thing, (while enjoying a cold one) that amounts to a single hour of productivity, then you broke even. Anything more and you basically got free output from some of your most expensive resources.  Even consider the casual conversations that can occur and free up more time during regular business hours.. it all adds up and I think it will be in your favor, and we will not mind at all.

Opening all modified files in an SVN repo with Vim

svn st | grep ^M | awk ‘{print($2)}’ | xargs vim -p

svn st – this is svn status, lists modified files with a M for modified

grep ^M only shows lines that start with a capital M.  If you have capital M in your filename and that file was displayed in “svn st” for some other reason then they would be kept in this list.  The ^ is regex for beginning of the line to prevent that.

awk is awesome.  This awk commmand just prints the 2nd column of data, which is the file path and name.

xargs is also awesome.  In this case we are using it to allow vim to open the list of file names without compaining about it.  Vim will still throw a warning, but no error.

vim is your editor, right?  -p opens them in separate tabs.  gt and gT move left and right through your tabs.

Instead of remembering this “one liner” you can set an alias in your .bashrc file.  mine looks like this:
alias vimAll=’svn st | grep ^M | awk “{print($2)}” | xargs vim -p’

So now in any svn checkout, I type vimAll to open all the modified files in and under the current directory.



A new gasoline engine with lower pumping losses – brain dump / thought exercise

I was thinking last night about how mazda used a twinscrew supercharger to increase the efficiency of the Millenia – the Miller cycle engine.  The briefest overview is that this engine uses a higher mechanical compression ratio, combined with the supercharger to pre-compress and cool the intake charge, and valve timing to control the amount of cylinder fill.  For example, a theoretical Miller cycle engine could have a supercharger generating 7 psi of boost pressure, and adjust valve timing to close the intake valve when the piston is 50% of its way back to TDC on the compression stroke.  the end result is there is slightly more air in the engine due to the ability to cool the air from the SC before it is compressed he rest of the way in the cylinder.  The final temperature is also lower, allowing different ignition timing and higher compression pistons to be used which give the advantage of higher efficiency.

All that is well and good and completely understood by some smart engineers somewhere.  I started thinking about the idea of the supercharger being a more efficient compressor than a piston in a cylinder.  Immediately after that I thought about how roots ( positive displacement) superchargers kind of suck compared to centrifugal type or turbocharger with respect to efficiency.  So The idea hit me, why did the Miller cycle do any compression at all with the pistones movement?  I suspect because Mazda’s design target was to improve low engine load efficiency, but still have the capability of utilizing large amounts of power – i.e – how a typical american drives, one pedal always mashed, especially in stop and go bumper to bumper traffic.  If there is no requirement to make ‘big’ power, we could compress small amounts of air to the same levels the piston sees at TDC under partial throttle pretty easily.. partial throttle is when you are crusing on the highway and want really good gas mileage. The engine is doing a lot of work to create vacuum by sucking the restricted amount of air the driver is allowing with the gas pedal controlled throttle plate.  So sucking air past that throttle plate and generating 15 inches of vacuum when the piston is at bdc ( bottom dead center) and then the piston moving back upwards, recovering much of this work, and then compressing what is still left means the cruising cylinder pressure is pretty low. Lets use my imaginary engine that has 15″ vacuum – which is about 7 psi absolute pressure. This means that the cylinder has 7 psi in it at BDC, and since my imaginary engine is a 10:1 static compression ratio engine, it has 70+ psi at TDC.  the pressure will be higher than 70 because the air will be quite hot.  If the driver had to pass someone and floored it, all 14 psi atmospheric pressure could fill up that cylinder at BDC, and the piston would compress it to 140+ psi at TDC.  In reality the pressure would be more like 180-220 psi due to the air heating effect due to inefficient compression.

So instead of sucking air past that throttle plate, what if the motor had an efficient compressor attached to it somehow ( turbo, centrifugal supercharger, twinscroll or roots blower – or multiple stages of compressors that we could engage and disengage somehow – a wastegate for the turbo, a clutch for the supercharger, or use a variable displacement pump and vary displacement from 0 to X as needed.  We can size this so that it creates 70 psi air for us, intercool it, and then pass it to the cylinder via a re-engineered induction system when the piston is at or near TDC, and then use direct injection to add fuel, ad some spark, and go to town.  This gets rid of the throttle plate for lower pumping losses, provides a cool dense intake charge that has no tendencies to ignite our fuel too early, allows us to increase compression ratio drastically for more efficiency, and by adjusting the pressure / volume of air put int the cylinder at TDC, allows us to regulate power easily.

Power regulation is the next topic of this engine – chances are the steady state pressure / flow numbers can be optimized quite a bit. If this new imaginary engine has an 18:1 or 25:1 compression ratio and a long stroke, less air and fuel would need to be consumed to generate the same power as the normal 10:1 engine sucking past the throttle plate, and heating the air up during the compression pat of the cycle.  So for this example, say to cruise on the highway at 10hp it needs 13 cfm or .9 lb/min of air.  Our pump should be the most efficient pump possible to generate this amount of air at whatever the required pressure ended up being.  What happens when the driver needs to pass someone then? Obviously we need more air, but how much more air?  With that high 18:1 compression ratio, and no vacuum pumping losses, and more efficient intake charge compression, it will not be as much air as a typical engine, but it will be substantially more than the 13cfm used to cruise.  Say the driver needs 100 hp of power to pass – like 130 cfm or 9 lb/min worth of air.  Obviously this is a lot more volume than that optimized pump setup could supply, so some additional air must come from somewhere… how about a high pressure tank under the car. A typical welding tank is a 330 cu/ft tank -almost 3 min at 100hp level consumption rates.  This wont work for a racecar, but to commute to and from work, it should… Pro benefit is all this compression can be done at home using electricity – cheaper than gas, cleaner than gas for most areas of the country. Seems like I have heard a lot about the idea of a plug in hybrid lately.. Does this qualify? How about if we alter our compression system so it is flexible enough to refill this tank as you drive by consuming power during braking?  Did we just create a hybrid?  Will the steady state pump even have to run most of the time?  If you are cruising at 13 cfm from a 330foot tank you can go 25 min without running out, and that does not take into account any regen you get when braking..  Maybe the compressor can now be a much higher pressure pump that runs on a low duty cycle for cruising to keep the tank at a minimum level, and is completely off for higher power operation.  All of this could be computer controlled to the extent of telling the car the trip you are about to take and where it can be recharged ahead of time.  If google can tell me how long it will take me to get home in current traffic, telling the car I am going to work and back home should allow it to optimize for utilization of that full tank each morning by adjusting the duty cycle of the on vehicle pump to allow the tank to run down to some safe reserve amount over the course of the two trips. Obviously, if something unforseen arises, the onboard pump can just run more to keep the tank above that safe reserve level.

Imagine if we had some sort of device that had a GPS in it, that knew where we were going, and could remember the route from the previous times we took that route – elevation changes, speed, braking, merge acceleration etc. – and optimize the pump / tank system to consume more when we are within a mile from a long downhill off ramp when it would regenerate itself via braking, but to run more when it knew that there was a long grade ahead that it could pre-pump the tank for the entire grade… Computers – freaking magic.  Pocket sized computers with many processors, GPS + wifi communication etc but our cars are still so dumb.

Another major benefit to this idea is the power to weight ratio initially looks like it will be terrible – adding in a big tank ( scuba carbon fiber types might not weigh much compared to my stel welding tanks), and adding in an external compressor.  A positive is the intake manifold and throttle body can go away entirely.  Supplying air from a high pressure source will be more like braided steel teflon core or hydraulic lines  + some solenoids than thick aluminum castings.  The head itself can be smaller as the intake port is useless area, we need as close to direct cylinder injection o the air as possible. The intake port is a dead concept for this motor. The intake valve has to be re-imagined as more of a solenoid with a much shorter on / off time / duration, and smaller area requirements.  We might be able to go much larger for exhaust valves as there will be more space for them, assuming they can stay cool enough.

And the best for last – we just got rid of the compression stroke from this motor right? The intake event is a high pressure gas being released into the cylinder at TDC, so we also got rid of the intake stroke.. How many strokes are left? Power and exhaust?  2 stroke engines have double the number of power strokes as a 4 stroke motor.. this motor just doubled its hp/displacement numbers. Running at 18+ :1 compression ratio, it is going to be making a lot more power due to its higher efficiency also… And then the only thing regulating more power is the ‘on time’ of the air supply solenoid and the correlate direct injection fuel supply.. The knock limits we know and understand now are for engines that have a hot intake charge… we limit compression ratio to keep this temperature under control. entirely new knock limits will have to be learned on this motor, and it might be that we can supply it with 300 psi of air blowing way past what a typical otto cycle engine could handle.. 300 psi sounds like a lot, but cold compression tester numbers on some 4cyl motors are already in the 250+ range without the benefit of the entire intake charge being at or even below ambient temp.

In fact, if the supply tank is at 3000 psi, supplying 10-300 psi air is going to be some rapidly cooled via expansion air, and probably necessary to go through a heat exchanger  with any gas being compressed in order to keep it above minimum temps that gasoline / air mixtures burn well at!

Next steps for this Idea are to research if anyone has already done it – like pretty much every awesome Idea I come up with, I find patents already exist.  If so, add it to my list of “almost first” ideas.  If not, then start doing some math and other research

  •  solid numbers on air requirements for 10 hp and 100 hp when the compression ratio is ridiculously high and the intake charge is ridiculously cool, ( examples I used came from online calculator for a typical motor).
  • compression efficiencies of a piston compressor vs a screw, roots, impeller etc.
  • how difficult would it be to convert an existing engine

radial component layouts

I was daydreaming about a circuit laid out in a circle to optimize the trace length between components.  I was thinking for audio amplifier to minimize signal path, but I suppose any circuit might work.  Semiconductor chips could come in new packaging instead of square, they could be round for the center of the circuit,  wedge for a multi component center, or wedge sections if they are farther out from the center of the circuit. (think the same of a piece of pie if you ate one bite off of the pointy end)

Everything done now is rectangular in a single or very few planes. Some circuit boards are multi later so the traces can pass each other. Semiconductors are multi layers of square components.

Computers are smart, they can do things. Compacting technology is becoming a geometry problem that we can outsource to some smart programing.

4ag port media

Trying to get a good view inside the ports of a 4agze head.  As you can see, this did not work out too well without puling the cams and valves, which would allow photos from the combustion chambers, as well as lighting from one end and taking pictures from the other.

There are alos some pictures of a tacoma 1gr-fe I forgot were on the camera, I am trying to sell that 4.0 liter v6 to fund a milling machine.



Bees in the attic

We had bees in the side of the house for a few weeks.  Once summer heat arrived, they moved out.  They had good timing because the backup plan was to just spray them.  If we left them alone, and they had stayed, the inside of the walls would get filled with honey and wax… like potentially hundreds of pounds of it..



Facebook, bubbles, and startups

With Facebook off to such a slow start, I wonder what effects will trickle down to the rest of the ‘web economy.’  Social media is a difficult arena to monetize, and I think advertisers  and investors are beginning to pick up on the fact that all web is not created equal.  An ad placed during a shopping session will have value where an ad placed when a user is doing Facebook social activities is as near worthless as an ad placement can be.  Nothing else comes close to Facebook in sheer size or in quality of execution, so if they cannot reverse a trend of decreasing revenue per user, what does that say about social media as a whole?

Personally, I hope it suggests that focused niche areas will be lucrative, and that advertising dollars will begin to follow the analytics more than just following the crowd.  Key points to me are I need to understand the analytics better, and if as a web developer I feel this way, many less technical marketers must also feel this way.  Maybe this is a startup opportunity in itself.

svn propset svn:ignore does not work if the target is a directory with a .svn folder

There are many tutorials that explain how to set svn to ignore a directory, such as:
Unfortunately, they do not mention that if you already have a .svn folder INSIDE the dir you want to ignore, it will keep showing up when you do an “SVN STAT” which can be fixed by just deleting the .svn folder that exists in the directory you want to ignore.

f23 hybrid motor theoretical build notes

F23 block:
-86mm bore – bore out to 87mm
-219.5mm deck height
K24 crank:
-99mm stroke – offset grind to 102mm stroke
-51mm rod journals – offset grind down to 48mm
K20 rods:
-22mm pins
-51mm mains -custom rods with 48mm mains
k24 pistons:
22mm pins
87mm bore
30mm comp height
0cc dome

End result should be 2425cc motor with a piston that protrudes from the block .5mm.. so need a .5mm thick headgasket for zero piston to head clearance  .5mm is .0197 inches, lets round to .020 to correlate to imperial units. Oem 3 layer gasket is .026mm thick.  This gives .006 inches clearance.. not enough.. but adjusting the offset griding operaiton on the crank should easily get us a tiny but less stroke and the exact quench we want.  What that is I do not know.. the v8 guys discuss this in detail but I have not found the honda knowledge base on this yet.  I suspect it to be about .030 inchs = .75mm resulting in a 101.3mm stroke and a tiny bit less displacement. 2408cc 12.3:1 compression.  I think there is still too much custom machine work and not enough off the shelf parts for this build, but if it looks interesting to you, have fun.  You can use the h22 DOHC head instead of f23 head and should get you 240+ whp with right around 200 ft/lb at the wheels.