Starting with Ruby

Recently I was digging through the many PDF and other ebooks that I have purchased and found Learn to Program by Chris Pine. The book has a publication date of 2011, but I have no idea when I bought it, so I started looking into it. Rather than a philosophical approach to programming, it introduces the reader to programming with Ruby. As with nearly all introductory books, this one is easy to get moving with. The concepts are almost universal, so I have been making nice progress. However, Python is what I really need to be working on.

A blurb I read somewhere claimed that Ruby draws on the best of Perl, a language I never touched, but I once read it was developed by a linguist, which explains some of its quirks. Since I once studied linguistics, that made me chuckle. All the same, the linguistic basis might explain some of the nifty string methods in Ruby.

Oh, I also upgraded the default Ruby installation on Mac OS X to 2.5.0. I picked up some nice gems, too.

Errata for "Getting Started with the TI-89 Graphing Calculator"

Let me start by saying that I have a TI-89 Titanium, so perhaps what I list as errata is not for the TI-89, which differs from the Titanium. Regardless, I am working through Carl Swenson's book Getting Started with the TI-89 Graphing Calculator, quite a good book, but errors pop up now and then. Those that trouble me most follow.

Chapter 13, page 56 has two sum equations that are incorrect. I found the correct forms at TechniCalc. Change the equations to:

\Sigma(y1(a+i*(b-a)/n)*(b-a)/n,i,0,n-1)\rightarrow lhs(a,b,n)
\Sigma(y1(a+i*(b-a)/n)*(b-a)/n,i,1,n)\rightarrow rhs(a,b,n)

The commands in Figure 13.3 will now work.

Chapter 16, page 68 has code for a program called rsum() that will not work as written. To make it work, omit the final 1 in each summation command; that is, not
\Sigma(y1(xmin+i*d),i,0,n-1,1)*d\rightarrow s1
\Sigma(y1(xmin+i*d),i,0,n-1)*d\rightarrow s1
Fix all three instances and it will work.

Chapter 19, page 83 has no error but the equation is missing. It is simple enough, but here it is anyway:


Chapter 21, page 92 needs a second closing parens added to the piecewise equation for y1.

Chapter 24, page 104 has a boxed-in Tip for unlocking the data file. The last value should be 22, not 21.

Chapter 26, page 112 lacks the full equation for the overdamped case. The equation to enter is:

deSolve(y''+3*y'+2*y=0 and y(0)=-.5 and y'(0)=3,t,y)

Chapter 26, page 113 lacks the equation for the Home menu's F2:zeros() command. You can cut and paste from the equation in the history above the entry field then delete the "y=" part, but here it is:


Chapter 26, page 114 lacks two equations that are not difficult to figure out; nevertheless, here they are:

deSolve(y''+2*y'+2*y=0 and y(0)=-.5 and y'(0)=3,t,y)