Tuesday, December 29, 2015

History of my Javascript (random thoughts)

Loosely coupled, well-supported and easy to use.  SailsJS really is the epitome of a NodeJS ORM/MVC framework. I ended up using SailsJS  because I expected certain standards and they delivered.

NodeJS has matured over the years and multi-core environments make it so much more awesome!

I have always tried all new technology and dabbled in:

  • ASP 3.0
  • XML/XSLT
  • .NET
  • Visual Basic
  • JSP

However, I lived in Ruby land for a few years and grew through Ruby 2 and Ruby 3 and found that maintaining love for it was more pain than it was worth.  Gems and libraries died off from support, assistance was hard to find.  Ruby and Ruby on Rails as a trend became a maintenance nightmare.

These downfalls are not due to the language or framework, but due to the fact that "IT" constraints don't upgrade as fast as the development arena does. We were stuck with old software for way too long.

I worked in PHP for quite a while, Codeigniter, Symphony, Cake and Zend.   All good but somehow never felt right. Seemed like a hybrid of Perl with Java and C conventions.  Documentation was great but consistency behind usage was all over the place.  I had a good 'bout of about 10 years with PHP and just gave up as NodeJS, Dart and other JS related languages started to peak.

I turned back to my core, what I knew, and Javascript was there.  The concepts of:

  • Easy to understand
  • Prototyping
  • Mutable objects
  • Lambda support
  • Asynchronous by design
... were so natural to me. Moving from frontend JS to NodeJS was so easy.

Scared by the past failures of
  • jScript
  • Apache Jaxer
.. server-side JS just still sounds bad. 

However, knowing Google and their V8 Engine was taking storm over the initiative was a HUGE revival!

I am very happy that I have turned back to my core knowledge as it has provided many awesome solutions.

Long live Javascript!




Tuesday, December 8, 2015

I Love Javascript but...

I love Javascript. It is the language of my choice.  I can do everything with it.  I love NodeJS as well.

But, I hate when I open a project in an editor with Javascript.  Browser-side and server-side code, they all have .js extensions - eek!

It is easy to confuse your IDE with multitudes of Javascript files that are named the same but are in completely different interfaces of your application.

How to solve?  Perhaps adding some silly extra extension to your frontend files like:

clients.interaction.js

But who wants to write that extra suffix?  Sure you could make it shorter like "ui" or whatever. We do have EJS which heralds the distinguished .ejs extension but it still looks very close to .js.  Perhaps:

clients.view.ejs

Now onto backend, we like our short file names, Clients maps to clients.js in a controller, right? Again, if we kept the nomenclature throughout the app, we might have "clients.js" for a:
  • UI processed Javascript file
  • UI template Javascript file
  • Controller file
Oh yeah, forgot to mention the potential model:

clients.model.js

I just think that adding all those "dots" is silly for application but an IDE that lists all files can easily make you lose your place, even if you have navigated into the correct folder.  Therefore, we might need to think about a standardized convention - or do we?  Or is this ask stupid and petty?  Not sure, but I do find myself opening one file just to close it after I realize I am in the wrong folder.

We could go with the acclaimed CamelCase model and that would suffice but enforcing case-sensitivity on files sucks for Windows users.  It would look pretty though:

  • ClientInteraction.js
  • ClientView.ejs
  • ClientController.js
  • ClientModel.js
Any ideas are welcome for managing modern NodeJS applications.

Monday, December 7, 2015

How Did I Get Here?

First things first, pardon me being all over the map in this post, it is rather general as I just write what comes to mind.

I have spend the last 5 days:
  • Learning oCaml
  • Writing Python scripts
  • Remembering my Perl days (and writing code)
Isn't technology super fun?!  I can't say it has been a bad experience. The issues I have encountered have challenged me to make different decisions and find smarter ways to achieve short-term goals.

At my core is VanillaJS.  Back in the day, I was all LAMP stack.  I moved into MVC more and delved into PHP and Codeigniter, Zend and Symfony. Can't forget to mention the shit-pile we call Drupal and the wonderful yet awfully insecure WordPress.

I was tired of that and moved into Ruby and picked up Ruby On Rails.  Awesomeness was there but short-lived - it just didn't scale well and the developers were too arrogant for my taste. 

I originally started development without code at all - I was a designer using charcoal pencils, drafting material and eventually Corel Photopaint.  

I was an art major, I was and am still talented with art - not sure why.  I also am a music "guy" - have played drums since I was ten years old.  I also tried: Trumpet, Trombone, Saxophone, Guitar, Piano. I stayed with drums for some reason and didn't find passion in the others.

I actually learned that I wasn't an art major about one year into college. I hated the judgmental instructors who wanted to draw on my shit. I changed over to music.  Hell yeah! I'm gonna be a music major!   Nope.  That was boring as fuck and seemed eerily repetitive of my high school days; time for a change!  

I became a cartographic design major.  It seemed right, a mix of computers, art, science and such - what fun. Except that every other student in my classes had "super computers" of 1994.  I hand drew all my shit, laid lines on grid paper and used technical tape to make fancy diagrams.  I was doomed in that idea - I needed a computer!!

We always had computers in the household.  My father somehow would obtain the "leftovers" from his workplace which included an old Apple IIe, Commodore Vic 20 and some brand of MS-DOS workstation.  We also had that wonderful and loud dot matrix printer - geez were we cool!

With that MS-DOS computer we had Windows 3.1.  I had to load it from 5 inch floppy disks to run it every time; it wasn't very efficient.  I didn't really get the whole idea of the GUI that Microsoft had developed and I turned to making something useful with QuickBasic

I was collecting a lot of toys during that time.  Truth be told, I was a hoarder and scalper.  I had every Power Ranger, Spawn and Star Wars figure and I was determined to make money on selling them.




Lo and behold came my first ever website, The "ToyScout" (no it no longer exists). My goal was to buy and sell Star Wars figures across the globe. Awesomeness of the idea is that it actually worked.  I collected about one thousand dollars of foreign toys making overseas trades for my expensive hobby. I truly had the holy-grail of global modern Star Wars to later sell at conventions and toy shows.

My first programming application helped me keep track of my inventory of toys - it was awesome! I could easily lookup any item that I had and move it through my QBasic application.  I was very proud f myself.  Being the son of a great Fortan developer, I suppose I picked up something. 

I have to continue more later, this story can go on forever...

Thursday, November 5, 2015

Framework Kool-Aid

It was bound to happen again.  I despise Web frameworks with a passion as I hate the over-abstraction; the bloat and the complications with too many libraries that one has to learn.

The last framework I started building was in PHP as Zend, Cake and CodeIgniter were so built-out and I didn't want all their features:

https://github.com/crh3675/surf-for-php

I never had enough time to make anything of it, but I believed strongly in the concepts.  I wanted to build something that made it easy for those unfamiliar with MVC to have a transitional route.  Surf did exactly that.  Perhaps it wasn't run-of-the-mill or well documented but I built many good projects with it.

Well, now I am at it again, except my language of choice is NodeJS (love it).  I am a lifelong Javascript guy - I can do anything with Javascript and it has done great things for me!

Long story short, here is the new framework I am building:

https://github.com/crh3675/nodeii

I still have more to do before a Beta release but as I stated earlier, I believe in the concepts and the easiest way to demonstrate concepts is to actually "do them".

Like it, love, hate it, despise it, any comments welcome.

Tuesday, November 3, 2015

Code Reviews Need "Mood Tags"

Have you ever had the job of commenting on another developer's code? If not, it is actually painful if you have strong opinions on some items and are candid and silly for others. The most difficult aspect of code reviews are the perceived implications and inflections in the tone when writing your:
  • Subjective comment
  • Rude comment
  • Haha funny comment
  • Just talking smack comment
We have emoticons and other ways we communicate with social media platforms, why not with Code Reviews? I find myself sometimes writing code reviews and then saying to myself, "Gee I sound like an asshole".  Or even, "I don't think I expressed that opinion the correct way."

However, if I was able to "tag" my own comment as "Asshole Statement", the recipient would at least know that I accept full knowledge that my comment was "ass-holish". We should have the ability to tag our code review comments as we do with emoticons nowadays.

We need tags/emoticons such as:
  • Idea - Recommendation (Here is a cool alternative)
  • Strong Opinion (I am Jedi master and have the "right; solution)
  • What Were You Thinking? (Your code makes no sense to me, spaghetti all over)
  • Alternate Solution Proposed (Good job, here is a more efficient way though)
  • Should Fix This At Some Point (It works but might cause unforeseen issues)
  • Critical Oversight (Oh snap, what about the fib in the fab on the fob with the flip?)
  • Your Code Sucks (WTF is that? You need skillz assessment)
This would eliminate any inflections in perceived written tone and give the recipient at least a notion that the reviewer is trying to convey their writing or lack-of writing skills in a certain mood.

 Just my thoughts.

Saturday, August 29, 2015

Angular *not Trending

Despite my excitement (lack-of) to use AngularJS, I do believe in a fair trial.  I have done quite some research and found some insights from Google themselves (aka AngularJS). Excerpt presented:

ng-controller="UnsupportedDeviceCtrl"ng-class="{'unsupported-device': showUnsupportedMsg}"><md-icon class="exclamation-mark generic-hide-in-mobile" md-svg-src="https://ssl.gstatic.com/trends_nrtr/117_RC06//ic_exclamation_mark_24px.svg"></md-icon>

I did actually peruse the source code of their website as I was much curious as to how and when they "eat their own dog food".

Well, they in no way showed usage of "ng-model", quite strange eh?

However, usage of "ng-controller""was apparent. Not sure what that means except "what a waste of of shit".
Albeit, please don't anyone preach another Javascript framework upon me; I care not. I use the KISS approach and Angular, you are far from it.
By the way, I am hammer and nails.

Thursday, August 13, 2015

Roofing Tool 3000

So (in concept), I wanted a new roof.  Simple right? Shingles, nails and some good experience about shingles and nails along with some basic weathering.

Finding that person for the job, shingles and nails guy - impossible!

The shingles and nails guy is actually now the "Roofing Tool 3000" expert.  He isn't qualified for shingles and nails but he sure knows the "Roofing Tool 3000".

He knows:
- How to configure the tool
- How to load the tool
- How to embrace the tool
- How to sell the coolness of the tool
- How to use the tool

Does this tool make his job easier?  In his opinion, yes.  In reality, it just obfuscates the actual work that is being done meaning he no longer has to be smart - the tool is smart for him.

So what happens when the "Roofing Tool 3000" is broken, this guy isn't an expert in fixing the tool and he has to to hire someone who knows shingles and nails to finish the job.

I am shingles and nails.