Quantcast
Channel: Tech – Andy Balaam's Blog
Browsing all 29 articles
Browse latest View live

Rust 101 – 20: Unit, integration and benchmark tests

How to write unit tests in your Rust code, and some quick pointers on writing integration and benchmark tests. Series: Language basics, More syntax, Traits and generics, Building applications,...

View Article


Rust 101 – 21 Exercises for module B (q1)

Going through an exercise on serialization with serde. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects This section...

View Article


Rust 101 – 22 Exercises for module B (q2)

Building a command-line quiz application to bed in our knowledge about crates, modules and serialisation. All done using test-driven development. Series: Language basics, More syntax, Traits and...

View Article

Rust 101 – 23 Exercises for module B (q3)

Testing, benchmarking and optimising a small program that plays FizzBuzz. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects...

View Article

Rust 101 – 24: Parallelism and Rayon

What concurrency and parallelism are, a brief intro to Rayon, and a quick note on closures. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and...

View Article


Rust 101 – 25: Threads, Mutexes, channels, Send and Sync

How to spawn threads and deal with lifetimes, how to send or share state across threads, and what Send and Sync mean. Series: Language basics, More syntax, Traits and generics, Building applications,...

View Article

Rust 101 – 26: Exercises for module C (q1)

Searching across multiple documents in parallel with Rayon. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects This section...

View Article

Rust 101 – 27: Exercises for module C (q2)

Implementing a simplified form of Mutex. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects This section (Concurrency and...

View Article


Why I won’t link to AI resources

I received a very kind email today from someone who had found my page Resources for year 6 teachers on coding and programming helpful, and wanted to suggest another link for me to add, about AI...

View Article


Rust 101 – 28: Dynamic dispatch

Explaining how to hold on to something even when we don’t know its exact type, just what trait it implements. Series: Language basics, More syntax, Traits and generics, Building applications,...

View Article

Rust 101 – 29: Trait objects and object safety

Trying to explain why the rules for object safety are the way they are, and how to create and use a trait objects. Series: Language basics, More syntax, Traits and generics, Building applications,...

View Article

Rust 101 – 30: Good patterns and not so good

Some good patterns to follow in your code e.g. “newtype”, “typestate” and one to avoid. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism,...

View Article

Rust 101 – 31: Exercises for module D (q1)

Some good patterns to follow in your code e.g. “newtype”, “typestate” and one to avoid. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism,...

View Article


Rust 101 – 32: Exercises for module D (q2)

Trying out the typestate pattern by tracking the state of a 3D printer by changing our type instead of updating a variable whenever it changes. Series: Language basics, More syntax, Traits and...

View Article

Elected to the Matrix Foundation Governing Board!

I am really excited to say I was elected to the Governing Board of the Matrix Foundation! I was really surprised because there were lots of people standing, and the quality of the candidates was very...

View Article


Rust 101 – 33: Exercises for module D (q3)

Following through an exercise using a trait object with dynamic dispatch to choose different behaviour at runtime. Series: Language basics, More syntax, Traits and generics, Building applications,...

View Article

Rust 101 – 34: What is async?

What async programming is and what it looks like in Rust. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects, Async This...

View Article


Rust 101 – 35: Futures

Exploring what a Future is in async Rust and how we could manually write code that polls futures. Normally, we avoid this manual work by using the `async` and `await` keywords, but looking into this...

View Article

Rust 101 – 36: What async and await really do

Attempting to explain as slowly as possible what actually happens when the compiler finds an async function containing awaits: it writes a poll method for you to create something that implements...

View Article

Rust 101 – 37: Async runtimes

We talked about how Futures have poll methods, but who calls them? That is the job of the runtime. We talk about how to launch your async code and how to choose the right runtime, and then we have a...

View Article
Browsing all 29 articles
Browse latest View live