user132118: is it possible to get bitcoins using your own custom code? Is it possible to get a hash somewhere, come up with a solution on my own, and then submit the solution somewhere? I just thought the puzzle part of bitcoin sounded fun, I don't want to have some other person's solver running on my machine.

user13866: 
is it possible to get bitcoins using your own custom code?

Yes, the software ("code") would be what Bitcoin folk called a miner back when software and a CPU or GPU was all you needed. Nowadays you would need to write custom code that works with custom or commercial ASIC hardware.

Is it possible to get a hash somewhere ...

That's not how Bitcoin mining works. You need to create block template, set the value of an arbitary "nonce" and then calculate the hash of this block data. Then vary the nonce and repeat until you find a nonce value that leads to a block hash whose value is less than the current target value.
You need to be listening to the Bitcoin network using the Bitcoin network protocols in order to collect information needed to construct a new block. This would include the hash of the currently latest block, the network target and other items. Optionally you would maintain a pool of pending transactions you might want to include in a block.
Part of the block data you create is a "coinbase" transaction of your own devising that pays to an address of your choice the block-reward plus total of transaction fees of any pending transactions you included in the block.
That constitutes mining a block.
Nowadays you'd typically use a mining-pool network protocol to work as part of a mining pool. If you have huge financial resources and can buy immense numbers of ASICs you might not need to be part of a pool.

... come up with a solution on my own, and then submit the solution somewhere?

Once you have mined a new block you use Bitcoin network protocol to notify a few bitcoin nodes (peers) that you have new block data. You find those peers using the Bitcoin peer-discovery process.
If your block is acceptable, you can spend your coinbase output anytime after 100 other blocks have been mined using your block as an ancestor.

132118: <p>is it possible to get bitcoins using your own custom code? Is it possible to get a hash somewhere, come up with a solution on my own, and then submit the solution somewhere? I just thought the puzzle part of bitcoin sounded fun, I don't want to have some other person's solver running on my machine.</p>
 13866: <blockquote>
<p><strong>is it possible to get bitcoins using your own custom code?</strong></p>
</blockquote>
<p>Yes, the software (&quot;code&quot;) would be what Bitcoin folk called a miner back when software and a CPU or GPU was all you needed. Nowadays you would need to write custom code that works with custom or commercial ASIC hardware.</p>
<blockquote>
<p><strong>Is it possible to get a hash somewhere ...</strong></p>
</blockquote>
<p>That's not how Bitcoin mining works. You need to create block template, set the value of an arbitary &quot;nonce&quot; and then <em>calculate</em> the hash of this block data. Then vary the nonce and repeat until you find a nonce value that leads to a block hash whose value is less than the current target value.</p>
<p>You need to be listening to the Bitcoin network using the Bitcoin network protocols in order to collect information needed to construct a new block. This would include the hash of the currently latest block, the network target and other items. Optionally you would maintain a pool of pending transactions you might want to include in a block.</p>
<p>Part of the block data you create is a &quot;coinbase&quot; transaction of your own devising that pays to an address of your choice the block-reward plus total of transaction fees of any pending transactions you included in the block.</p>
<p>That constitutes mining a block.</p>
<p>Nowadays you'd typically use a mining-pool network protocol to work as part of a mining pool. If you have huge financial resources and can buy immense numbers of ASICs you might not need to be part of a pool.</p>
<blockquote>
<p><strong>... come up with a solution on my own, and then submit the solution somewhere?</strong></p>
</blockquote>
<p>Once you have mined a new block you use Bitcoin network protocol to notify a few bitcoin nodes (peers) that you have new block data. You find those peers using the Bitcoin peer-discovery process.</p>
<p>If your block is acceptable, you can spend your coinbase output anytime after 100 other blocks have been mined using your block as an ancestor.</p>
