Hello.

My first post is not about coding specifics, per se, but more about whether my thinking process in terms of getting from requirements capture to actually coding something is right.

I want to start really really simple and small and try and do things in the most efficient and elegant way possible. I'm more than a little rusty at C, and need a little push to get me going.

What I'm trying to do is design and develop a simple simulator that spits a string out of a pc or laptop serial (or USB) port (or possibly even ethernet, but I think that's jumping the gun).

I've got a string with a fixed format - numbers with commas inbetween, and I want to be able to plug in another device and read the string. Ideally, I would like to make this into a little Win32 GUI box.

My first thought was to have four source.c files each with a header.h, apart from the main.c, which would have a windows.h header. The other three pairs would be a reading.c and .h pair for getting the contents of a default.csv file - a file with a set of made up values in the format of the string; and then for some reason I think I should have a storage.c and .h pair, to copy the data from the reading.c file to prepare it to be moved to a sending.c and .h pair, which would then echo the contents to a com port that an external device could be plugged into.

So, the first question is:
1. am I making this more complicated than it needs to be?
i.e.: is this actually an incredibly easy thing to do that can and should be done in a single file; or,
2. have I got the right sort of idea, if I want to set something up that can be expanded upon with more features over time, like displays and interactive things (e.g.: loading and saving files, switching between types of files; editing protocols and baud rates; etc...)
3. am I going for the right language? I think I am, and I think I need to get my head into C as well as C++ and Java and Python, as I'd like to get comfortable with embedded systems.

I appreciate this might be a dumb question, but you've got to start somewhere, and I'm hoping that I can get some pointers on how best to analyse the problem I'm trying to solve; how best to design for the long-term (i.e.: expanding the software); and how to filter effectively to produce the leanest, neatest code and most user-friendly user-interface - even if it's just a simple one.

All of your thoughts will be gratefully received.

Thank you.