Writing Code, and New Challenges

Finally writing code...for better or worse

I was excited to start writing some Rust code today! This only led to new struggles, however. The first coding challenge did provide some guidance in the way of a code template. Certain parts of writing the solution have proven easier than others.

Part of this task, and many of the challenges in Saving Satoshi, involved decoding strings. This challenge provided the first base58 string I’ve encountered, which like many other concepts is well explained on Learn Me a Bitcoin. While we are not supposed to use Rust crates to solve the entire challenge for us, I did use the bs58 crate to do the decoding for me.

Even simple tasks like this have proven time consuming as I become accustomed to Rust. Manipulating data is much more complicated than in PHP. Fortunately, the RustRover IDE I’m using is very helpful, but over time I hope to continue reading through the Rust book to gain a deeper understanding of using different data types.

The hardest challenge so far has been deriving child private keys from the extended private key. The relevant BIP and Learn Me a Bitcoin page have been very helpful, but translating these concepts into code has proven difficult. Fortunately, Learn Me a Bitcoin has code examples in Ruby and PHP which have been somewhat helpful. I also use ChatBTC and internet searches if I’m feeling really stuck, and there’s always the Discord for peer support.

It felt like drinking from a fire hose today, but I’m already becoming more familiar with concepts that were foreign to me not long ago. This program is living up to its promise of being immersive - either I master the technicalities of bitcoin, or I don’t continue. Though it has felt overwhelming at times, especially with the struggles of writing Rust code, I’m making progress in my solution to the first challenge.

Who knows how things will turn out, but I feel challenged and have learned a lot already. I hope to make more progress and complete the first challenge in the week ahead!


Write a comment
No comments yet.