Clean Code (a well-deserved plug)

Book cover for Clean Code by Uncle BobI was sitting in a the Lone Star PHP development conference a couple of months and was listening to a guy talk about some seemingly relevant topic (to which I would give credit, if I could remember who it was and what he was talking about), but what I was struck by was with the conviction he spoke about a methodology in development of which had characteristics that….well, made me downright uncomfortable. I can’t remember all of the ideas he conveyed that had this effect on me, but the one that got my attention the most was the idea that well written code should have

no comments.

Wait a minute…what??? Yes, that is what he said….that does not compute. I have lived under the belief that code should be well commented….not that I did comment my code well (or that many coders ever do), but I always believed that I should.

Yet, this guy is not proposing the idea that that belief is incorrrect….he is stating a fact. One that I know to be true when he said it – but not knowing how this is possible. Thank God he did not leave me hanging, but went on to describe the source of this fact (or really the source that points to this fact, of which is the method that all real truth is conveyed.)

Clean Code: A Handbook of Agile Software Craftsmanship by Uncle Bob (aka, Robert C. Martin)

Well, I don’t read books. I used to, as a kid, read a lot. I read tons of fantasy and science fiction novels. In the last 10 years, I’ve read about 5 books and 3 of those are spiritual books, the other 2 were fiction. I DON’T read books.

Still, this presenter’s simple statement of fact that he seemed to have acquired by reading this book would not allow the fact that I don’t read books to deter me. I had to know if this truth could become more than a belief. It’s one thing to believe something – belief rarely changes anything substantial. It has to be known in a way that makes a difference. So, that propelled me towards the path of reading this book – well, that and the fact that the book was not very long and was available via Kindle (I really wasn’t about to read a book that was in paper format.)

Sometimes people misquote the carpenter and say “the truth will set you free.” He said “you will KNOW the truth, and the truth will set you free.”

IT DID.

(to be continued…..)

Movie Review–I Am Number Four

I am very pleased to say that my faith in Hollywood’s ability to do good science fiction has be officially restored. A couple weeks ago, my wife and I saw Super 8…and WOW. Great flick. True Spielberg (even the time setting.) Still, I was very hesitant on this movie, because I have just felt like the genre was on a severe decline (sans a few, e.g. Star Trek, Avatar.) I have to say that this one of my favorites of the last decade (must be, I’m blogging about a movie….which I never do, ok, actors on a decline, maybe…but not movies.) Still,I was so inspired by the acting,the storyline and the incredible portrayal of the powers that these beings have, especially when working as  team, had been yelling at the TV like it was an NFL game (back when I actually watched sports on TV.) The fact that this was a novel for teens (didn’t know this detail until afterward), makes me even more surprised of the depth and lack of 90210ism that this move had (and heck, even I think the lead role was kind of cute.)

Anyway, hooray for Hollywood today. Oh, and one more thing….boo to the so-called critics. Once again, my theory that if the critics hate it, then I will love it prove true. Thank god I don’t pay any attention to their silly ranting.

Facebook, Nerds, Writer’s Block….

Ok, life is busy. I think too busy if I can’t find 30 minutes to sit and write an article on my own blog. I hate to say….I mean it, I REALLY hate to say it, but my inspiration came from all things tonight….watching The Social Network. Really a great movie, but probably not for the same reason that my wife thought so. I mean, sure I understood most of the ramblings about code and various techno-nerd topics. However, what gets my juices flowing is the possibilities. I love writing code. I especially love writing code that does something (I can get pretty hot and heavy on code that does nothing too, so don’t think that was a mutually inclusive statement.) So, I am not talking about the possibilities of me getting to write code, although, I’m sure that that is intrinsically built into my salivation response. I’m talking about the possibilities for the future, for our world, for technology and how we are all becoming more and more connected.

For me, writing code is a spiritual….missing a word here….meditation? Not the word, but close enough. I am so focused when I have time to really get into the process.

So, why the heck do I have writers block? I don’t know. Maybe my aspirations of being a writer, amongst other things….is just that.

But I’m not giving up yet.

<beginrealtopic>

Writing JavaScript with PHP

I know, what kind of topic is that!#@? It gets worse, I really don’t know how to do it. I mean, I’ve begun writing this class (called, JS, go figure), that does exactly that. Still, it’s so tricky and so many ways that it can break. I don’t mean, to simply have the JavaScript built into a form so that it does validation or any of that crap. I mean, so that, without having to break stride in my PHP code, I can write complex JS and have it parsed correctly with the IDE of choice (PHPStorm is mine today, despite what you may have read.)

I’ve made good progress, but it’s painstaking and I feel like my current method is too primitive. I know my readership is small at the current time, but if anyone reads this and has any ideas about this sort of thing, please, let me know.

I’m a good JS coder…ok, I’m a so-so JS coder, but I’m a good JS-Prototype coder. So, it’s not my ability to write good JS code that is the problem (actually, it’s just the opposite.)

<endrealtopic>

So, there. Writer’s block over.