What was the most complex thing you ever made in fuze
-
I am interested in your experience
-
When it comes to coding, it is important to know the difference between
difficulty
andcomplexity
.For example, I believe that I've made the AI in 2048 too complex, and that's probably the reason why it doesn't win the game yet. If I had come up with a more simple solution already, it would probably be better at solving the game at this point.
So my point is, it's fine to take up a task that's difficult, but it may take time, research and experience. The problem you try to solve, might even be complex. But the last thing you want, is complex code to solve a complex problem. You should always strife to simple code to solve any problem.
There are different types of complexity that you can creep into your code. Often distinguished between
cyclomatic complexity
andcognitive complexity
. If you search for those terms, you'll probably find some good resources to learn about those.I think most developers will sometimes make the mistake to make something too complex. Maybe because you didn't have a complete picture or what you needed to build at the start, or one of the many other reasons. Nothing wrong with that, but often, when you spot that something you build becomes more complex the more you work on it, it's a good idea to review that part of your code and see if you can come up with a more
SOLID
approach.So to answer your question about complexity in Fuze: I think my initial approach to the AI in my 2048 game is too complex, so when I feel like it, I might refactor that in the future to make it more simple. I believe by doing so, I might make it more easy to solve the task of winning the game via AI. But personally I don't want to take my Fuze coding too seriously, because I don't want work related stress in my free time, and Fuze is only hobby for me. In other words, Fuze is not a priority for me, but as long as I'm having fun or feel useful on the forum, I'll probably spend some of my time on it.
But when you're starting out, that is something to keep in mind. Complexity in your solution, is usually something bad and unproductive.
I hope I didn't go on for too long, that it made sense, and is useful to you :) And otherwise, I apologize for my rambling, it was with good intent :P
-
This goes very deap
-
-
Nothing yet, ask me in 5-6 years when I finally get the grasp of it. ;)
-
@SteveZX81 what means grasp
-
@petermeisenstein Understand