The Art of the Bodge: How I Made The Emoji Keyboard

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

"One take"!

He dragged me in and I loved it. I felt the same relief when he realised it was all in one take.

πŸ‘οΈŽ︎ 20 πŸ‘€οΈŽ︎ u/Hippocentaur πŸ“…οΈŽ︎ Sep 24 2015 πŸ—«︎ replies

He's frustrated that he spent half an hour with a bug. Cute...

πŸ‘οΈŽ︎ 111 πŸ‘€οΈŽ︎ u/doyouevenliff πŸ“…οΈŽ︎ Sep 24 2015 πŸ—«︎ replies

As a professional software engineer this video ground my gears right down.

πŸ‘οΈŽ︎ 11 πŸ‘€οΈŽ︎ u/RBLSTR πŸ“…οΈŽ︎ Sep 25 2015 πŸ—«︎ replies

All bodges in the emoji keyboard:

  1. creation of emoji
  2. emoji in unicode
  3. expansion of emoji
  4. skin tone modifiers
  5. zero width joiner
  6. wingdings in emoji
  7. unicode backwards compatibility with alt + ####
  8. lua macros
  9. account for lua counting from 1
  10. make lua macros use alt + ####
  11. AutoHotkey code
  12. luamacros saves the keypress to a file and presses f24, autohotkey listens for f24 then reads the number in said file, then types the emoji associated with that emoji.

That's a lot of bodges.

πŸ‘οΈŽ︎ 8 πŸ‘€οΈŽ︎ u/Dsiluigi πŸ“…οΈŽ︎ Sep 25 2015 πŸ—«︎ replies

I like how he's crapping so hard on linux, but then at some point he has this problem of he has to reconcile these two bodges to bodge some more (lua can detect which keyboard and key -> AHK can write unicode). But in Linux, you could actually just figure out how to do that directly. And you could use a language that doesn't count from 1 like lua to save 30 minutes of bug chasing for it...

Seriously though, use the tools you like. And bodge when your feature list is small and/or you're working on a project alone only. Bodging stops being an art when you did it to code I have to maintain.

πŸ‘οΈŽ︎ 48 πŸ‘€οΈŽ︎ u/juckele πŸ“…οΈŽ︎ Sep 24 2015 πŸ—«︎ replies

This guys attitude is beautiful

πŸ‘οΈŽ︎ 33 πŸ‘€οΈŽ︎ u/ChickenOfDoom πŸ“…οΈŽ︎ Sep 24 2015 πŸ—«︎ replies

Muahaha, I love lua and the stupid arrays that start at 1. I don't even know if there's a good reason for that.

πŸ‘οΈŽ︎ 6 πŸ‘€οΈŽ︎ u/talking_to_strangers πŸ“…οΈŽ︎ Sep 24 2015 πŸ—«︎ replies

Tom Scott is awesome.

πŸ‘οΈŽ︎ 16 πŸ‘€οΈŽ︎ u/tfofurn πŸ“…οΈŽ︎ Sep 24 2015 πŸ—«︎ replies

We had an intern at the lab where I used to work whose catchphrase was, "Hey, who cares! It works!" This came up a lot because he never did anything right. Having this as a mantra meant that he half-assed everything, with confirmation bias as backup to prevent him remembering all the times it didn't work, or didn't turn out to be the most efficient way to do it. We had a lot of stories about him, such as the time he was caught measuing out some very expensive bundled cables (hundreds of dollars per foot, and limited in supply even if you afford more of it) by looping it around his forearm -- and then cutting it, just like that. He probably still thinks he was saving time, since he wasn't still around by the next time we had to wait for more of that cable to arrive. Because he wasn't welcome back.

This guy seems a little like that -- the kind who's so enamoured of his own clever little hack that he's not even curious whether the "correct way" is actually better in real ways, or if the "slow way" they're hacking around is really just as fast or faster.

πŸ‘οΈŽ︎ 12 πŸ‘€οΈŽ︎ u/MuonManLaserJab πŸ“…οΈŽ︎ Sep 25 2015 πŸ—«︎ replies
Captions
a lot of techies are surprised when I say I mostly use Windows why would anyone who writes code and at its video use Windows two reasons are one it's cheaper and two it lets me botch so sit back because yes I'll tell you how I made the emoji keyboard but more importantly I will tell you about the art of the bodge bodging is a wonderful British word that means to patch together to make temporary repairs a body's clumsy it's in elegant it'll fall apart but it'll work and it'll keep working as long as there's someone around to botch it again if it breaks you know that bit in Apollo 13 why they have to fit the square peg in the round hole that is a bodge actually that's possibly the greatest badge in human history in fact if you can think of a better one let me know in the comments cuz there is there's probably a book on great bages of history to be written there and i to be the one to write it anyway um bodging has always sort of been how i make things i didn't study computer science i'm not writing elegant solutions here i I patched things together the important stuff backups password security I make sure I get that right but stuff I'm making for fun I botch now I learned properly barge when I was filming a TV show a few years ago some of that shows made it online I'll put links in the description but stick with me for now because you need to know some context about it I was filming with two people Colin Furze who you might know of YouTube he makes ludicrous big exploding physical things and he has the land speed record for mobility scooter and then there was Charles yarn 'old who makes intricate micro electronics with Arduino and circuit boards like but last year Charles made Barack Obama's Christmas tree and people could go online to to customize the colors and the patterns that the twinkly lights that went up and down it was wonderful and my job on the TV show was was through the bridge between those two between Colin and Charles to get the creations that they physically fabricated working with the world and with each other so so when we made a remote control for a horse I'm not killing that we made it become control for horse um Colin built the framework for a robot jockey Charles made all the circuits and relays to have it pull the reins when it got signals and I built a smartphone app that let you send those signals to let you steer a horse and it worked and I probably had the easiest job the three of us because when I made things I had an undo button but the key part was this we were building prototypes they had to work for one day of filming and we'd be there for it but they had to work on that day or the TV show would be would be terrible and we'd have wasted a lot of money and we basically had no time to build there we were working 16-hour days seven days a week and by the end of production we had no time we were bodging and a bit of software that helped me on that shown since more than anything else was called autohotkey autohotkey is such a good bodging tool that it sometimes gets detected as a virus autohotkey was it was originally meant to be really really simple it waits until the user presses a certain key and then it starts a program or it types some longer text or it presses a more complicated series of key commands that'll be really difficult otherwise like if you wanted your f10 key to make your video game character suddenly spin 180 and fire got it no problem autohotkey was it thing is autohotkey grew and grew and grew and grew and grew in its scripting language that the stuff you have to write in to make it work is terrible I mean really awful it was meant to do really simple things and over time it's gained the ability to do so much it can read files it can look at the color of individual pixels on screen it can call arbitrary windows dll's it can pass regular expressions so anyone who knows what those are but it's all in this weird non-standard way that is inspired by Visual Basic autohotkey is a badge that helps you make other budget but it works and it means it instead of having to spend hours of time diving into complicated operating system-level stuff you just write a few lines of script I think does the job I use daughter hotkey on the TV show to control the release of a skydivers parachute and it worked I mean really well I mean we hadn't we had a reserve but it worked the greatest badge I ever pulled for that TV show involved I swear this is true a voice synthesizer and copy of sigh bilious on a Mac being remote controlled by autohotkey on Windows PC which was blindly dragging the mouse around doing pre-recorded movements through a remote desktop connection while another PC fire commands to a Google Chrome window open on the Mac over Wi-Fi because Apple script and all the similar tools for Mac that we needed to run on siberius just weren't up to doing something that ridiculous and by the way if anyone out there suggests using Linux know the world loves emoji I mean seriously individual people might not sure I don't really use them myself despite the keyboard but the world loves them people click on headlines about emoji just putting the word in a headline means you get way way more hits on it emoji is is basically the Donald Trump of computers there's a joke that won't date well I mean the very name is clickbait you don't really need anything else on top of it my friend Matt who is behind the camera right now say hi Matt Matt and I made an emoji only messenger last year and hardly anyone use it now that's not true loads of people used it for about 5 minutes before they realized it was utterly impractical and never opened it again but you should have seen the press coverage their emails we got we even got confused investors thinking it was a startup and emailing us to talk about equity so this year movie studios were bidding on an emoji based pitch not mine sadly I wish I'd thought of it because they got nearly a million dollars for it the world loves emoji and here's the thing the concept of emoji as we know it today as is on this keyboard is a bodge you know you might know the story around the world every language had a different way of translating between letters and binary code ones and zeros for computers now Japan had better space in its text encoding scheme they've got a lot more characters than the Latin alphabet anyway so adding a few more wouldn't really have been a problem and some clever engineer things hang on we can put little pictures in our text encoding we can let people send those and we can send pictures without actually having to send pictures or all the bandwidth that entails so there are a few competing version that but they never left Japan until the Unicode consortium came along now the Unicode consortium job is to go to every country to work out how they encode text into binary and turn all of these hundreds of competing approaches into one big worldwide standard and the most amazing thing about it is that for the most part they actually managed to make that work but Unicode was meant to be two-way you convert text into Unicode then convert it back out into your countries or legacy system and nothing should be lost so the Unicode team get to Japan begorrah oh you've you put pictures in your text okay um we can deal with that we will add them to the standard as little glyphs that's fine we had it we had a smiley face in there anyway no one will notice and no one does notice really for a little while until Apple who want to sell iPhones in Japan quietly add emoji as a fairly hidden option but as soon as one person notice hey I can send little piles of poo to my friends all the friends go oh wow how do you turn that on and suddenly you have this kind of ready-made viral explosion of piles of poo which I guess is norovirus um so suddenly the world has emoji and America is all holidays because they're used to having consumer electronics text encoding everything designed by America for America they have no idea what what the the cherry blossom stamp is or or why there's a riceball emoji but no burrito and they have no clue what a mob hotel is die ask because bear in mind these original ones were designed decades ago in Japan for Japan and they were originally only about a hundred maybe 150 of them an America is like well why can't we have a burrito emoji they mostly think it's an Apple thing not an international standard thing so the Unicode consortium suddenly finds itself having to barge in new emoji and now to barge in the flags of all nations which is a really clever approach actually where you're actually sending letters for country abbreviations separate thing then they realize every phone supplier has made the default emoji either yellow or just plain white and realized they have to barge in what are now called skin tone modifiers and let's face it a one man one woman one boy one girl family is stereotypical so they make Italy who knew something called a zero with Joyner to any two-person characters you like and they will come together into a single family emoji you can do that with shift on this this keyboard by the way we should be proud of I know I know someone out there is it is about to comment oh it's political correctness gone mad no no to hell with that - how would that these are meant to be international these are meant to be cross-cultural for everyone on earth there have damn well better be those options and thankfully we are more or less there but the emoji we have today weren't designed as one worldwide thing they are a bodge on top of a barge on top of bodge cleverly done and standardized sure but there are a patchwork of rules they've even got wingdings in there now that's why there's levitating man in business suit because that came from an American decision and the latest version of iOS does have a custom version of that in you might even be able to have a skin tone modifier to it I'm not sure yet so I get the idea for a physical emoji keyboard I thought about trying a full unicode one but I realized I would need hundreds and hundreds and hundreds of keyboards but you can just about fit all the 1,200 1,300 are so emoji that are currently out there on 214 keyboards so they're all here actually getting the stickers to print correctly on the homing jet was a little bit tricky but I got there it was just a matter of lining everything up properly and spending several hours sticking the damn things on and thankfully you can just plug 14 USB keyboards into a Windows machine through USB hubs and go yeah yeah right I've got 14 keyboards now that's that's cool but but the trouble is all 14 keyboards as far as most programs here are concerned are counted as the same keyboard you don't get to see which Zed keys been pressed you just know a Zed key has been pressed somewhere an even autohotkey my old reliable standby couldn't help me with that so I started looking around for solutions and there are low-level api's programming interfaces in Windows that let you see the raw input as it comes in over the wires Mac and Linux folks in the comments are gonna be gone oh oh yeah all you have to do all you have to do is connect the flambeaux boozled to the gkx virtual port then write it no no not gonna do that but I got the point of installing Visual Studio on this and think about actually learning the low-level stuff and I thought no I run Windows someone will have done this before and sure enough they had uh of all things that there is a program called Lua macros and it is meant for the flight simulator community flight simmers are amazing they will build entire fake cockpits with a hundred switches in them so it's all accurate and if they can't afford that that he will want to plug in multiple keyboards so it at least feels a bit like they've got a fake cockpit with a hundred switches and so lower macros exists and it's wonderful because it is basically a modified version of Lua which is a weird but not too weird programming language with a load of extra functions grafted in to handle detecting different keyboards and key presses and because it's a full programming language you can do full-on programming it which is fantastic I mean I was I was overjoyed literally dancing around my flat when I first home loaded and ran lower macros which was partly because I was really happy and partly because I had AK was first album on but that that's beside the point I could detect individual keys from individual keyboard great so here was the plan get each keys code that's the number that gets sent to the operating system when it's pressed put those in a list from top left to bottom right all the way down one keyboard ignoring the complicated ones like enter and control amount then when a key gets pressed take the code look it up in that list remember what position it is then add to that the total number of keys in that list multiplied by the number of the keyboard it was pressed on so if I hit the fifth key on the second keyboard that would come through as item for in the list and keyboard number one because computers and programmers count from zero so fifth key zero one two three four second keyboard zero one plug all that into the formula and you'll find where you are on the list and the reason we count from zero is because it makes maps like that's so much easier keyboard one times the ninety four keys and less plus four means you want the 98 item unless starting from zero the equation is just so much simpler and it didn't work didn't work it took me half an hour to find out why it didn't work and the reason it didn't work is that lower unlike every other programming language in modern times counts from one not from zero half an hour half an hour that took me I I fix the equation and then it worked so I loaded in the full list of emoji in the order that I'd put them down on the keys and I told no macros when you get a key calculate that number like we just did look it up in the big list of emoji go down that many lines and type that emoji and it didn't work either because there are no emoji keys on a regular keyboard of course there are no one has been ridiculous enough to make an emoji keyboard yet so there isn't a key combination that will get you an emoji all right there might have been swearing at this point just a little so okay what next why it turns out that Windows has a way of writing special characters and quite a few of you will remember it you hold down the Alt key and then you type numbers on the numeric keypad that's that's not even from Windows that that goes all the way back to original IBM PCs and BIOS and dos okay okay it's decades old but it still works because Microsoft is obsessive about backwards compatibility you can still type those like it was the late 80s but then they realized oh now now we've got all those unicode characters so they used a badge they extended it to Unicode you do a quick registry tweak you can type alt plus sign and then a Unicode code point and it will type it all the way up to emoji hallelujah and I got that working and it through emoji into Microsoft Word I was laughing and then I tried it in in a web browser like for Twitter and it didn't work either because that backwards compatibility means that adding Unicode points only works in rich text boxes things that allow formatting not plain ones a couple of hours went by at this point but nearly there I got quite frustrated I took a break and I swear at some point while I was cooking dinner it was like a light came on in my head and the gods of bodging shun down upon me and I shouted out autohotkey yeah that wasn't just a pointless ramble about bodging earlier with autohotkey autohotkey because it can't tell which keyboard is being pressed but that doesn't matter what it can do is type emoji it can look down the list or emoji it can read a particular character from a line and it can enter it anywhere because it doesn't use key presses it uses low-level window stuff so I have one program lower macros it can read the keyboards and work out which emoji the user wants and I have one program that if we already know which emoji the user wants can type it so it was bodging time here's how this keyboard works you press a key lure macros intercepts it on the way in stops windows actually typing the letter or whatever's underneath it it works out which number emoji you want and it saves that number to a file on disk then it presses the f24 key that's right there's an F 24k it's not on my keyboard it's almost certainly not on your keyboard but it's still a key that windows can deal with because backwards-compatibility an autohotkey is listening for that F 24k and when it hears it it reads that same file file or Mac files just put the number in it reads that number it looks down the list of emoji and it types that emoji that is how the emoji keyboard works that's why I use Windows and that is the art of the bodge one tank yeah thank you Matt
Info
Channel: Tom Scott
Views: 2,579,977
Rating: 4.869668 out of 5
Keywords: tomscott, tom scott, bodge, bodging, AutoHotkey (Software), luamacros, Lua (Programming Language), emoji, emoji keyboard
Id: lIFE7h3m40U
Channel Id: undefined
Length: 17min 15sec (1035 seconds)
Published: Thu Sep 24 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.