I tend to do the same thing. But as time goes on with me working on the EventGhost project I have started to plan things instead of simply diving head in.. I have had things bit me in the ass and have to rewrite large pieces of code because i didn't lay things out in a manner that would allow for expansion or i tried to code in a manner that would work instead of being readable and understandable.
with something like this you want to make it in a manner that would be easy to expand onto. because you and I both know you will add onto it. and I think that a simple one word targeted keyword at the beginning to set the "stage" is the way to go. to keep things simple and readable. RegEX is an awesome tool. but I don't know of a single person that can look at a regex expression and know what the hell is going on without actually seeing the input text. Also due to the large number of "flavors" of it that also adds to the complexity. RegEX is something that you would use if the text already exists and you do not have power over changing it to a format that would make your life easier. in this situation i say lets go with readability and simplicity so 6 months or a year down the road and you want to add a command you won't have to try and figure out what you did to make it work. it will be pretty simple to figure out.
Is there a better way to do this? (a bit long of a read)
- kgschlosser
- Site Admin
- Posts: 5508
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Is there a better way to do this? (a bit long of a read)
sage advice to be sure,
thank you for all the help.
thank you for all the help.