Wednesday, May 15, 2013

Increase Your Code Power: X-Macros

Copyright © 2010,2011 Gary R. Van Sickle

[Editor's Note: First posted on THE SHORTED TURN's WordPress.com site on 2010/02/21.]

Hello again, Gentle Reader,

Have you ever run across code littered with warnings to “keep this array synced with that enum!”?  Have you ever needed not just the numeric value of an enumerator, but its actual name, perhaps for debugging via printf()s?  Have you ever needed to serialize and deserialize enums in a portable way?

If you have come up against any of these problems, you’ve also probably exclaimed, “I’m SICK of Fighting The Tool!  There MUST be a better way!  Help me Shorted Turn, you’re my only hope!”  Good news, Gentle Reader, there is indeed a better way:

X-Macros.

Sunday, May 12, 2013

The Fault -> Error -> Failure Chain

[Editor's Note: First posted on THE SHORTED TURN's WordPress.com site on 2010/02/16.]


Copyright © 2010 Gary R. Van Sickle

Hello once again, Gentle Reader,

Today let’s discuss software defect terminology.  We’ve all complained about how “buggy” some piece of software we use is, or read the headlines about a “glitch” in some large software system causing unspeakable mayhem.  Terms like “bug” and “glitch” perhaps have a certain charm which make software defects easier for the layperson to swallow or the PR department to explain.  “A spoonful of sugar” and all that.  But Gentle Reader, as software professionals, you and I don’t traffick in charm – the world in which you and I live is a cold, dark place where the only “charming” “bug” is a “dead” “bug”, and our only respite is the incessant grind of ensuring, of knowing, that our software is as defect-free and as safe as we could make it.

As professionals, we can and should be more precise with our terminology when discussing software defects.


Saturday, May 11, 2013

New EE Article: “L200/L200C Macromodel”

[Editor's Note: Originally published on THE SHORTED TURN's WordPress.com site on 2009/12/05]


Copyright © 2009 Gary R. Van Sickle

Hello once again, Gentle Reader,

More good stuff for you today, this time in the form of an article on modelling the L200 linear regulator from ST Microelectronics.  Check it out!

Until next time, Gentle Reader, I remain,

Gary R. Van Sickle
President and CEO/Editor/Head Writer
The Shorted Turn

Don Eyles: Tales From The Lunar Module Guidance Computer

[Editor's Note: Originally published on THE SHORTED TURN's WordPress.com site on 2009/10/24]

Copyright © 2009 Gary R. Van Sickle

Hello once again, Gentle Reader,

If you’re like me, you can’t get enough of:
  1. Spaceships
  2. Computers and software that run spaceships
Perhaps somewhat surprisingly, there’s less information on the World Wide Internet concerning the latter than one might think.  Today, in an improptu Google Adventure on the topic, I ran across a a piece by Don Eyles on the Apollo LM’s control systems, entitled “Tales From The Lunar Module Guidance Computer“.  It discusses not only the well-known software restarts which happened during the Apollo 11 landing, but also a descent engine control loop stability issue (caused by a single incorrect lag value) which persisted until Apollo 14, going into considerable detail in the process.

While you won’t be able to build your own lunar lander control system after reading it, it is an interesting technical-insight piece on a number of issues and challenges encountered with that system.

Until next time, Gentle Reader, I remain,

Gary R. Van Sickle
President and CEO/Editor/Head Writer
The Shorted Turn

Misc: The Best Guitar Sounds Of All Time

[Editor's Note: Originally published on THE SHORTED TURN's WordPress.com site on 2009/10/21]


Copyright © 2009, 2013 Gary R. Van Sickle

Finally, The Shorted Turn brings you the authoritative list of the best guitar sounds of all time.  Unlike other lists of this nature, this one is complete, correct, and the final word on the subject.  If you disagree with anything on this list, read it again – you must have missed something.  Without further adieu:
NEW AND IMPROVED!
Due to overwhelming demand from long-time followers of The Shorted Turn, this post has been UPDATED with links to YouTube clips of the guitar tones in question.  Enjoy!
Sincerely,
The Management
2013-05-12: NEWER AND EVEN MORE IMPROVED!!
Due to the ever-changing nature of the Internet, some of the links pointed to YouTube clips which no longer exist.  They have been fixed.

Sincerely,
The Management

10. “Dance The Night Away”, Van Halen II, Van Halen
Ok, I’ll admit it: Edward Van Halen is really only on this list at all because I know if I didn’t put him here you’d all have me drawn and quartered.  But he only gets in at #10, and just barely at that.  Yeah yeah, “the brown sound” and all that, whatever.  I will admit though, that for a keyboardist, Edward can play the guitar pretty well, and does have a passably decent sound to boot, well documented by this track.

 9. “This Beat Goes On/Switchin’ To Glide”, The Kings Are Here, The Kings
Oh man, the perfect “mush” rhythm guitar tone on this track.  It doesn’t hurt that the song absolutely rocks either.  Harmony’s the sweetest sound baby YEAH!!!!

8. “Simon and Simon Opening Theme”
Yeah, you read it right.  And you know as well as I do that not only does the song rock, but the guitar tones are pretty sweet as well.

7. “Mississippi Queen”, Climbing!, Mountain
While the rest of them dudes was a-gettin’ their kicks, buddy, beg your pardon, Mountain was dialing in two of the best guitar sounds of all time, and in the same song.

6. Anything from AC/DC
Seriously, is there any sound the Brothers Young have ever recorded that was not 100% Grade-A awesome?  Answer: no.  It all rocks.  Rocks hard.  But let’s pick one: “It’s A Long Way To The Top (If You Want To Rock ‘N’ Roll)”.  I’ll tell ya folks, it’s harder than it looks.

5. The last chord of Richards’ solo in “Sympathy For The Devil” (at about 3:27), Beggars Banquet, The Rolling Stones
After suffering through about a minute Keith Richards soloing with the absolute worst guitar sound of all time, we are treated to a glorious, single chord hit that contains more awesome than should be allowed to fit in the groove of a 33-1/3".

4. “My Kinda Lover”, William “Billy” Squier
While not a spectacular guitar sound in and of itself, the intro riff on this song is recorded so well that it’s like young William is rockin’ his axe directly into your car stereo.  Bravo Mr. Squier, bravo.  Way beyond revenue.

3. “29 Palms”, Fate Of Nations, Robert Plant
Weren’t expecting that one, were you?  Listen to this track though: there are a couple of really nice clean guitar sounds on it, whose equal I am unaware of.

2. Brian May
Oh lordy, where to begin?  How about “Killer Queen”?  How about “Bohemian Rhapsody”?  How about anything the dude has ever played through that astrophysically-perfect hand-made guitar of his?  It’s simply the perfect sound, and there isn’t a player amongst us who doesn’t crave it.  Guaranteed to blow your mind – any time.

1. “Call Me the Breeze”, Second Helping, Lynyrd Skynyrd
The intro guitar riff to this song gives sound a reason to exist.  QED.

So there you have it.  You’re welcome to fight amongst yourselves about the relative rankings above, but I can assure you that they are 100% correct.  You’re welcome.

Until next time, Gentle Reader, I remain,

Gary R. Van Sickle
President and CEO/Editor/Head Writer
The Shorted Turn

Announcement: Carputational Sciences Division

[Editor's Note: Originally published on THE SHORTED TURN's WordPress.com site on 2009/10/17]


Copyright © 2009 Gary R. Van Sickle

Hello once again, Gentle Reader,

The Shorted Turn is pleased today to announce the formation of our brand-new Carputational Sciences Division (CSD).  Carputational Sciences is an exciting new field covering the electrical, mechanical, electromechanical, and software design, implementation, and deployment of Carputers and Carputer Accessories.

Check out the charter on the About page, and prepare yourself for a deluge of Carputer-related content in the very near future!

Until next time, Gentle Reader, I remain,

Gary R. Van Sickle
President and CEO/Editor/Head Writer
The Shorted Turn


Software Safety Basics PowerPoint

[Editor's Note: Originally published on THE SHORTED TURN's WordPress.com site on 2009/10/11] 

Copyright © 2009 Gary R. Van Sickle

I ran across a better-than-usual PowerPoint presentation on the basics of software safety, somewhat cryptically entitled “Software Safety Basics”.  It’s slides for a CompSci course, so get it while it’s hot (i.e. before the semester ends):

http://www.csl.mtu.edu/cs3090/www/lecture-notes/Software%20Safety%20Basics.pptx

It’s essentially the standard CSci safety course introductory slideshow, following the standard format:
  1. Here’s a bunch of costly/deadly software failures that happened.
  2. Here’s basically what happened in each instance.
  3. Here’s some definitions of the terms and concepts we’ll be dealing with for the rest of the semester.
By its very nature, it is extremely high-level and lightweight.  What makes this one better than average are a few things:
  1. The standard littany of case studies has been updated for the 21st century, complete with good use of graphics.  I.e., not another rehash of the Therac-25 - except as sad footnote to an exactly equivalent failure which occurred with a different radiation therapy machine some twenty years later (2000).  [Italics mine.  And that's twenty Internet years.  Has our profession truly made no progress in all that time? - Ed.]
  2. A good graphical representation of the Fault-Error-Failure model (see pages 21-22).
  3. A good (and again very high-level) state-transition-diagram-like depiction of  a “Model of system failure behavior” (pg. 26) which is applicable to all systems, even if they’re completely ignoring safety considerations.
So take a look if you want a good high-level overview of this topic.

Until next time Gentle Reader, I remain,

Gary R. Van Sickle
President and CEO/Editor/Head Writer
The Shorted Turn