What I love is the syntax which has sensible import and export module declarations, cleaner and almost completely optional type annotations (excellent type inference), all data structures are immutable by default, and the compilation speed is quick.
The frontend web development world has changed a lot in the last 5 years and it is wonderful to see developers using ES6 and Flow or TypeScript and realizing the value of type checking and of great tools like webpack.
So I decided to try and create a new syntax highlighting mode from scratch. This allows me to use the mode as a base for more interesting functionality; especially when I need to customize things for the React project I’m working on.
This is the main reason I use Emacs. It lets me create new tools and update my tools to match the projects that I’m working on. I’ve done this over the years and it’s always been the one thing that keeps me coming back to Emacs. I have tried other IDEs and text editors and they do have their own conveniences but they just don’t have the power that Emacs has. Being able to define your own functions to automate repetitive tasks is great. Being able to define your own functions that turn a complex task into a simple task is even better.
Here are some examples over the years of tools I’ve built with Emacs Lisp to help me in my daily work:
Some other examples of functions I’ve written in Emacs Lisp to make it easier to work on a project:
Functions for jumping to the definition of a function or class
A function for opening the test/spec file of a class
Some functions to run a whole test suite on a virtual machine through SSH, and to run particular tests from the point I’m at in a file
All of these were customized for each project because each project has its own standards. Jumping to the definition of a class that’s written by your co-workers is different from jumping to the definition of a class that you’ve downloaded as part of another package (for example, searching through “lib/” rather than “node_modules/”).
If you decide to pick up Emacs and learn to use it, you’re going to be extra productive over the years, any initial hurdles you encounter will be worthwhile because your peak productivity will be higher than others in the long-term and that’s the #1 reason I keep using Emacs.
While the performance of React is awesome, at a certain point, you will notice that having React just isn’t enough.
You’ll also want Redux, Flux, or some other data flow library installed.
You will want Webpack and Babel installed so that you can use the latest features of ES6 (also known as EMCAScript 2016).
Elm will give all the goodies that React, Redux/Flux, and Flow give you but as a collective programming language rather than as individual libraries.
Also, instead of having to find individual tools, everything that you need to create fast components and single page applications come with Elm. It’s a batteries-included language. It comes with a REPL (command line interface). The Elm-Reactor included with it will reload any changes you have made to an Elm file. With all these elements, it is the perfect language for rapid frontend web development. You can learn Elm quickly, and learn to quickly build, test, and refactor Elm components in a way that can’t be replicated by tools like TypeScript or ES6 or React or Angular.
Compare React and Angular To Elm
So while React is great for creating web components, when we compare it to Elm, it can be hard to get started because it requires a bit more infrastructure around it (with Babel, Webpack, Flow, TypeScript, etc.) to really get started on developing a production-ready web application.
The instagram code is neat because you can see how quickly you can write up a grid layout. You can see how to work with modals/pop-ups and how to manage state within an app. You can check out the code for the instagram clone here. The instagram clone is licensed under the Apache license 2.0.
Event Creation Tool written in Elm
The event creation tool for an event ticket sales page is cool. It explores more state management in the context of an app. For example there’s a way to switch the type of event you’re creating in the app. When you switch, an explanation page appears in between to give you guidance on how to create the different type of event that you just switched to. the event creator web app is licensed under the AGPL. You can check out the code for the event creation page for an event ticket sales website is here.
More Articles On Elm
I will be publishing another article on Elm (update: it has been published) very soon that is a continuation of the Instagram-clone code. It will include an API server to show how to use HTTP and AJAX calls. Furthermore, it will show you how to embed and fullscreen a component. This is vital if you want to use Elm today in an existing project and integrate components in a piecemeal fashion.
UPDATE: The 2-part article on creating an Instagram clone in Elm (instaelm) has been posted on Codementor:
On 17 October 2016, I gave a presentation at ActivateTO, a Toronto-based non-profit that hosts a speaker series. It was located at Toronto City Hall which is a very nice venue, very organized with great audio/visual gear (projectors and mics). My presentation included FreedomBox.
The topic that night was Pokemon Go and its implications for society, including its impact on personal privacy, ethics and responsibility of the game developers to their audience, and how game players interact with one another.
My presentation covered community-building alternatives like Loomio and privacy protection like Signal and the FreedomBox, a suite of software for the Raspberry Pi (and other hardware). The idea is that Pokemon Go encourages people to form small communities but that they’re all within the service of one commercialized game development company that has profits as its overriding goal. I pointed out that Pokemon Go had, within a month, started to explore how to inject more advertisements into the game and I predict, at some point (maybe during the winter months) when player engagement drops and there are fewer people playing the game, that they will be look at selling data to marketers and advertisers.
The presentation was great to give and there were quite a lot of people in the audience and I hope I enlightened them as to the other possibilities that exist out there.
I also made a few choice remarks about the ethics and responsibility that software developers have to their users/audience and how in 2016 we can’t ignore basic privacy implications in the code that we create. We have to be far more responsible and communicate more with our users to ensure that we’re doing the right thing.
In the last few weeks I’ve been busy preparing AngularJS 2 courses and I’m really excited about the first video tutorial that NeverFriday Software Expertise is releasing.
In this tutorial you learn how to create an AngularJS 2.x project and how to create a comment box directive component. In the React tutorial, they show you how to create a comment box just like on Facebook so I thought, why not show how easily it can be done in AnagularJS 2?
It’s a good tutorial and introduction to Perl 6 which hasn’t seen wide adoption yet. It’s a solid language which has had a lot of thought put into it and the libraries that exist for it so far are good. Since it’s still Perl, it has that hack-y, fast-paced feel to it where you feel like you can quickly put together a one-off script to get the job done or put together an MVP (Minimal Viable Product). However, since Perl 6 is better designed, you can build a well-structured, well-engineered large project.
Learning new languages and how they work can help make you a better programmer and introduce new ways of thinking that can make it easier for you to find solutions to technical problems.
It’s a great short ebook and very useful for those wanting to see the value of one-on-one meetings. Teams function more smoothly when team leads and managers take the time to have one-on-one meetings. While it can be tempted to put them off or to try and broaden your reach by using surveys instead, a one-on-one is more useful and personal.
In project management, they talk about forming, storming and norming your team. Within 90 days, your team will pass through each of those stages. Initially, the team forms. Then, there is some storming and conflict that is resolved to build up a better functioning team. Finally, with your leadership, the team is in the norming stage where everyone works well together.
Leadership is Investing Your Time Understanding Your Team
Kellogg has great tips on how to handle this situation, where you have inherited a team and are expected to lead them:
Invest a lot of your early time in understanding your team. Their strengths and their weaknesses. What their internal customers think of them. What you think of their work. What coworkers think. Understand their backgrounds, interview them, and go review their LinkedIn profiles or CVs.
Remember that it’s about personal wants and needs. Where do your team members want to be in a few years? Do they see a way to get there from here at your company? Are they happy with short-term constraints or are they struggling to get out of meetings in time to hit childcare before those draconian fines kick in?