Didn’t take long did it. :)

Didn’t take long did it. :)

I already modded my car. I haven’t even had it a total of 8 hours, and I already ripped the dash apart. I put in an auxmod – which adds a line-in capability for the stock stereo. Can’t believe aux in lines aren’t standard on everything, but they stubbornly refuse to be in more than 50% of cars. I forgive my 2004, and since this thing works so well, I won’t complain.

Now to get back to listening to Moby Dick (books on mp3 – freely downloadable from the Portland Library!) every morning on my way to work. Over halfway finished with the book so far…

Trip completed

Trip completed

Update: it’s here. I’ll be driving over at lunch to pick it up.

I figured the car shipping would get stuck at way stations for days on end on its way out, but that hasn’t been the case at all. It’s moving right along and makes a great diversion while code is compiling to check up on the next spot. I’m hoping it will make it out well before the Apr 25th eta. Here’s the progress so far:

Fort Wayne, IN 0 mi <start>
Indianapolis, IN 127 mi
Arbury hills, IL 307 mi
Frankfort, IL 310 mi
Council bluffs, IA midnight 12th 758 mi
Brady, NE 09:00am 13th 1020 mi
Lodgepole, NE 10:00am, 13th 1146 mi
Kimball, NE 12:07pm, 13th 1206 mi
Cheyenne, WY 12:57pm, 13th 1275 mi
University, WY 03:04pm apr 13th
Buford, WY 02:21pm, 13th 1302 mi
Evanston, WY 10:00am apr 14th (all day) 1632 mi
Salt Lake City, UT 09:00am apr 15th 1713 mi
wilson, UT 10:15am apr 15th 1752 mi
Malta, ID 12:00pm apr 15th 1869 mi
Eden, ID 01:00pm apr 15th 1928 mi
Ontario, OR 04:00pm apr 15th
La Grande, OR 0:5pm apr 15th
Hood River, OR 07:00am Apr 16th
Troutdale, OR 08:00am Apr 16th <done>

8:30am – call from shipper that it arrived
12:00am – picked up car from shipper – arrived in almost perfect shape
01:30pm – DEQ testing = passed
02:30pm – plates and title taken care of, after driving past 3 state troopers that didn’t pull me over for no plates
03:00pm – bought new bolts and front mount for plates
03:30pm – back at work

How’s that for efficient!

live updates!? Nifty

live updates!? Nifty

I just found that the DAS auto shipper site actually has live updating of the car traversal.  I simply hit refresh and it went from Brady, NE to Lodgepole, NE.  How’s that for cool!  Poor guy is driving across Nebraska right now…

Your car is now in: Council Bluffs, IA

Your car is now in: Council Bluffs, IA

Interesting updates on the car progress. I checked around 5pm and it was in Frankfort, Illinois; and now it’s in Council Bluffs, Iowa. 756 of 2400 miles done. Google maps says thats 12 hours worth of driving. Whew. Glad I’m not doing it. Instead, this afternoon I had a beer with several friends on a patio in shorts, 60’s, sunny and warm.  Beautiful day today…

Quotes

Quotes

Mark Twain:
“Don’t go around saying the world owes you a living. The world owes you nothing. It was here first.”
“Why do you sit there looking like an envelope without any address on it?”

Plato:
“One of the penalties for refusing to participate in politics is that you end up being governed by your inferiors.”
“This city is what it is because our citizens are what they are.”
“The measure of a man is what he does with power”

Nifty links

Nifty links

Sub-pixel rendering on LCD displays:

VI color scheme tester/downloader – test out and download from a whole library of color schemes that some nerds hacked on for months…

Slyfex – auxMod. This little gadget plugs into the head unit inside your Mazda radio and turns the ‘media’ button into what it should have been – not XM satelite, but an aux-in line input. It’s all internal and you pick where you’d like the cable routed. Mine’ll be going to the center console box.

Your car is now in: Frankfort, Illinois

Your car is now in: Frankfort, Illinois

So far so good with DAS – Dependable Auto Shippers. They’ve gone about 340 of the 2400 miles.

They are who are bringing my car out, and are one of 4 shippers recommended by ebay motors. In talking to a few folks about auto shippers, here’s what I learned:

  • Happy Bob drives it: Never NEVER use the services where someone drives it out to you unless you don’t care about the car. They pay some kid/person with a license (hopefully) to just drive your car. One friend had their car totaled when the driver got t-boned just a few blocks from the destination. Another friend said he got his car – and it was full of wrappers, McDonalds bags, and other filth, etc. The guy had probably been sleeping in the car most of the way, and smoked about 10 cigars a day. He never did get the smells/cigar smoke out – not to mention the new ‘mystery stains’. And when he complained, nothing ever came of it. The guys that do this are usually the kind of folks who would have taken Greyhound, but found a way to do the drive and make a bit of cash while doing it. They may not have even had to pass a background screen.
    • Good: super-cheap
    • Bad:
      • You add all the mileage and wear/tear of the trip
      • No tracking – it’ll arrive when they feel like it’ll arrive.
      • Don’t know if the person driving will treat your car with any more respect than a rental – odds aren’t good if they’re doing this for a living…
      • God only knows how/where it’ll be driven and what will happen in your car along the way.
  • Generic car carriers: Most of these car carrier companies will quote you based on mileage because they don’t transport the car themselves. They just call up the pool of truck drivers and find anyone to carry your car. These are the most cost-effective way, but you don’t know who will be carrying it.
    • Good:
      • car is carried – no mileage or wear/tear added
      • Usually fully insured against damage/collision
    • Bad:
      • The guy that transports your car is the one who would take the least amount of money. Nuff said.
      • You have no clue who has got your car at any time – and the carrier usually has no idea where it is since they’re pairing out the work to whomever. One coworker thought they lost his car when it didn’t arrive and no call came 5 days after expected delivery date. (the company just kept saying ‘It’s in transit’). His car showed up weeks late – and no explanation of where it had been.
      • It might be sitting in the parking lot in downtown Detroit all night if that’s where the driver parked it to swap off with another guy.
      • Getting damage claims may be a nightmare, as they’ll need to track down the guy that had the car during the damage – and everyone can circle point or never respond until you give up.
  • DAS or owner/carriers – these guys own the trucks and the distribution centers.
    • Good:
      • no mileage/wear/tear – nobody driving it around.
      • carried by guys with good insurance – and since they had it the whole time – no way to back out.
      • Written inspection before acceptance and sign-off required after delievery.
      • You could pay a bit more for a top-load or even closed sides to avoid road debris (I went top load for $150 more)
      • Cars kept at their distribution centers between hauls – so they aren’t just sitting out somewhere.
      • online tracking
    • Bad:
      • not always the cheapest, but mine was within 10% of regular carrier
      • Seems to take a bit longer – 3-4 weeks estimated for me.
Your lockless future!

Your lockless future!

Queue grainy PSA video: “Here at the Intel Bit labs, we’re working on some exciting new things…”

Sufficed to say, multi-core programming is getting bigger and bigger – and is here to stay for the foreseeable future. We started back in the day with a single monolithic compute engine that people queued up jobs for. In the 60’s and 70’s, those big monolithic servers got many cores/threads – but you still queued up your individual jobs to run on them. Then, in the 80’s – single core computers caught on. Now, in the 2000’s, we bring many cores to the desktop masses. Now nVidia and ATI have graphics cards with hundreds of programmable ‘stream’ processors with massive floating point math support (dot products, 4×4 matrix multiplication, etc). And I’ll wager this is likely to be the direction for the next 10+ years. Gone are the halcyonic days of yore when one could write monolithic code for a single processor. And with multiple cores, comes multiple new challenges.

The first is algorithms and data structures. I just finished writing my first lock-less, thread-safe data structure. Granted, it was a simple lockless stack, but lockless and thread-safe none-the-less and was used to feed jobs to several cores. Seeing it in action is quite impressive. I had multiple producer threads filling it, while multiple consumer threads tried to empty it. Consumer/producer threads could switch back and forth being producers if the job queue emptied out too fast, or switch over and become a consumer if the stack was filling up too fast. All without loss of a single data element, and all without a single semaphore.

If you’re a computer programmer, you owe it to yourself to start thinking and writing in a thread-safe manners from here on out – and learning when you can ply your trade – and where you can’t. I know in my time, parallel algorithms were kind of a ho-hum addition towards the end of your algorithms courses. The 90’s was when all the big super-computer companies were going belly up. A lot of the research had already been done, and the basic take-away was that for some operations, parallel algorithms scale by the number of cores nicely, others stubbornly don’t scale at all. Best crack that old book and get yourself familiar with which ones do/don’t again.

There are two ways to go about thread safety – using the inherent structures of an API/system (SQL or other systems that inherently are built to handle multiple requests in a threadsafe way), or using hardware intrinsics down at the core. You should learn them both. Knowledge of high-level system abstractions is good, but when you find that suddenly your getting the same element twice, or one dissappears, or you get garbage at random intervals – you need to know how it works underneath – in spades.

Debugging parallel algorithms and data structures can be very painful. A very brilliant guy here worked for several weeks on a lock-based queue with memory/node reuse. The bugs were tenacious and very hard to duplicate. Some took a week or better to show up. The simplest change would fix or completely destroy the system. Memory allocation was something of voodoo art (anyone want to become way famous by writing up memory allocation routines for parallel/lock-less algorithms??). You think malloc/free bugs were hard to find before…

At least familiarize yourself with these topics:

  • New atomic hardware instructions – atomic increment/decrement, compare-and-swap, etc.  There are new commands coming out with each new processor – go find out what they are.
  • What new services are provided by my OS/language for synchronization?  I actually have had to use inline assembly for new hw intrinsics because many compilers don’t expose the new commands just yet but certain lock-less data structures and algorithms can’t be written without them.
  • What API’s/OS calls are thread safe at the app level, the thread level, and/or the os level?
  • Learn how to debug a multi-threaded app
  • What algorithms (searching, sorting, counting, etc) parallelize nicely, which do not
  • What kinds of data structures can be lockless? Which can’t?
  • In what novel ways can I combine lower-level atomic operations to build new atomic instructions (such as using atomic INC and CAS to build an n-way CAS)
  • How do I handle allocation/deallocation in a multi-threaded app?

Got more?

April fools

April fools

How’s this for fun. I went in this morning to sign the auto loan for my car. I then arrived at work and told everyone I bought a car. They laughed, and said, “Yeah right – April fools isn’t it?”. But no, I really did buy a car “yeah really – show us”…but I can’t…it’s in Indiana right now…but it’ll be here in a couple weeks… “Oh yeah – suuurrrreeee you did…”

Doh. Nobody believes me. 🙂