Sunday, July 12, 2009

First Dyno Run Stock G8 GT 87 Octane

OK, normally this is a computer programming related blog, but I have a weak spot for V8-powered muscle cars. In this case, our family sedan, with which I have a complicated love/hate relationship.

If you are one of my prius-driving friends (Lance, Paul, I'm looking at you!) you can safely ignore the rest of this post and pass judgement. If you are one of my carbon-spewing muscle car driving friends (James? David? Are you Listening?), read on for the goodness.

On a whim I drove out to St. Charles County to a place called Midcoast performance. First, the stats:

2009 Pontaic G8 GT
87 Octane
Mustang Dynamometer 1100-SE Chassis Dyno
SAE Corrected
Peak Power (hp) 309@5400rpm
Peak Torque (lb*ft) 335@3600rpm

This was a hot, humid day, but SAE corrects for that. This was the third pull, after the first two had some erratic results so I discarded them. The numbers were all jittery and the torque said like 2300. This was primarily a Ford-centric shop (ford outnumbered all others in the shop 5:1) and the dyno operator said "the dyno doesn't like GM LS engines".

By the third pull the engine was hot so 309 was all she would do. One of the first two runs said 319 peak but like I said they were erratic so I'm throwing it out. I'll stick with what I can document.

We were hooked to a wide band oxygen sensor and he was able to observe that the PCM was pulling up to 7 degrees of timing up top because of KR.

See attachment with my notes in red.

Friday, April 03, 2009

Top 10 64-bit Java Excuses

Q: Why doesn't my Java app work on a 64-bit JVM?


10. Use a 32-bit JVM, 64-bit JVM is overkill.
9. Use a 32-bit JVM, AND a 32-bit OS. 64-bit anything is overkill.
8. We will never use more than ~1200 MB of memory, so 64-bit is overkill, use 32-bit JVM.
7. We bundle our own 32-bit JVM, use it.
6. We use a native launcher that we refuse to compile for 64-bit.
5. We use a native launcher that we don't know how to compile for 64-bit.
4. We use JNI libraries that we don't have source code for and/or don't know how to build them. Use a 32-bit JVM.
3. We use an older version of JNA that doesn't have support for 64-bit .
2. Just because you can buy 4GB of memory for $32.99 at Newegg doesn't mean you get to actually use it all.
1. We don't understand why it doesn't work and don't know how to fix it.

Wednesday, February 25, 2009

The Cookie Misnomer

The NetBeans term "Cookie" is a misnomer. Furthermore, in the description (found here http://is.gd/kObi) , the author of the Netbeans Cookie documentation fails because "opaque callback object" is an opaque description of the commonly accepted definition. And it's not a "sometimes used" definition, it's a universally understood definition. Google for cookie.

FTFA (From the ------- article):

"Take care not to confuse this NetBeans usage of the word with a different meaning sometimes used in computer science, that of an opaque callback object."

Let me rephrase:

The universally accepted definition of cookie is a small bit of data stored in a web browser to help a web server remember information about a session between requests.  But forget all that.

Monday, February 02, 2009

Google Collections, Part 2

FYI My latest article, Google Collections, Part 2 was published yesterday.  Hope folks find it informative!

Thursday, December 18, 2008

Java Source Jars in Ruby (Reprise)

I made a couple minor improvements to my srcjar.rb script. If you recall this script builds Java source jars suitable for IDE source attachments. The diffs are highlighted in red bold below. The improvements are in the usage line that is presented to the user if they don't provide arguments, and also it looks for package statements that might not be in the first column of the Java source file.

require 'tempfile'
require 'fileutils'
include FileUtils

pwd = Dir.pwd

if ARGV[0] == nil
puts "usage: ruby srcjar.rb "
exit 0
end
javapkg = {}

Dir.chdir ARGV[0]
Dir.glob(File.join('**', '*.java')) do |f|
IO.foreach(f) do |line|
if line =~ /^\s*package\s*/
pkg = $'.lstrip.chomp
pkg = pkg[0..pkg.index(';')-1]
javapkg[File.join(ARGV[0], f)] = pkg
end
end
end

Dir.mktmpdir() {|dir|
javapkg.each_pair do |k, v|
src = k.gsub(/\\/, File::Separator)
dest = File.join(dir, v.gsub(/\./, File::Separator))
mkdir_p(dest)
cp(src, dest)
end
Dir.chdir(dir)
system("jar cvf src.jar *")
cp("src.jar", pwd)
Dir.chdir(pwd)
}

Wednesday, December 17, 2008

iPhone 3G vs Google G1 phone (Round 1)

My coworker (call him Andrew to preserve his anonymity) just purchased an unlocked G1, and I just purchased an iPhone 3G.

iPhone Pros:
  1. I have it and Andrew doesn't.
  2. Navigating around on a web page is easier with double tapping and intelligent zooming vs G1 + and - buttons.
  3. Zooming photos is intuitive using multi-touch pinch gestures.

G1 Pros:
  1. G1 lets you choose an arbitrary swipe pattern to unlock your phone. iPhone does a standard left-to-right swipe to unlock the phone. Updated: iPhone does allow you to set an unlock code, but it's a second step. G1 usability win.
  2. Barcode scanner. G1 has a 3 megapixel camera, iPhone only 2 megapixels. Updated: iPhone does have some barcode scanning apps in the app store, but they all have horrible reviews. I've seen the G1 barcode scanner shopping thing work successfully.
  3. You can program it in Java on Windows, Linux, or Mac. Want to program iPhone? Get a Mac.

Tuesday, September 16, 2008

Tuesday Morning Ruby Challenge

Help me find the duplicate elements!


arr = [1,1,2,2,3,3,4,5]

# want to know which items are duplicated
# answer should be [1,2,3]


Extra credit if solution doesn't contain nested loops.

Labels: