The 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.
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:
I 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.
I'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.
What I have is a sheet which says how many of each asset I own, and the desired allocation. Then, there is a cell that calculates the current allocation, based on the number of shares, and the current price of the share.
The current price of the share is fetched from another sheet using a vlookup. That sheet is populated by the script. The script is here! https://gist.github.com/2717042
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/). 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.
Last 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
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.
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.
Seriously just use Excel - it's just what you've asked for.
I don't think you're trolling; Excel is certainly an option.
But for two things:
Excel for Mac - $129 (http://www.amazon.com/dp/B003YCOJBC)
Excel for Win - $121 (http://www.amazon.com/dp/B0039L2XG6)
And you need a Windows box or Mac with Excel installed. I personally have access to dozens of machines, literally none of which have Excel. All of them have a web browser, and thus access to Google Spreadsheets and Google Apps Script for free. To me, and many others, that makes all the difference in the world.
You can use Office 2010 web apps FREE from a SkyDrive account and openly collaborate with people or you can pay $20 a month per seat for Office 365 and you will get Sharepoint and ALL Office 2010 desktop apps.
The office web apps work perfectly in all browsers (I've tried Chrome, Firefox and IE).
Considering the cost of playing around with Google spreadsheet with those restrictions, it's possibly a good idea.
How come Excel works fine with source control? It is a binary blob and diff and merge are done with Excel itself, not the version control's merge and diff (which may or may not be what you want).
What are those collaboration tools for Excel? This is an honest question: all I see is some spreadsheet on shared drive or Sharepoint with some ad hoc process around editing, making sure the need for the merge is avoided.
Granted, excel is a powerful tool for an individual to work with, but for teams working with a large number of complex sheets the model breaks down quickly. Keeping up with changes and versions using excel is a nightmare.
You are right, it's something I forgot to mention: we are Google Apps users. We love that product: gmail, docs, spreadsheets, now drive... our whole business is based on Apps and our own ticketing/crm/sales software.
And I don't even use Excel, I run linux, although I've used Excel a lot and I think it's awesome at what it does.
I didn't find your reply as trollish, you certainly do make a very valid point.
You can hack some of these. Scripts can import code from a remote server, which allows you to edit where you like, push to your remote server and pull it into App Script. That tool enables small libraries, I've used it to write a simple test environment. I think you could test App Script JsTestDriver et al with some kind of mock-up strategy.
I haven't enjoyed it, but it has met the client requirements and that's the main thing, right?
I get that detachment from the DOM but jQuery has useful tools beyond element selection and manipulation.
For that matter, why doesn't App Script expose an interface that expresses page components as part of a DOM? The Sheet app could provide an interface to a cell with classes for its particular column, row and sheet, allowing access with jQuery / CSS selectors. Instead users have to learn a new interface with stuff like Spreadsheeet.getRange().
We've got a fairly robust Mail Merge script with attachments (either the same for all or per-user), but distribution and maintenance is tricky given the lack of support for a centralised library of code.
Ideal would be allowing any publicly accesible URL (with some security measure to avoid blatant security holes) like Github raw master (always up-to-date).
The closest I've found is using eval (which is clearly NOT the best approach).
There would need to be a format to specify which services you want to use (as currently it derives these from the source you write in the editor).
I would LOVE to be able to load in 'authorised' libraries to avoid redundant code.
This is pretty much what I want as well. I'm working on an app that is essentially your own Google Fusion Tables running local or on your own server. It includes a CLI for running as a service (integration, etc), so plugins could be made that hook into your local editor. It's a JS-based data publishing platform.
Btw, I was invited to YC interview round to show it. But sadly PG passed on it due to an enterprise strategy. :( Funny thing is I had an acquisition offer on the table during the YC meeting and subsequently closed a round. :)
The server environment is JVM-based since they expose GWT as the way to build UI. I think I remember seeing Rhino-specific error messages.
The coding environment is not very good, but you can build ERPs, CRMs, document management and similar for small businesses on Google Docs, in a way Microsoft Office / VBA never made possible. The modules it provides (spreadsheets, forms, formatted text document, gmail, calendar, wiki) seem to be very useful building blocks for describing your business processes.
Agreed an offline editor is very important, in my keyboard setup for some reason I can't use the character "}". Needless to say, hard to code without it. I'm sure they will fix it so, but it's a big no no for me at least.
Edit, it is not due to my keyboard language, i simply cant use the "}" character, the AltGr combination with the third button after the "L" is not working (My keybard has "ñ").
Is 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.
The 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.
That 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.
Thinking about Google Docs simply as an Office competitor is wrong. If you come to it expecting to do everything you do in Office, it is probably adequate but definitely much worse. However, Docs can do sharing of centralized data, use web APIs, integrate with your mail, and more - things Office can't even hope to match.
I think that's the idea of Fusion Tables . Since there is an API, I don't see why you couldn't combine it with Apps Script (what this editor is), if you wanted to. I don't think tight integration is there yet but the pieces seem to be in place. I think they just need to allow a script to be invoked from a Table.
I use Google Docs code a lot at work in "production". Here's my experiences:
-- 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.
The 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.
This 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.
This 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.