News for hackers. Stuff that matters.
Re:The story BCG offered me $16,000 not to tell by carbocation on Sunday April 11, 2010 @05:58PM (#1257723)
He invokes Excel as an analytical engine several times in this story. I am trying to figure out if he actually considers it to be a powerful statistical engine, or if he is merely using it synecdochically for the benefit of non-technical readers, in order to represent statistical software more generally.
Re:The story BCG offered me $16,000 not to tell by _delirium on Sunday April 11, 2010 @06:06PM (#1257743)
It actually is the de-facto-standard modeling engine in a lot of areas, even some scientific areas, but mainly economics/finance. There are some pretty nuttily complex simulations written entirely in Excel, with the visualization part of the simulation done by popping up a chart--- you can even make it animated by popping up a new chart at a certain time interval. There's even a market in commercial spreadsheets, which you buy and load sort of like libraries: http://www.palisade.com/RISK/

Not necessarily a good idea, but somehow it caught on. One possible reason is that it was one of the earlier widely available pieces of software for doing declarative, dependency-based modeling that auto-propagates updates: if box A and box B are linked by a "B = 2*A", then B auto-updates whenever A changes, without you manually writing a propagate-updates loop. You can now do stuff like that in a lot of languages, but it's relatively recent (e.g., it's one of the new features JavaFX variables have).

Re:The story BCG offered me $16,000 not to tell by eru on Sunday April 11, 2010 @06:30PM (#1257792)
Spreadsheets are the most popular declarative (or zero order functional) languages in the world. There were even talks about spreadsheets on the International Conference on Functional Programming 2009.
Re:The story BCG offered me $16,000 not to tell by ramchip on Sunday April 11, 2010 @11:58PM (#1258372)
You can now do stuff like that in a lot of languages, but it's relatively recent

Saying "Lisp had it X years ago" sounds perhaps a little weenish, but... that sounds a lot like the Cells library, and the even older Garnet KR. Granted, they're quite a lot less accessible than spreadsheet programs.

FRP seems to be modern take on it. It's being very actively researched in the Haskell community.

Re:The story BCG offered me $16,000 not to tell by gjm11 on Monday April 12, 2010 @12:08PM (#1259480)
Visicalc: 1979. Excel: 1985. Garnet: early 1990s. Cells: 2000 or so.

On the other hand ... Sketchpad: 1963. (Constraint satisfaction, but not embedded in a general-purpose programming system.) Prolog: 1972. And Guy L Steele wrote a nice general-purpose constraint system in 1978. ("Constraints", MIT AI Memo 502.)

Re:The story BCG offered me $16,000 not to tell by CWuestefeld on Monday April 12, 2010 @01:44PM (#1259826)
Twenty-plus years ago I wrote a complete blackjack game in a spreadsheet, all using 1-2-3 "slash" macro commands (not VBA or anything like that). It even did insurance and doubling-down. I was part of the team testing the product, and each of us on the test team built a different casino game -- one guy did craps, and found a bug in the random number generator.

Once you get your brain around the paradigm, it can be a powerful tool.

Re:The story BCG offered me $16,000 not to tell by chime on Sunday April 11, 2010 @06:29PM (#1257791)
The 'Solver' (http://www.solver.com/) tool in Excel is widely used for many business optimization problems. If you have x & y quantities of two raw materials and products A and B consume different proportions of each raw material, then you can use the solver to determine the most optimal production strategy that maximizes your profit (or minimizes your labor requirements etc.)
Re:The story BCG offered me $16,000 not to tell by eru on Sunday April 11, 2010 @08:12PM (#1257997)
The joys of linear optimization. Do you know if it also supports integer optimization? (Doing that fast enough would be a feat in pure Excell.)
Re:The story BCG offered me $16,000 not to tell by 3pt14159 on Monday April 12, 2010 @12:21AM (#1258396)
There are multiple versions of Solver. To get the free one to do this requires a hack (using some sort of Fourier Transform into a cell or something, I think there are multiple ways). There are paid versions of Solver that are far more powerful, with fully developed APIs. Also, Iron Python can be used with Excel, which makes the whole thing really intense because many Python Libs can be used. Excel truly is Microsoft's shiniest, best piece of software.
Re:The story BCG offered me $16,000 not to tell by rbanffy on Monday April 12, 2010 @08:32AM (#1258978)
> Excel truly is Microsoft's shiniest, best piece of software.

I would grant that honour to SQL Server. In fact, I regard SQL Server as Microsoft's third best product, lagging behind both the Natural Keyboard series (a must) and their mice ("honest value", reliable and comfortable). Never thought that, but Excel could be the fourth product in this list.

Re:The story BCG offered me $16,000 not to tell by jodrellblank on Monday April 12, 2010 @04:02PM (#1260195)
Excel is scriptable by COM and therefore VBSript, Python+PyWin32, and any other COM scripting language.

Presumably you mean IronPython integration in a different sense due to it being a .Net library? Got any links with examples of how that looks / what it can do?

Re:The story BCG offered me $16,000 not to tell by 3pt14159 on Monday April 12, 2010 @10:44PM (#1261034)
You are totally right, it had been a while since I had looked into this. I was confusing (blending together?) pyinex and IronPython. You are right, IronPython (and tons of other languages) all have access to the .Net libs, but pyinex is what I was thinking of. Apparently, though, it is not fully developed yet.

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

Re:The story BCG offered me $16,000 not to tell by jodrellblank on Tuesday April 13, 2010 @12:17AM (#1261131)
I was thinking you were going to refer to .Net linking with Office, which seems to be something different from the COM automation, and more complicated than I've ever been interested in.

That, however, looks pretty darn cool. On the odd occasion I've used Python/COM/Excel together, I've really wished for a Python shell inside Excel to do things like:

  for cell in Range('a1:a10'):
      cell.Value = cell.Value.split('-')[0]
or whatever. I don't know if Pyinex will quite do that, but thanks for the link!
Re:The story BCG offered me $16,000 not to tell by gilest on Monday April 19, 2010 @10:07AM (#1276710)
You can do almost exactly that in Resolver One (http://www.resolversystems.com/), which has got a Python console as well as allowing Python functions and Python syntax in the grid. It's a separate spreadsheet program, though, not an Excel plug-in.

Alternatively, there's PyXLL (http://www.pyxll.com/), which lets you write Excel user-defined functions in Python, but doesn't have a console.

(Full disclosure: I work for Resolver Systems.)

Re:The story BCG offered me $16,000 not to tell by ShabbyDoo on Sunday April 11, 2010 @08:17PM (#1258008)
I believe it does. And, IIRC, it's a native code library that uses Excel for data input and results presentation.
Re:The story BCG offered me $16,000 not to tell by Rod on Monday April 12, 2010 @12:40AM (#1258417)
Give Solver Foundation a try: http://www.solverfoundation.com
Re:The story BCG offered me $16,000 not to tell by simonsquiff on Monday April 12, 2010 @04:26AM (#1258681)
I've seen Solver used by a number of accountants to say 'I need my profit to be this number, what figures do I need to change to hit that?'. Solver is a life saver for those looking to cook the books (sadly far too many people).
Re:The story BCG offered me $16,000 not to tell by roundsquare on Sunday April 11, 2010 @11:35PM (#1258327)
Its fairly common for programmers to dislike excel (at least in my experience). However, it provides a lot of benefits:

1) Its actually pretty powerful. Since the cells update in real time it provides a nice way to do "what if" analysis pretty quickly.

2) The solver is pretty good.

3) Most people in business can read excel so it provides a good common ground.

4) Since all the intermediate steps in a calculation are in a cell somewhere, its pretty easy to trace through logic.

I certainly wouldn't use excel to handle huge amounts of data, but its a good tool as long as your computational requirements aren't that big.

Re:The story BCG offered me $16,000 not to tell by wlievens on Monday April 12, 2010 @05:00AM (#1258725)
Mostly off-topic anecdote:

In high school there was a girl in my class that preferre to do everything in excel. And that included writing papers, because it made the formatting easy.

Re:The story BCG offered me $16,000 not to tell by edge17 on Saturday April 17, 2010 @03:48PM (#1273599)
I think his point is that Excel is a powerful weapon in the right hands. Most people don't do much with it, but it's powerful none the less. If dollars were points, many trillions in commerce and complex decisions have been made on the result of analysis done by spreadsheets.