I'm having trouble thinking of projects I can do. I can't for the life of me think of good programming projects to do.
Parallel with that, I realize that I don't really learn the depth of the language because I don't do something difficult enough with it. Or I just don't know enough about software engineering in general to be able to get started with a big project. I feel I know the basics pretty well, but I don't get past the stage of writing small toy programs.
Now, my question is: I've had this idea of writing a program that can search a dictionary and return you all the possible words if you give it a Boggle grid. Do you think it's a good fit for Rust, and do you think it's a good fit for a beginner? I want to write it in Rust, because I think the speed will matter and I'd like it to be ergonomic and guaranteed memory safe.
Now the second part of my question would be about what architecture would make most sense. I'd like the code to be a reusable module, because I want to try to make it part of a server which can enable people to play over the internet. I have the following rough structure in mind:
- Some form of network code to connect to an online dictionary for whatever language.
- Some struct containing at least a 4x4 array of "letters" representing a grid, maybe some other state as well. I can't think of something else you'd want to store right now.
- Maybe the "letters" should be a C-like
enum
or elsechar
s. - A
new()
method for the grid which can take into account that there are a 16 blocks with 6 letters each and randomly shuffles them in the grid. - An implementation of
Iterator
over all possible options of words in the grid. Having smarts like only using adjacent blocks for the next letter and not reusing any blocks, yielding all possible strings of letters possible according to the rules. - A
find_all_words()
method for the grid to iterate over all possibilities and returning aVec<String>
or something like it with all the possibilities the iterator yielded which were also found in the dictionary.
How do I know if I'm on the right track? Do I need to know that before I start coding? Or is such a basic idea good enough, and I can flesh out the details as I write the code?
I realize this isn't easy to read or to answer. Therefore, if you made it this far, thanks for reading. If you answer on top of that, you're awesome! Thanks!