Jump to content
UBot Underground

Best Practices For Tabs + Define Node? What Do You Do?


Recommended Posts

Hi guys,

 

I just started learning about how to use the Define node, and it seems it'll help me condense a lot of my code. :)

 

However, I read that some people use the Define node to define different sections of code on different Tabs, and then run all the defines from one main Tab.

 

I was thinking this might be a good idea for organizing my codes. Keeping them in different Tabs would probably be quite organized.

 

Right now I have all my code in one Tab, separated by dividers and comments. 

 

I was wondering if keeping different actions in different Tabs and calling upon them using the Define node is a good thing to do? I might end up having a lot of tabs that way though so not sure if that's a good thing...

 

What are the best practices you use with the Define node and what do you use your Tabs for?

 

 

Link to post
Share on other sites

i find it depends on what kind of bot you are building. If you are getting it started, and actively working on certain parts, then the defines should stay in the same tab as you are working, as they are easy to reach and fast to edit. However, once you are sure that they are tested/working and you have finished with that section then you can move them to a separate tab.

 

an easy rule is to keep upto 20-30 defines in the same tab, then once you go over that, start to maybe organize them into different tabs.

Link to post
Share on other sites

Hi guys,

 

I just started learning about how to use the Define node, and it seems it'll help me condense a lot of my code. :)

 

However, I read that some people use the Define node to define different sections of code on different Tabs, and then run all the defines from one main Tab.

 

I was thinking this might be a good idea for organizing my codes. Keeping them in different Tabs would probably be quite organized.

 

Right now I have all my code in one Tab, separated by dividers and comments. 

 

I was wondering if keeping different actions in different Tabs and calling upon them using the Define node is a good thing to do? I might end up having a lot of tabs that way though so not sure if that's a good thing...

 

What are the best practices you use with the Define node and what do you use your Tabs for?

 

You can use defines however you want.

 

I usually use tabs to code a part of bot, which I can also test in that tab, then I include that tab into main tab, so it becomes part of main code. This way I can simply go to that tab to test that part of code.

 

i find it depends on what kind of bot you are building. If you are getting it started, and actively working on certain parts, then the defines should stay in the same tab as you are working, as they are easy to reach and fast to edit. However, once you are sure that they are tested/working and you have finished with that section then you can move them to a separate tab.

 

an easy rule is to keep upto 20-30 defines in the same tab, then once you go over that, start to maybe organize them into different tabs.

Where did you get that number, 20-30? You can use as many as you want...

Link to post
Share on other sites

 

Where did you get that number, 20-30? You can use as many as you want...

 

Its the same amount of times that i have made a sandwich with my own nob cheese? Its the number of times that i beat up my wife? Its the number of times that i've often dreamed about having a robot steel toe?

 

Its from a bot that i looked at that has more than 300 defines, and how i eventually found it the quickest and easiest to manage. Especially when it comes to bug testing. 20-30 per tab. eventually it became only 3 functions inside 1 loop.

 

Having more than 20-30 (in one tab showing )really slows ubot down, and i like ubot to be fast, as i'm normally waiting 0.2 - 0.4 seconds for it to keep up. over 30-50 and i was checking my emails in between nodes opening.

Edited by quite_interesting
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...