News for hackers. Stuff that matters.
Re:Google's Code Editor by selectnull on Wednesday May 16, 2012 @11:55AM (#3982538)
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

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

Re:Google's Code Editor by gouranga on Wednesday May 16, 2012 @12:23PM (#3982684)
NOTE: 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.

Re:Google's Code Editor by dewitt on Wednesday May 16, 2012 @12:31PM (#3982727)
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.
Re:Google's Code Editor by gouranga on Wednesday May 16, 2012 @12:44PM (#3982792)
That's not a major issue.:

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.

Re:Google's Code Editor by sad_panda on Wednesday May 16, 2012 @11:52PM (#3985311)
Does the Excel web app support VBA? I was under the impression that the 365 apps offer a subset of the functionality of their desktop counterparts.
Re:Google's Code Editor by gouranga on Thursday May 17, 2012 @04:28AM (#3986013)
They don't support VBA directly.

I've always used Excel to publish result data to a spreadsheet rather than the entire thing. Data collection is done using InfoPath so you get the following workflow:

[www:InfoPath Office 365] -> [dt:Excel]-> [www:Excel report on Office 365]

It depends on your use case. I'd be tempted to use a sharepoint list with a custom report for anything more complicated.

Re:Google's Code Editor by mynegation on Wednesday May 16, 2012 @12:55PM (#3982863)
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.

Re:Google's Code Editor by debacle on Wednesday May 16, 2012 @03:32PM (#3983617)
Excel files are simply zip files with XML in them.
Re:Google's Code Editor by lparry on Wednesday May 16, 2012 @08:26PM (#3984779)
What version control system will let you see the changes between the contents of two zip files again?
Re:Google's Code Editor by emmelaich on Thursday May 17, 2012 @12:17AM (#3985387)
With Git and Svn you can specify the diff to use, so you can use something like oodiff if you are versioning OpenOffice files.

Something to diff zips of xml almost certainly exists and could be used in the same manner.

Now, patch is another thing ...

Re:Google's Code Editor by debacle on Thursday May 17, 2012 @10:00AM (#3986986)
TortoiseSVN will diff OO and MS Office files out of the box.
Re:Google's Code Editor by bwanab on Wednesday May 16, 2012 @12:37PM (#3982757)
But seriously, you're kidding right? Here's microsoft's answer to the diff and merge question: http://answers.microsoft.com/en-us/office/forum/office_2007-...

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.

Re:Google's Code Editor by gouranga on Wednesday May 16, 2012 @12:41PM (#3982780)
That's what Sharepoint is for :)

Also Word/Excel 2010 have excellent change management tools which integrate nicely with mercurial and SVN built in (under review changes).

You have to frig a couple of command line switches to get it to work but TortoiseSVN has those preconfigured.

EDIT: answers.microsoft.com is full of trash - ignore it...

Re:Google's Code Editor by euroclydon on Wednesday May 16, 2012 @03:26PM (#3983590)
Re:Google's Code Editor by gouranga on Wednesday May 16, 2012 @04:02PM (#3983745)
Indeed.

We have 400+ page documents in the system and they all work nicely :)

Re:Google's Code Editor by selectnull on Wednesday May 16, 2012 @12:32PM (#3982731)
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.

Re:Google's Code Editor by gouranga on Wednesday May 16, 2012 @12:47PM (#3982815)
WRT to Linux, all the Office web apps work on Linux quite happily.

We tend to give senior people access to windows machines with Office 2010 Professional Plus on and relegate support staff to Linux machines with Office web apps (in Chrome).

Re:Google's Code Editor by EastCoastLA on Wednesday May 16, 2012 @02:14PM (#3983263)
Can you elaborate on Common Lisp automation...
Re:Google's Code Editor by gouranga on Wednesday May 16, 2012 @03:57PM (#3983723)
Via COM. Technically any language with a COM or DCOM bridge will work fine. lispworks has one and there is a route via the CLR here:

http://weitz.de/rdnzl/

Re:Google's Code Editor by chernevik on Wednesday May 16, 2012 @06:42PM (#3984437)
I've worked with this for some clients. I am but an egg, but I'm not convinced this is entirely JavaScript, I've had some code fail in App Script that passed JavaScript unit tests. And you cannot bring in libraries like jQuery.

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?

Re:Google's Code Editor by selectnull on Thursday May 17, 2012 @04:54AM (#3986074)
It is server side javascript and because of that there is not jQuery (which is client side library). You are not working with DOM, you are working with API defined by Apps Script, check the docs here https://developers.google.com/apps-script/
Re:Google's Code Editor by chernevik on Thursday May 17, 2012 @08:01AM (#3986555)
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().

And maybe they've revised the docs, but I spent a fair amount of time in them and didn't see any discussion of what JavaScript tools would not be available. I had to figure that out by trial and failure.

Re:Google's Code Editor by beyondwords on Wednesday May 16, 2012 @01:28PM (#3983038)
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.

Re:Google's Code Editor by pfranz on Wednesday May 16, 2012 @02:42PM (#3983389)
Your comment reminded me of a post I saw on here a few months back, a commandline interface for google apps (including docs):

http://code.google.com/p/googlecl/

Re:Google's Code Editor by apgwoz on Wednesday May 16, 2012 @01:38PM (#3983088)
I implemented Conway's Game of Life in AppScript once: http://sigusr2.net/2010/Jun/25/google-spreadsheets-game-of-l...
Re:Google's Code Editor by tzm on Wednesday May 16, 2012 @07:31PM (#3984625)
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. :)

Re:Google's Code Editor by ntoshev on Thursday May 17, 2012 @03:50AM (#3985929)
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.

Re:Google's Code Editor by Trufa on Wednesday May 16, 2012 @01:26PM (#3983027)
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 "ñ").

Re:Google's Code Editor by phreeza on Wednesday May 16, 2012 @12:19PM (#3982672)
200 or 20000 lines of code?
Re:Google's Code Editor by selectnull on Wednesday May 16, 2012 @12:25PM (#3982697)
200 :) thanx, i fixed it.