Is there a better way to do this? (a bit long of a read)

If you have a question or need help, this is the place to be.
User avatar
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)

Post by kgschlosser » Mon Jan 01, 2018 5:18 pm

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.
If you like the work I have been doing then feel free to Image

Posts: 38
Joined: Wed Jun 07, 2017 8:30 pm

Re: Is there a better way to do this? (a bit long of a read)

Post by cvben » Tue Jan 02, 2018 2:50 am

sage advice to be sure,
thank you for all the help.

Post Reply