Friday, July 29, 2011

Your book is your calling card

The world is changing fast. It used to be that a Phd needed to pay attention to the adage "publish or perish", but in today's world a case can be made that just about all serious business people should get published. There's no need to panic, or feel that this goal is over the top. It's actually quite easy to author a respectable book, because that can include a short Kindle book that's many times easier to write and to publish than were the books of just a few years ago. It's a whole different publishing world out there today!


Instead of handing a prospective employer a resume, how much more powerful is it to hand them a book you wrote? Write the book on a passionate (for you) subject, and the doors to employment in the subject area you are passionate about are much more likely to open. I worked as a solar software engineer back in the 80's, on some of the world's largest solar power fields. Pictures of the photovoltaic trackers I programmed appeared on the covers of Scientific American and Popular Science magazines.
 I felt very fortunate to land that job back then. Recently, my book titled "Sun Position" was released on Amazon, in both Kindle and paperback versions. What a tremendous "calling card" or "resume" this could be if I were to decide to apply for a solar engineering position today. (I'm quite happy working on my LucidBrake invention right now, thank you, although I'd be glad to entertain contract or consulting work.)


  If you speak as part of your professional life, having a book to sell at the back of the room is a proven way to increase your cash flow.

If you're looking for employment in a highly technical or professional position, having a book can move you to the front of the line.


If you're simply looking for a way to increase your visibility and credibilty in a professional role, having a book is the ticket.


There are many, many more options today for getting published fast, efficiently, cost-effectively, and in a way that you can have more control over than was possible in the past. There's a lot to learn, but lots of people are finding it easier and more beneficial than ever before. For getting started, I suggest checking out the economical online video lessons, or the all-day intensive seminars provided by EJ Thornton at Books To Believe In. She really knows her stuff, and her information will likely save you thousands of dollars when you hire editors, graphics artists, printers, and other service providers.




Monday, July 25, 2011

Microsoft and manhole covers

Many years ago, when I was visiting in the Microsoft Press offices, a discussion of strange employment questions came up. I had heard a story that Microsoft often asked interviewees if they knew why manhole covers were always round. It sounds silly, but there is important logic to round manhole covers - they're round so they can't slip through the hole in the street and cause real problems when they fall into the manhole.

Supposedly they asked this question to see how well people could think outside the box, and of course, programmers who could think outside the box were more desirable to Microsoft. I've never been asked this question about manhole covers by Microsoft or anyone else, but for several years now I've had my own unique answer ready to go. (Microsoft Press published quite a few of my books though, so I'm sure not complaining.)

You see, the standard answer is wrong! There are an infinity of manhole cover shapes that won't fall down the hole. Let me explain.

A circle has a constant diameter, no matter which way you turn it. A square lid, on the other hand, can be rotated such that its width is less than its corner-to-corner distance, allowing it to slip through the square hole in the street.  The theory is that any planar shape other than a circle will have some distance across it that is less that some other distance across it, so it can be turned to slip through its own hole.  But consider the shield shape shown here.
This shape is formed by striking three intersecting arcs with their centers at the corners of an equilateral triangle. The distance from any corner to any point on the far edge is constant, just like the diameters of a circle are all constant.  There is no way to turn this figure such that it can slip through a slot based on its shape, again just like with a circle.

What's more, instead of three equally spaced points to define the corners, we can use 5. Or 7. Or any odd number of points.  Here's what the 5 pointed shield figure looks like.

There are an infinity of figures we can form this way, although they quickly approach the shape of a circle as the number of points increases.

Saturday, July 23, 2011

Pulling numbers into a range

In my recently published book, Sun Position, there are several astronomical calculations that result in angles well outside the range of 0 to 360 degrees. For example, there's a rather complicated formula for the mean longitude of the earth, or the number of degrees of angular travel for the earth as it orbits the sun, accurate for past, present, and future moments in time. The angle is calculated by a polynomial that returns a number that increases approximately by 360 for every year added to the input value. As a result, the angular position of the earth in its orbit around the sun is calculated as so many thousands of degrees, a number that's hard to work with.

The most straightforward way to convert this angle to something more usable is to repeatedly subtract 360 degrees until the result is brought into the range 0 to 360, although this is computationally inefficient. A better approach, and the one used most often, is to divide the large angle by 360, take the integer part of the result and subtract that number times 360 from the original value.

This technique works pretty good to bring large angles into the range 0 to 360, but sometimes, as in the case of an elevation angle, the range -180 to +180 is more appropriate. Also, in some calculations the angles are in radians instead of degrees, so ranges of 0 to 2*PI or -PI to +PI are more appropriate.

So, I decided to create a flexible function that could handle all these cases with ease. Here's the result, in Visual Basic syntax. It works very well...


Public Function Range(ByVal x As Double, ByVal rMin As Double, ByVal rMax As Double) As Double
   Dim delta As Double = rMax - rMin
   Return (((x - rMin) Mod delta) + delta) Mod delta + rMin
End Function


To use this function, pass it the number to be processed, the low end of the desired range, and the high end of the range. It works well with negative numbers, radians, degrees, or other number ranges. Here are a few examples...

Range(1234.56789, 0, 360) = 154.56789
Range(-456.7, -180, 180) = -96.7
Range(1234.56789, -3.1415926, 3.1415926) = 3.0635908
Range(1234.56789, 0, 1) = 0.56789