Date: Thu, 8 Sep 2005 22:36:30 -0500 (CDT) Subject: 100 hours a week and interface architecture X-UID: 87 Content-Type: IMAGE/JPEG; name="img1834.jpg" The last two weeks have been difficult because of my day job. Yesterday was a 19 hour day - as usual, no appreciation. But I did come to two realizations. 1. System architecture is important and consists primarily of subsystem interfaces. 2. 100 hours a week is required for the next six months I am in an engineering group that is approximately seven to eight years backwards when it comes to technology. We have a massive amount of object-based C++ code. One reason is that the design philosophy caters to the lowest common denominator. So the use of templates, explicit memory management, standard threading models and hashed or tree data structures (as opposed to simple linear searching and time complexity) is generally prohibited as is any refactoring. The result is a big system that doesn't do that much proportional to it's size and requires a lot of work to maintain. To add just another pull-down menu option may require one line code changes in half a dozen places followed by regression testing. In my experience, I've found that aggressive optimization can shrink code by up to 10x (have seen literally 50 KLOCS reduce down to around 3.5 KLOCS) and speed it up by one to two orders of magnitude. But unless people aren't looking, you aren't allowed to do this. So the last two weeks, I decided to push the envelope a little and templatized two of the modules. One component is at the application level and must interface with the standard infrastructure code we use. The other is an integration server that bridges between our group's systems and another's. In both cases, trying to templatize a design makes it clear how much consistency of interfaces affects how practical this is. In any country, all appliances will have standardized electrical requirements. This is why power supplies and moreover the electrical grid can be generic. But imagine a country in which there are no standards. Every appliance has different AC and DC requirements. It means every unit is now a special case. Everything costs more as there is standardization. Yesterday, I also realized that I'll have to pull the motor control board out again. My design uses SPI (Serial Peripheral Interconnect) as the interface between one of the Geode SBCs (Single Board Computer) and the microcontroller on the motor control board. However, the 2.6.x Linux kernels come with an i2c driver. Which should I use, SPI or i2c? The answer is that I will use whichever one works. I kept going back and forth and ended up wiring the board for SPI. I could have wired it for both SPI and i2c without any conflicts. But I didn't out of the drive to have a minimal design. But as the incremental cost is just a few inches of wire, there's no reason to have both. Had I conceptualized the system design of the motor control board and the SBC, this would have been obvious. SPI and i2C are two possible bus interfaces between them. But as I had my head in circuits, I didn't see this. Really, it's inexperience. But now I'm starting to see more connections between hardware and software. When I was an undergraduate at SJSU, I would go to class for around 20 hours and then study for 80. This allowed me to finish an hour exam in 25 to 30 minutes as I had memorized everything. Speed was limited by how fast my hand could write the solution. This was a sustainable workload for months at a time. What clicked yesterday is that I must return to this. I think there are these tradeoffs in engineering: PROJECT TRADEOFFS CAREER TRADEOFFS STARTUP TRADEOFFS time personal growth chronological time money compensation intelligence quality happiness hard work In any category, you can optimize only two aspects. This is traditional orthodoxy in engineering as I have learned. In my robot "startup" project, my intelligence is largely fixed. I can not improve on my basic genetics without neurological modification (with technology that barely exists - there are neurotropic drugs that do selectively improve memory and literally turn off the part of your brain that makes you tired - military has experimented with this for people who don't need to sleep for long periods). Anyway, so as intelligence is fixed, I can optimize chronological time and hard work. This has forced me to clean up my apartment. It is an ongoing process. I'm converting it over to a lab area. My bed is about three feet from the stuff in the photo. Also, I expect to move or relocate in six to ten months so will have to be more organized to do this anyway.