Question Anagram Solver with ListBoxes

ddecker

Member
Joined
Aug 31, 2021
Messages
6
Programming Experience
1-3
Hi guys,

I am wanting to create a anagram solver that uses a listbox named listdictionary and another named listscramed. The idea is simple... I want to be able to import a list of anagrams into listscramed and then after click the "solve" button have it look through the word list in listdictionary and find the matching words.

For example: phpya = happy

I have no idea where to start so if anyone has a VB.Net tutorial or code they are willing to share that would be great. Thanks!
 
Firstly, I have broken your post out into its own thread. Please don't bring your problem into someone else's thread unless it relates directly to their specific problem. The fact that you are both working on anagram solvers does not mean that you're having the same problem.

What's more, that thread was nearly twelve years old. It is never a good idea to resurrect a thread that old. Even if you have the same problem, it's still better to create a new thread and provide a link to the other one if doing so adds value.
 
As for the problem, you don't even have a problem yet. One of the biggest issues that beginners have is that they try to go directly from an idea to a working application in one hop and all the stuff in between is just kinda supposed to work itself out. That's not how software development works. Programming doesn't exist in a vacuum. The logic that we apply to the rest of our lives doesn't get tossed out the window just because we're writing code. If you had to create this anagram solver with pen and paper, could you do it? I bet that you could give it a pretty good go, so you obviously DO know where to start: with the LOGIC.

You should approach all programming problems by pretending that they're not programming problems. If you had to solve the problem manually, how would you do it? That doesn't take any programming experience at all. It just takes a bit of effort to think logically. Think about the problem and then pick up a pen and paper and write down the steps involved. Keep refining the steps and breaking them down into smaller parts until you have a series of the simplest steps possible to achieve your goal. That is your algorithm and you can test that algorithm manually with various inputs to ensure that you get the correct outputs.

Once you have an algorithm confirmed as correct by testing, only then should you think about writing code. The code you write doesn't actually have to give any consideration to the original problem. All it has to do is faithfully implement the algorithm. Each step in the algorithm is as simple as possible so it will only a line or two of code to implement it. You can repeatedly test and debug your partial code to make sure that it produces the same intermediate results as manually performing the algorithm. Any time the results differ, you know that the last bit of code you wrote is wrong so you can address that before going on. If you can't work it out yourself, THAT is when you post a question here, pointing out the specific step in your algorithm that you're having trouble with.

ListBoxes are completely irrelevant at this stage too. They are about presentation to the user. until you have a working algorithm AND you have implemented that in code, there's no need for a UI at all. You can just use arrays or collections to store the data in code and work against those. Once that's working, then you can display the data in the arrays or collections in a UI, but that should be the last step.
 
Firstly, I have broken your post out into its own thread. Please don't bring your problem into someone else's thread unless it relates directly to their specific problem. The fact that you are both working on anagram solvers does not mean that you're having the same problem.

What's more, that thread was nearly twelve years old. It is never a good idea to resurrect a thread that old. Even if you have the same problem, it's still better to create a new thread and provide a link to the other one if doing so adds value.
ok not a problem
 
Back
Top