Browsed by
Month: June 2007

’07 Viper vs. ’91 Civic SI

’07 Viper vs. ’91 Civic SI

I was on my way to my parents house in Colorado and saw in front of me the telltale rear end of a high performance car. You know it when you see it because its very wide and low to the ground, and the tail lights don’t look familiar, the tires are entirely too wide, you know what I’m talking about… I was excited to see what it was, so I accelerated to overtake this sure to be exotic car… to my satisfaction, an 07 viper fulfilled my suspicion. to make things even better, the license plate said “race me” (literally), and that was all I needed to know that my otherwise dull ride home was going to get a lot more interesting.

A little back story about my car, it is a pretty much bone stock civic si, d16a6, stock si trans, cold air intake, k&n air filter, dynomax superturbo exhaust. And my favorite feature, a turbo-edit tuned, launch control equipped pm6 ecu, chipped and programmed by me. Now I know what you are thinking, I don’t have a chance in hell, and there you would be correct. but that is not the point. The point is to have a good time driving and see how my car stacks up to a modern supercar, and this is exactly what I got.

The guy driving the Viper was pretty young, which surprised me. Usually with cars like this, you get the mid-life crisis, “I don’t want to scratch it” much less get on the gas type old guys who are content just cruising it but maybe gassing it once or twice to get people to stop staring. This guy seemed like he was out to have some fun, and being late at night, and on the outskirts of a small town, he was.

I overtook him about 2 miles to the transition between the city street we were on and the highway that would get me home. The stretch of street we were on was free of stoplights, quite curvy, and it was late at night. I decided to just stay with him, but accelerate out of some curves to see if he was going to play along. Sure enough, to complement my 7000rpm whine, I got a grunt and the burble of an angry pushrod motor pulling to catch up.

At this point, I didn’t know if this guy was gonna be a jerk or a nice guy.. So I just kept my eyes on the road and drove through the curves to get to the stoplight I knew marked the beginning of the highway. He stayed with me, matching speed and gassing it to make sure we stayed even. Then came the stoplight.
My usual reaction in situations like this is to look at the other person and flash a “I know I’m gonna get my ass kicked” smile. Luckily in this case, my smile was met with a grin and a rev from a car that probably cost 70x what mine does. That’s when I knew it was going to be a good time.. I watched the cross street lights to see when they were going to go yellow. The light had to have changed for no other reason than they were on a timer for some reason at this time of night. The Yellow cross-light flashed.. My heart started pounding, as my car bounced of the rev limit from launch control. “Any second now”, I thought.. And then the light turned green.

My car did the familiar light wheel spin and then caught traction. The 4.25 final drive gave me all the acceleration it could. He on the other hand, stayed off it a bit and was behind me already. “Second Gear time” I thought, and shifted fast. “Sweet, no embarrassing grinds..this time” I thought, trying to memorize that shift length to give my syncros *just* enough time to do their job. He was gaining, but not that fast. “Feathering it I guess.. Maybe his license plate wasn’t all it was cracked up to be. ” At that instant, I hear that pushrod engine growl and I see headlights moving fast to overwhelm me. I was going about 60 mph in a 55, and he accelerated to catch me, and then matched my speed. The thought ran through my mind, “I think this first light is to see how fast I really was. ” In retrospect, it probably was. Another stoplight on the highway was coming up, and we stayed pretty much right with each other the whole way. “That whine from the engine is not good”, referring to the definite turbo or supercharger whine from the engine, “He probably has like 700hp” I thought. And I was about to find out.

The next stoplight was in the middle of nowhere, again. Another light that probably changed for no other reason than it had to change every 15 minutes, so some poor schmuck, usually me, doesn’t get stuck waiting forever. We lined up, and I knew this time was for real. “Ok watch the cross lights, wait for yellow, then rev to 3800, but try not to hit launch control”, I thought, as the dull murmur of a viper ready to strike just feet away on my left reminded me of my all too probable fate. Green…

“Holy shit this guy is fast. Wait.. Did he just shift?”, as my tachometer still read 5000rpm in first gear. “He did..What the hell??”, time for me to shift. “7000 rpms is not good for this quarter million mile engine. Haha, 7000rpms.. Maybe it will be new motor time.. YES..k-series here I come..” as the viper driver firmly planted the go pedal in the down position, and melted the 20 inch wide rubbers in second gear. This left me contemplating whether or not I was working hard enough in my life to be able to afford a Ferrari F430. “Then i would give viper guys a run for their money”, i thought. Well, I got into second gear nearly door to door with a viper, and even though he may have been feathering the gas, I still stayed with him, until he got to second and realized he needed a little less rubber on the rear tires.. Either way.. I got wasted, but I stayed with him for about 2 seconds.

At this point, the pecking order was in line, and the guy slowed and just stayed with me. We came to another stop light on the same highway, about 5 miles from the previous “big race” light, and I finally had a chance to talk to him. “That second gear is murder!” I yelled across the noise, referring to the burnout, “Is that thing turbocharged”, instantly realizing that turbochargers aren’t quite as popular with the pushrod people. “No, its supercharged”, he replied. “Well, your car is really nice and REALLY FAST”, I said. He grinned ” Yeah, I have another 06 twin turbo at home”, he said. “How is that possible, this guy is like 30, MAX” I thought, “I’m definitely not working hard enough, if this guy is telling the truth.” Either way, the light turned green and off we were, but at a more leisurely pace. another guy or girl in a Toyota Corolla had joined us from out of nowhere. We both just stayed behind him or her, and just drove next to each other for a couple miles, not really saying anything, just running together. We got to the next stoplight on the highway, and he yelled “this is my turn” out the window. We hit the stop light, and I yelled “Thanks for the runs”, and my light turned green. Another 7000rpm run to say good-bye, “thats all my little hatch should have to succumb to for the night”, i thought. I settled back into the 65 mph drive, thinking about what I can do to save for a Ferrari.

A List of Java Container Classes

A List of Java Container Classes

I spend a lot of my time programming in Java. I refer to it as my favorite programming language, as it was my first *real* programming language, I therefor naturally have bias toward it. The other day I was thinking, “Wouldn’t it be nice to have a centrally located list of all the Java container type classes for easy reference?”. Well, here it is.. I don’t imagine that it is an exhaustive list, so read up, and if i missed 1 or 2 or 5, post up a comment to let me know what I forgot.

  • AbstractList: A member of the Java collections framework. This implementation is only a bare bones implementation. This class supports Random Access. AbstractSequentialList, ArrayList, and Vector classes are derived from this class.
  • AbstractMap Classes: AbstractMap is a super class for ConcurrentHashMap, EnumMap, HashMap, IdentityHashMap, TreeMap, and WeakHashMap a family of containers which generally use hash functions to determine object placement in the table structure. Subclasses which use this class are known for very fast random access.

  • AbstractSet: AbstractSet is a superclass to CopyOnWriteArraySet, EnumSet, HashSet,and TreeSet.

  • AbstractSequentialList: This class is a member of the Java collections framework. This implementation is only a bare bones implementation. This class is built for sequential access. Linked Lists are Derived from this class.

  • ArrayList: Ammortized constant time add. Get, set, size, isEmpty, interator and listIterator run in constant time. This structure is dynamically expanding. similar to the idea of a vector in c++. This class is not threadsafe by default. This class will add an additional amount of storage equal to 50% of the previous ArrayList size when it needs more storage.

  • BitSet: A BitSet is a container for bits that grows dynamically. BitSets are great containers for 1’s and 0’s 8) . you can perform logical operations on BitSets as well. BitSets are not threadsafe.

  • Buffer classes: The classes ByteBuffer, CharBuffer, DoubleBuffer, FloatBuffer, IntBuffer, LongBuffer, and ShortBuffer are all primitive type containers based from an abstract superclass called Buffer. The subclasses of Buffer can all be created as read only buffers. These classes are also not type-safe. The buffers included in the buffer class may reside outside the scope of garbage collection.

  • ConcurrentHashMap: A Hashtable that supports nearly full concurrency. All operations are threadsafe in this class, but the caveat is that data reads are non-locking, and there is no support for locking the whole table during reads. Data access therefore reflects the most recent completed write.

  • CopyOnWriteArraySet: A thread safe version of ArrayList, in which a copy of the underlying array is operated on. This is obviously an expensive option to consider, but for arrays in which reads are significantly more common than writes, it is a viable option. When the iterator is created, a snapshot of the array is created for traversal.

  • EnumMap: This is a special class built for enum type keys. EnumMaps can contain only one type of enum, which can be declared implicitly or explicitly. EnumMaps are not synchronized.

  • EnumSet: Enumset is a container for Enum objects. EnumSets can contain only one type of enum, which can be declared implicitly or explicitly. EnumSets are not synchronized and are not thread safe.

  • HashMap: A Hashmap is Java’s version of a hash table. This implementation uses the Map interface for object containment. As with all hash storage methods, the trade-off for constant time access is the need for periodic rehashing if storage becomes an issue.

  • HashSet: This class brings constant time performance to the set interface. Iteration performance is in O(n) time. The implementation is not thread safe.

  • IdentityHashMap: This class is not used often at all, and is not recommended for use, except in very specific circumstances. If reference equality semantics are important, then this is the storage class for you. This class implementation is not thread safe.

  • List: List is effectively a object oriented implementation of the primitive array.

  • LinkedList: Java’s version of a singly linked list.

  • LinkedHashMap: This class provides a structure which is a hashmap and linked list. LinkedHashMaps maintain a doubly linked list through all entries.

  • LinkedHashSet: This class is an implementation of a hash table and linked list using the set interface. It is different from HashSet in that it maintains a doubly linked list through all of its entries. Basic operations are in constant time.

  • MapList: Maplists are Hashtables based on the Map interface. This class provides constant time performance for get and put operations, but operations including rehash of data provide a counter balance to this storage method. HashMaps are not thread safe in the default implementation.

  • Primitive array: This is the statically sized, c programmer version of the array. High performance, and low overhead make this a popular choice for simple programs, as well as programs which need a low memory footprint.

  • Queue classes: The classes which inherit from queue include AbstractQueue, ArrayBlockingQueue, ConcurrentLinkedQueue, DelayQueue, LinkedBlockingQueue, LinkedList, PriorityBlockingQueue, PriorityQueue, and

  • Stack: This is the classic Last In, First Out(LIFO) stack. It is built on top of the vector class, so it is dynamic in size.

  • SynchronousQueue: These classes share the characteristics that ordering is generally First In, First Out (FIFO) ordering, with the exception of the classes considered priority queue classes.

  • TreeMap: This is an implementation of a Red-Black tree on the sorted map interface. ContainsKey, gets, puts and removes are all guaranteed O(log(n)). The implementation is not thread safe by default.

  • TreeSet: This class implements the set interface, backed by a treemap instance. The class guarantees the elements will be in sorted order, and that add, remove, and contains operations are O(log(n)) operations.

  • WeakHashMap: A hashtable based map interface with “weak keys”. This means that the presence of a given key will not prevent the key from being discarded by the garbage collector. If ever there was a class that was not made for long term use, this would be it.

  • Vector: A dynamically resizeable array. This is a thread safe version of ArrayList. Vectors double in size when they fill up, rather than ArrayList’s 50% larger growth method.

WordPress Installation

WordPress Installation

In getting this new Blog setup, I ran into a tiny issue. I tried to access wp-admin/install.php and I recieved a “Your PHP installation appears to be missing the MySQL which is required for WordPress.” error.

I installed WordPress on Fedora Core 6, and used yum to install MySQL and PHP5. I forgot to install the php-mysql library, and hence the issue.

So, if you are receiving the same error and happen to be using Fedora Core 6, issue the command “yum install php-mysql” as root, and reboot your computer after the install.

Sure, you can restart daemons too, but that is less fun.