Hacker News new | past | comments | ask | show | jobs | submit login

I use Excel extensively for automated code generation.

I'm not going to argue if this is a good thing or a bad thing to do, but even you have to agree that this is an extremely rare thing to do, and something that would be more or less impossible for Microsoft to anticipate you doing.




Of course. This was just one illustration of Excel as an augmentation tool. There are probably thousands of such special applications out there, some commercial, some not, that used Excel this way.

The greater point, perhaps, is that making things prettier at the expense of raw functionality isn't always the best idea.

For the record, on first inspection I like the outer appearance of VS 2011. I like the pictographic icons and clean uncluttered appearance. I hope that this effort did not come at the expense of function elsewhere. We'll upgrade when it comes out of beta and see.


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.


Using tools in wrong way is a kind of entertainment for hacker. But hacker shouldn't complain if something breaks.


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.


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.


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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: