Difference between revisions of "Talk:Making a Password Protected Door"

From ComputerCraft Wiki
Jump to: navigation, search
(Undo revision 1343 by 24.20.222.206 (talk) -- revert deletion)
(clean up talk page, add {{subst:unsigned}})
Line 1: Line 1:
  
== In response to 24.20.222.206 who reverted my changes and commented "Make code better, again" ==
+
== Re: "Make code better, again" ==
  
 
How is it 'better' to leave the computer running when it's not needed?
 
How is it 'better' to leave the computer running when it's not needed?
 
Assuming this is the desired behaviour, why is it 'better' to reboot the computer each time instead of using a loop?
 
Assuming this is the desired behaviour, why is it 'better' to reboot the computer each time instead of using a loop?
 
And assuming ''that'' is the desired behaviour, why is it 'better' to have the call to os.reboot() repeated inside the if blocks instead of once after the if?
 
And assuming ''that'' is the desired behaviour, why is it 'better' to have the call to os.reboot() repeated inside the if blocks instead of once after the if?
<pre>
+
:Loop uses more memory. Also, there's no difference, do you really care that much? <small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:24.20.22.206|24.20.22.206]] ([[User talk:24.20.22.206|talk]] • [[Special:Contributions/24.20.22.206|contribs]]) </span></small><!-- Template:Unsigned -->
24.20.22.206:
+
Loop uses more memory. Also, there's no difference, do you really care that much?
+
</pre>
+
 
::I reverted changes from two users. This guide is supposed to be a reasonably low level tutorial. Simply slapping code on a page is not a tutorial, hence the previous version with screen shots is more noob friendly. Secondly, the latter version used variables that don't need to be variables. [[Special:Contributions/121.45.75.253|121.45.75.253]] 14:07, 16 April 2012 (UTC)
 
::I reverted changes from two users. This guide is supposed to be a reasonably low level tutorial. Simply slapping code on a page is not a tutorial, hence the previous version with screen shots is more noob friendly. Secondly, the latter version used variables that don't need to be variables. [[Special:Contributions/121.45.75.253|121.45.75.253]] 14:07, 16 April 2012 (UTC)
  
Line 14: Line 11:
  
 
i am a noob and have just started to use Computer Craft. I was learning how to make a password protected lock and i understood all of it, until it said, " Now to start it, we have the computer call the function after it declares it." This confused me very much and i was hoping someone could clarify or edit the page to be even more "Noob" friendly.
 
i am a noob and have just started to use Computer Craft. I was learning how to make a password protected lock and i understood all of it, until it said, " Now to start it, we have the computer call the function after it declares it." This confused me very much and i was hoping someone could clarify or edit the page to be even more "Noob" friendly.
 
+
:Try the 'Better / Alternative Code', you might understand that more. <small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:24.20.22.206|24.20.22.206]] ([[User talk:24.20.22.206|talk]] • [[Special:Contributions/24.20.22.206|contribs]]) </span></small><!-- Template:Unsigned -->
24.20.22.206:
+
Try the 'Better / Alternative Code', you might understand that more.
+

Revision as of 19:30, 25 April 2012

Re: "Make code better, again"

How is it 'better' to leave the computer running when it's not needed? Assuming this is the desired behaviour, why is it 'better' to reboot the computer each time instead of using a loop? And assuming that is the desired behaviour, why is it 'better' to have the call to os.reboot() repeated inside the if blocks instead of once after the if?

Loop uses more memory. Also, there's no difference, do you really care that much? — Preceding unsigned comment added by 24.20.22.206 (talkcontribs)
I reverted changes from two users. This guide is supposed to be a reasonably low level tutorial. Simply slapping code on a page is not a tutorial, hence the previous version with screen shots is more noob friendly. Secondly, the latter version used variables that don't need to be variables. 121.45.75.253 14:07, 16 April 2012 (UTC)

I think this can be more "Noob" friendly

i am a noob and have just started to use Computer Craft. I was learning how to make a password protected lock and i understood all of it, until it said, " Now to start it, we have the computer call the function after it declares it." This confused me very much and i was hoping someone could clarify or edit the page to be even more "Noob" friendly.

Try the 'Better / Alternative Code', you might understand that more. — Preceding unsigned comment added by 24.20.22.206 (talkcontribs)