Home » Archive by category "Javascript"

3 JavaScript Fallacies You Might Believe

You know, you think the whole world knows something is true until you hear someone people respect say something really dumb.  The three JavaScript fallacies I have here are actual statements I’ve heard over the last week during a discussion about Angular2 and Rect.  What makes these fallacies particularly interesting is that they sound plausible.  In fact, there are time when they are even true.  But in the larger context of a JavaScript application they are nearly always false.

So, here are 3 JavaScript Fallacies you may still believe that you may want to reevaluate.

3 JavaScript Fallacies You Might Believe
Photo credit: bark via VisualHunt / CC BY

Continue reading “3 JavaScript Fallacies You Might Believe”

JavaScript Fatigue Makes Me Scream

Maybe JavaScript Fatigue makes you scream too.

Are you annoyed with the constantly changing JavaScript environment?  Do you wish things could just settle down for a bit?  Have you decided that you won’t learn anything new because there will just be something new to learn tomorrow?

Welcome to JavaScript Fatigue.

But frankly, unlike many people who talk about JavaScript Fatigue, I see JavaScript Fatigue and the much broader subject of language fatigue as a symptom of a much larger problem that has less to do with JavaScript and more to do with human psychology and the state of the programming community at large.

image

Continue reading “JavaScript Fatigue Makes Me Scream”

The Irrational fear of JavaScript “Script Kiddies”

Over the last several months, I’ve seen a lot of whining, complaining a fear regarding Angular 2 in particular and the JavaScript platform in general.

Terms like “JavaScript fatigue” are indicative of the attitude.

Another place I see this is with the recent announcement from the Angular team stating there will be another major point release every six months.  Like this is a bad thing?

Or the general attitude that particular (modern) design decisions that have been made in some of the more recent frameworks that have been released are bad for JavaScript.

And I look at that and honestly wonder why these people are programming in the first place.  If change bothers you, you are really in the wrong industry.

The Irrational fear of JavaScript "Script Kiddies"
Photo via tookapic via Visualhunt.com

Continue reading “The Irrational fear of JavaScript “Script Kiddies””

TypeScript and Electron The Right Way

I’ve been working on a new project over the last weeks that involves getting TypeScript and Electron working together.  Unfortunately, the amount of information available on how to do this correctly is pathetically none existent.

That isn’t to say there aren’t sites that don’t try.  But in the end, all they show you is how to write essentially the same JavaScript code you would have written using JavaScript with a little bit of type information thrown in.  What I was looking for was something a little more object oriented.  Let’s use ALL of TypeScript.

And then there is the whole setup of TypeScript in Node thing.  This was mostly my not knowing my editor well.  But while we are documenting how to get a TypeScript/Electron app setup, let’s cover that as well.

TypeScript and Electron The Right Way
Photo credit: Smithsonian Institution via Visual hunt / No known copyright restrictions

Continue reading “TypeScript and Electron The Right Way”

Using JavaScript to Drive Selenium Tests

I’ve written about using Selenium to test web applications before.  But all of those articles have assumed you are using C#.  I’ve realized that Selenium has multiple language bindings which allow me to use any language I want but C# just seemed easier at the time.  But, now I’m in an environment that doesn’t use .NET at all.  They use Java.  I know Java, but I choose not to use it and instead my focus at this shop is all JavaScript.  Which means, if I want to write Selenium tests to verify my work, I need to write my tests in JavaScript.  But Using JavaScript to Drive Selenium is, in my opinion what everyone should be doing.  At least everyone who is writing most of their web application using client side code.

Think about it, the primary language you wrote the client side with is JavaScript, and yet you are going to write your tests using C#, Java, PHP… when you could be writing the tests using JavaScript.  The same language you used to write the bulk of your application.  Further, when you write your tests using C# or Java, you’ll probably either write the tests using a unit testing framework (MSTest, NUnit, JUnit) or you’ll use some sort of BDD adapter like SpecFlow to coerce the unit testing framework into the behavioral pattern you need.

image

Continue reading “Using JavaScript to Drive Selenium Tests”