Ruby Rogues
168 RR Xiki with Craig Muth
The Rogues talk to Craig Muth about the Xiki command line tool.
August 06, 2014
Episode 168
168 RR Xiki with Craig Muth
Ruby Rogues
0:00
0:00
Speed:
Share This Episode
Show Notes
The Rogues talk to Craig Muth about the Xiki command line tool.
Special Guest: Craig Muth.
Transcript
JAMES:
Todayâs opening joke needs to be the chat text before we started the call. [Laughter]
CHUCK:
I could totally see that narration. Screaming. More screaming. Howling. Burning flesh smell.
CRAIG:
Itâs really going now. Itâs really going. [Laughter]
CHUCK:
There goes his shirt! [Laughter]
DAVID:
Here comes Chuck with, âIs that a marshmallow on a stick?â [Laughter]
CHUCK:
If he had hair, he wouldnât anymore!
[This episode is sponsored by Rackspace. Are you looking for a place to host your latest creation? Want terrific support, high performance all backed by the largest open source cloud? What if you could try it for free? Try out Rackspace at RubyRogues.com/Rackspace and get a $300 credit over six months. Thatâs $50 per month at RubyRogues.com/Rackspace.]
[This episode is sponsored by Codeship.io. Donât you wish you could simply deploy your code every time your tests pass? Wouldnât it be nice if it were tied into a nice continuous integration system? Thatâs Codeship. They run your code. If all your tests pass, they deploy your code automatically. For fuss-free continuous delivery, check them out at Codeship.io, continuous delivery made simple.]
[This episode is sponsored by Hired.com. Every week on Hired, they run an auction where over a thousand tech companies in San Francisco, New York, and L.A. bid on Ruby developers, providing them with salary and equity upfront. The average Ruby developer gets an average of 5 to 15 introductory offers and an average salary offer of $130,000 a year. Users can either accept an offer and go right into interviewing with the company or deny them without any continuing obligations. Itâs totally free for users. And when youâre hired, they also give you a $2,000 signing bonus as a thank you for using them. But if you use the Ruby Rogues link, youâll get a $4,000 bonus instead. Finally, if youâre not looking for a job and know someone who is, you can refer them to Hired and get a $1,337 bonus if they accept a job. Go sign up at Hired.com/RubyRoguesPodcast.]
[Snap is a hosted CI and continuous delivery services that is simple and intuitive. Snapâs deployment pipelines deliver fast feedback and can push healthy builds to multiple environments automatically or on demand. Snap integrates deeply with GitHub and has great support for different languages, data stores, and testing frameworks. Snap deploys your application to cloud services like Heroku, Digital Ocean, AWS, and many more. Try Snap for free. Sign up at SnapCI.com/RubyRogues.]
CHUCK:
Hey everybody and welcome to episode 168 of the Ruby Rogues Podcast. This week on our panel, we have James Edward Gray.
JAMES:
Actually, Iâm going to need you to refer to me as Mr. Haskell from now on.
CHUCK:
Awesome. David Brady.
DAVID:
Man, I had something all ready to go, but now I just want to be Mrs. Haskell. [Laughter]
CHUCK:
Iâm Charles Max Wood from DevChat.TV. And all I have to say is, hello everybody! [Chuckles]
CHUCK:
Iâm just feeling good today. Anyway, we also have a special guest and that is Craig, is it /m_th/ or /mĂŒth/?
CRAIG:
/myĂŒth/.
CHUCK:
Muth.
CRAIG:
Like music.
CHUCK:
So neither. You want to introduce yourself real quick? [Chuckles]
CRAIG:
Neither. Yeah, Iâm Craig. Iâm the author of Xiki, which Iâve been working on for about 13 years. And Iâm super excited to be on this podcast.
JAMES:
Woohoo!
CHUCK:
Awesome.
CRAIG:
[Chuckles]
DAVID:
So, Craig Muth, talk to us about your inability to ship a product.
[Laughter]
JAMES:
Great opener.
CRAIG:
Great question.
JAMES:
Yeah, just set him up there.
DAVID:
Yeah.
CRAIG:
[Chuckles].
JAMES:
How about we start withâŠ
CHUCK:
Well, he had people contribute $85,000 to not ship a product. [Chuckles]
CRAIG:
Thatâs been out there for 14 years.
DAVID:
Wow.
CRAIG:
With many satisfied users.
JAMES:
I actually knew about Xiki for, I canât remember. I think I probably mentioned it on the podcast about when I found out about it.
CRAIG:
You did. You did mention it. Yeah, yeah.
JAMES:
But it was years ago.
CRAIG:
Yeah, it was two years ago. It was after my Xiki RubyConf talk. You and Avdi both picked Xiki as a pick at the end in two separate episodes. I was pretty thrilled about that.
JAMES:
Thatâs right. Thatâs how I found it, with the Ruby Conf talk, yeah.
CHUCK:
Iâm pretty gratified that weâve been doing this long enough to where it was picked years ago on this show.
JAMES:
Yeah.
CRAIG:
[Chuckles]
JAMES:
So, Xikiâs gone through this life cycle, apparently. Itâs been under the radar and then it started to get out there. And now itâs a Kickstarter. Maybe you can walk us through how it happened.
CRAIG:
Yeah. It was a Kickstarter. It ended the Sunday before last, barely squeaked by. In the last week, I made up half of the distance to the goal. Super thrilled about that, really excited to jump in. How it started, do you want me to go way back to the beginning? Or maybe I should do a description of it first.
DAVID:
Yeah, I was going to sayâŠ
CHUCK:
Yeah.
DAVID:
Can we get a definition? What is Xiki?
CRAIG:
Itâs many things. But think of it as expanding commands. So, it lets you expand the output of shell commands in a very GUI-ish way. Itâs spelled X-I-K-I and the X is for expanding. So, letâs say youâre in your shell console and you type ls, and it shows you a list of files and directories, if you want to see the files in one of those directories, Xiki lets you just move your curser down to that directory and expand it right there in place, like you do in a GUI file tree, instead of typing cd and retyping that directory name and another ls. The directoryâs already there. Why do you have to retype? Why not just move your cursor down and expand it and drill in?
Just like the OS X file browser, or the Chrome Inspector where you click the little triangle to drill into directories or HTML or JSON, Xiki basically does that. But everythingâs plaintext and the text is always editable. And youâre expanding into shell commands and other things. So really, itâs actually more similar to code folding, the cold folding feature in IDEs. You guys familiar with that?
JAMES:
Yeah.
CHUCK:
Yeah.
CRAIG:
A lot of IDEs, you can click a little triangle or a plus or a keyboard shortcut and you can expand and collapse methods and classes. So, Xikiâs closer to that because everythingâs plaintext. Itâs always editable. And itâs much less rigid than a GUI like Chrome Inspector where you canât just copy part of your HTML and delete it. But of course, in Xiki you can because itâs just one big text area. And you can do everything keyboard only in Xiki, which is different than most expanding tree kind of things. So, it keeps everything really lightweight and shell-friendly. You want me to do a couple, other examples?
JAMES:
Sure. So, talk about Git, because I think thatâs pretty [inaudible].
CRAIG:
Oh, yeah.
JAMES:
Git integration.
CRAIG:
Yeah. So, if youâre in your shell and you type git and then return, it shows you the most common commands, checkout, status, log. And the Xiki way of doing things is instead of having to then retype âgit logâ, you just move your cursor down to the output of the Git command where the log line is. And then you type a keyboard shortcut and that expands right there inline. And it inserts the Git log, basically. So, itâs running a command for you behind the scenes. And then you can move your cursor down one level deeper into down to one of the commits and you can expand that with a keyboard shortcut. And it shows your commit message and your files. And then you can move down and expand one of the files and see the diffs. And then from there, you can expand that and it navigates to the file.
DAVID:
Iâm going to be honest with you guys. Iâm not going to be paying attention to most of the rest of the episode.
JAMES:
[Laughs]
DAVID:
Because this is so awesome, I got to go play with this.
CRAIG:
[Chuckles]
JAMES:
[Inaudible] to be playing with it. And we should bring that up. Itâs one thing to hear us try to describe it. But it is something else to see it in action. Weâll put a link to the Kickstarter in the show notes. There are several videos one there. And so, you can go watch the videos and see interesting Xiki things going on, tons of examples. And you really need to watch them for a second and be like, âWhoa. Whatâs going on here?â because itâs something.
DAVID:
Yeah. So Craig, your Xiki logo is this octopus grabbing onto all kinds of things, like Git and the web and the console. And one of the things it has got a hold of is databases.
CRAIG:
Yes.
DAVID:
Can you drill Active Record? Can you go to one table and then jump to another table through the relationship and that sort of stuff?
CRAIG:
Through the relationship? Not really.
DAVID:
Aw, rats.
CRAIG:
That would be too hard to mock up by just inspecting the metadata. Really, the cool thing about Xiki is how lightweight it is to create commands and extend them. So, we should pair and do that.
DAVID:
Iâm in.
CRAIG:
Thatâd be pretty cool.
DAVID:
Iâm totally in.
CRAIG:
The main, basically database use case, I have Xiki commands for Mongo, for Couch, for RethinkDB, MySQL. And the main use case is you just type whatever, RethinkDB for example, and then you expand it or youâre in the shell console and you type âxsh rethinkdbâ for expanding shell or a Xiki shell. And then it usually just lists out the tables at the root. And then you expand those and it shows the records. And then you can type to incrementally filter down to one of the records. And then you expand that out and then you see the contents. And then you can edit and expand to save back.
DAVID:
Very cool.
JAMES:
Okay. So, weâre starting to get the picture of what it is. Now, tell us this cycle. Itâs been around forever.
DAVID:
Yeah.
CRAIG:
Yeah, yeah. It started out 13, 14 years ago as me just hacking Emacs and adding little features for myself. And over time, I was doing that when I was supposed to be doing my day job and getting distracted.
[Chuckles]
CRAIG:
Iâve always been kind of rebellious about doing things the way I wanted to and I always wanted to have a really flexible interface. It started out I wrote a file browser, the tree kind of file browser, all in plaintext with the two-space indenting to do the nesting. And if Iâm looking at a directory and I have 20 models and I only care about two of them at the moment, and one starts with A and one starts with a Z, I donât want to scroll up and down between those. And maybe Iâve got a controller also that I care about. I want to be able to just temporarily delete everything from the view and just have those three files.
So, I made this really, really flexible file browser where itâs basically just paths with two-space indenting. And then when you do a keyboard shortcut on one of those, the files, itâll just open it. And when you keyboard shortcut on one of the directories, itâll just expand it one level deeper, with two-space indenting. So, thatâs how it started out. And then it slowly evolved. After a couple of years, I started to take it a lot more seriously, because I realized that the power of applying this to this simple text-only paradigm, it could apply to user interfaces in general. And I started making all the database ones of it.
The next one was a shell command. And itâs very wiki-like which is why itâs Xiki, because itâs named after a wiki but an X for expanding. So, I figured, âHey, letâs make a wiki syntax for running shell commands, which is obvious. Itâs already there, dollar sign space, thatâs what people put on the documentation and stuff. So, if you type dollar sign space on any line, and then you do a keyboard shortcut on that, itâs control + E for expand by default, but you can do control + Enter also, actually is probably the more common default. That will run the shell command and insert it inline.
And once I had that, I realized, âOh, well if you can do directory paths and you can do shell commands, why not combine those and have a shell command indented underneath a directory?â And then it runs the shell command in that directory. And then after I had that, I realized, âOh wait a minute. Why not just do this on remote directories also?â So, you can have username at server slash path and then you can expand remote directories and run shell commands remotely as well. And then once I had that, I figured, âOh, if I can browse file systems in directories and files, why not also browse databases?â And if you can do that, why not edit them as well? And if you can do that, why not have a web interface too, where you can browse a little mobile interface of all these menus.
And basically, thatâs the whole story of Xiki, is each time I do something, something else becomes obvious. Why donât I do this, too? And everything is just text in and text out. So, itâs super lightweight. Itâs not like youâre making an Eclipse plugin, which Iâve done also. Or a webpage, where you think, âOh, I want to do this interface.â The first step is, well, Iâve got to figure out what itâs going to look like, what my wording is, where the buttons go, what the buttons say, whether thereâs going to be text fields, separate text fields, or radio buttons. All that stuff is trivial but honestly it takes a lot of brain cycles and a lot of thinking. Even the ones youâve figured out, you have to arrange it.
With shell commands, you just basically dump a bunch of text out, so theyâre lighter weight. And Xiki stays very close to shell commands in that respect, just text in, text out. So, whenever I have an idea of, âHey, why donât I try this?â itâs literally just a couple of minutes of typing it out and then Iâm already trying it. And you can get a rough version of most things working in just minutes, assuming youâve got a gem. Itâs easy to code up the actual, doing the work, making the interface. And Xikiâs always really easy. So, itâs obvious next step after obvious next step. And then here I am 14 years later. [Chuckles]
JAMES:
You gave it to a couple of friends and got a mini test group. And eventually you decided, âHey, I should show this at the Ruby Conference,â I think is where I finally got wind of it. And so, youâre trying to get it to a wider audience. And then now, youâre at the point where youâre like, âHey, I think Iâve got something here. And itâs time to double down on it and see how it goesâ?
CRAIG:
Yeah. The way I got the friends involved, they were actually coworkers before they were friends. And Iâm obsessed with pair programming, and of course was really bummed that Avdi couldnât make it today. I want to say before I forget. Avdi backed the Kickstarter in a generous way. And I just wanted to thank him. Really, really appreciate his support, and he tweeted a ton. And so did you, James. You tweeted about the Kickstarter and I really, really appreciate that. Avdi and I actually paired on Xiki about a couple of years ago. We made a cowsay command. [Chuckles]
DAVID:
Awesome.
CRAIG:
Which is kind of sweet. [Chuckles]
CRAIG:
And yeah, so the way I got my friends involved was we were pair programming on projects. And I was using Xiki and they were using something else. And I was like, âHey, check this out,â and they were like, âHey, show me that.â So, I taught three, four people to use Xiki by pair programming with them on fulltime projects. And thatâs just a really good way to learn things in general, and particularly things with a lot of keyboard shortcuts, because you can just basically pass on the information. I was continually adding to it and changing it. And I would just say, âHey, hereâs the new keyboard shortcut for this,â and then thereâd be very little friction there. So, I could change it. Yeah, and theyâve used it for years. They havenât used a whole lot of the newer advanced features because itâs hard for me to communicate those to people.
And really, the whole reason for being for Xiki is for me to use it for myself. Everything in it I use for very practical things, with a couple of exceptions more recently, where Iâve made things that I just thought would be cool. But itâs something that I only, Iâve actually made a ton of things that I
thought would be useful and then I didnât end up using. Theyâre kind of cool, but not cool enough for me to remember them. So, I just deleted them. And it sort of evolved for specifically the stuff thatâs useful for me. And yeah, a couple of years ago I did a RubyConf talk and then I did a Strange Loop talk on Xiki and a QCon talk more recently.
And itâs just recently I think, âHas Xiki gotten to the point where I wanted it to be?â where I feel like really, really going to have a great user experience. Specifically that the new feature I just wrapped up in the last couple of months is a contextual menu, a dropdown menu. If youâre using Xiki from a text editor, you can actually use your mouse to click around and expand and collapse. And you can actually right click for text editors that support that. And you can see a GUI dropdown menu on pretty much anything. So, youâre looking at a file path and you right click on it, on a file, and you have delete and rename, the standard things, which that paradigm of a contextual menu, everyone knows and is used to. So, I made a text-only console equivalent of that, right click and you get a dropdown paradigm, which is you just type control + D for dropdown, or whatever shortcut you want to map it to. And it shows you a text dropdown, which is just items indented underneath. And then you can pick from one of those.
So, I think that is going to make it, thatâs gotten it to the point where itâs going to be really easy to learn because people will just say, âOkay, I want to do something here. Iâll just try the dropdown menu.â And I wonât have to have this extensive documentation explaining, âHereâs how you do this.â It will all just be right there. So yeah, within the last year, Iâve realized, âAlright. Finally, all these ideas Iâve been building up for years and years, Iâve had time to do them. And now itâs time to reach out and make an actual real, user-friendly installer.â Hopefully, it will be a one-line installer, and actually start throwing it out there for the world to use and start actually supporting people with the installer. Many people have gotten to use it, but the installer thatâs out there now really sucks, which is half of what the Kickstarter was about. And it has issues. It requires a specific version of Ruby,
1.9.3. And with MavericksâŠ
CHUCK:
That made me cry.
CRAIG:
Yeah. [Chuckles] Youâre not alone. But yeah, with Mavericks, so now Ruby 2 is there by default. So, I should be able to make the installer really slick. And on Linux, you can just say, âHey, install Ruby 2â and everyoneâs fine. So yeah, the Kickstarter was all about supporting Sublime and vim, which Iâm working on and hope to get out in a few months, and making the installer nice. And so many people came out and supported it, and so grateful and excited about that. And now I want to just pair program with everyone over the next year and get something out there thatâs awesome.
DAVID:
Awesome.
CRAIG:
Make a bunch of crazy menus with people.
DAVID:
That is awesome. So, you talked about you started this 12, 14 years ago, tinkering with stuff, just on the side. Something would distract you and youâd go after it. And Iâm just so happy to realize that thereâs a fine line between yak-shaving and ADDDD, which is ADD-driven development. [Laughter]
DAVID:
And that lineâŠ
CRAIG:
Never heard of it.
DAVID:
Is 12 years. [Laughter]
DAVID:
I have hope that 12 years from now, I will have a cool product as the resultâŠ
JAMES:
[Laughs]
DAVID:
Of what Iâve been calling yak-shaving but Iâm now going to call ADDDD from now on.
CRAIG:
I love that. Did you coin that? ADDDD?
DAVID:
Just now.
CRAIG:
Iâm going to use that, with your permission.
JAMES:
Itâs perfect.
DAVID:
[Chuckles]
CRAIG:
That describes my development style to a tee.
JAMES:
[Chuckles]
CHUCK:
So, I have to say, I played around with Xiki. I actually paired with Federico Iachetti for an hour [chuckles] playing with Xiki. And it was really wicked awesome. The only problem I had was that when I run it in Bash, some of the time I get errors and some of the time I just run the command and it works fine and it does cool things with the file system. The other issue I have though is that with the menus, I wasnât able to actually click on anything in iTerm and have it expand. And so, I have to keep running Xiki commands and just drilling in to get things to work. And so, what Iâd love to see is an interactive shell. And Federico actually showed me that he basically had it interactive in Emacs, which again I couldnât get it to work on my machine. Iâm assuming youâre going to solve all these things. But yeah, Iâm just wondering, when is it going to work on my machine?
CRAIG:
[Chuckles] When you say click, did you mean with your mouse in iTerm?
CHUCK:
With my mouse or basically anything.
CRAIG:
Mmhmm. Yeah, the iTerm, in terminals, the mouse support is a really specific thing.
CHUCK:
Right.
CRAIG:
In terminals, itâs intentionally all keyboard only.
CHUCK:
Yeah.
CRAIG:
Right now if you use Aquamacs or Emacs, you can do the clicking.
CHUCK:
Right.
CRAIG:
But in the terminal, everything should work with the keyboard shortcuts.
CHUCK:
Yeah. Oh, there are keyboard shortcuts so itâs not move the cursor over this and hit enter or space or something?
CRAIG:
Exactly, yeah.
JAMES:
Yeah, thatâs a good thing to mention, because when I first looked at Xiki, I was almost turned off by the clickiness of the demos kind of thing.
CRAIG:
Yeah, yeah.
JAMES:
And I was like, âNo, no, no. Iâm a power user. I want to use a keyboard.â And it turns out that everything you can do in Xiki with a mouse, you can also do with a keyboard, right? [Chuckles]
CRAIG:
Yeah. Thatâs a very, very good point to make, because many people have been turned off, particularly in reddit comments and Hacker News comments. People are just brutal about, âOh, the mouse for a command. Thatâs horrible. I would never use that. This guy needs to go dig a hole and go bury himself in it.â
JAMES:
[Chuckles] What? On Hacker News? Come on.
CRAIG:
No, I swear. I have proof. [Chuckles]
DAVID:
My favorite thing about tribes on the internet is not what theyâre about but what they hate about other tribes. [Laughter]
DAVID:
There are people who live their life with their pinky on the control key and their other fingers on the Z, X, and C, and with the finger reach over to V for the clipboard commands. And actually, itâs X, C, and V. And then itâs another finger reach to get to control Z for undo. And their right hand is on the mouse key.
[Chuckles]
DAVID:
And they will just drag, copy, click, paste. And Iâve worked that way, 15 years ago. I could spend an hour editing text without typing with my right hand. It was just insane.
CRAIG:
Yeah.
DAVID:
And those people hate the keyboard shortcut crowd. [Laughs]
CRAIG:
[Chuckles] Itâs fun to hate. Iâm actually probably equally as, I wonât use swear words and stuff, but Iâm probably equally as brutal with other peopleâs things that they say like, âHey, this is a great thing.â If someone wants your attention with their crazy new project that they say is awesome, theyâre putting themselves out there. And I can take the abuse. Itâs fine. But no, I know what you mean about that, mouse jockeys. Iâm actually in the keyboard shortcut tribe, so mouse jockeys is what I call those people.
CHUCK:
Mouse jockeys. [Chuckles]
CHUCK:
I love it. [Laughs]
CRAIG:
I have to say, Iâve worked with a few mouse jockeys that actually can just shred. I worked with a guy many years back who used Notepad on Windows and the mouse to edit HTML. And he just shredded. He was super productive. He would copy and paste, move the mouse lightning speed. There are a lot of people like that, that theyâre so productive in just using GUIs. I actually like to almost never use the mouse. But sometimes I do. Sometimes, itâs just convenient. You could type ten keys and feel proud of yourself. Or, you can just drag the mouse and click somewhere, where you just want to navigate to on the screen. But yeah, 90% of the time I use the keyboard.
And yeah, Xiki is built for the keyboard, for plaintext, fundamentally. But if you want to invite new users, none of us, very few of us at least, use the keyboard to navigate the web. I used the email client in Emacs for a while, but then Iâm like, âYou got Gmail. You just click around.â And thereâs a new feature, you just click on it. You donât have to know the shortcut, or not even know that the feature is there. So, the mouse, if you want to invite new people, itâs like, âHey, new person. Use my user interface,â you have to support the mouse, or touch interface or something. None of us are going to go to a webpage that weâve never heard of before and read a list of keyboard shortcuts. Even the most hardcore keyboard person, theyâll use the mouse and click around links. And theyâll be up and running with the webpage.
DAVID:
There are people who will use Vimium in Chrome.
JAMES:
I do that.
DAVID:
And everybody who sees them using it thinks theyâre crazy. [Chuckles]
JAMES:
Itâs pretty awesome.
DAVID:
I donât think youâre crazy, James, just because Iâve never seen you use it. As soon as that happens, the bit will flip.
JAMES:
Okay, thatâs good. Craigâs hit on this concept a couple of times, though. I think itâs worth calling out. You mentioned that it was hard to disseminate information from Xiki without pairing with people over it so you can show them a few things. And then later you discovered that if you turn things into these dropdown menus, that then you could, because you could click or whatever, then you could see your list of available options at any given point. And then it made it much easier to disseminate.
And then you just hit on a similar point where I will admit to being that guy who actually sometimes reads the keyboard shortcuts before I try to mess with something. But youâre right. Most people donât and will just start clicking things and see what happens, because thatâs a way more exploratory thing, action. And I think weâre talking about discoverability.
CRAIG:
Yes.
JAMES:
The ability to find. Xiki is a big thing, with lots of commands and stuff. And even if I went and read the keyboard shortcuts, maybe a third of them would actually stick in my head per pass.
CRAIG:
Yeah, yeah.
JAMES:
And so, I wouldnât get it. But the ability to be able to hunt around and pull up some popup menu and be like, âWow. I didnât know I could access my Git log from here,â or whatever, that adds to my repertoire much easier and quicker and allows me to discover what Xikiâs capable of. And I think thatâs pretty cool.
CRAIG:
Yeah. I like that word, discoverability. Someone just recently drew that to my attention as being a good word for that. I just want to modify your description really quickly, just for those mouse haters out there, which I am largely one of. When you said dropdowns, in Xiki 90% of people will use textonly dropdowns. So, I didnât GUI-fy everything beyond making it just optional for some people. So, if youâre a keyboard person, Iâm taking this dropdown idea and making a text version of it, text-only keyboard-only version of the dropdown. Yeah, discoverability is really key.
The reason most people arenât going to go to a webpage, if you say, âHey, hereâs a URL. Go to the webpage,â the reason those all have GUI thing laid out on the screen is basically yeah, discoverability. Itâs right there. You can look at it. You can explore it. And even if youâre using the keyboard shortcut, itâs largely a graphical interface. Itâs not text-only.
JAMES:
Right.
CRAIG:
Whereas in Xiki, everything actually is text-only but with navigational menus built into everything. Another word I like is emphasis. I feel like thatâs missing from so many UIs, and particularly command line. If you type git on the command line, you see a list of, what is it, more than ten things and theyâre ordered alphabetically.
JAMES:
Yeah.
CRAIG:
And if you want to get started with Git, whatâs missing is they donât emphasize the two or three or four things that you need by putting them at the top and hiding everything else away. So, Xiki focuses on discoverability and emphasizing the stuff that you need right away.
JAMES:
Right. You typed git. Do you want to use reflog? And itâs like, âHow often does that happen?â
CRAIG:
Exactly. And yeah, most command interfaces are like that. But theyâre great. I love command interfaces. I feel like command interfaces are, some people look at them as this old relic technology thatâs still around because itâs kind of useful. I actually see it as the reverse, that command lines, commands are having a renaissance where all the new exciting cutting edge software that matters on the dev side are first and foremost only command lines, like Git, AWS, Rails, Node. Theyâre just command line interfaces first and thatâs why they can get up and running. So, I donât think that the command line should change.
I just think itâs really starting to come into its own because of a lot of new things out there, like tabs, and iTerm, and awesome shells like Z shell and fish. People are filing in the gaps and making command lines, I think, go to a whole other level. And yeah, I think being able to read that, see all those commands, is awesome and a great use case. And for a lot of people, thatâs the use case theyâll want, because they already read it and know about it. But thereâs also this big missing piece, I think, of yeah, youâre just starting out with it. You want to see something working. And yeah, you could go read a webpage and spend five minutes getting up to speed with it and try it out. But if itâs possible to in literally 15 seconds, 30 seconds, to just drill in and try it out and see it working, I think that should exist as an option.
DAVID:
Itâs interesting that you mentioned people expanding Zsh and Bash and that with their own extensions and theyâre trying to grow it. When I first saw Xiki, the first thing I thought was, âOh, itâs like Light Table for Bash.â [Chuckles]
JAMES:
Neat comparison.
CRAIG:
Except that Light Table made 300 and something thousand in their Kickstarter and I made 75.
[Laughter]
DAVID:
Thatâs because Light Table looks dead sexy, and youâre crippled by Bash.
JAMES:
Thatâs right.
CHUCK:
Yeah.
JAMES:
Theyâve got a better marketing team than you do.
CRAIG:
Yeah. On the other hand, Xikiâs been out there, working for years and years and years.
DAVID:
We love you more. How about that?
CRAIG:
Yes, Iâll take it. [Chuckles]
CHUCK:
So, one thing that I want to get into a little bit and talk about is Xiki is, you keep using the word extendable and I keep thinking about the menus and the way that they expand. But you can also add your own menus.
CRAIG:
Yes.
CHUCK:
And you can write them in Ruby, I believe.
CRAIG:
You can write them in Ruby, or JavaScript, or Python, or CoffeeScript, pretty much anything. Ruby is the most supportive language, because Xikiâs implemented in Ruby. It has been for years. But a relatively newer feature is support for pretty much any language. Arguably, the coolest thing about Xiki is how easy it is to create a command, which is like an extension for Xiki. You can do it, basically any obvious way of creating a command works.
So, the default âHello Worldâ is you just create a hello.txt file and you put it in a place that Xiki recognizes. And then bam, youâve got a working command. So, if you have hello.txt and you stick it in the commands directory, in your home directory, and you put âworldâ inside of the file and save it, then youâve got a working command. So, from your shell, you can run that by typing xsh, say youâre in Bash or Z shell or whatever, you can just type âxsh helloâ and then it will show you world.
And from there, you can use any file extension. So, you could make a .rb file or a .py file, like hello.py. And then you put code in the file. And when you run the command, it will run the code and then show you the output. And then if you expand one of the lines of output, it will just call the script again and pass in the thing that the line that you expanded and a variable called path, and then your code could look at that and say, âOh, they passed in an argument. I can use that to do something different.â And then you can do that recursively. So, say youâve got hello and then you run it and your script dumps out states, say, and then you expand states and it passes that in. So, your script can say, âOh, he passed in states. Iâm going to dump out all the states,â and it dumps out all the states. And then you could expand Ohio and then it will pass in the path variable as states/Ohio basically. And then you can look at that as the parameters. When you expand that and your script runs, itâll say, âOh, Iâll dump out the capital of Ohio,â or information, or open up a webpage about Ohio, or whatever.
So, that simple paradigm of just passing in the path using, climbing the path of two-space indenting, you can implement anything. You could implement browsing file systems that way, browsing any UI. I should probably cover, for people that arenât familiar with Xiki, a lot of the commands that come with it, because itâs so easy to make commands, I have hundreds of commands that come with it. You can type html and it will just dump out some sample html and then you can expand that. And it opens it and displays it in your browser. And you can edit the HTML and expand that again and it will update it in the browser. CSS, it will dump out some sample CSS and then apply that to the browser. All the databases Iâve mentioned. I have Bootstrap, to do this in Bootstrap layouts.
There are Xiki commands for d3 and three.js, for just really quickly in 15 seconds sing a little sample of a library, and then expanding it, editing it if you want, and then seeing it working in the browser or somewhere else. There are commands for all kinds of utility things, like searching in the files. So, you can be in Bash and you can type xsh-f to search in all the filenames. And itâs like grep, but it draws out a nested tree view of the file system of the search results. If you just do a âf it will show you all the filenames. And then you can to incrementally narrow down, as you type to the files that match. And you can do xsh-s for search, and then type an argument like foo. And then it will show you a nested view of all the matches. And you can type to narrow down and you can navigate to them. And there are just hundreds and hundreds of other menus. Iâve been pairing with people.
During the Kickstarter I was reaching out to companies to get them to help sponsor. I made a menu for Twilio. Twilio was a great sponsor of the Kickstarter campaign. So, you type twilio and then it shows you phone numbers and you can expand the phone number and then type something. And bam, you sent a text message to the person right from your shell, or a text editor like we touched on. If your text editor has a Xiki plugin you can just type these commands in a blank line. So, you can type twilio in a blank line in your text editor and expand it and start using Twilio. And PubNub is another company that sponsored the Kickstarter. They do messaging. You can see a list of channels and send a message to it. Twitter, you can type twitter and then see your followers. You can type tweets, or Iâm sorry, just tweet, and then type a message and then tweet it. And here, I can do that right now while weâre talking. It wonât be very visual. [Chuckles]
CRAIG:
Iâm going to go and type tweet and then say, âTweeting while on,â whatâs your, @RubyRogues?
JAMES:
Yeah. @RubyRogues.
CHUCK:
@RubyRogues.
CRAIG:
And then expand it, and I think I just tweeted that. If you go to Twitter.com/Xiki, I think that tweet will be there.
JAMES:
Let me ask you a question about how you accomplished some of this, because I think it may lead to an interesting discussion. You said now that you support tons of languages, so Ruby and Python and such. And people can just write commands in whatever way feels most naturally to that. Under the hood, are you doing that as a typical Unix filter where the input comes in on, well I guess in your case itâs whatever argument. So, that comes in, in argv or whatever that languageâs equivalent shell arguments are, and then they just write to standard out and thatâs what you capture to show the output and stuff? Is that how youâre doing that?
CRAIG:
Itâs pretty similar to that, but instead of standard out, well yeah. Actually, you write to standard out. There are two ways of doing it. You can write to standard out or you can have a return value at the end. And the input, I actually make a little wrapper script on the fly, for Python for example. So, I take their code and I wrap it. And at the beginning I pass in a path variable. So, if youâre in Python you can just use this path variable that will magically appear to get the input. And then yeah, you just print out the output and thatâs what gets dumped underneath as the output.
JAMES:
Gotcha. So, I asked that because I was actually having a discussion with someone the other day. Theyâve written a script and it was a simple little script of, we can call it compiling a file. So, there was this file that was source code, sort of. And the script ran and it found that file and then it created a file that is the same name but with a different extension or whatever. And then it copied the data over, changing it as it was moving it over. So, theyâd written the script in such a way. Open this file, read, and they open the output file, and theyâre writing it across. And weâre talking about that code later and Iâm like, âYeah. Thatâs cool. But actually, I wanted to work like this,â and I actually collapsed the code down so that it just took on standard in, whatever, to compile, and then wrote whatever the compiled thing was to standard out.
And on first pass, that looks like you almost have to do more work at the command line, because now I have to make sure I redirect standard in. Or if you use Rubyâs argf, you can just list the files just like you did in his version. And then I have to redirect the output at least, to put it in the file I want it in. But then I started showing that now that it was this thing that followed this set of standards that have been agreed upon by the Unix community, then now itâs this piece in a bigger machine. And so, I started showing how I could send the output to pbcopy on my Mac to get it on my clipboard. Or I started showing how I could key the file to an output file and a standard out so I could put it in a file. So, I have it, but I can also visually inspect to see, did I get what I thought I
was getting, or things like that, and how it fits into this larger ecosystem.
And I think what Iâm talking about here is composability, how you can combine these various pieces to do these interesting things. And it seems to me like Xiki really hits it out of the park on the composability front, because you have all these different things that can drill into these commands and work in different ways. And then because everythingâs just text, you can compose this environment thatâs what youâre doing right now.
So, to give an example, if I were working on my Rails app and maybe what I needed to do was edit a few files. Like you said, I could ls my models directory or whatever, remove all the models that I have nothing to do with the feature Iâm working on, leave the others there, maybe invent some shell command thatâs how Iâm currently monitoring what Iâm doing. Like, âThis will be successful when this command finally outputs zero entries,â or whatever, so I can keep checking that over and over again. I can maybe have my database up for the particular table Iâm concerned with and editing the entries in there as I need. In addition, it seems like Iâm basically composing the interface that solves exactly the problem that Iâm working on right then. Does that make sense?
CRAIG:
Yeah. Xiki has a UI-focused kind of composability where you can basically get the output of something and then pass it into something else. Thatâs awesome. I actually developed most of Xiki in parallel with my web startup, which is Memorize.com. And just like I said, everything I made in Xiki was something I used.
An example of what youâre talking about is Iâve got my models that I just can access them remotely on the server with YAML, and dump them out as YAML. So, Iâve got a command, say âmodelsâ that will dump out, let you drill into the models and grab it. And then once youâve got the output as YAML, you could take that. Itâs just text dumped into your text file. And you can take that and save it into a file, or I can take it from prod and then dump it directly into local by just changing the command thatâs above it, to change it from prod to local and then expand it to save it locally. And I could send it in an email by putting email above it, and having it nested under an email address. Or I could tweet it, for example. So yeah, itâs a cool type of composability.
Yeah actually, Iâm really excited about people making more commands that work together. My longterm plan like I said is to pair with everyone. And I really think Avdi is the champion of this, the pair with me tag and everything. Huge fan of that. I think this collaborative thing, where people make their own commands that work with other peopleâs commands and just people getting together in general and pairing with each other on open source is just going to be a huge, huge and awesome part of the future of the way developers just connect with each other in general. With pair programming, like Avdi has said in various podcasts, you get the motivation for free. Itâs not a pain. You donât even want to slack off because youâre sitting there with someone and youâre having fun. Youâre brainstorming. So, Iâm really looking forward to pairing with a ton of people and get connected with them and get them working on Xiki and then even collaborating with them on profitable projects.
Iâve got a really awesome idea for the next big feature on Memorize.com. And I might actually be at the point where I want to talk to some investors about that. Iâm not sure. But I think itâs another huge missing piece that wonât take that long to get out there. Iâm hoping some of the collaborators that I pair with on Xiki eventually will just really hit it off and Iâll say, âHey, you want to collaborate with me on my website?â or whatever. But yeah, I think if you can have a common language where the code that you make, even in different languages with different paradigms, if you can have a composable UI interface, itâs going to make just collaborating with people easier in general.
There are tons of performance things that need to be worked out there, because like you said, when I shell out to Xiki to a Python script, Iâm just making a process and then killing it. If youâre just clicking on something in the UI, thatâs actually so quick that itâs not noticeable. But I think thereâs going to be an internal language bridge that wonât be too hard to implement, like a de facto standard for it, where you can keep a Python process alive and then just communicate with it. And that way, you can get the speed of development and the composability and the interoperability with performance on top of that.
JAMES:
Yeah.
CRAIG:
Sorry, Iâm bouncing on many topics. I apologize.
JAMES:
No, thatâs a good point, that you have the standard interface and the ease of that. But you have to trade it off against other things like if theyâre running a subcommand on every single file in the directory, probably the ideal solution is not to fork 30 Ruby processes, right?
CRAIG:
Yeah. The cool thing about the way Iâm using this, that, basically way of running things, is if youâre just clicking around on the UI and youâre one person, you can have a few milliseconds there to start up a process and you donât even distinguish it. But it would be nice to take this paradigm and apply it to websites and high-volume things as a language, where not only can you navigate and discover the features of something while youâre using it, but then you can take those paths and menu items that you used manually and use that as an API as well and plug it into code.
JAMES:
Yeah. That was where I was going with the composability thing.
CRAIG:
Yeah.
JAMES:
One of the things I got out of my discussion with this other programmer about Unix filters and the power of them were as every vim user knows, vimâs commands are ultimately composable. You delete a file, a line, whatever. You trigger that delete and then you compose it with something else to say what youâre deleting.
CRAIG:
Yeah, yeah.
JAMES:
And the way you combine those things. But this is like a fundamental concept of programming, these little tools that work together and pipeline and stuff. Even in a well-developed object-oriented system, your objects are these little things that you plug into each other in certain ways to get certain outcomes.
CRAIG:
Yeah.
JAMES:
And it turns out to be this fundamental thing, I think, of being able to combine these little pieces, or you put these little pieces together in ways that you want to get the desired outcome.
CRAIG:
Yeah, totally. And itâs been my opinion for a long time that discoverability, before I used that word, discoverability and emphasis are really big missing pieces in just code in general. If you go into a new project, you see a big list of classes. Itâs nice if theyâre organized, nice if you have models and views or whatever, or controllers. But fundamentally, youâve got a big list of classes and a big list of methods. And if you want to discover and see whatâs important, youâre left to your own, or like a little short documentation. I think this user discoverability, itâd be great if it existed in a new project. Letâs say you hired someone to make a new feature for your program. And when they were done with two weeks of work, my preference is actually to pair with people, then you donât have as much communication. But letâs say you paid a pairing team of two people to do something and then they hand it over to you and itâs just a code and itâs a library that youâre going to plug in.
But how awesome would it be if you could just click and see a little UI where you clicked around and expanded things to use the code, and maybe they built in some sort of mocking there so you could use it right there without having to connect to some other system. And then you could use it and see whether it works or not. You get to type in and try different values before even jumping into the code. So yeah, I think thereâs a huge potential of the underlying language thatâs in Xiki, which Iâm calling expanding, for that to be applied as a bridge to languages. And obviously, if you want to make a really solid library or a part of your app, youâre going to want to make everything largely like OO and use the tools that are there already. But why not make a little wrapper interface on top of it that is for an interactive documentation of your code. And then when you actually plug it in to where itâs being called, you could call the methods directly, the underlying methods directly.
JAMES:
Right. Do you think Xiki will, as more people get into it, encourage people to, I have this specific database that I work on thatâs structured X way, and being able to look at any table and edit an entry is nice. But actually, the things we always care about are these kinds of queries. Do you think people that get into it will be more tempted if you can lower that barrier enough, which it seems like youâve really done a lot, as to just make a custom command that appeals specifically to them and their use cases so that they can basically just turn the standard âqueryâ into the query that makes sense for them and use it that way?
CRAIG:
Yeah. I think some people really like to, arenât afraid of jumping in there and making their own wrapper on top of things. And Iâve always been that type of person where Iâll spend a couple of minutes to improve the UI and customize it to myself. And I think those people are going to really love Xiki. And then people that just want to use something out of the box, maybe some other people will write commands that work well for them.
JAMES:
So, you talked about how Xiki used to be in Emacs Lisp. And you started playing with it that way. And then eventually at some point, you moved it over to Ruby, you said.
CRAIG:
Yes.
JAMES:
Why did you make that decision and why Ruby and how did that work out?
CRAIG:
Um, letâs see. I just loved Ruby. I never really, really, really loved Lisp. Common Lisp, the Lisp that most people use, is more fully functional than Elisp. So, I went from Elisp to Ruby. And it was just, my productivity shot up 3x probably when I did that. And itâs not because, Elisp for what it does is super awesome, actually. And I still use it. But for what Xiki does with text processing and really quickly making working code and classes, Ruby was just a really, really great fit. So, that was probably about seven years ago, when I switched from Elisp to Ruby. That was about the time I named it Xiki. And Iâd always⊠I guess I discovered Ruby a little bit before that. Before that I did Java and Perl. And I love the lightweight, loosely-typed, super-fast concise aspects of Perl. But I love the OO stuff you could do in Java. And Ruby seemed to me like the perfect combination of those two. So, I just feel in love with Ruby and then realized that you could extend Emacs with Ruby around that time using this obscure library that one of the core Ruby guys named rubikitch wrote. Itâs a library called El4r, like Elisp for Ruby. So, I discovered that as an Emacs, Elisp/Ruby bridge, and jumped all over it and got all excited about it. But since then, Xiki, the core of it has been pulled out, outside of Emacs, and it just runs as a Ruby process itself so that it can be used by other editors.
JAMES:
Thatâs interesting.
CHUCK:
Yeah, that was one of the areas that I was having trouble with, when I was setting up, was getting El4r to work properly.
CRAIG:
Yeah, a lot of people have had issues with it. I need to⊠in the process of improving the El4r library itself, I made a gem out of it and Iâve improved it, like with the error handling and stuff. And I think Iâm not too far away from making all those things transparent and making those errors, making people not even know that thatâs running behind the scenes and just have everything work by default.
CHUCK:
Yeah, I did notice that you have taken over the maintenance of that library.
CRAIG:
Yeah.
CHUCK:
Is it mostly Emacs Lisp? Or is it mostly Ruby?
CRAIG:
The library itself?
CHUCK:
Yes.
CRAIG:
Itâs half-and-half, roughly. They are two main files, just one giant Elisp file and one giant Ruby file that talk to each other.
JAMES:
Thatâs interesting.
CHUCK:
One thing that Iâm curious about is if somebodyâs getting started with Xiki, where do you recommend they start? At this point, you clone the repository and you run the command to put it into your path. But are there certain things that come naturally to people when they start fiddling with Xiki?
CRAIG:
Well, the new answer for that is going to be, they should start by using the xsh command, which lets you, itâs like the expanding shell, the Xiki shell. It lets you run commands right from your console and theyâll work with, itâll let you stay in Z shell or Bash and use Xiki commands in conjunction with your shell and jump in and out of Xiki.
So, the high level answer is Iâd recommend people wait a few weeks until I get that out there, because thatâs going to make the initial user experience so much nicer. You'll just be in your shell and youâll type âxsh lsâ or just xsh to jump into Xiki shell and then type a command there. And Iâm going to make it as user-friendly as I can. Have you guys ever used Pico?
JAMES:
Yeah.
CRAIG:
You know how in the bottom they have just a fewâŠ
JAMES:
The commands you need, right?
CRAIG:
Right there on the screen, yeah. [Chuckles] So, control + X to quit is I think there. So, Iâm going to do that. Iâm just going to have, I think just three of the main commands, so control + E to expand and collapse, control + Q to quit, and then control + K I think to show more keys. And then when you do control + K, it will show you a list of keys that you can drill into. So, itâs going to be really, it will hold your hand to get used to things. Iâll have a nice tutorial that youâll be able to navigate to from control + K, probably. It will walk you through things.
So, thatâs going to be a way more nice experience than what you have to do right now, which is go check out the Git repository and go through some sort of hellish installation steps. Itâs not hellish forever. And some people, it just works, especially on I think Linux, itâs pretty seamless. But most people run into these really bad installation issues. And even when you do get it up and running, if you havenât watched the screencasts and know what to expect, itâs not going to help you through that. So, the user experience is bad, which is largely what the Kickstarter was about. And it passed, thank God, and thank everyone that contributed. Hugely appreciative of that. So now, Iâm going to go make that the big party. So, the overall advice is just wait a few weeks, and then it will hopefully be a one line installer that will have a really great experience.
JAMES:
Thatâs awesome. Thatâs something to look forward to. I was actually talking to another friend of mine the other day about, we know this person that just really never programmed or been a very tech-savvy person and theyâre interested in just learning a little bit and seeing what itâs like. And we were talking about good first steps. And one of them was, âWell, we should put him on some Linux distro, just so they can start interacting with the command line and stuff like that,â because again, you get this concept of composability and pipelining commands together, which I think are all fundamental to programming.
But I actually like the idea of Xiki, when it really reaches this user-friendly point, I think I might recommend that as a great first step. And starting to see this ability to put out commands and drill down so you get the shell without all of its obscure mess and way better discoverability, and being able to dig in, I think that would be an easier on ramp for people to start getting into this kind of stuff.
CRAIG:
Yeah, I hope so. I hope so. One of the marketing messages that you have to worry about when you do a Kickstarter, which I hate [chuckles], one of the messages I toyed with was, âHey, bringing the power of shell commands to everyone,â which I think lost the interest of some of the power users who actually probably are the core audience of Xiki. But yeah, I think thatâs⊠everyone has a Mac.
Basically now, every computer you have has hundreds of shell commands installed by default and theyâre all super powerful. But they donât give you a friendly interface if youâre not a techie person. So, thereâs this amazing power sitting on everyoneâs computer unutilized. I think that little piece of what Xiki can do where it takes those and makes them discoverable basically, is an awesome, yeah almost side-effect of what Iâm trying to do with it.
JAMES:
Yeah, itâs interesting how it does seem to affect at both ends. Users get the easier time into it and discovering whatâs there, which may help them find commands. How many people find Gitâs reflog command until they actually need it?
CRAIG:
Oh, yeah. Thatâs [inaudible]?
DAVID:
Yeah.
CRAIG:
I think I only know about one-fourth of the awesome Git features. [Chuckles]
JAMES:
Right.
CHUCK:
[Chuckles]
JAMES:
And so, thereâs that. And then at the same time, for power users, Iâm a super big automate everything guy. And for me, it gives me the easier command creation to do things a certain way, the way I prefer them and stuff. And so, I feel like it does a good job of appealing to both audiences.
CRAIG:
Cool. James, you and I should pair. You could probably come up with a few amazing automated type ideas that I probably would never have thought of. I would love to get your perspective on a lot of that kind of things. Iâm mulling through now as far as next steps and stuff.
JAMES:
[Inaudible] have to do that someday.
CRAIG:
And everyone else should pair with me. Iâve got basically an open invitation to the world to pair. And I think thatâs an awesome way of making an open source project. So, follow me.
DAVID:
Iâm in line.
CRAIG:
Awesome. You guys will clearly be at the front of the line, in addition to my Kickstarter rewards people who get a reward for pairing. Iâll probably have to do them first, which Iâm really looking forward to. But yeah, everyone elseâŠ
JAMES:
I thought that was an interesting use of rewards. You had the rewards like you said, where it was like, âThink up some command. Iâll pair with you on it and weâll make it.â So, it was neat in that it let them get some buy in and help like they were influencing the project. And then you get access to these new ideas. And like you say, youâre going to see some things you never would have thought of. And I think thatâs cool.
CRAIG:
Thanks. Yeah, I thought that was risky for me to make that the reward. But I was really happy that people bought into it and that seemed as exciting for them as it did for me. Yeah, anyone who wants to pair, just follow me at Twitter, @Xiki. And just tweet, âLetâs pair,â and weâll pick a time and do an hour. Iâve done a bunch of them. Theyâve all been so fun. Remotely or locally, Iâve paired with people. And Federico in Argentina, Iâve paired with him several times. Iâve had amazing pairing sessions and ideas that came out of that. Heâs actually extended Xiki in a few awesome ways. Iâm going to pair with him again about that. And then people in the UK and just all over the world, Iâve done pairing sessions with them. I promise Iâll make it fun.
Iâm not looking to rope you into being a contributor and say, âHey, now youâre committed and you have to do it again.â No, just one time commitment, an hour, or two hours. We could pick something that you like to do and make a command for it, like some library, some JavaScript library or this gem or Node module or whatever, npm module. We can just make a little wrapper around it, something that youâre interested in. We can just brainstorm about a few things like, âHey, what are you interested in?â Find something thatâs exciting for both of us and just knock it out in a few minutes, make a command, and yeah. Iâm really looking forward to doing that. And once I get the one-line installer, that will be obviously way more attractive to people.
DAVID:
You talked a while ago about how you can program it with Ruby, with JavaScript, with Python. And you made this really bold statement of, âOh, you can program it from any language.â Have you developed an SOA style, like an API communication layer? And is that how you integrate with things? If I wanted to add a JLang interface to it, or a Java interface to it, would I have to sit down and write a wrapper module or something like that?
CRAIG:
Yeah. But itâs pretty thin. Basically, youâd have to make a class and then modify a couple of files in the Xiki source where it registers it, registers the file extension and says shell to this.
DAVID:
Yeah.
CRAIG:
And itâs like code that manually just grabs the source of the command from the file, appends the stuff at the top where it makes the path variable just by inserting it, and that comes in, which is very lightweight. And then it writes, well it usually pipes that to the command, whatever the Ruby command or whatever. And then it gets the output and it inserts it. So, itâs pretty thin. But yes, itâs not entirely pluggable. You have to modify the core source. But itâs probably doable in half an hour, or hour.
DAVID:
Thatâs cool.
CRAIG:
Especially if someone wants to do that, itâd be pretty hard to do them on their own probably, to figure out my crazy source code. But just ping me and weâll pair on it and we could knock it out in a half an hour or hour, add another language.
DAVID:
Youâve already got a Twitter invite from me for, âLetâs pair.â Iâm just saying.
CRAIG:
Sweet. Awesome.
DAVID:
Iâm just saying. [Laughter]
DAVID:
What are you doing after the show today? [Laughter]
CRAIG:
Pairing with you. [Chuckles]
DAVID:
Good answer.
CRAIG:
[Chuckles]
CHUCK:
Yeah, and Iâm really looking forward to just getting this working. And the thing is that I see a lot of potential here. One thing that I think would be really interesting is if you could set up Xiki so that you could use the command interface to run things on remote machines. And I know that you can set it up so that you can do that through local commands, like Capistrano and things like that. But Iâd really be curious to see where things could go in that way.
JAMES:
That wouldnât be hard. SSH and some command runs it on a local machine.
CHUCK:
Oh, thatâs true.
JAMES:
You could definitely⊠you could make a command for it yourself fairly easily. Itâs not hard.
CRAIG:
Yeah. Iâve actually got a few things. Iâve got out of the box file navigation and running shell commands. The Xiki commands will do that. And then Iâve got, for Memorize.com, Iâve got tons of commands that run things on the remote server, yeah. So, just basically Ruby code that uses the SSH gem to connect and run commands and show me the output. Iâve got tons of things that do, Iâve got a Memorize.com prod menu that will restart the server, that will clear out the cache, that will let me interact with the models, and deploying. Iâve got things that will restart Apache and stuff. You could do that asynchronous or synchronously, because sometimes you want to, especially if itâs prod, you donât want to hide too much of that. So, you just make Xiki commands that will launch a shell and run a command. And then you can see the output there and then run more commands and stuff.
CHUCK:
One more aspect to Xiki that I want to talk about is it has a web component to it. Do you want to talk about that for a second?
CRAIG:
Yeah. So, basically if you make an interface, a user interface, by making this two-space indenting. Say youâve got states as your command name and then underneath that youâve got whatever, northern states, southern states. And underneath that youâve got a list of sites. Thatâs a general purpose UI.
Backing up for a second, think about what the difference is between, youâve got foo menu in your menu bar on the Mac or whatever, and you click that and then it drops down and you see a bar item. Whatâs the difference between that and on the command line typing foo and then seeing bar as a result? Whatâs the difference between that and having a directory named foo and you expand it and you see a file named bar? Whatâs the difference between all those things and seeing an icon on your Desktop called foo and then you double click on that and it shows you bar? Or a button in some UI thatâs labeled foo and you click on that and it shows you bar? Whatâs the difference between all those things? And also, whatâs the same in all those things? Thereâs something there that can be abstracted out. A similar thing, you mentioned specifically the web. So, whatâs the difference between typing a URL foo.com and it shows you bar?
So, thereâs something there that could be abstracted out. And thatâs at the core of what Xiki is all about. And the simplest possible text-only way I think of doing that is you just have nested plaintext with nested indenting. So, you have foo and then underneath that is bar. And then from there, you can obviously have bar and multiple things underneath it. And then you can go recursive and then youâve got 75% of what most user interfaces do, even though theyâre pretty and have intuitive layouts and different ways of interacting. Theyâre fundamentally just nested lists in many ways. So, youâve got this general format that you typed out, or you made interactive by a command or a class or a script.
Xiki out of the box will draw a mobile interface for that. So, it comes with a web server. And it will draw a mobile interface, with the standard pill-shaped buttons for your items, and let you navigate that way. It also has Bootstrap support where you can nest those into the items. From there, there are all these devices, different types of smartphones coming out there. 10 smart watches coming out, if you ever go to the smart watch aisle of Best Buy. There are so many of these devices now. I have a Pebble and itâs great. Samsungâs making one. Google supposedly and Apple are making smart watches. And all these devices are going to have, and already have, their different specific API for making apps for them. I had to write in C in this crazy language to make a Pebble app.
To me, thatâs crazy in 2014, that thereâs not just some general UI language that you can just type out in a few lines and then deploy that to your Android, to your iPhone, to your Pebble watch, to web browsers. Thatâs insane, that we donât have that. And the first thing that most people are going to think in response to that is, âWell, for apps to be useful, they need to make device-specific calls,â and thatâs a very, very true point. But that doesnât mean throw the baby out with the bathwater.
DAVID:
Right.
CRAIG:
There should be a general open user interface, a language for defining user interfaces, and then you can deploy that to a bunch of devices. And then if you want to make something device-specific or make it pretty, you can add to that structure something that will make a call to the GPS, or a styled UI instead of a standard mobile-looking interface with items that just slide back and forth. You could easily add style on top of that to make it into, make a different looking navigation or make some crazy touch interfaces.
An example of a use case for doing that where you wouldnât even need any code is, I just went to 4js conference. And like all conferences, they have a schedule and a webpage that you have to go to. And your phone sometimes doesnât work and you donât know whatâs next and you end up walking up to the big board that lists out the rooms and the schedules. How cool would it be if you could just type out this basically a textual outline and then say, âHey, everyone can download this and deploy it to their watch, to their phone, as an app.â You donât even need to do it in code. Itâs just the schedule.
So, youâve got day 1, day 2, as your root items. Underneath that, room 1, room 2, room 3, and underneath that the talks, and then underneath that you can have a heading. Iâve got a wiki syntax for headings and paragraphs that describe it. And then I can deploy it to my watch and be walking the conference and navigate the schedule. Because fundamentally, most UIs you look at, like I said, they boil down to just glorified nested items. And a lot of times the glorification is really important. But that could be added on to a structure thatâs usually deployed.
DAVID:
I would love to stick you in a room with Steve Klabnik and say, âHypermedia APIs. Go.â [Chuckles]
JAMES:
I was sitting listening to him talk and all I can think of is I love the world youâre dreaming of.
DAVID:
Yes. [Chuckles]
CHUCK:
Yeah.
CRAIG:
[Chuckles] Itâs fun to dream.
JAMES:
Thatâs right.
DAVID:
Itâs funny, you talked about going from foo to bar, whatâs the difference and whatâs the same? And the thing thatâs different is what happens when you land on bar? But whatâs the same is navigation from foo to bar, and it reminds me of Ido mode for Emacs.
JAMES:
Yeah.
DAVID:
You start typing, you got to open a file and you start typing. You can do this in TextMate or Sublime as well, command + F or command + T to search, whatever. And you start, you type, youâre looking for myTestFile, so you type mtf. And it finds myTestFile just because itâŠ
JAMES:
Yeah. You can do it in GitHub too, which is [inaudible].
CRAIG:
Yeah, yeah.
DAVID:
Yeah. And ultimately, from my experience, I saw it happen in Emacs first. Iâm not saying Emacs did it first.
JAMES:
I think it was TextMate, actually.
DAVID:
Well, TextMate did theâŠ
JAMES:
No, Ido predates it probably.
DAVID:
Well, hang on. Let me specify, because I believe it was, I saw the fuzzy file find in TextMate first. I did. But somebody pulled it into Emacs and then they said, âWait a minute. Navigation is the same thing as navigation as navigation as navigation.â And Ido mode suddenly just became this Elisp function that given a list and a text pattern, will give you a filtered list. And in TextMate, it was in a bundle and it was stuck. All you could use it for was searching for files. But in Emacs all of a sudden, you can use it to search the command that you want to run next, or you can use it to find files anywhere on your hard drive, or you can use it to sift through text in a buffer.
CRAIG:
Yeah.
DAVID:
Or to find recent files, in the recent f buffer. And it was like the Emacs guys were the ones that got the âOh wait. Big list, filter, small list,â and getting from foo to bar is the same in all of these. The only thing thatâs different is what happens when you land on bar.
CRAIG:
Yeah. Whatâs also really interesting is that kind of paradigm is working its way into end-user apps like Facebook. You can go to their bar and type calendar and jump to the calendar. So, thereâs basically text where you can just type in some text to basically navigate a really broad namespace when you want to, a tree with again a really wide first level. All of a sudden, in the last few years, itâs becoming acceptable. And just text interfaces in general are starting to, itâs starting to become acceptable.
I donât know if you guys have had this experience, but for me ten years ago, if you were a developer on a project and some PM or product person was saying, âHey, we need a feature where we want to reference other users.â Most developers would tend to say, âHey, weâll just have a little character for that, that they can type in,â like code. And thatâll mean they can type the character and then the username, whatever, and then weâre done. And your product person will say, âNo way. We need a GUI for it. My users would mess that up. Thereâs no way they could just type something. Theyâd type the wrong thing.â
DAVID:
Right.
CRAIG:
And maybe that was true ten years ago, but since then, people are just so much more savvy. And theyâve typed email addresses with @ signs and URLs with â://â. And now youâre on Twitter and youâre like, âHey, you want to reference another user? Itâs just @Steve. You want to do a hashtag? Itâs #whatever.â And then they can have a little GUI on top of that like when you @someone, it will autocomplete for you. But yeah, thatâs the power of just text. The wiki-ish power is just really taking off. And there are so many things that arenât obvious right away. But you see it in practice. Like with Twitter, if you see someone that tweeted #RubyRogues, by looking at that you know how to do it yourself, because youâre looking at the source basically and itâs transparent. So, you can be able to goâŠ
JAMES:
What a great example.
CRAIG:
Yeah. So, I can make a tweet and do #RubyRogues and I just did what they did. You take examples. You can learn by example and you can do what other people did. If it was a GUI, yeah that would be more friendly for probably people that were less tech-savvy, but theyâd have to click an insert button and theyâd have to search to narrow down, to find the username, and they would insert something with a special style. But then when you looked at it, it would be opaque. You wouldnât know how that person did that.
JAMES:
Thatâs awesome. I have to tell a funny story related to that. I used to spend tons of time in the TextMate IRC Channel. And when they wanted to show each other code, they had a command in TextMate that they would pick. And you highlight some code and you pick this command, and you could tell it to send it to a channel in IRC. And it would put it up on Pastie, I think is what they used back then. And then drop a link in the IRC channel and it would just be your username and it would say âPasted:â and then the link to the thing. And so, I saw people doing that but I wasnât aware of this TextMate command that did all the steps for you. And so, when I wanted to show them code, I would go to Pastie, put my code in there, get it, get the URL, go in and type âPasted:â, and dump in my URL.
[Chuckles]
JAMES:
So, thatâs like mimicking how they were doing it. And it was a long time before they realized I had no clue and I was doing this manually. I think I typoed it one day or something. And theyâre like, âWait, the command didnât do that.â [Laughter]
DAVID:
Are you typing that?
JAMES:
Yeah. Theyâre like, âAre you just doing that?â And then they told me about the command. It was like, âWow.â
CRAIG:
Thatâs funny.
JAMES:
Itâs awesome.
CRAIG:
Yeah, people do some awesome things in IRC channels.
JAMES:
Yeah.
CRAIG:
Oh, which reminds me, I had a few people in Xiki, someone suggested a Xiki IRC channel. So, I need to get that and get to hang out in there more.
JAMES:
Thatâs a good one. Well, thanks Craig. Geez, this is crazy cool.
DAVID:
Should we do the picks so that we can get to the end of the show so that I can pair with Craig? [Laughter]
CHUCK:
Nah.
JAMES:
Alright.
CHUCK:
David, why donât you do the picks first, then?
DAVID:
I have one pick today, and it is freaking awesome. Itâs weird. It sounds like a Steven Wright joke. In fact, it was a Stephen Wright joke ten years ago. But I have bought a wireless extension cord. So, I have weird hearing. I cannot tell the difference between a 48k mp3 and a 128k. I just canât hear the difference in the quality. I just canât. But you put me in headphones that have any kind of hiss or any kind of noise, and it will drive me right up the wall. It makes me absolutely crazy.
So, as a result, Iâm a little bit of an, Iâm not an audio snob because I canât tell the difference between file formats and file quality. But I am an audio hardware snob, because the hiss and the pop and the crackle make me absolutely crazy. And as a result of this, Iâve got a pair of really nice, Iâve got the Boss sound system, little speakers the size of a coffee can type things, a pair on my desk, whatever. And Iâve got a pair of Boss QC15, the quiet comfort over the ear noise cancelling. I may have picked those on a previous show. If not, thatâs a bonus pick, the Boss QC15. Itâs like electronic Ritalin. I can put them on and just all distractions go away. Itâs wonderful.
The problem is that the Boss QC15 plugs into my Boss sound system. And again, Iâm not bragging about how I have this great sound system. Iâm saying I have to have something this quiet when itâs trying to be quiet or it makes me crazy. And the problem with it is that itâs got a six-foot cord. I am tied to my desk. And I have tried every kind of Bluetooth headset. I went out and bought a set of Bluetooth headphones and I put them in and tried to do the show with them last week. And you guys remember I had all kinds of audio problems. When I did have audio working, it was hissing and popping and cracking. It was just all kinds of problems.
It turns out that the problem was that the computer I was using was using an old version of Bluetooth that didnât have really high quality audio transmission on it. And it had really poor range. And gosh, you know what I wanted? I wanted to be able to plug something into my Boss sound system that would turn it into a Bluetooth transmitter. And I wanted something that I could plug into my Boss QC15 headset and turn them into Bluetooth-enabled headphones. And guess what? It exists.
Gentlemen, I give you the Indigo BTR9. [Chuckles]
DAVID:
Itâs a little box about the size of a matchbook. You plug it into USB and you charge it up and then you pull it off. Itâs got a headphone jack on it. And you plug your headphones into it and you push the pair button. And it will pair with any Bluetooth transmitter. And ta da, youâve got a Bluetooth headset out of any good pair of good quality pair of headphones that you want. I still have this problem that the machine Iâm transmitting, that Iâm podcasting from, itâs a machine built in 2008. Itâs got Bluetooth 1.0, doesnât have good high quality Bluetooth transmission on it. Well, guess what? The Indigo BTR9 has a button on the side, a switch on the side that goes from RX to TX. And so, I bought two of them.
The other one, you plug in a patch cord from the BTR9. You plug it into your headphone jack on your speaker outputs. And then you hold the two of them together, and this is the beautiful part, thereâs six questions going, âCan I pair these things together?â And the manufacturerâs writing back on every single one saying, âYes. We designed them explicitly to like to pair with each other, to prefer to pair with each other.â So, you can plug this into a headphone jack. And now, if youâve got Bluetooth headphones, youâre done. You can pair your headphones with this little tiny box. But the beautiful thing is if youâve got two of them like I just bought last week, you can take them both, put one in transmit, one in receive, hold them next to each other, push the pair buttons, and hold them next to each other. And they go, âOh hey, itâs you.â âOh hey, itâs you.â And they pair.
And I have been podcasting today with my QC15 headphones on and my sound coming through my Boss sound system. And I actually went out to the kitchen and got a drink of water halfway through the show. And I never lost the cool. I listened to you guys talking. I couldnât talk on my mic because itâs in here. But I was able to go out and get a drink of water. I could still hear Craig talking. I was able to come back. And itâs my nice headphones. Itâs my nice sound system. And itâs the Indigo BTR9. This is the first tech pick that Iâve actually wanted to just rave and rave and rave about.
Theyâre the size of a matchbook. The audio amp, when youâve got it in receive mode, will drain the battery in about six hours. The Bluetooth transmitter in transmit mode will drain it in about 11 hours. And so, basically you can get most of a day of audio listening with full-blown Bluetooth with your good headphones on, on a single charge. And itâs freaking awesome. And thatâs way too much talking about one thing. I could pick something else, but Iâll save it for next week. So, thatâs my pick, the Indigo BTR9. Itâs freaking awesome. Get two of them, because that makes them even awesomer.
JAMES:
That does actually sound scary cool.
CRAIG:
Totally.
CHUCK:
It does. I think you just spent some money, Dave.
DAVID:
Theyâre about $30 a pop. So, Iâve just spent $60 of your money on Amazon. [Chuckles]
CHUCK:
Alright. James, what are your picks?
JAMES:
I got two picks today. Since Avdiâs not here, weâll have an Avdi tribute. He has a great blog post recently called âWhere do ideas come from?â and this is a strange phenomenon Iâve experienced, too. When people know you and youâre out there and your public, they come up to you and say, âHow do you get all these ideas?â which is a super weird question, in my opinion. But Avdi answers it here, as only Avdi can. And he gives you the address you write off to and they send you the ideas in the mail. And itâs just great. No seriously, if you believe any of that, you have to go read this blog post, because it tells you how people come up with ideas. And itâs great stuff, good post.
Number two, I just saw this the other day. I believe it was Katrina that tweeted about it and tipped me off to it. But Pat Maddox has this new mailing list that is doing Ruby lessons every single day. And heâs rotating through topics. So Mondays Ruby, Tuesday Rails, Wednesday TDD, Thursday object-oriented programming, and Friday refactoring, which is just this amazing collection of neat ideas.
DAVID:
That is cool.
JAMES:
Yeah. Once a week, they do a video interactive lesson each week. And then code examples and notes on each other day. Super cool and insanely priced at free, right now, which I canât even fathom. So yeah, if youâre not subscribed up to RubySteps yet, itâs what itâs called, I expect us to just bury their web server as soon as this episode goes out. So, thatâs my charge to you. Bring that sucker down. Thatâs it. Those are my picks.
CHUCK:
Very cool. So, Iâve got a couple of picks here. Iâve been doing some pairing, mostly with Federico. We talked about him on the show a bit. And one of the tools that are really handy for doing this is the Chrome Remote Desktop plugin for Chrome. Itâs a Chrome App. And yes, it actually does remote desktop. There are two options for it. One is to actually, you can share it, so you just share your screen and you give somebody else a pin number. They put it in and youâre good to go. And then the other option is you can actually set it up so that you can connect to it with your own pin number. And yeah, that pretty much makes it so that you can connect to your machine from somewhere else, if you have that pin number. So, I really, really like it. Itâs been really nice.
The other nice thing about it is that if I share my desktop, I can actually share my mouse and keyboard, or share the mouse and keyboard with whoever Iâm pairing with. Skype just doesnât do that. Screenhero does, but Screenhero doesnâtâ work on Linux. Anyway, so thatâs one thing that Iâve really been liking. So, go check that out.
The only other pick I have is Iâm just excited to get DevChat.TV launched. So, keep an eye out for that. We also just started a new podcast on DevChat.TV and itâs called Adventures in Angular. So, if you want to check it out, go to AdventuresInAngular.com. Not you guys on the show, because itâs not launched yet. But itâll be launched by next week. So, if youâre listening to this show after itâs been released, then it should be out there and available. Weâll have two episodes out and be recording the third next Wednesday. So anyway, those are my picks. Craig, what are your picks?
CRAIG:
My first pick is Mission Bit. Itâs a non-profit group here in San Francisco, in the Bay Area that teaches code to high school and middle school students for free. You can volunteer and tutor kids.
My second pick is a project, another project of mine. Itâs my craziest project, which you guys said itâd be okay picking my own because thereâs no chance for making a profit out of this. Itâs just this crazy font for reading in binary dots. Itâs Dotsies.org. D-O-T-S-I-E-S dot org. Itâs a TrueType font and thereâs a bookmarklet too, where you can display your text as binary dots like youâre reading QR codes, which is way more horizontally condensed and visually simpler. So, shapes are more recognizable at smaller sizes. I think thereâs a chance something like that is going to be part of the future, like the alphabet ABC has been around for thousands of years and hasnât really changed fundamentally. My craziest project, itâs out there, I admit it. [Chuckles]
The third one is a book called âSurfaces and Essencesâ by Douglas Hofstadter. I read it over many months, finished it up a few months ago, and itâs really just changed the way I think about a lot of things. The theme of the book is analogy is the core of all thinking. And itâs very readable. Itâs really long and repeats points a lot. It tells stories and it doesnât beat you up with terminology. It just says, âHey, think things this way.â And it goes into very specific ways that analogies between thoughts and recognizing similarities and sameness in concepts and categories are whatâs going on in your mind. And itâs really cool. A lot of the reviews say itâs repetitive, and it kind of is, but in a way that the âOrigin of Speciesâ is repetitive. Itâs an idea thatâs drilled over and over. But itâs such an important idea and so hard to grasp that to me it was really great.
And can I do a fourth really quick?
CHUCK:
Yeah, go ahead.
CRAIG:
So, Ward Cunningham the guy who invented the original wiki is working on a new project, the Smallest Federated Wiki, which is mind-blowing. And itâs taking the wiki concept and letting you have your own wiki that exists on a server and then sharing stuff between other peopleâs wikis. So, thatâs all I got.
CHUCK:
Awesome. You also mentioned Memorize.com. Do you want to give us the two-minute pitch on that?
CRAIG:
Itâs a very wiki-ish lightweight website for learning. Itâs like the Twitter of learning where your content that you learn is very boiled down into facts, like questions and answers, or like key and value. You could think of it sort of like flash cards. But there are also other processes. And Iâve got a lot of med students that use it.
If you have a lot of information that you want to commit to your memory, and you want to be able to restructure it, organize it into different smaller groups, add little hints, have it be not just a big spreadsheet of things to memorize like most kind of learning memorize sites, if you want to be able to move things around and add notes then collaborate with people, check it out. Memorize.com. And soon, within a few months hopefully, probably several, because Iâm going to be focusing on the Xiki stuff obviously. But at some point, Iâm going to have what I think is just a revolutionary feature for collaborative learning thatâs also very fact-focused, which Iâm super excited about.
CHUCK:
Very cool.
JAMES:
Cool projects.
CHUCK:
Yeah.
CRAIG:
Thanks.
JAMES:
The font page totally sucked me in like flypaper. [Chuckles]
JAMES:
I went there the other day. You sent us an email about it.
CRAIG:
Yeah, yeah.
JAMES:
And then Iâm just poking around. This is crazy. [Chuckles]
JAMES:
And I just couldnât leave. It was amazing.
CRAIG:
Yeah, read at the bottom. Thereâs a tutorial where it starts in the Roman alphabet, ABC. And then you read through it and it gradually turns into dots.
JAMES:
Right.
CRAIG:
And people can get through it between half an hour and three hours, it seems like. People can get through it and youâll be reading in dots by the end of that. Youâll be super slow. But if you want something thatâs just a mind-warping experience, take a couple of hours and do that.
DAVID:
[Chuckles]
JAMES:
Itâs cool. Everybody should go check it out. Itâs break-your-brain cool.
CRAIG:
[Chuckles]
CHUCK:
Awesome. Alright. Well, I think thatâs it. So, be reading the âRefactoring: Ruby Editionâ book. And weâll catch you all next week.
[A special thanks to Honeybadger.io for sponsoring Ruby Rogues. They do exception monitoring, uptime, and performance metrics and are an active part of the Ruby community.]
[Hosting and bandwidth provided by the Blue Box Group. Check them out at Bluebox.net.]
[Bandwidth for this segment is provided by CacheFly, the worldâs fastest CDN. Deliver your content fast with CacheFly. Visit CacheFly.com to learn more.]
[Would you like to join a conversation with the Rogues and their guests? Want to support the show? We have a forum that allows you to join the conversation and support the show at the same time. You can sign up at RubyRogues.com/Parley.]