Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C vs Spreadsheets 1

Status
Not open for further replies.

Qshake

New member
Oct 4, 2000
7
0
0
US
All,

I am familiar with programming to an extent; mostly FORTRAN but am now getting into C and possibly carry into C++.

I am a structural engineer and so most applications are hard calculations toward solutions for sizing various structural elements - everything from retaining walls to small beams. Or analysis via matrix methods. I have done a lot this with spreadsheets and so this leaves me to my question.

Would someone please let me know what great benefits there are to programming in C or C++ that can't be done on spreadsheets?

I really appreciate you insight. I am a member of the eng-tips.com community.

Thanks,
Qshake
 
This question really hurts me. I'm sorry to be rude.
Seriously:
Use the tool that fits best. High level, and even higher
level stuff is great: if it works for you.
At the 'spreadsheet' level you are galactic distances from
C.
 
The answer: speed. There are many (even simple) practical problems where C/C++ programs run 1 second but any interpreter (spreadsheet, for example) may run over 1 hour or more...
Have you such problems? You know...
 
Please know that I'm not trying to be rude but to just find out the limitations of spreadsheets and when higher level languages take over in terms of benefit.

I think the answer to ArkM's question is that I probably haven't experienced any of the large problems since most of my work can be done rather quickly in several sheets though.

Also, I'm not trying to start a war between the two factions of users, just trying to understand.

Regards,
 
What about graphics? Can C or C++ produce graphics or a gui?
 
Yes, of course. But, as expected, it's not supported natively by the language. You would need to use a system API or third party library.
 
If you get into mathematical problems that are a bit too much for a spreadsheet, you might consider something like Matlab before you go into things like C. The problem with C is you are responsible for absolutely everything, memory allocation, memory return, format in which your data are stored, etc. etc. Which puts a big load on you as the programer. You'll probably waste a lot of time sorting out graphic interfaces etc., which you could better spend on the calculations. It's possible to go wrong in C in all sorts of interesting and horrible ways.
 
Why war or factions? It's a pragmatics question, that's all...
 
> Why war or factions? It's a pragmatics question, that's all...
Stupid flames can arise out of the most practical of questions.
 
> Stupid flames can arise out of the most practical
> of questions.

Should I use Linux or BSD (or maybe Windows) if I...?
How about Vi or Emacs for editing a...?
C or C++ for writing a...?


> the limitations of spreadsheets and when higher level
> languages take over in terms of benefit.

You've got it backwards. The spreadsheet is the high-level langauge. C is low-, low-, low-level.

C is a low level programming language that is hugely general. That is, you can use it to do practically everything. That power comes at the cost of you needing to do a lot of work to get it to do anything.

A spreadsheet is a high level langauge (but not necessarily a programming langauge) that is highly specialized for performing and displaying the results of certain types of calculations. It can't do much else than that, but for the things it can do, it makes doing them fast and easy.


The moral of the story? If you have a high-level tool that makes doing your job fast and easy, and you don't find yourself wishing, for a way to do X more easily or Y faster, then use the high level tool. If that tool is not adequate for doing your job, then that's when you look into using C or another programming langauge to extend the tool, write a supplementary tool, or even write a brand new tool.


As for learning the limitations of spreadsheets, you might get a better response in a spreadsheet forum. I'm about 80% sure there's a Microsoft: Excel forum on Tek-Tips. Check it out. People who use the tool a lot might have a better insight about what they wish it could do better.

One limitation of spreadsheets is that you can't relate a field in one spreadsheet to a field in another spreadsheet., and that representing large amounts of information often requires its duplication. That's why people made databases (another high-level tool that solves a different problem). Unfortunately, many people continue to use a spreadsheet when they need to be moving their stuff over to a database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top