TruerWords Logo

Search TruerWords

This is one of my journal's many "channels."
This chanel only shows items related to "Essays."

Sign Up  Log On
Thursday, April 30, 2015

Creating Great Mobile Apps! (snark)

The following is a re-post of something I said on Facebook just over a year ago. The topic came up today in a conversation on Twitter so I figured it was time to move it to here where others can see it.

Written after Twist went under.

How to create a great mobile (iPhone/Android) app in the current business climate:

  1. Go to school, fail math. HARD.
  2. Have an idea for a cool product.
  3. Get your programming buddies together, create a demo.
  4. Optional: Show it to a venture capitalist. Get lots of money to grease the skids for the first release.
  5. Finish the app.
  6. Release the app. Make it free for everybody. You'll make it up in volume! (See step 1.)
  7. Get lots of users.
  8. Wonder why you're not yet profitable.
  9. (Optional) Get more money from the vulture capitalists!
  10. Spend lots of money on marketing.
  11. Spend lots of time on a big update that makes the app prettier and funnerer.
  12. Wonder why you're still not profitable!
  13. Go out of business. Disappoint the millions of users who would have paid for your app had you let them.
  14. Blame the system. The app store. The market. The business climate. Never consider your own utter failure at math, because who needs math when you have millions of customers ^d^d^d^d^d^d^d^d^d users!
  15. Return to step 2, wiser and stronger for your failure, to create an even better business based on a free app (in a completely different space).

This just keeps happening.

Saturday, April 11, 2015

Swift Spirals

Yesterday on Quora a particular Math question caught my attention and fired up my imagination. I've already linked to it, but here's how the question was worded:

Four persons K, L, M, and N are initially at the four corners of a square of side 'd'. Each person now moves with a uniform speed of 'v' in such a way that K always moves directly towards L, L directly towards M, M directly towards N and N directly towards K. At what time will the four persons meet?

(Why say they are people and then not give them real names? I thought that was funny.)

Let me rephrase the question. Four people (or uh... dots) are at the corners of a very large square. They're all going to move at the same time, and keep moving until they touch. Each person moves toward the person at the next corner of the square in the clockwise direction. (So the person at the top left moves toward the person at the top right.)

I didn't care about the actual question there at the end, "at what time will the four person's meet?" I was just interested in the path they would each travel, the shape it would form.

Now keep in mind that each person is always moving towards the next person, not towards the corner where that person started.

It was obviously going to be a spiral in toward the center. Could I write a program that would simulate this travel?

Yes, I could! Here's an Xcode Playground file (written in Swift) that demonstrates the whole thing. It's not fancy, but it does show the spiral being drawn and I've kept the math self-contained in a couple of functions.


Here's the same thing in some javascript, running in the browser.

  var graphSide = 500.0
  function sqrx ) {
      return ( x * x );
  var Point = functionxy ) {
      this.x = x;
      this.y = y;
  // thanks to my buddy Pythagoras
  Point.prototype.distFromPoint = functionpointB ) {
      return Math.sqrt(sqr(pointB.x - this.x) + sqr(pointB.y - this.y));
  var actorA = new Point00 );
  var actorB = new PointgraphSide0 );
  var actorC = new PointgraphSidegraphSide );
  var actorD = new Point0graphSide );
  var distToMove = 2;
  var lineWidth = 2.0;
  var canvasctx;
  function initSpirals() {
      canvas = document.getElementById"spiralCanvas" );
      canvas.width = graphSide;
      canvas.height = graphSide;
      ctx = canvas.getContext("2d");
  function reset() {
      actorA = new Point00 );
      actorB = new PointgraphSide0 );
      actorC = new PointgraphSidegraphSide );
      actorD = new Point0graphSide );
      var canvas = document.getElementById"spiralCanvas" );
      var context = canvas.getContext("2d");
  function runButtonClickede ) {
      window.setTimeoutincrementWalkers0 );
  function resetButtonClickede ) {
  // find a new point on the line between a and b
  function moveFromAToBpointApointBdist ) {
      var dist_total = pointA.distFromPointpointB );
      var newX = pointA.x + ( ( dist * (pointB.x - pointA.x) ) / dist_total )
      var newY = pointA.y + ( ( dist * (pointB.y - pointA.y) ) / dist_total )
      return new PointnewXnewY );
  function moveAndDrawFromAToBpointApointBdist ) {
      var dest = moveFromAToBpointApointBdist );
      ctx.moveTopointA.xpointA.y );
      ctx.lineWidth = lineWidth;
      ctx.lineTodest.xdest.y );
      return dest;
  // incrementWalkers is its own function so that we can see the 
  // image updating in an animated fashion. If it was just done in 
  // a loop, then all we'd see is the finished product.
  function incrementWalkers() {
      if ( actorA.distFromPointactorB ) < distToMove * 1.001 )
      // draw lines from old to new locations
      var destA = moveAndDrawFromAToB(actorAactorBdistToMove);
      var destB = moveAndDrawFromAToB(actorBactorCdistToMove);
      var destC = moveAndDrawFromAToB(actorCactorDdistToMove);
      var destD = moveAndDrawFromAToB(actorDactorAdistToMove);
      // update actors with new locations
      actorA = destA;
      actorB = destB;
      actorC = destC;
      actorD = destD;
      lineWidth = lineWidth * 0.99;
      window.setTimeoutincrementWalkers0 );
Thursday, November 13, 2014

Primary Colors

We had Lauren Monday night. That's wonderful! Her parents have been really generous lately about letting us spend time with her.

She's in second grade now, and what was not so wonderful was her homework. It was a reading-timing test. (As in, time her for a minute to determine how much of this essay she can read.)

The essay was the problem. It was all about how Red, Yellow and Blue are the primary colors. "They're called the primary colors because you can make any color with them."

It's simply not true. It's not even close to true. The primary colors are Cyan, Magenta and Yellow. Mixing pigments of those pure colors, you can make any other color in the visible spectrum. In fact, you can even make red (magenta and yellow) and blue (magenta and cyan), which are not actually primary colors.

You can't make magenta or cyan with those fake primary colors. No mixture of red, blue or yellow will give you either magenta or cyan, because magenta and cyan are actually both primary colors. You can't really make a pure green because green is actually cyan and yellow, not blue and yellow.

It is possible to cheat a little with crayons (and perhaps ONLY with crayons), because you're not really mixing the colors so much as layering them, so the top color becomes dominant. You still can't make magenta or cyan.

The funny thing is that even people in the printing/prepress business get confused about this. Everybody in the business knows the the 4-color printing process uses CMYK (cyan, magenta, yellow and black inks), yet many still think of red and blue as primary colors, because that's what they were taught in primary school.

I don't mean to claim this is a big deal, but it's an example of the kind of thing that gets under my skin. Kids are taught one thing that's absolutely untrue, and then anybody who ends up in a line of work or hobby that requires an understanding must be RETAUGHT the very most basic points because they've been misled their whole lives.

Incidentally, the same is true about the Bible. People are told what it says and means by other people who are just repeating what still other people have told them. When teaching someone, a huge amount of time has to be devoted to easing the student over and through those misconceptions which aren't their fault at all.

Thursday, November 28, 2013

Thank You

Thank you, Father, for the uncountable and innumerable blessings you've poured into my life.

Thank you Corinne for the love in your eyes and the touch of your hands and your humor and for putting up with mine and for sticking with me even when all seemed lost.

Thank you Lauren for being such a sweet, smart girl and for lighting up so brightly whenever you see us. I dare say I've learned as much from you as you have from me.

Thank you Mom and Dad for raising me, for teaching me the way I should go, for helping me to see the wonder and beauty and hope and humor in this life on God's Way.

Thank you Mikel and Shannon for adopting Corinne and I as surrogate parents, for letting us love you and Richie, Lauren and Sam, for coming home again, for letting Lauren still be such a huge part of my our life.

Thank you Katie for being one of the most wonderful people I know. Come home!

Thank you Ellyn for agreeing to be my only big sister (instead of my aunt), for forgiving me for NOT being there when you needed me a few years ago, and for loving me like only a big sister can. ;-)

Thank you Ben and Mandi for becoming more than "just cousins" to me this year. I love you both.

Thank you also to Lilly for being one of Lauren's best friends!

Thank you Steve for the excellent discussions of the truth and our life in it, for the many hours together on our bikes, for your patient and constant work to reunite something which looks permanently broken to so many others.

Thank you Mark for being there whenever anyone needs you, for always trying to be The Blessing that we seek for our brothers and sisters, and for being one of my oldest friends.

Thank you Darren for keeping me sharp, as David says, "like iron sharpeneth iron!" I've learned things from you, too, that I didn't seem to be learning anywhere else.

Thank you Frank and Bonnie for loving Lauren so much, and Frank for our new friendship!

Thank you Jim and Dee for trying to see past (or ignoring) my foibles, for being our friends, and for always reminding us to keep the Kingdom of God at the top of the list and the front of our minds.

Thank you Eric and Bonny for forgiving me for my temper (which got the better of me a couple years ago) and for everything you bring to our ecclesia.

Thank you Rich for the friendship and the work over the years. 7 ½ years!

Thank you Joseph and Andy for the work and the chance to make something(s) fun.

Thank you Corinne for the love and magic you work in the kitchen, and for how much you love to share it with our brothers and sisters (and anyone else who eats real food).

Thank you Robin for coming back into Corinne's life. She's my best friend, and you've made me happy by making her happier than I could do alone.

Thank you to Kim and Dave and Tiff and Joshua and Jed and Sarah and dozens or hundreds of other people, too many to list, who have brought love or peace or adventures or joy or laughter into my life, who have taught me something, or somehow managed to learn something from me.

Thank you, Father, for blessing us all so thoroughly, and for providing each of us as blessings to each other.

Monday, September 30, 2013

Air Fares, Wealthy Members and Generosity

(There's a point to this, but you have to read the whole thing to get it!)

I was reading a tech article and actually noticed an ad. (That's almost bizarre enough to merit a mention!) The ad was for Emirates Air. Specifically for, "First class private cabins between JFK and Milan." The ad's photo implied extreme comfort and luxury.

Note that I am NOT in the market for tickets to Milan. Or anywhere else.

Just out of curiosity, I clicked the ad and eventually figured out how to search for the fares for these first class flights.

Now I should point out that Emirates Air actually has a decent reputation, from what I've heard on NPR. They have budget seats.

These aren't them.

Emirates rates

The highest and lowest rates are highlighted, both near the middle of the table.

Who would ever, EVER, pay that kind of money for two people to fly anywhere on someone else's plane and schedule?

The high rate is so high that the lowest rate almost seems reasonable until you think about it in the absolute sense.

But, I suppose if you're a billionaire and your private jet is in the shop or you have family going multiple directions, $44,000 (boggle...) is just money.

After all, a man with $1,000,000,000 in the bank looks at $44,000 the same way a man with $10,000 looks at $0.44.

Yeah, that's right. Forty-four cents to the man with ten thousand dollars is forty-four thousand dollars to the man with a billion dollars.

OK, so I went to the extreme by bringing in Billionaires. There are plenty of them around these days (over 1,600), but there are a lot more ten-millionaires (over a million). So how does someone with $10,000,000 in the bank see a $44,000 airfare? The same way a man with $10,000 sees a $44.00 airfare.

This brings me, in my own round about way, to something I've been thinking about quite a bit lately. I often hear people talk about how generous this-or-that rich member of their church or ecclesia has been. It's clear that there is some gratitude there, but also that a bit of pedestal building has happened. That rich person has been elevated in someone's mind because of the generous donations made to the church.

How do those generous donations compare to the person's resources, though? If you had $10,000 in the bank, would you only donate 44 cents to your worthy causes and charities?

I'm trying to make a point without being blunt or sounding accusatory, so let me finish with a quote from a much wiser man than myself:

And there came a certain poor widow, and she threw in two mites, which make a farthing.

And he called unto him his disciples, and saith unto them, Verily I say unto you, That this poor widow hath cast more in, than all they which have cast into the treasury:

For all they did cast in of their abundance; but she of her want did cast in all that she had, even all her living.

February, 2016
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29  
Apr  Mar


Channel RSS: RSS Feed for channel

is Seth Dillingham's
personal web site.
Truer words were never spoken.