<p>I'm very new to this whole programming thing.</p>
<p>For instance: this a little program I understand it. I get what it's supposed to, but my problem is if I were to do it myself I wouldn't be able to come up with all the words and syntax. How do I learn this? I know this might be a silly question for some programmers, but I'm just being honest and I want to learn.</p>
<p>pragma solidity <sup>0.4.0;</sup></p>
<p>contract Coin {
// The keyword "public" makes those variables
// readable from outside.
address public minter;
mapping (address => uint) public balances;</p>
<pre><code>// Events allow light clients to react on
// changes efficiently.
event Sent(address from, address to, uint amount);
// This is the constructor whose code is
// run only when the contract is created.
function Coin() {
minter = msg.sender;
}
function mint(address receiver, uint amount) {
if (msg.sender != minter) return;
balances[receiver] += amount;
}
function send(address receiver, uint amount) {
if (balances[msg.sender] < amount) return;
balances[msg.sender] -= amount;
balances[receiver] += amount;
Sent(msg.sender, receiver, amount);
}
</code></pre>
<p>}</p>
<hr/>**评论:**<br/><br/>shazow: <pre><p>This has nothing to do with Go. Solidity's compiler is not even written in Go, it's written in C++.</p>
<p>You want <a href="https://www.reddit.com/r/ethereum" rel="nofollow">https://www.reddit.com/r/ethereum</a> or <a href="https://solidity.readthedocs.io/en/develop/" rel="nofollow">https://solidity.readthedocs.io/en/develop/</a></p></pre>tmornini: <pre><blockquote>
<p>I wouldn't be able to come up with all the words</p>
</blockquote>
<p>Naming is one of the two hard problems in programming.</p>
<blockquote>
<p>and syntax. How do I learn this?</p>
</blockquote>
<p>One compilation failure at a time.</p></pre>shovelpost: <pre><blockquote>
<p>This is a solidity program</p>
<p>if I were to do it myself I wouldn't be able to come up with all the words</p>
</blockquote>
<p>Use your own words.</p></pre>nhooyr: <pre><p>Come on.</p>
<p><a href="https://www.reddit.com/r/golang/comments/6ovb2d/restful_api/dkkr4wq/" rel="nofollow">https://www.reddit.com/r/golang/comments/6ovb2d/restful_api/dkkr4wq/</a></p></pre>Arcticcu: <pre><p>Same guy keeps posting stuff like this all the time.. mods, some sort of warning or or bam might be in order?</p></pre>