11 ms·
Google's Code Editor
- bananaoomarang 14y agoWow, why don't they publicise this and get Go and Dart working?
- silasb 14y agoFunny, I ran into this this morning while trying to figure out to do condition formatting in Google Docs.
- grok2 14y agoThis really is a "Google Apps Scripts" editor for writing JavaScript to manipulate stuff in Google docs...see https://developers.google.com/apps-script/guide_writing_scripts https://developers.google.com/apps-script/guide_writing_scri...
- alecbenzer 14y agoIs there an article explaining this or anything? I couldn't seem to get to it anywhere from the main google docs/drive page (although I didn't look very hard). 'docs.google.com' also isn't being translated to 'drive.google.com' like it normally is. I hope they end up expanding this and using it for things like phone code interviews, though. Coding via the regular google docs interface was a bit of a pain.
- darrhiggs 14y agoCheckout the help menu, it has links to: The documentation[1] And the old support channel[2]… …which is now officially at[3] [1] https://developers.google.com/apps-script/guide https://developers.google.com/apps-script/guide [2] http://productforums.google.com/forum/#!forum/apps-script http://productforums.google.com/forum/#!forum/apps-script [3] http://stackoverflow.com/questions/tagged/google-apps-script http://stackoverflow.com/questions/tagged/google-apps-script
- vlisivka 14y agoSee http://developers.google.com/apps-script/articles/yourfirstscript http://developers.google.com/apps-script/articles/yourfirsts... .
- crazygringo 14y agoThis is actually pretty cool, one step closer to making Google Docs a worthy competitor to Office. If they combine this with an Access-type database app, it could be a great tool for businesses. Although using the interface builder brings back memories of VB...
- recursive 14y agoThe UI designer from old-school VB the best part about it. Obviously, the language part was crap. I think that forms designer still represents a rapid UI development environment that many languages/environments have not reached.
- prplhaz4 14y agoProbably not a very popular opinion here on HN, but the raw productivity you can achieve in the VBA/Office world is hard to reach anywhere else.
- nobleach 14y agoThat still mostly exists in Visual Studio. I'm writing C# right now and the good old toolbox is right there on the left. Now it has even more goodies thanks to the .NET framework. I typically do more webapps than anything else, so I have gotten used to designing my own UIs from scratch. I don't mind as it helps keep things very lean... but I'd love to use something like Sencha's app designer thing. I just can't justify the cost currently.
- Peaker 14y agoI always thought Trolltech's Qt Designer was much better. Evidently, you could smell a VB product a mile away because of the awkward widget positionings in the window and the usually-not-resizable aspect. You had to write manual resize code for all window components in VB, whereas in Qt it was all automatic.
- augusto_hp 14y agoI think the interface builder resembles more interfaces builders for Java than Visual Basic and Delphi ones... And that's good IMHO
- dkhenry 14y agoWell this would form a good basis for an on line code editor. I am surprised they are using javascript instead of Go, Dart, or Python
- gnarbarian 14y agoJavaScript is already supported by the browsers, it seems like the obvious choice for me. Especially since it's supposed to be for manipulating google docs, which live on the browser. The alternative would be to run the code server side which seems silly when you have a js interpreter right there already.
- shanemhansen 14y agoThis is an awesome tool. Has anyone tested to see if it supports collaborative editing the same way other google docs tools do? If so, this would be a great alternative to screen in some cases, and would definitely go in my interviewers toolkit.
- Arcanis 14y agoIt does not.
- objclxt 14y agoFWIW, Google used to (still do?) use Google Docs as their recruitment tool for code screening.
- briancurtin 14y agoYep. That was the case when I went through two years ago, and a friend went through the process within the last month and also used Docs.
- samet 14y agoIt has also an interface builder: File -> Build a user interface.
- noinput 14y agoThe script manager can be very useful. For a project, I needed to get translations in 4 languages and the client wanted to handle all of it. I wrote a quick script to pull id's and all the columns and format it exactly how I needed, than email me the file. Anytime there are language updates, they send me a note, I run the script and commit the language file changes. The same logic applies to another where I let the client update SEO keywords/meta/OG info. Of course I could have built a CMS for it, but then again, they already have a google account and revision history with gdocs is a nice touch.
- sshrin 14y agoGoogle has had what they call "Google Apps Script" for quite some time. From the documentation page at https://developers.google.com/apps-script/guide https://developers.google.com/apps-script/guide: "Google Apps Script gives users a new level of control over Google products. Now you can access and control Google Spreadsheets and other products using JavaScript scripts that you write yourself and can share with others. Unlike browser-based JavaScript, the scripts you write run directly on Google servers in order to provide direct access to the products they control.You can also use Google Apps Script from Google Sites." This online code editor seems to be a new and improved UI for creating / editing apps scripts. That said, this editor isn't proprietary. A quick look at the source shows that they're using CodeMirror (http://codemirror.net/ http://codemirror.net/). We've tried out various code editors for unclassroom.com (where I work) and code mirror has been the best to work with in terms of features, ease of use and comprehensive documentation. The second version (CodeMirror2) is really top notch compared to other alternatives out there.
- pyrotechnick 14y agoIt's CodeMirror - http://codemirror.net/ http://codemirror.net/
- drivebyacct2 14y agoTis a shame, there are far more comprehensive and impressive displays of what Code Mirror can do than this. CodeMirror makes the OP's link extremely trivial to implement. edit: Sorry, this isn't meant to be a dig on the Google's Code Editor as much as it's meant to be praise of how impressive I find CodeMirror (and it's competitor/friend Ace).
- rkwz 14y ago> there are far more comprehensive and impressive displays of what Code Mirror can do than this. Can you give some examples?
- fierarul 14y agoI guess 2013 will be the year of the OnlineIDE? It would be pretty great to use ChromeOS for some actual work.
- blahbap 14y agoCloud9 is pretty decent - especially being able to deploy directly to Heroku and Azure
- Andrex 14y agoDon't forget Git and GitHub.
- mmahemoff 14y agoThere's actually a Web Development category in the Chrome Web Store. Cloud coding is something I was very much pushing for when I was working on the store, we blogged about some of the tools available at http://blog.chromium.org/2011/06/cloud-coding-and-beyond-web-development.html http://blog.chromium.org/2011/06/cloud-coding-and-beyond-web....
- selectnull 14y agoLast year I've used Google Apps Script to automate a spreadsheet, it worked very well and that spreadsheet is still used inside my company. It's not very complex, all together maybe 200 lines of code, with tests. But, I'm not sure if I would do it again. Development style is not enjoyable, coding inside textarea with syntax highlighting is simply not good enough. I would prefer to use my text editor and some way to deploy changes without the need to copy-paste from editor to browser. I want to use my Also, tell me exactly what language and what runtime is being used on the server. I remember searching the docs and it was "it's javascript". Maybe it's better now, I haven't looked since. Or just use node, after all it's V8. In ideal world, this is what I would like (and really use): * let me code offline: my editor. my source control. * give me some SDK to run code offline like app engine * give me a way to push changes to server * great documentation Without these, it's just too much like VBA in the nineties. edit: 200 lines of code
- phreeza 14y ago200 or 20000 lines of code?
- selectnull 14y ago200 :) thanx, i fixed it.
- gouranga 14y agoNOTE: this is NOT a troll. I know a great tool for the job. It works fine with source control and allows documents to be diffed and merged. The editor is 100% offline as is the product or it can be 100% online at will. No need to push changes to server - just replicate/copy. If you fancy collaboration tools you can use use extensive ones on a subscription basis. It's got a well documented SDK and an interface that you can call. Documentation is wonderful. Automation can be done with PowerShell, VB.Net, C#, Python, Ruby, VBScript, JScript/JavaScript, Java or even Common Lisp if it takes your fancy. Seriously just use Excel - it's just what you've asked for.
- dewitt 14y ago
- alexis-d 14y agoThat will better for phone interviews will Google than the "plain" Google Doc (which is just terrible for writing code -and that's normal-).
- pjmlp 14y agoYuck
- rmason 14y agoIf you want to look at another editor using CodeMirror check out Adobe's Brackets: https://github.com/adobe/brackets-app/ https://github.com/adobe/brackets-app/ It's early in development and not ready for general use yet. Unlike Google this one is open source and it runs as a desktop app built primarily with JavaScript, CSS and HTML5.
- luminaobscura 14y agoif you need excel-like desktop app, but with a decent scripting support (VBA sucks) check http://www.resolversystems.com/products/resolver-one/ http://www.resolversystems.com/products/resolver-one/
- Juha 14y agoThey just need a Git integration with syntax highlighting for other languages and this might actually be useful. Although there are many web-IDEs simple tool like this would still be useful.
- obilgic 14y agoGoogle is new Microsoft, They have no idea which products/apps they have...
- kjhughes 14y agoThe link title will attract developers anxious to see what Google is offering or Googlers are using to edit code, but this is just an online editor designed for Apps Script editing. It's been around a long time and is less interesting than the link-bait title suggests. Google Apps Script is very useful in conjunction with Google's online apps and their rich libraries. JavaScript makes for a good customization language. One non-obvious irritation, however, is that scripts cannot be shared. So, for example, one has to duplicate code between multiple spreadsheets rather than being able to import it as one would expect. There's an issue open, but even with a high priority, it's two years old: http://code.google.com/p/google-apps-script-issues/issues/detail?id=40 http://code.google.com/p/google-apps-script-issues/issues/de...
- roguecoder 14y agoThat model does work reasonably well for use cases like roleplaying game character sheets, where individual players may want to tweak the scripts for their specific character. It is incredibly useful in general, but definitely not news.
- notJim 14y agoI have a financial spreadsheet that I use to track the distribution of my portfolio. I follow a system where I have a target allocation for each of a small number of assets, and then I buy or sell shares when any given asset gets beyond a certain tolerance of its target allocation. Using Google Spreadsheets and the Google finance API available with Google Apps script, I was able to automate every part of this except syncing it with my account (since there's no API to access my financial records.) All I have to do is click a button, and the cells change color based on whether I should buy, sell or hold.
- niqolas 14y agoI'd be really interested to see how your set-up works. Would it be possible for you to share your files/code and a short description of how you implemented your set-up? I am happy for you to remove/sanitize sensitive details relating to your portfolio. However, I would love to understand how I can develop a solution like this for myself. Thank you for your help.
- ibadet 14y agoFilim Malena
- Craiggybear 14y agoYou know ... I would really like them to do a version of TeX/LaTeX like this. If they can do this they could do a neato XeTeX implementation no problem.
- woodchuck64 14y agoWhy use anything but its-all-text and vim?
- veidelis 14y agoI cant seem to be able to run a closure. The editor says: no functions to run. Consider this code: var i = (function () { var k = 1; return function () { return ++k; } } () ); i();
- juddlyon 14y agoThis opens up some great possibilities. I noticed a jQuery plugin the other day that ingested JSON or could pull data from a supplied Google Doc. Seemed odd but makes sense when you see the direction Google Docs is headed.
- obilgic 14y agoThey even have gui builder http://cl.ly/0t4740472r2p1E2p2F1N http://cl.ly/0t4740472r2p1E2p2F1N
- deleted 14y ago[deleted]
- iamchrisle 14y agoI use Google Docs code a lot at work in "production". Here's my experiences: Yes, you can do more than a few hundred lines of code. My in house library is now about 5k LOC. Yes, it's basically straight JavaScript. Everything is there except for the DOM. Yes, the online editor sucks. I don't use it at all. (see below how) No, you cannot use jQuery/Prototype, etc (there's no DOM or Window class). No, you cannot use long running methods. Google Docs cuts you off at around 30 seconds of execution. No, you cannot share code. (see below) -- How I develop on Google Docs: 1. I develop it outside of Google Docs using Sublime Text 2 2. I test using Node.JS + assert() + methane.js (see below) 3. I then minify it using Google Closure Tool 4. Then I copy and paste it into Google Docs This works well because the online editor blows when you're doing anything semi-complex. --- Testing in Google Docs I use node.js + assert() + methane.js. What is methane.js? It's a little piece of JS that mocks some of the Google Apps classes and functions. I can then override that mocked method to return the value I expect Google to return and test my own methods. It's here: https://github.com/chrisle/methane https://github.com/chrisle/methane Consider it alpha code. It's not very well documented. It works for me!(tm).... -- Sharing code in Google Docs: Inside of onLoad() I've seen people use UrlFetch and then eval() the response string as a way of getting shared code to work. Not ideal, but it works. I personally don't share code or use this method.