Archive
Surpise, Suprise, Surprise
I always get a kick out of how people express great surprise when a management shakeup occurs and the old guard is sacked for the not-so-old guard. “OMG! I can’t believe so-and-so is gone“. “It’s about time so-and-so got booted“. “Why the hell is so-and-so still here?“. “Why am I still here?“.
Well geeze, the reason a change was made was because it finally became unavoidably obvious that something wasn’t working the way it should to somebody who had the power to make the change. Nonetheless, changing a leadership team in response to an existential crisis doesn’t guarantee squat. At best, the new team will propel the org out of the crisis and place it on a trajectory of success. At worst, the org’s demise will be accelerated.
Risk Averse Weenie
In this short video interview with the MIX‘s Polly LaBarre, “Are you a Type A or a Type I”, Daniel “Drive” Pink talks about finding and flocking with the right people for you. Mr. Pink wisely advises each person to “find out what you’re good at when nobody’s looking” and to avoid flocking with “risk averse weenies who are fixated on achievement for achievement’s sake“.
One Chart Summary
While flipping through Herb Sutter’s “C++ And Beyond” keynote speech charts, I stumbled upon this fabulous one chart summary of all (almost all?) the new features available in C++11.
Pretty intimidating, but cool, eh?
What Will The Children Think?
A Bunch Of STIFs
In “Object-Oriented Analysis and Design with Applications“, Grady Booch argues that a successful software architecture is layered, object-oriented, and evolves over time as a series of STIFs – STable Intermediate Forms. The smart and well liked BD00 agrees; and he adds that unsuccessful architectures devolve over time as a series of unacknowledged UBOMs (pronounced as “You Bombs“).
UBOMs are subtle creatures that, without caring stewardship, can unknowingly sneak up on you. Your first release or two may start out as a successful STIF or a small and unobtrusive UBOM. But then, since you’ve stepped into UBOM-land, it can grow into an unusable, resource-sucking abomination. Be careful, very careful….
“Who advocates for the product itself—its conceptual integrity, its efficiency, its economy, its robustness? Often, no one.” – Fred Brooks
“Dear Fred, when the primary thought held steadfast in everybody’s mind is “schedule is king” instead of “product is king“, of course no one will often advocate for the product.” – BD00
Smart And Well Liked
You like me, you really like me! – Sally Field
When I’m feeling down and I need a good chuckle, I like to periodically parachute into the spam community and observe what they’re saying. Of course, since it’s universally known that all bloggers want to be liked and perceived as super smart, spammers “cleverly” try to exploit that opening:
Bravo guys and gals, right on! But jeeze-us, kant yuo git yore seplling wrgiht?
Multi-Pronged Response
To aid bloggers who’ve signed up for the 2011 “post a day challenge“, wordpress.com e-mails out example topic ideas to stimulate bloggers’ imagination. In “The Impulse to Create”, Daryl Houston poses the question “why do you blog?“.
Hmm. I’ve asked myself that same question several times over the past couple of years. I’ve conjured up this multi-pronged response:
- To share thoughts, ideas, opinions, experiences with anyone who’s willing to listen
- To learn more about the subject I’m writing about
- To blow off steam (against imaginary BMs and BMWs)
- To make stuff up
- To manifest the unmanifested
- To move toward the peak of Maslow’s pyramid: self-actualization
How about you? Is there something you regularly do outside of family and work for your soul?
Doing Double Duty
In the industry I work in, domain analysts are called system engineers. The best system engineers, who mostly have electrical engineering backgrounds, know how to read code. Specifically, they know how to read C code because they learned it as a secondary subject in conjunction with hard core engineering courses (I actually learned FORTRAN in engineering school – because C hadn’t taken over the world yet).
Since the best engineers continuously move forward and grow, they often take on the challenge of moving from C to C++. One of the features that tends to trip them up is the dual use of the “&” token in C++ for “address of” and “reference to“. In C, there are no “references”, and hence, the “&” serves 1 purpose: it serves as the “address of” operator when applied to an identifier.
The code snippet and its associated output below show the classic, single purpose use of the “&” operator in C to obtain the “address of” an integer type identified by “x”.
In C++, the “&” token serves two purposes. The first one is the same as in C; when applied to an identifier, it returns the “address of” the object represented by the identifier. As the code below illustrates, the second C++ use is when it is applied to a type; it represents a “reference to” (a.k.a “alias to”) an object.
So, what good is a reference when C++ already has pointers? References are safer than pointers. When defining a pointer, C++ (like C) doesn’t require that it be initialized (as the first code fragment shows) to a valid address value immediately. Thus, if the code that initializes the pointer’s value to a valid address is far away from it’s definition, there’s a danger of mistakingly using it before the valid address has been assigned to it – as shown below. D’oh!
Since C++ requires a reference type to be initialized at its point of definition, there’s no chance of it ever being used in an invalid state. C++ compilers won’t allow it:
Another reason for “preferring” references over pointers in C++ is the notational convenience it provides for accessing class members:
It may be arguable, but besides saving one keystroke, using the “.” method of access instead of the “->” symbol provides for cleaner code, no?
So there you have it. If you’re a system engineer that is struggling to learn C++ for self-growth or code reviews, or a programmer trying to move from C onward toward C++ proficiency, hopefully this blog post helps. I know that expert C++ book authors can do a better job of the “what, how, and why” of references, but I wanted to take a shot at it myself. How did I do?
Note: I used Eclipse/cygwin/gcc over Win Vista for the code in this post. Do you see those annoying turd characters that surround the “r” in the pink compiler error output above? I’ve been trying to find out how to get rid of those pesky critters for weeks. As you can see, I’ve been unsuccessful. Can you help me out here?
Premature Optimization And Simplification
Premature optimization is the root of all evil – Donald Knuth
Most, if not all software developers will nod their heads in agreement with this technical proverb. However, as you may have personally experienced, one man’s premature optimization is another man’s simplification. Some people, especially BMs and BMWs shackled from above with a “schedule is king; what is quality?” mindset, will use that unspoken mantra as a powerful weapon (from a well stocked arsenal) to resist any change – all the while espousing “we’re agile and we embrace change“. Lemme give you a hypothetical example.
Assume that you’re working on a project and you discover that you can remove some domain layer code with no impact on the logical correctness of the system’s output. Furthermore, you discover that removal of the code, since it is used many times throughout the BBoM code base, will increase throughput and reduce latency. A win-win situation, right?
The most reliable part in a system is the one that’s not there – because it’s not needed. – Unknown
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. – Antoine de Saint-Exupery
OK, so:
- you disclose your discovery to the domain “experts”,
- they whole-heartedly agree and thank you,
- you remove the code, and all is well.
Well, think again. Here’s what may happen:
- you disclose your discovery to the domain “experts”,
- you receive silence (because you’re not a member of the domain layer “experts” guild),
- you persist like a gnat until the silence cannot be maintained,
- you’re “told” that your proposal is a pre-mature optimization,
- you say “WTF?” to yourself, you fire a verbal cruise missile at the domain experts’ bunker, and you move on.
Defacement
While browsing for blog post ideas, I felt a strong need to deface this Dilbertonian classic with BD00 graffiti:















