5 ms·
> In the olden days, Excel had a very awkward programming language without a name. “Excel Macros,” we called it. It was a severely dysfunctional programming lan
by segfaultbuserr 4y ago
> In the olden days, Excel had a very awkward programming language without a name. “Excel Macros,” we called it. It was a severely dysfunctional programming language without variables (you had to store values in cells on a worksheet), without locals, without subroutine calls: in short it was almost completely unmaintainable. It had advanced features like “Goto” but the labels were actually physically invisible. [...] I was supposed to come up with a solution to this problem. The implication was that the solution would have something to do with the Basic programming language. Basic? Yech!
Take a look at this 4-minute video: Excel Magic. This engineer demonstrated the implementation of many sophisticated simulations, entirely in Excel, including flight simulators, orbital mechanics, digital signal processing, ray-tracing, heat transfer, chemical reaction dynamics, and more.
https://www.youtube.com/watch?v=r9PLmtQZwmY https://www.youtube.com/watch?v=r9PLmtQZwmY
I don't know what to say... On one hand, I clearly understand that, due to the programmability with macros and VBA, the express power of Excel is as powerful as any "real" programming language, and in fact, a lot of real-world engineering calculations are indeed performed in Excel, the prevalence of Excel in engineering is almost terrifying. Imagine solving differential equations numerically using 10,000 cells in Excel, yes, it has been done! I respect their skills and achievements.
On the other hand, it just looks painful to me, and feels like constructing a skyscraper using a toothpick.
- buescher 4y ago> Imagine solving differential equations numerically using 10,000 cells in Excel, yes, it has been done! There's a nice treatment of how to do this for simple heat transfer problems in Tony Kordyban's Hot Air Rises and Heat Sinks. You will amaze and frustrate your co-workers. Excel is 100% the poor man's simulation package. I like Matlab and Simulink a lot better, and if I were 25 again I'd be a fool for Julia, but nothing beats it for sharing a simulation or other analysis with someone that doesn't have the same software you do on his or her computer.
- segfaultbuserr 4y ago> Tony Kordyban's Hot Air Rises and Heat Sinks It was a fun book, I don't remember the Excel modeling part though... I do remember seeing something similar on Microwaves101.com by The Unknown Editor... > The spreadsheet has 96 distance steps and 2000 time steps, or almost 100,000 cells. In the old days it would bring a computer to its knees when you changed a variable. Now it's almost instantaneous, however, it still measures 10MB. We will offer a zipped version of it in the download area, soon. https://www.microwaves101.com/encyclopedias/fourier-s-law https://www.microwaves101.com/encyclopedias/fourier-s-law
- buescher 4y agoChapter 25, "Even A Watched Pot Boils Eventually". If you want a whole lot of that, appendix D of Holman's Heat Transfer, which is referenced in Kordyban's book.
- amalcon 4y agoExcel macros were/are bad as a programming environment, for the reasons Joel says. The thing is, that's because it grew out of the deficiencies of formulae. If you can't do a thing with formulae, the next logical step was a macro. Since Excel was such widely distributed software back then, and it took actual effort to get decent tools for programming, macros were a lot of folks' first exposure to programming. In turn, that means there are people who can perform what I'd consider pure wizardry with them. My hat is off to those people, though I still am happier that I got my hands on Turbo Pascal at the right age.
- filoleg 4y agoOh hey, another turbo pascal starter. If you don't mind, can you elaborate on why you feel that way about it? In retrospective, I am happy about starting with it, and remember it fondly. But I cannot really make any good point for why, and I definitely remember cursing it out very hard at the time.
- amalcon 4y agoBasically two things: 1. It was better than the other stuff I had access to at the time. This is due more to the poor quality of the other stuff I had access to at the time than any benefit of Turbo Pascal, but it still mattered. 2. There are pointers in it, but you aren't forced to use them for simple programs. Having encountered pointers early is a huge leg up when it comes time to work with something like C or assembler. Being forced to use them (as in C) makes the learning curve really steep. Something like Pascal, where you have pointers but you aren't forced to use them for the sorts of program a beginner will tend to write, seems to give both benefits.