-Поиск по дневнику

Поиск сообщений в rss_planet_mozilla

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 19.06.2007
Записей:
Комментариев:
Написано: 7


Pomax: Mozilla released a tool I am excited about.

Воскресенье, 20 Сентября 2015 г. 01:02 + в цитатник

tl,dr: you should have a look at https://thimble.mozilla.org, and if you think "this is just a fancy jsbin", challenge yourself to first read http://blog.humphd.org/thimble-and-bramble, which explains in detail how this is nothing like the other "single tool sites" we had on the web until pretty much this month.

With that said, Thimble has a larger story here for me, personally, and I'd like to tell you that story so that you might understand why I am genuinely excited about this tool.

Once upon a time, I was a Java developer.

In a round-about way, my first "being a programmer" identity started in University. As a kid I'd written things in Basic and Turbo Pascal, but it wasn't until University that I was taught how to write structured programs that were more than utilities or silly time wasters.

My first "real programming" kicked in about three years into my AI education, when we were taking a 10 credit course that involved working on real world AI applications, I worked on a java code base for running distributed sensors backed by software agents that collaborated on performing Bayesian reasoning about signal sources. It was interesting, and after the course was done, landed me my first student job continuing my work on it. I ended up designing the code architecture, which ended up landing me my first permanent job, and ultimately gave me a subject I could do a master's thesis on (yes, that's the order things happened in).

Of course I was still programming my own things in my spare time, as well as maintaining some websites (most notably nihongoresources.com) and when a friend mentioned doing some log visualisations using a language called "Processing" (which is the worst name for a programming language that wants to be searchable on the internet btw), I figured I'd have a look at what this mystery language was.

As it turned out, I really liked Processing: it was like Java, but with more freedom: a simpler modeling concept, "global unless you enclose it" functions, immediate execution of code in an imperfect editor (the "PDE") that was good enough to write quick, super sweet visual things. What's more there was even a JavaScript port available, for running your pde files online. Not as Java Applets, but just "as content".

I ended up using Processing enough that I started running into annoying inconsistencies, or even bugs, in the Processing.js port, and being familiar with IRC I jumped into the #processing.js channel on irc.mozilla.org and started complaining whenever things didn't work. In some places, that gets you kicked out of a channel, but in this one, a user called "humph" flipped my complaints around and threw them back at me as suggestions on how bugs could be filed, discussed, and fixed, instead. Without knowing it, I was getting a lesson in how to be a member of a community, and it worked.

My life in today's definition of open source really started there: I started filing bugs, I knew JavaScript well enough to write code for web pages, but the kind of JS needed to write Processing.js was different, so I started learning more about JS as I tried to figure out problems in Processing.js, and at some point decided I knew enough that I could patch problems when I ran into them, with a community of devs that were kind enough to help me through the process of getting those patches submitted and landed into the main codebase. I ended up, I think it's fair to say, a major contributor to Processing.js, I moved from the Netherlands to Canada and went from Java developer to freelance web dev with a love of JS, and that's where this story turns into my involvement with Mozilla.

"I want to put a team together."

I can't talk about humph, or really, Dave Humphrey, without a certain amount of adoration (and that is a well-considered word).

If you haven't heard of Dave, he's a Professor of Open Source with ties to Mozilla, teaching at CDOT, at Seneca College in Toronto, and if you use Firefox, there's a good chance you've enjoyed his work. Dave, to me, is in the category of people who look at something and go "what, 2 years from now, is a thing I want to be taking for granted as available and usable, that isn't there right now". And then, unlike many people, doesn't just blog about it, but sits down and figures out how to make it happen. The part that earns him my adoration is that one of his approaches is to inspire others to do the work, because he has the singular ability to explain his ideas in ways that hold up, and make you excited about the prospect of them becoming reality.

And he was thinking of "a thing" that would require getting some people together to make it happen. Needless to say, he had my attention.

Dave had been linking me to blog posts about making the web about "making" instead of "consuming" by a guy called "Mark Surman" every now and then, and while I'd never heard of the man, his posts made a lot of sense. It wasn't until Dave explain his idea to me that things clicked: Mark Surman was the director of the Mozilla Foundation, and the idea that Dave had was a project to foster "making on the web" through a Mozilla Foundation initiative that you might have heard of.

"Webmaker"

In 2012, I joined a tiny Mozilla Foundation.

I applied to the Mozilla Foundation as a software engineer when it was pretty small. Certainly not "5 people and a goat" levels of small, but when I joined, Ryan Merkley was still with the foundation with the explicit goal of growing it to self-sustaining size, and while I had initially expected to work on "Popcorn Maker", an online video mashup/remixing tool spearheaded by the fascinating Brett Gaylor (from Do Not Track fame), I instead ended up working on a project that was about letting people write HTML in a friendly way, to allow them to learn HTML while also making things they wanted to make on the web.

For quite a few months there was no name, and initially the "webmaker" name applied only to this particular tool, but as we folded more tools into the offering (popcorn maker and the "x-ray goggles", most notably), the overarching program became "Webmaker", and the tool that I was involved with became "Thimble". It was an interesting thing to work on: I learned a ton about patterns and antipatterns in the JavaScript world, and despite the tool being a single page editor, people responded positively. Thimble empowered people on the web in a way that they hadn't been until then, and that made it really important.

But, as a developer, I wouldn't use it myself.

In the same way that I won't do my job using jsbin or jsfiddle or codepen as tools, Thimble was too simple to address the needs of "everyone". It was great for sitting down to with someone, and running them through a "zero to hero!" process where they walked away from the experience with the ability to create simple HTML pages for their own, personal content, and a way to put that content on the web (outside of social media postings), but there was no reason to ever use it if you already knew HTML and CSS and JS, and certainly not if you were a developer.

Thimble got upgraded quite a bit...

After a year of Thimble, as well as several other tools being part of the Webmaker offering, we made a decision to give a new technology called Node.js a shot at the Foundation. As a JavaScript server side technology, it offered the benefits of "the same language everywhere", rather than the "JS in the browser, Python on the server" that we'd been using until then, and we quickly learned how to use Node.js and Express (in no small part thanks to jbuck, who did a phenomenal job at giving an hour and a half lecture on how to go from an empty file to a fully functional Express server, following best practices), and in the process rewrote parts of our tools to take advantage of the fact that everything could be done in JavaScript.

We were able to add features and fix bugs much quicker than before, and we ended up releasing updates almost as fast as we could land bugs. But the Thimble tool stayed relatively samey: yes, there was progressively better support for error reporting in HTML and CSS, and we figured out how to safely allow script execution, so that people could write "real" web pages, but they were still just single pages.

With the help of Tom Park from Drexel University we came up with a way to present not just an editor but also a tutorial system, so that using Thimble for educational purposes would be easier, but ultimately it was still just single pages.

This was not a tool that would work for everyone.

The problem with Thimble, and I'm making it sound like one but for the purpose of Thimble it mostly wasn't, was that it was aimed at an audience that I wasn't part of. In my professional life, I could do everything Thimble did, better, in tools I already had at my disposal on my computers. A desktop code editor and a browser gave me more power than the single flat file concept Thimble operated on, and so I would still use Thimble to teach people, but that was it.

There were always ideas. "Wouldn't it be great if Thimble was like a real editor, but friendly when it needed to be, while being progressively less 'teaching tool' and more a real development tool as you level up your skills". It would be great. But we couldn't make that tool. Having the tool work for educational setting was more important than spending time on making it better for a group of people who already had tools at their disposal.

That makes sense, and that makes what makes the end of this story even more remarkable.

Atom, Brackets, and Thimble; Oh my!

Sever-side JavaScript did more than just skyrocket Node.js's popularity: it also allowed for some headless browser experiments that ended up spawning "pure JS" code editors. code editors called Atom and Brackets hit the scene, being experiments on using a headless browser as a UI framework, and using pure JS as the editor engine. Presented as normal desktop applications, but "powered by the web", there was a lot of love for these new flavours of code editors.

But: if they ran in a headless browser, there wasn't any real reason why they shouldn't be able to, at least in principal, run in real browsers, online.

And that's where Dave showed his genius: he took Adobe's "Brackets" editor, and at MozFest 2013 showed off that it might be possible to put it in the browser, and use it as the code editing part of Thimble, rather than relying on codemirror, so that people would have all the power of a true code editor at their disposal. There was a confluence of technologies that he knew of that could take "making things on the web" to a whole new level, and listening to him describe it, it was the kind of thing I wanted to use.

Imagine opening a code editor with file management, running a localhost server for proper http:// protocol testing, and a browser with live reloading so you could see the results instantly. As a dev, that sounds a lot like how I do my work already.

Now imagine not doing those things separately because the browser just does all those things. A true file system, a true code editor, a true zero-conf HTTP server, true live reloading, all of it, just working. No questions asked. Start it up, and it all just... works.

To me, that's the future. And that's what Dave was suggesting was possible. If we could put in the time to make it work.

Sometimes, tough choices aren't fun

Unfortunately, we didn't have the man hours to make that happen. I really, really loved the idea, but we didn't have the time or the people to stop working on Webmaker, and the Thimble we already had, and instead work on this new thing. This made me sad: it felt like we were focusing on the wrong things by sticking with the Thimble we had. Imagine growing up in a country rife with corruption, and discovering "Norway" is a real thing: while Thimble was still the same tool it had been before, I had seen a glimpse of what it could be, and how much better that was, and simply knowing that the technology allowed for this amazing thing, devalued the Thimble we worked on for me, instead.

Fortunately, the Mozilla Foundation is about fostering a "maker attitude" on the web, and promoting digital literacy, not "maintaining a set of tools in perpetuity" and even though Thimble was a tool that helped people express themselves creatively on the web, while learning about how the web works, we were constantly looking at what else we could do, or what we could do instead, to instill those core ideas in people, but not necessarily with the same tools all the time. We came up with Appmaker, which allowed people to make web apps, using web technologies - it was fun, it ended up not working as well as we'd hoped, and so we tried something else. We took the lessons we learned and made a page builder that used templates to allow people to make simple pages that also worked as apps on platforms that supported WebApps (like Android and Firefox OS).

We looked at the world, and saw a significant part of the world experiencing massive friction between "what the web can do", and "how it was experienced": over a billion people are slowly coming online all over the world right now (even in places like Europe or the US), and the only "internet" they get is through preinstalled apps on their phone; they use Facebook, Twitter, Instagram, but not a browser, that supposedly ubiquitous gateway to the world wide web. The browser is supposed to open up the whole wide world to you, whereas branded apps like Facebook's client are like the CompuServe and AOL of days gone by; you get content presented in one way. Their way.

This is not a good thing, and so we changed what the app we made could do, transforming it into an Android app (available in the Play Store for free) that lets you build simple multi-view websites with text, images, and navigation buttons, to cater to the needs of the people we talked to in the various countries in the world where internet connectivity is starting to boom. It's not done, but the response from people for whom the app makes sense because they've been getting, effectively, locked-in devices has been great.

At the same time, we deprecated the tools we had been using for the last few years, moving some to new homes and retiring others. And that's where this story comes full circle:

We killed off Thimble. And replaced it with Thimble.

Letting others do the work you can't

I'm going to borrow a page out of Dave's book, and profess my enthusiasm for the "let others do the work when you can't do it" doctrine, even though it's a bit of a boomerang: while we were doing all this at the Mozilla Foundation, various people were working on the various technologies that could be glued together as the kind of vision-of-the-future Thimble that Dave had talked about in 2013.

Alan Kligman developed a POSIX filesystem that ran on top of IndexDB, Dave had been working on getting Brackets itself to work in the browser, the web itself had landed, or had in draft, several new technologies that made data management and communication between processes, documents, and service workers easier, and eventually everything was available for Dave to put together a team of students and see if they could combine everything into the kind of Thimble I had been hoping for since Dave showed me Brackets.

On Monday, August 31st 2015, that thing officially became real.

the new Thimble is a dream tool, and I love it

Here's a true thing: the day the new Thimble got announced, I stopped using jsbin, jsfiddle, codepen, and all those other "make a quick html/css/js thing online" tools. Overnight, they had become obsolete. Anything I used them for could be done better in the new Thimble, and where jsbin or codepen let me be creative in a "single thing", the new Thimble lets me be creative without a ceiling. It's simplified the tools necessary to have a live server running with a full file system at my fingertips to "just open thimble.mozilla.org", and I can make things as simple or as complicated as I want.

It's a true code editor that I can use to make as many files, in as many directories, as I need to properly organize and work on my code. There is undo/redo, but I don't ever have to hit save: my changes are synced by the extremely clever file system that Thimble runs on top of. It has an invisible zero-conf webserver running in the browser that shows me the result of what I'm writing right next to the content I'm working on. I no longer need a live-server or a python -m SimpleHTTPServer anymore, it's all just there.

And here's a thing I didn't even think I would say as a developer: thanks to the new Thimble just... working, I don't even need git anymore.

No, I don't get revision control (though really, "I don't get revision control yet", because remember that the current https://thimble.mozilla.org is really just a Minimum Viable Product launch: we've only just begun to see what it can do, and now is that time to start dreaming about fancy features), but I can write my code, publish it to the web for free, and have people be able to see the code I used because they can click a button to fire up thimble with my project loaded up as a forked copy for themselves.

If I just want to write some Proof of Concept code, or demonstrator code for an article I'm writing, or example code for something I'm explaining to someone online that might be useful later on, I don't need to set up a git repo, with a gh-pages branch. I can just work in Thimble, hit "publish" (which will update what is online if I'm republishing the same project, with changes) and move my attention elsewhere in the knowledge that my stuff's been updated online for everyone to play with, and my code's safe and sound on a Mozilla server somewhere. And any time I want to dive "deeper", I can just tell Thimble to export my entire filesystem as a .zip file, and then do whatever I feel I need to do.

The new Thimble is taking away the need for tools I thought were essential in my life.

I honestly think that's the most impactful statement I can make here. Thimble is solving problems I didn't know I had, and that makes me super happy, and excited about the future.

So, in conclusion:

Go try out the new https://thimble.mozilla.org, and let the team know what you think of it, and what you can imagine as, in the future, being obvious things you already use it for, that it can't do today.

Thanks for reading, and I need to be off to write code for my next blog post on writing fonts as source code. I already have Thimble open in another tab with demonstrator code doing amazing things.

http://pomax.github.io/#gh-weblog-1442700129236


 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку