CMOS #9: Ire Aderinokun - Khaled Bot, Can I Use Embed, Formhack
Interview with Ire Aderinokun about Khaled Bot a Slack-bot, The (Unofficial) CanIUse Embed, and Formhack a configurable form reset.
In which I've also learned what are CSS resets and heared about progressive web apps.
Ire Aderinokun
Links
Transcript
But I got interested in this when I was a lot younger, so maybe when I was about 13, 14. I used to play this online game which is called NeoPets, I think a lot of people use to play it as well, so I'm not the only one. But it was just kind of like an online role-playing game in a way, and as part of the game you could do little bits of HTML and you could create these pages, so you could style them a bit differently. So that's kind of how I got started with it, that's how I was introduced to the concept of making websites or doing things like that. So that's how I got started and then, over time, I found that I was really interested in doing this, so on and off, I would make websites for my friends and family. And then more recently, after I graduated from my masters, I decided this was actually something that I want to do, not just as a hobby but as a career.
So I decided that I would just go for it and see how it worked out. Luckily it worked out well because I'm still doing it and I don't have to go back to law school.
Because that's kind of how I learned myself, by looking at what other people had done, people putting their code online and making things open source so other people can learn from it.
So as much as possible, whenever I do something, I always try to give back in that way because it was so important, it was such an important part to me learning, that I try to contribute as well.
And sometimes it's just a silly project that I work on, so it's not even something that I would make money off of, so it's just kind of fun to show people, Oh, this is how I made this funny Slack bots or something like that.
Well, that's a difficult question! I worked on a bunch of different things, so different things kind of hit different things for me as well, but I think one of the most fun things that I worked on was the Slack bot, which is called Khaled Bot. So I think awhile ago, there was kind of a DJ Khaled phase, when people were making things to do with DJ Khaled, and I think I saw someone had made sort of a Lorem Ipsum version of DJ Khaled. It just kind of brought the idea to me because I was also playing around with Slack bots, to make a DJ Khaled Slack bot, so that was really funny for me to do.
I was personally cracking up to myself while I was making it, while I was testing it, and seeing how it works, that was really fun to make.
So I just made this bot that pretends to be DJ Khaled, so you can talk to it and then it will say things like Major Key
and all of that.
So that was really fun and I think a lot of people enjoyed it as well, so that was fun for me, probably one of the most fun things.
Because a lot of my other projects, not all of them are just random, fun things. Some of them are actual utility, so they're less funny but probably more useful, because I don't think this Khaled bot is very useful!
Okay, just go and send something, go and talk to this person.So maybe if someone is having an argument, you can privately just say,
Okay, go and just send a key to this person.And then in the middle of maybe a heated argument, DJ Khaled would just pop up and just say something, so I guess that's a good utility for the bots.
Can I use?project, something like that, right? That's on your website?
So obviously, when I'm writing about things like CSS features or JavaScript features you come across, you always want to know whether there's support for these features across all the various browsers.
So probably the most popular website for this is this website, called Can I Use?
and they actually have their data open source, so they have an API where you can just connect to and just get all the data.
So I had the idea of creating an embeddable widget of the information, so whenever I'm writing a blog post, if I'm talking about Viewport units or CSS variables, I could just drop in the embed, so people could, while they're reading, just see what the support is for this feature at the moment. So I created that, it's probably one of the biggest things that I've created by myself because I learned a lot, I learned a lot about it because I don't think I'm that amazing at JavaScript but it's through working on things like this that you develop your skills, so it taught me a lot.
And so I put it up, I think you can go to CanIUse.bitsofco.de or if you just Google Can I Use Embed
it should show up somewhere.
So you just have this little widget that you can embed in your blog post or wherever, and you can see the support for something like CSS, JavaScript, HTML features.
It has something that kind of looks like a table, and it has all the major browsers, and then you can just say that you want to see what the feature support is for the current versions of each browser. Or you can say you want to see what will be in the future or the past. And then you just drop that there and then it's responsive, so it will look nice on your site.
Oh, that's cool!
But for the Embed, in particular, there are some things I want to do.
For example, because it's an iframe, you can't really use it in GitHub READMEs, and that's something that some people have requested, How can we use it for that?
So I had this idea of making it like a canvas thing, so people can just download it as an image as well.
So that's something that's been on my to-do list for awhile, and I hope to have that feature out soon, if I have some time.
But if anyone wants to help me out with it, that'd be great as well, because it's open source, people can contribute as well.
I'll be happy with that.
Okay, I want the user to be able to input text here.If I just drop that into the page, it's going to look different between different browsers.
So a reset, a CSS reset, is basically something that you add to try to normalize the way things look across different browsers.
Because by default, different browsers may add specific CSS rules to specific elements on the page, so you want to add something at the very beginning of your CSS to just say Make sure everything is the same.
So forms in particular are quite difficult, because the different browsers, they have a lot more heavy influence on the way these things look, so form elements tend to look much more different between different browsers, more than other elements on the page.
I wanted to create a reset for forms that was also configurable, so instead of just saying Make sure everything is this width, or has no margins, or no paddings, or something like that,
it's something that you can actually configure.
As you're doing the resets, you're also defining what you want it to look like as well.
So instead of just a basic reset, it's just something that you can, as you're doing the reset, you can style it the way you want it to be.
That's basically what it is.
Because, so for Bootstrap, they've already defined what the styles are going to look like. So whereas, what this is, is something where you want to define what you want things to look like. In Bootstrap, you can tell like buttons always have a certain look, or all these elements have a certain look, but with this, it's kind of for you to say what you want it to look like.
So it's more easy to change things using this, rather than using something like Bootstrap, where all the things are already predefined for you. Whereas, this gives you the opportunity to make changes much more easily without having to write out the CSS for everything always from scratch.
Lately I've been doing a bunch of work with progressive web apps, actually. So I've been playing around with how to create them and things like that. And I think about a month ago, I was giving a talk about progressive web apps and I created this project, which is called Offline FX, so it's basically an FX exchange-rate app, but it's a progressive web app, obviously.
So I've been working on that and that's been really interesting. I demoed how I made it into a progressive web app, so I put the source for that on my GitHub as well, so you can see how you can take a web application and convert it to a progressive web application.
Okay, it was really very nice to talk to you and very educational about all these projects. Do you think there are any other subjects that we haven't touched, that you would like to talk about? Or anything you haven't mentioned?
Published on 2016-09-21