jsfiddle_jsFiddle创作者Piotr Zalewa访谈

jsfiddle

One of the great code sharing tools was pastebin. It was simple and straight-forward but quickly grew out of its usefulness. That's where jsFiddle comes in. jsFiddle is a fresh tool that not only displays the code and highlights it but also executes its code within the browser for even better debugging. The creator of jsFiddle, Piotr Zalewa, took a few moments to answer my questions about his awesome creation.

最好的代码共享工具之一是pastebin。 它很简单直接,但是很快就失去了它的用处。 这就是jsFiddle的用处。jsFiddle是一个新鲜的工具,它不仅可以显示代码并突出显示它,还可以在浏览器中执行其代码以进行更好的调试。 jsFiddle的创建者Piotr Zalewa花了一些时间回答了我有关他的出色创作的问题。

jsfiddle_jsFiddle创作者Piotr Zalewa访谈

皮奥特(Piotr),请分享您的身份,发展重点以及受雇的人。 (Piotr, please share who you are, your areas of development focus, and who you are employed by.)

I am a happy father, an aquarist and a web developer and I would like it to be in that order.

我是一个快乐的父亲,是一个水族馆专家和一个Web开发人员,我希望能够按此顺序进行。

I have started my first commercial web development in 1996 in Poland, and now I am working for Mozilla on Add-ons Builder. The tool of choice is a mix of Django and MooTools.

我于1996年在波兰开始了我的第一个商业网站开发,现在我在Mozilla的Add-ons Builder上工作。 选择的工具是Django和MooTools的混合。

对于那些还没有听说过jsFiddle的人,请解释一下jsFiddle是什么,它的用法以及它的来历。 (For those who haven't heard of jsFiddle, explain what jsFiddle is, how it's used, and where the idea came from.)

JsFiddle is a playground for web developers, a tool which may be used in many ways. One can use it as an online editor for snippets build from HTML, CSS and JavaScript.

JsFiddle是Web开发人员的游乐场,该工具可能会以多种方式使用。 可以将其用作从HTML,CSS和JavaScript构建代码段的在线编辑器。

The code can then be shared with others, embedded on a blog, etc. Using this approach, JavaScript developers can very easily isolate bugs. We aim to support all actively developed frameworks - it helps with testing compatibility.

然后可以与其他人共享代码,将其嵌入博客中,等等。使用这种方法,JavaScript开发人员可以非常容易地隔离错误。 我们旨在支持所有积极开发的框架-它有助于测试兼容性。

The idea came while I was chatting with MooTools developers on IRC #mootools. We were helping new people with JavaScript issues, using code which would fit in one line. Soon there was a question which was too complicated for a "one-liner". Answering it would involve opening an editor, creating an HTML file with all necessary tags and in the end opening it in the browser. I thought there's too much burden and the question remained unanswered. From that moment I knew it should be done on the web and the next day the prototype was ready.

这个想法是在我与IRC #mootools上的MooTools开发人员聊天时产生的。 我们通过使用适合一行的代码来帮助遇到JavaScript问题的新手。 很快,有一个问题对于“单线”来说太复杂了。 要回答该问题,将涉及打开编辑器,创建带有所有必需标签HTML文件,最后在浏览器中将其打开。 我以为负担太多了,这个问题仍然没有答案。 从那一刻起,我就知道应该在网络上完成,第二天原型就准备好了。

您已选择使用MooTools JavaScript框架创建jsFiddle接口。 为什么选择MooTools? (You've chose to create the jsFiddle interface with the MooTools JavaScript framework. Why did you choose MooTools?)

At the time I was already using MooTools on a daily basis, it was natural to choose this framework. I think it is simply the best and I still hold it.

在我每天已经使用MooTools的时候,选择这个框架是很自然的。 我认为这只是最好的,我仍然坚持。

开始编写网站代码时遇到了哪些早期困难? (What were some of the early difficulties you ran into when you began coding the website?)

The worst was stability - there was no caching and my old server was quickly running out of memory. The other thing was the URL naming convention, jsFiddle still suffers from some of the choices made on day one.

最糟糕的是稳定性-没有缓存,我的旧服务器很快用完了内存。 另一件事是URL命名约定,jsFiddle仍然在第一天就遇到了一些选择。

您添加到jsFiddle的功能的继承/时间表是什么? (What was the succession / timeline of features you added to jsFiddle?)

There were lots of ideas from the MooTools community, but adding new features is always a lot of fun. We are simply trying not to overcomplicate the UI. I think that new interesting features came in following order: ability to save versions, testing Ajax requests, framework dependencies, adding external resources, discussing fiddles.

MooTools社区有很多想法,但是添加新功能总是很有趣。 我们只是试图不使UI过于复杂。 我认为,有趣的新功能按以下顺序排列:保存版本,测试Ajax请求,框架依赖项,添加外部资源,讨论小提琴的能力。

第一次发布jsFiddle需要多长时间? 此后不久您遇到了什么问题? (How long did the first release of jsFiddle take? What problems did you encounter shortly thereafter?)

The functional prototype was done in 4 hours, it was written in spaghetti PHP, allowed to save HTML/JS/CSS and was opening the result in a separate browser window. Naturally, I have changed the code since then. There was so much hype I hardly remember the problems I've encountered. The one that I remember (and which was hard to solve) was the Cookie security bug. Early versions allowed to steal Cookies from jsFiddle. Someone could steal my administrator password by writing a simple fiddle and asking me to take a look. But this is no longer the case. jsFiddle is in alpha stage, so it's still before the "first release".

该功能原型在4个小时内完成,它用意大利面条PHP编写,可以保存HTML / JS / CSS,并在单独的浏览器窗口中打开结果。 从那时起,我自然就更改了代码。 炒作太多了,我几乎不记得遇到过的问题。 我记得(很难解决)的一个是Cookie安全漏洞。 早期版本允许从jsFiddle窃取Cookies。 有人可以通过写一个简单的小提琴并要求我看看来窃取我的管理员密码。 但是,情况已不再如此。 jsFiddle处于Alpha阶段,因此仍在“第一个发行版”之前。

哪些jSFiddle比您想象的要容易? 事实证明更困难吗? (What pieces of jSFiddle were easier than you thought they'd be? What turned out to be more difficult?)

Adding custom caching was something which took two hours - I thought it will take few days. The most difficult was (and still is) planning, the way people use jsFiddle changes and we should predict it in the code, urls and design.

添加自定义缓存需要花费两个小时的时间-我认为这将需要几天时间。 最困难的是(现在仍然是)规划,人们使用jsFiddle的方式会发生变化,我们应该在代码,URL和设计中对其进行预测。

当您向更多JavaScript框架打开jsFiddle时遇到了什么困难? (What difficulties did you run into when you opened jsFiddle to more JavaScript frameworks?)

One problem is management, I am always late with adding new versions. Recently I upgraded 3 of them in one day YUI, Raphael and Dojo. The other is onDomReady event - I don't know all of the frameworks and finding a default usage of onDomReady command per framework happened to be not as easy as I thought.

一个问题是管理,添加新版本总是很晚。 最近,我在一日YUI,Raphael和Dojo中升级了其中的3个。 另一个是onDomReady事件-我不知道所有框架,并且发现每个框架的onDomReady命令的默认用法并不像我想的那么容易。

当您添加EMBED功能时,网站体验会对性能产生什么影响? (What affect on performance did the website experience when your added the EMBED feature?)

To be honest I don't see any effect, I need to log it properly though.

老实说,我看不到任何影响,但是我需要正确记录它。

迄今为止已保存了多少把小提琴? (How many fiddles have been saved to date?)

There is over 40,000 fiddles in 160,000 versions

160,000个版本中有40,000多个小提琴

您在不久的将来会看到哪些功能添加到jsFiddle中? 远期怎么样? (What features do you see adding to jsFiddle in the near future? How about the far future?)

Big things - search, user registering, dashboards and social features. That's something which will change jsFiddle for good. Ephemeral fiddles as default for guests - there is no need to have a fiddle solving an issue on IRC to have an eternal live. We have some ideas for the far future, these however depend on the way people will use jsFiddle.

大事-搜索,用户注册,仪表板和社交功能。 那将永远改变jsFiddle。 临时拨弄是客人的默认设置-无需拨弄小提琴就可以解决IRC上的问题,从而获得永生。 我们对未来有一些想法,但是这些想法取决于人们使用jsFiddle的方式。

The Beta release will generally be a big step forward, apart from the aforementioned features, jsFiddle will get a refined interface - this is being worked on very heavily, and it already looks amazing! http://tiny.cc/d290k

除了上述功能之外,Beta版通常会向前迈出一大步,jsFiddle将获得完善的界面-该界面工作量很大,而且看起来已经很棒! http://tiny.cc/d290k

谁在帮助您对网站进行编码,设计等方面发挥了影响力? (Who has been influential in helping you get the website coded, designed, etc.?)

Oskar Krawczyk of http://nouincolor.com. He asked me once on IRC if I'd like him to design the UI. I think the next day I knew he is the right person to do it. Since then we are working closely together (not only on jsFiddle, but also on Mozilla Add-ons Builder and some minor projects). Every now and again Oskar adds little functionally enhancements to jsFiddle - discussions, sharing, etc.

http://nouincolor.com的 Oskar Krawczyk。 他曾经在IRC上问我是否要他设计UI。 我想第二天我就知道他是做这件事的合适人选。 从那时起,我们就紧密合作(不仅在jsFiddle上,而且在Mozilla附加组件生成器和一些较小的项目上)。 Oskar时不时地在jsFiddle上添加很少的功能增强-讨论,共享等。

我谨代表MooTools小组以及所有使用jsFiddle的人,感谢您的工作! (On behalf of the MooTools team and everyone that uses jsFiddle, I'd like to thank you for your work!)

You are very welcome. It's great to develop for such a responsive community.

不客气。 为这样一个响应Swift的社区而发展,真是太好了。

A big thanks to Piotr for his time. If you have more questions, feel free to ask him within these comments and he'll answer them as soon as he has a moment!

非常感谢Piotr的宝贵时间。 如果您还有其他问题,请随时在这些评论中询问他,他会在有时间的时候尽快回答!

翻译自: https://davidwalsh.name/jsfiddle-interview

jsfiddle