Testing Without Mocks: A Pattern Language

Turning Google smart speakers into wiretaps for $100k

Reflecting on Transducers

Issue #314

1/9/2023

{{PreviewText}} 

Hey-yo
Hope you all had a good start to the new year! I took an extra week off because I felt like I needed it. Still getting back into the routine, hence the late issue today.
Completely off-topic, but I've been growing out a mustache and beard. Do you ever get used to your mustache constantly tickling your nose? I swear the number of times I sneeze has increased by 300% because of that.
Anyway, here's the issue.

====================================================================

Testing Without Mocks: A Pattern Language

Published: 20 December 2022
Tags: java, javascript, testing


James Shore discusses the importance of automated tests and the various ways to write them. The author describes the problems with the easy, obvious way to write tests and the benefits of using mocks and spies. He also describes the problems with using mocks and spies and how they can be avoided. The article is broken up into bite-sized pieces with lots of code examples.
Some highlights:

  • You have to adjust production code to work for tests (using an off switch)
  • Tests become more "sociable", meaning multiple can fail from a single bug
  • There's a long list of benefits for not mocking things for tests


====================================================================

Turning Google smart speakers into wiretaps for $100k

Published: 26 December 2022
Tags: http, infosec


Matt Kunze describes his discovery of security issues with the Google Home smart speaker that allowed an attacker within wireless proximity to install a “backdoor” account on the device, enabling them to send commands to it remotely over the Internet, access its microphone feed, and make arbitrary HTTP requests within the victim’s LAN.
Some highlights:

  • Google Home’s architecture is based on Chromecast, which doesn't have need for very good security
  • Although many researchers have looked into the security of this devices, they mostly missed the subtlety of the account linking vulnerability
  • More devices, more problems


====================================================================

Reflecting on Transducers

Published: 4 January 2023
Tags: clojure, rust, scheme


Jeremy Steward explains his process of creating a transducer egg (module) for Scheme. Jeremy was motivated to create the egg because they wanted Scheme to have something similar to Rust's iterator trait.
Some highlights:

  • Tranducers are a way to apply a composition of functions to each element in a collection
  • Creating something like a trait in Scheme is difficult, because Scheme is a dynamic language
  • Scheme library authors aren't really helping the idea that lists should only be used in certain circumstances and not all of the time


-

How did I do?

* Amazing
* Articles not relevant to me
* Articles were relevant, but badly written
* Summaries told me everything I wanted to know
* I like turtles

Want to help?

Thank you for reading! If you enjoy the newsletter, I would really appreciate you helping me spread the word by forwarding this to your friends and colleagues or sharing it on social media! Get cool stuff for your referrals using your link https://abyteofcoding.com.

Your referrals:


If you want to discuss or comment on this issue, head on over to this page at A Byte of Coding. You can also subscribe there if you're new!

Have comments or feedback? Just reply to this email or hit me up on Twitter @AByteOfCoding.

Email landed in your promotions tab? Please move it over to primary so you don't miss the latest issues in the future.
Thanks for your Support! 

Big thanks to all of the Patreon supports and company sponsors. If you want to support the newsletter you can checkout the Patreon page. It's not necessary, but it lets me know that I'm doing a good job and that you're finding value in the content.


Stats (updated daily)

Sent: 3031

Opens: 1522

Clicks: 339

Link Clicks Clicks % Unique Clicks Unique Clicks %
Testing Without Mocks: A Pattern Language 145 56.20% 170 58.42
Turning Google smart speakers into wiretaps for $100k 56 21.71% 62 21.31
Reflecting on Transducers 57 22.09% 59 20.27

Previous

Back to Issues

Next