Help with project idea

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:

  1. Some form of network code to connect to an online dictionary for whatever language.
  2. 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.
  3. Maybe the "letters" should be a C-like enum or else chars.
  4. 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.
  5. 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.
  6. A find_all_words() method for the grid to iterate over all possibilities and returning a Vec<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!

After I've learner the syntax and basic constructs for a language, my go-to project is to write a parser+compiler or a parser+interpreter for a simple programming language (usually a lisp). For example, this is what I wrote up a couple years back when playing with LLVM (repo).

Yes and yes.

It should be doable with any general purpose programming language that. I haven't looked too deeply into the challenge, but I'm guessing it'd only take a couple hundred lines.

Some of the best beginner projects are ones that push you to try new things. Don't worry about failing. If you get stuck, bang your head against the problem for a bit and if the answer still eludes you, you can ask on this forum and people will help you learn :slight_smile:

You might be overthinking it. I you use a char it'll make working with strings (e.g. to look in your dictionary or yield from the iterator) easier.

If you get midway through and find a simple char isn't good enough, you can just swap it out. The nice thing about a strongly typed language like Rust is that once the code compiles again it should Just Work (modulo silly logic errors).

I like the idea, although instead of Grid::new(), I'd call this Grid::random().

It's a convention that most new() methods are dumb and only do enough to set up the inputs. If you make a random() method it can generate a random set of characters then pass it to Grid::new() to get an actual grid.

How big is a block? If we're dealing with characters it's going to be pretty cheap to copy blocks around.

I'd start simple, then once you've got everything else working you're in a better position to go back and make optimisations and tweaks. It'll also teach you an important skill... Refactoring code without breaking it.

I think this is a pretty good starting point. When I'm beginning a new project at work I'll figure out what I want the thing to do, then put together a very rough plan to help guide me.

Don't try to define every little detail before you start coding. As you implement things you'll discover more about the problem space and may find that the original plan was flawed or needs adjusting.

The awesome thing about code is that by hitting a single delete key you can change the plan or take the project in a different direction. It costs nothing... Compare that to a civil engineer building a bridge, there are massive ramifications to changing direction or encountering a design flaw (e.g. you've got to knock down a pillar you just put in because it should have been 1 metre to the left).

1 Like

Thanks for the answer! I really appreciate you taking the time!

I meant one square in the 4x4 grid when I said "block". I'm not concerned about copying here; I want my iterator to use a letter only once and only string adjacent letters together according to the rules of Boggle.

1 Like

This is not my post, but I feel much the same as the poster: https://www.reddit.com/r/rust/comments/gguf3p/good_project_ideas/

Hi @L0uisc, it seems like you have the opposite problem of me: I have too many projects :slight_smile:

Now, given that you learned C++ in order to contribute to MuseScore (music notation software), you may be interested in audio software in Rust. It may be interesting to know that there is a dedicated forum about audio development in Rust. You can also ask your question there.

In case you're interested in software synthesizers, this issue may be something for you (I'm shamelessly dragging contributors to my own projects here :wink: ).

Another thing that you might think is cool is automated music transcription. I have some ideas about that, but it will probably turn out more of a research project than of a programming project. Anyway, let me know if you're interested.

Another cool project (by @chris-zen ) is Hero Studio. Now the scope of it is probably way to big for one person, so your first job is probably finding a way to reduce the scope. In my experience, scope management is one of the hardest things.

This is an oversimplification, but in my opinion, the "only" extra skill you need for bigger projects is the ability to split them into smaller, manageable projects that are as much as possible self-contained (ok, and if it's really a big project, the ability to keep oversight and to manage the contributors). In my experience, the Rust language and community are great for contributing to other people's projects. If you want to work on a bigger project, you can of course start your own, but then it will take some time before it becomes bigger and when it's a bigger project, you will probably realize that you have more work than you can handle. Or, you can work on an already existing bigger project, which has several advantages: you have a bigger project from the beginning and you're probably helping out the maintainer of the project who has typically a lot of problems to tackle but not enough people. In the case of Hero Studio, the maintainer hasn't contributed in a while. With Rust, this isn't much of a problem: Rust code doesn't "rot" that quickly. If you contribute to such a project, this can lead to a number of scenario's: you become the new maintainer of the project or you revive the old maintainer's interest and now you're working with two on the project, which is fun as well.

I've had very positive experiences this way; it's how I became the new maintainer of rsynth.

The particular projects that I suggested are what I like as project, your taste is probably different, but I hope that the idea of looking for already existing projects triggers some inspiration.

1 Like

@PieterPenninckx thanks for the mention to hero-studio. Definitively that's something that I plan to continue working on in the future (see my updated roadmap :slight_smile:).

I agree with how important is to keep the scope of the project under control if you are willing to get some practical results. In the case of my project hero-studio, it was a bit different, because I was more interested on the research and learning aspects than getting an actual product from it.

I also agree that you will have more impact contributing to existing projects. But you will need to work on your own projects to expand your knowledge about specific things (without the pressure to deliver something useful).

Best of luck.

P.S. I take the chance to mention that I'm open to collaborations with kiro-synth to build a synth that can run in microcontrollers such as the STM32H7 or nrf52 :stuck_out_tongue_winking_eye: The idea would be to present it in the next next OxidizeConf as an application note.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.