Another webdev blog

I'm SĂ©bastien Castiel, and I talk about web development and some other stuff.

Writing modern JavaScript code

Remember when JavaScript was a language used to make elements change on the page when the cursor was over them? These days are over, every language evolves over time, and so does the way wa use them. Look at the code you wrote one or two years ago: do you feel ashamed? If yes, this post is for you 🙂

I'll try here to list some good practices to make your JavaScript code easier to write, read and maintain.

Continue reading…

Play with cryptography with OpenPGP.js

For about a year now, I use ProtonMail as my mail provider. If you don't know it, you should definitively give it a look! The mails are encrypted end-to-end, which means that ProtonMail has absolutely no readable version of the stored emails, nor any key to decrypt them.

But one thing ProtonMail doesn't do is giving the ability to export emails, for example if you want to make back-ups, or move to another provider. That's why I developed a tool to give you this ability; and to develop this tool I used a fantastic library: OpenPGP.js, which is by the way maintained by ProtonMail ;)

If you know asymetric cryptography principles, I'll just show how OpenPGP.js provides a very easy way to play with private and public key generation, and of course encrypting/decrypting and signing/verifying messages. If you don't, this article may also be the opportunity to discover it with very simple examples.

Continue reading…

Use the coolest ES6 features everywhere

If you use JavaScript you probably know that recently a lot of new features arrived with ES2015 (also known as ES6): classes, const/let keywords, destructuring arrays and objects, modules and imports, etc.

You also probably know that all these features are not currently available in all browsers. A very good way to know how one particular feature is supported in all browsers is this ECMAScript 6 compatibility table. Looking at this table, you can think that it’s probably better not to use certain ES6 features because it can crash on some browsers. And what about Node.js? Are these features implemented? In which version?

That’s where a fantastic tool makes sense: Babel. And I’m gonna show you how to use it both client-side and server-side, so you’ll be able to play with latest JavaScript features right now.

Continue reading…

A new blog, a new blog management system

Today I'm starting a new blog. I started a few blogs in the past. Personal blogs, where I talked about a lot of things. This blog is very different, here's why:

Continue reading…