how to start writing a program

Hello! for senior design class, me and my teammates decided to create a project that has a lot of coding in order for us to learn. We basically want to write an app to represent a calendar and to be displayed on tv, but we took like 2 coding classes which is not enough. we were going to use c++ so my question is this: do you know where I can find materials to study and what do I need to study specifically? Do I need a special app to write such code besides c++ app for that? and where can I find out about creating a nice and pretty user interface in c++?

thank you in advance

Break the problem down.
First, you need the core program: the calendar part. But you plan to use a UI, so your design should bundle up your information in a way that you can display it a different way later on. That basically means that you should NOT embed a bunch of cin/cout console printing and getting functions in the middle of the calendar code; the calendar code should know nothing about how the interface will work at all and contain NONE of it.

Start there. See if you can code up the calendar cleanly, then in the main program, call the stuff you wrote and display it from main (just enough to see that it is working, it does not need to be pretty at this stage). ***

Then comes question number two. You said you want to display it on a TV. Does this mean that you want to use a TV as a computer monitor (easy: no extra work to be done!) or something much more exotic? Define exactly what you want to do here... The last time I did this I had to have a specialized graphics card that could output video signal for tv input.

And the final part, the UI. Depending on the answer above, you now need to pick an operating system (mac? unix? windows?) and a UI building library that is compatible with the OS you picked.


*** Technically a console interface IS a UI, but not a GUI. I assumed you meant GUI, eg a windows program or highly graphical display? If not, the final step could instead become "make a console UI" which is easier (if nothing else the tools are easier to use).
Last edited on
jonnin, thank you very much! I am new to this website and don't know if you will be able to see this message. So I have a question about this point: "That basically means that you should NOT embed a bunch of cin/cout console printing and getting functions in the middle of the calendar code". Why should I not use a bunch of cin/cout and functions in the middle of the code?
hey, everyone can see these posts, even people not signed up to the site. It just a public message system.

That aside,
if you build your tools to use cin and cout all through them, then what do you get when you call the functions in main? You get a console program, that interfaces to the console! You said you wanted a UI, and as I said, I assumed that means 'more than a console'. So you don't want your fancy windowed UI with buttons and such to suddenly stop and pop up a big black console window for the user to type into, you want them to type into the window's widgets and those will use other functions to interact like 'getwindowtext()' or whatever your selected library uses.

If your tools need user input, and most do, pass it into them from elsewhere, keep it out of the main processing area. Then you can *test* it and get it working using cin and cout in main, sure, I do a LOT of that. But once it is working and you start making the UI for it, you can replace the cin and couts with text interfaces to your gui design instead, and you don't have to change much, the same text you got from the UI is passed into the main tool, just as if it came from cin, the tool does not care where it came from.

If you embed the UI bits (and yes, cin and cout are part of the user experience and interface!) in the middle of the code, making it work with windows or QT or whatever wrapped around it is much harder, you have to change stuff all over the place, and worse, you may have done things that you assumed were fine to do (eg exploiting the whitespace properties of cin) that won't work with another type of input (most GUI widgets behave more like getlines).


This is almost something you have to screw up for yourself one time, but I am trying to save you the trouble :)
Last edited on
wow, I really appreciate your help, thank you! It seems that for our project we will probably use windows OS connected to a TV and in there we will create an app basically.

Also you suggested we start with calendar code first and then try to make it pretty so I am digging into very basic stuff on how to create windows, work with desktop apps, event based codes etc. in order to start building it (like here -> https://docs.microsoft.com/ru-ru/cpp/windows/walkthrough-creating-windows-desktop-applications-cpp?view=msvc-160). I think it is a right direction.

I also looked into graphical libraries and I liked dear imgui, qt and juce and, as I understand, they will change the looks of our app and we will be able to add them after we are done with main calendar code, right?
* if the page in that link is in russian, there is a button on top of the page that can change language to english
Topic archived. No new replies allowed.