I've taken classes in C++ and would like to continue exploring the subject, however it is difficult to teach oneself coding other than just doing exercises from a textbook. I wanted to give myself a project to do in order to learn programming. I work in a research lab and something that would be extremely useful would be an inventorying system. Our lab has hundreds of chemicals organized by location and property but its currently all inventoried on one word document and it is extremely ugly and disorderly.
The problem is I don't even know where to start. The projects I've done in programming classes have all been extremely structured and this is the first time I would be creating something that is entirely my own idea and not guided by a project prompt. In a nutshell, the user would type in the chemical name or CAS number of whatever they needed and the program would show where it is located in the lab and if it is out, would generate an order form for the user (our order forms are a formatted excel spreadsheet). I think a good starting point would be creating the user interface first but I have never made a user interface before. Any recommendations on textbooks or references for creating user interfaces for programs would be appreciated.
Another big question is if C++ is even the right language for the type of program I am thinking of creating. I am in no way set on using C++, its just what I have the most experience with, which isn't much.
Another big question is if C++ is even the right language for the type of program I am thinking of creating.
I'd say no. Something like this could be done with some clever scripting and usage of standard Excel commands like VLOOKUP. I'd just make a spreadsheet.
Even if it doesn't end up being used you could easily play around with making something to practice concepts you've learned so far.
You could try making a custom class Chemical that stores information about each chemical and then create another class Database that holds a vector or a map of the Chemical class you wrote. You could define >> and << operators for your Chemical class include functions for opening/closing file streams in the Database class and then read in/write out the vector or map of functions to/from a file. And then if you really wanted to you could implement some type of GUI for your program.
There's a lot you could do. Just pick something and play around with it. Practice makes prefect.
I'm envisioning a user interface where the user can use geometric shapes (square, circles, rectangles and such) to draw a labelled map of the lab in a overhead view and that would be saved as a user profile. So a long rectangle could be a bench top and a square drawn on top of it could be a desiccator or a large square could be a refrigerator or a glove box. The user would could then click on an object in the map and then input what is stored in each object. Then when the user wants to find something later, they just enter the chemical name or cas number and the location is highlighted on the map and additional information is displayed such as phase, b.p./m.p. or the procedure for how to distil or purify the compound. I just have no idea how I would go about creating that. All programs I have written have been the kind that are executed in the command line.
I realize I could make an organized excel spreadsheet but that wouldn't teach me how to use a programming language like python or java or c++, which is what I am trying to do. I'm more interested in the process rather than the final result.
EDIT: I guess my real question is how do I create programs that are independent of the command line. I want to make a program that has its own user interface and the the user doesn't have to make inputs in the command line.
To implement a GUI into your program you'll need to use a graphics library of some kind. I've only used graphics libraries a little but I've seen people recommend the Simple Fast Media Library(SFML).