Everyone knows engineers can’t write! I
is
an
engineeer!
But...
I Wish I Could Write!
Back to articles
I guess I could put this in the Rails or Ruby category but it touches a lot of stuff - that is why it is Stuff. This is an eMail I sent my former staff (really friends - at least they understand me!) back in April. I had just found out that some work I was doing for my former employer could not be implemented (or paid for) until next year - ethics stuff. A little discouraged I went off in other directions. Thought I'd post this for the heck of it. <strong>What I learned today.</strong> First off, I hope everyone has/had a Happy Easter. It is a fitting day to answer my own question. I'll try not to take too long on this and see if I can be a little more concise - but I will probably bounce between geek talk, religion and politics! Nil! That is what I learned - well maybe now understand a little better. And nil is having a profound affect on me. With the barrier that came up last week, I decided to do a little playing with RoR. Taking what I learned from building Restful Active4D, I took a little saner approach. Remember I initially converted my xml assessment stuff to RoR, then knowing that RoR was still a concept, I ported my RoR work to Active4D - and then tuned it. I decided to take the tuned version and port it back to RoR. I fixed up the nifty-scaffold generator templates to build saner templates that were more adaptive to CSS. Beside re-learning what I forgot, it only took a few hours to create the Restful CRUD application. I then started looking at the display and score processes and needed better data, so I imported the tables from 4D to RoR. That is when nil came up again. You have all heard me say many times, "There are only 0's and 1's". At the machine level, that is a correct statement. In life there is true, false and nil - or unknown. In fact, I'm not even sure about true and false anymore. When the data was converted from 4D, the routine would create NULL elements. If you try to display a NULL element in RoR, it produces an error "Can't convert nil to string". I've dealt with this before but just kind of ignored it by testing for both "nil?" and "empty?". This time a I did a little research to find the best way to test for the condition and then it hit me - Many questions in life can only be answered with nil! Is there a God? Will Obama destroy our country? Is the address blank or was it never defined? Now I hated philosophy - it was the only course I failed in college. I actually enjoyed the lectures, but didn't like to read and would get questions like "Who said xxxx" on a test and would have no earthly idea. I guess the philosophers spent most of their time trying to define what was true, false or unknown. In life our beliefs are nurtured by our teachers in life. There was a special on Fox New this weekend "The Passion: Facts, Fictions and Faith". I didn't watch it, it was just in the background but it started me to think about nil again! Then there is Glenn Beck's latest diatribe on what is happening to our country (allowing progressives to get in power) and his counter with "Faith, Hope and Charity". Before you go off making conclusions, Faith does not mean that God will throw Obama out of office - it is more that we have to have Faith in ourselves and our country that our checks and balances will right the ship. Ruby, by having nil (as do other languages), allows you to develop software closer to life. If you define a boolean in 4D, it sets the default to 0. Accepting defaults (There is no God, or God exists) is what has killed millions of people in the world. We Hope we never will see another Stalin, Hitler, or Mao again - but power corrupts and it will happen again - but I have Faith that it will not be on a large scale and Hope it will be fixed. After having these philosophical thoughts running threw my head for the last week, I have not changed - but I think a little more. I don't know if there is a God, but having faith in something has to be better than nothing! I heard a line this morning from someone reporting from Afghanistan that I've heard many times before - "You'll never meet an atheist in a foxhole". This is long enough. I was going to go into functional programming to get to the truth, but I'll save that for another time! Steve .textile
nil and Life
July 09, 2010 12:41