Wednesday, February 04, 2015

At my employer they are implementing a build tool that I was asked to create a batch file that would execute an MSBUILD from the batch file. It has been a while since I have had to work on scripting in BAT files - which goes back to the original MS-DOS operating system.


I found myself struggling to get little things to work - mostly due to unfamiliarity or not having used some parts for years - I have focused on using Powershell since 2008 and used VB script and Cscript for the ten years before that. The BAT command file format was something I used - but only as needed.  This new task brought back some old and new challenges.


The one thing that took me the longest to realize was that setting variables does not allow a space between - in Powershell and VBScript - that had not ever been an issue - but in the bat file - it took me some time to realize that this was why variables were not present after setting them.





In the two lines above - VAR1 will have no value after the SET statement runs and VAR2 will have a value - because of the whitespace.  It took me a long time to reach that discovery - which is why I am writing this. Hopefully it helps others.


The batch file sets variables that go to the environment variables within that session.  I learned a few things to help with the batch files.


In my searches for information on what I was missing - I found a great little series by a Steve Janson on Batch commands. The writeup was clear and gave good tricks that were needed to accomplish this task correctly.




The main trick for a batch file - is to use the





The pairing of those two protect the variables to not be set to the environment variables - effectively making the SET variables to be private variables to that task at hand - which was a nice touch for batch processing.


In trying to figure out why the variables would not have a result - I found a technique that would detect and exit the script.



REM == IF THE LOGDIR is EMPTY go to the ERROR  for this condition.








REM ====================================================



REM =====================================================


@ECHO The PROJROOT variable was NOT detected.




@ECHO The LOGDIR variable was NOT detected.






The SETLOCAL and ENDLOCAL  scope the SET XXX variables to that section of the batch script - that was something I had not seen - and in keeping the session environment variables clean made that very handy.


There were some reference links I found that might be useful later too.


Wednesday, February 04, 2015 10:18:46 PM (Eastern Standard Time, UTC-05:00)
 Saturday, January 31, 2015

Earlier I started the idea of learning the Durandal framework that Rob Eisenberg wrote.  Then last year he was brought onto the Google team for writing Angular 2.0 - and Rob gave the presentation at the ng-europe conference on the Routing framework - that was usable for both Angular 1.3 and Angular 2.0.


Rob Eisenbergs work on the Angular team gave me hope that the merger of Durandal and Angular had to be the best of the best working together. However shortly after that  ng-europe conference - Rob left the Angular team - and it seemed like nothing was going on -his lack of community presence was noticable - in fact the evening of Jan 26, 2015 - I was speaking to the .Net user group leader about volunteering to speak on a topic - maybe Durandal and Angular. We discussed that Robs lack of postings was odd - which turned out to be the same day that Rob Eisenberg posted his announcement of a new framework being available - Aurelia.


I have now picked this framework to study - and do a presentation on for the user group.  There are similarities to Durandal - which should be expected.


Aurelia is expecting the browser to support ES6 as the new ES6 classes form some of the basis of the architecture of this new framework - what Rob sees as the "direction of the web" - that he mentioned in his post of leaving the Angular team - he did not agree with their direction now.  Today - on the CanIUse site - that might limit the browsers to Chrome, Firefox, Opera - they are about 85-90% implemented in those browsers - I have not seen any numbers on the new Spartan browser for Windows 10.  (The leader of the local JavaScript user group made the statement that Firefox was the most compliant overall browser - it may refer to


I learned of Rob Eisenberg at the 2013 Orlando code camp - and have tried to follow what he is up to since - I consider him one of the best JavaScript developers I am aware of - and one to certainly learn from.


In order to learn - you have to teach - and doing a presentation will put me into that position - where you will retain 80% of what you learned - in order to teach the subject. That would be a win-win for me.  I am excited to get started.

Saturday, January 31, 2015 2:08:44 PM (Eastern Standard Time, UTC-05:00)
 Sunday, January 25, 2015
I was catching up on my podcasts and on HerdingCode -  heard Scott Koon say that Rob Eisenberg left the angular team - apparently back in November just after the NG conf post. Here is Rob Eisenbergs blog entry on his thoughts about it. The Herding code group talked about the way that Angular changes have really upset the prior users of the framework - and then hearing about Rob Eisenbergs leaving the team - felt like the right thing for him to do - not where he wanted to take the web.

So I may be renewing my efforts to dig into how Rob is going forward with his framework - he has a great standard of development and is extremely bright developer.

Podcasts are  a great way to catch up on the community when you have been doing other things that dont allow you to keep up directly.

Sunday, January 25, 2015 11:12:16 PM (Eastern Standard Time, UTC-05:00)
 Friday, August 08, 2014

I just listened to the JavaScript Jabber Podcast episode 115 with Guy Bedford.

This was an interesting podcast for me. It felt like I was hearing from someone who was working on the future design aspects of the browser environment and JavaScript language features we may find commonplace in 5 years. The spec process that determines all this is quite slow and in that line Guy Bedford mentioned the date of the
ECMAScript 6 (ES6) spec completion has now been moved into next year.

The tools that have been built  to validate the concepts of the spec, have impacted the way the spec is written - by seeing what works and what does not work - and corresponding changes get made based on testing of the concepts being proposed in the spec. The discussion also highlighted that the hooks that are built into the browser is going to be a different spec based on the completed ECMAScript 6 spec.

Guy Bedford has been working on some open source libraries to manage the modularity of JavaScript, which was the topic of my last post. ES6 will have modules; today there have been two competing formats - AMD and CommonJS.
The Projects that Guy has worked on build upon one another:

The SystemJS will load any of 3 styles of modules (ES6,AMD,CommonJS) which is designed to work with the ES6 Module Loader - and make them work together.

JSPM - a JavaScript Package manager built on SystemJS. (It sounded like you could load NPM modules with this too)

Inside of the SystemJS they provide a build process for production systems that will make the modules CSP-Compliant (Content Security Policy) so that the systems are less vulnerable to attacks.

There are Transpilers involved in getting the ES6 testing done here and may even work down to IE8.

The architecture of these ideas feels like a good direction. One of the comments in the podcast is that it will have to become more complicated before it becomes more simple. These ideas are being transpiled(Translating ES6 source to ES5 source), and not built into the browsers yet - but the browsers are changing so fast now that we may see these features in the next few years in all the browsers - which will also mean that most browsers(if not all) will be "evergreen" - self updating.

It has also become obvious that Node has become one tool that every web developer must learn.

Friday, August 08, 2014 5:17:36 AM (Eastern Standard Time, UTC-05:00)
 Monday, May 26, 2014
One of the talks that I attended at TechEd 2014 was on TypeScript and managing a Large JavaScript code base.
The developer speaking works for Microsoft on the "Monaco" project - that was converted to using Typescript for programmer safety - when the code base exceeded 100K LOC.  This is where TypeScript has a sweet spot - to give you the modularity from the intellisense and programming structures within Visual Studio.

I still agree that developers should know and understand the JavaScript language first before learning TypeScript - as you should know your language - and be able to explain the output that TypeScript is using.

Typescript can output the modularity as AMD or CommonJS (which is more prevalent with NodeJS).

Just as developers should know the language of JavaScript - understanding the basis of the Modularity and what ES6 is planning is very fundamental to having a broad basis of what your application is doing and why.

Addy Osamani's writeup on Modularity is a good start to that - and I would recommend it to developers needing to round out their understanding of JavaScript modularity concepts.

Monday, May 26, 2014 10:29:18 PM (Eastern Standard Time, UTC-05:00)
 Saturday, April 19, 2014

In looking over my twitter feed a few days ago - I saw the tweet by Rob Eisenberg  and read his post that Angular and Durandal will converge and he is working with Google to develop AngularJS version 2.0 - he did write a post on the angular website too.

Durandal 2.x will be supported and is not going away - however Rob's energy is going to the new version. The post he wrote explains how this came about and how these two projects converging will actually benefit developers by putting together some incredible minds in melding together two of the more impressive frameworks that I have looked at over last couple of years.

I just wonder how the AngularJS Manning MEAP book I ordered - due in the Fall - will handle this news - and hope that they change the basis of the book to be AngularJS version 2 - instead of the current version 1.

The learning that I have been doing with Durandal will still be good - which you can understand in reading his posts.

The learning that I have been doing will still be valuable. It sounds like the improvements to Angular with Rob Eisenberg working with them will be a nice team to create a great framework. I look forward to learning the result.

Friday, April 18, 2014 11:08:09 PM (Eastern Standard Time, UTC-05:00)
 Sunday, March 23, 2014

A couple of weeks ago, I had some internet connection issues with my ISP providers equipment. To resolve the issues -I had to make an appointment - and that meant being at home to wait for them to show up to fix the equipment -without a working internet connection.

 I tried the YouTube App on my phone for the first time. I saw a 2013 CSSConfUS  talk by Pamela Fox titled "When Bootstrap Attacks" , where she talked about the work she  did on the Coursera web site(apparently she is now at Kahn Academy).

 It was a half hour presentation on upgrading  the Coursera site from mixed versions of Bootstrap to a single version across a mixed code base - old and new. The work to upgrade to one version was made difficult because of the Bootstrap class names were in the HTML, the CSS and the JavaScript code - and the older code was PHP which would have that all mixed with SQL Statements also in the mix - so identifying just the bootstrap classes within the entire code base was not  easy.    The Coursera sites new Architecture uses BackboneJS, and Jade (requires NodeJS)  for templating and Stylus for CSS (a CSS Preprocessor Library similar to Less and SASS)


Finding things by name in the source code base was problematic, and would have been easier if there were a namespaces in the CSS.

She said that Bootstrap has an open issue in their backlog to Prefix their classes - but that they have not made it a priority. She suggests having your own classes that Extend the BootStrap classes using SASS (even though she really is using Stylus).


She also recommended that you publish your own style guide documents for your team to use and not use the Bootstrap docs. She suggested moving away from using the Bootstrap JavaScript and using their own; also not using the Styling CSS Classes in their JavaScript -they could use a JavaScript targeted CSS class (adding a  js suffix on the end) - so that the separation of style and functionality can remove the impacts on the JavaScript dependency to the CSS Class names. With HTML5 you could use Data Attributes to hook into things instead of using the CSS Classes. Keeping Styling and functionality concerns separate - reinforced the Separation of Concerns for these promotes better maintainability.

Pamela Fox also mentioned that she also started to introduce testing to their site -" if the front end does anything at all - you need to test it" - Mocha , Chai, JsDom and Selenium were used to start getting testing done on her site.  (Needle uses Selenium + Nose using python - to do screen shot comparisons from a good state screen shot when pixel  layout can impact functionality if not all of a set of data is visible due to CSS Changes-she has not actually used it) It is best to start this test development early so that you have plenty of tests. They have only reached a 2% coverage so far (as of 2013 talk).


You need to test that your separation of these concerns effort has not broken something and by lessening the dependencies you have a much better overall maintainability with test coverage automation will ease future maintenance - so if you plan on using Bootstrap or any other CSS Framework - keep the idea of separation of concerns in mind so that you do not trap yourself into a maintenance issue corner. That talk was a good followup on my look at Durandals use of Bootstrap.

Sunday, March 23, 2014 10:10:49 PM (Eastern Standard Time, UTC-05:00)
 Tuesday, February 25, 2014

The last month has been very busy. So, unfortunately I have not been able to do much research on BootStrap as I would have liked. Bootstrap is a good framework for getting workable HTML with CSS for a set of controls for a web UI that is very usable. The risk is that you could have a broken UI if they change the tags and CSS, on a later version. An advantage of using this framework is that you have a good basis to start from; you could bring in a true designer to re-skin your website/application by just updating the CSS.

Bootstrap as a combination of JavaScript, HTML with classes for CSS to style makes for a very powerful basic site.

CSS can be challenging and the use of a basic framework for a layout can be a time saver.

I hope to get some time to look into the use of FontAwesome and Bootstrap together.

Tuesday, February 25, 2014 10:44:47 PM (Eastern Standard Time, UTC-05:00)