News for hackers. Stuff that matters.
Re:Visual Studio '11' Announced by nonsensical on Thursday February 23, 2012 @08:51PM (#3627640)
I will argue, as I don't know who the submitter is, or even what this site is. HackerNews I think? I just got here via a Twitter post. So I have nothing to lose.

If you're using Excel for automated code generation, YOU'RE DOING IT WRONG

Surely there are better tools out there for the task.

Re:Visual Studio '11' Announced by deniska on Thursday February 23, 2012 @10:08PM (#3627827)
Using tools in wrong way is a kind of entertainment for hacker. But hacker shouldn't complain if something breaks.
Re:Visual Studio '11' Announced by algoshift on Thursday February 23, 2012 @11:30PM (#3628041)
That's really funny partner. Using Excel for generating code fragments that can be cut and pasted into your compiler is powerful and fast. Nothing wrong with it. But, go ahead and don't. I love compete with others doing thing less efficiently. Makes me smile.
Re:Visual Studio '11' Announced by philbarr on Friday February 24, 2012 @04:53AM (#3628636)
May I humbly suggest that you are mixing your data up with your code? Could you not just put the data in an external Excel file (or *.txt file, whatever) and read that in when you run your code?

This has a number of advantages:

- you don't need to change your code every time the data changes.

- you can version the data and the code seperately within your source control management system.

- you don't need to write any VBA. (always a winner, that one)

- current developers will be able to understand and change the code without being forced to use the macro you developed, or have it explained to them.

- future developers will be able to understand where all the code came from, and be able to effectively understand and change it.

- you will be less affected by changes to future versions of Excel.

Re:Visual Studio '11' Announced by dkersten on Friday February 24, 2012 @06:33PM (#3631599)
He mentioned generating code for an embedded system. In that particular situation what you suggest may not be possible.

On the other hand what would be possible (and I've done this a few times before) is write a program or script (I like writing it in Python) that takes the .xls/.csv/.txt/.json file (which is pure data, can be edited in many programs etc) and generates the C/C++/whatever code from that. Basically the best of both worlds.