Are you telling me front-end is not programming?
Recently, a fellow teacher dismissively stated that front-end development is not programming. After a brief flash of anger, his words triggered a few thoughts I'd like to share.
Fast-paced & ever-changing environment
Like "real programmers", the environment web developers work in forces us to always be learning and follow the developments of an industry that is very fast paced.
I would argue that web technologies, including HTML and CSS, evolve even more rapidly than other programming languages or frameworks. So rapidly, in fact, that the simple fact of following what's going on and integrating it to your work can be a challenge in itself.
Contrary to programmers working on native platforms or with server side technologies, we never control the environments in which our code is running and, consequently, have to plan for a myriad of scenarios.
As Donald Rumsfeld would put it, when real programmers deal with "known knowns" and "known unknowns", web developers mainly deal with "unknown unknowns".
HTML & CSS
It is true that HTML and CSS are declarative languages and, at their core, have got very little to do with programming as we know it: control structures, functions, variables, etc.
Lately though, with tools such as CSS pre-processors, build tools and templating languages like Twig or Liquid, HTML and CSS themselves have been integrating more and more concepts that are traditionally related to "real programming".
In my humble opinion, it is becoming very difficult to be a good front-end developer today without programming notions and a good understanding of the command line.
- Working with Sass, you use variables, control structures, loops, maps, arrays, functions, etc. in order to write CSS. Have a look at Kitty Giraudel's Gists generated by SassMeister and tell me that's not programming.
- Front-end developers regularly use build tools like Grunt or Gulp. Configuration files for such tools are typically written in JavaScript and can be relatively complex pieces of code on their own.
- As people working with CMSes, front-end developers have to know a bit of PHP or get familiar with templating languages like Blade, Twig or Liquid in which variables, for loops, array manipulation and control structures are quite a common sight indeed.
- In the hands of people like Ana Tudor, the seemingly humble CSS transforms and animations can become very complex and involve hard core mathematical notions akin to programming.
JavaScript all the things
I don't consider myself a JavaScript expert, but I work with it daily to manipulate the DOM in various ways or interact with APIs. Even at my level, I have to understand and use things like Immediately Invoked Function Expressions, the revealing module pattern, hoisting and event bubbling, which are "real programming concepts".
Over the past few years, JavaScript has become an increasingly important language for professionals in the web industry. I personally know quite a few people writing JavaScript code all day for a living.
These people are "real programmers" by all accounts: they write functional and unit tests for their code, use JavaScript MVC frameworks (Angular, Ember, Backbone, etc.) and deal with the same challenges any programmer writing applications with a high level language would face.
On top of that, they typically write code keeping performance and browser inconsistencies in mind and follow best practices like progressive enhancement.
So yes, dear colleague, for all those reasons I firmly believe front-end development is programming or at least largely uses the same concepts and notions. That's especially true if you mainly write JavaScript but also if, like me, it is part of what you do without being your main focus.