Lessons learned: May 2024

Lessons learned: May 2024
Photo by Rob Schreckhise / Unsplash

Hey all, I'll be starting a monthly summary of highlights and lessons learned from the past month.

Dynamo DB

Whilst creating a script to mass modify many db records, I was unsure whether to use Scan or Query. I was curious about the differences and came across an interesting breakdown: https://dynobase.dev/dynamodb-scan-vs-query/

πŸ’‘
Pro tip: Always dry-run (or at the very least, run a test against a single record) when attempting to modify database fields. Many things can go wrong, including your script!

All roads were pointing towards Query yet I had to take in several factors, such as:

  • Go n00b
  • effort vs time to produce end result
  • I had already produced a poc using Scan

At this point I figured I'd stick with Scan, even though the DDB users (and AWS themselves) declared this the slower option. However, my script that updated 50 records in <2 seconds? Scan was more than good enough.

Jest integration

Jest has a cache... who knew?! This was a real annoying one. Basically I found out, through much investigation, that jest had cached a function from an unused module at an earlier point in development:

dummyFile.ts

// modifyValue() << commented before test execution but cache restored uncommented version during test suite

This cached (i.e uncommented) code was producing a test suite failure and other weird results when running integration tests. My goodness this took a LONG time to figure out. By stepping through the execution process step by step, breakpoint by breakpoint, I was able to narrow down the root cause to jests' cache. 😌

Long live debuggers!

Troubleshooting Β· Jest
Uh oh, something went wrong? Use this guide to resolve issues with Jest.

ClickOps

I am 2 years too late to "ClickOps": https://www.lastweekinaws.com/blog/clickops/. I thought it was simply "using the GUI".

This got me thinking, will all our GUI actions become ClickOps? Am I a Mac ClickOps expert?!

Enshittification

Ah, finally a word to explain the degradation of online services.

Enshittification - Wikipedia

Essentially if you find that services or apps provided by companies like AWS, Spotify, Reddit gradually become, well 'shit', you can now clearly say "this app suffers from enshittification.".

Marshal vs Unmarshal

When transforming payloads for API tests, most of my efforts involve constructing or deconstructing json objects. This month I ventured into Go (still a n00b πŸ‘€) and was guided towards the phrasing of marshalling (data structure into json) and unmarshalling (json back into data structure).

Turbosquid account

Turns out you cannot delete a Turbosquid account: https://resources.turbosquid.com/how-do-i-close-my-account/

Oh well, I guess my downloads of Dinosaur and Fantasy 3D models will have to remain in limbo until I find another use for them.

SMS verification updates

Would you trust this message coming from Apple? The @apple.com #761627 %apple.com caught me off guard so I had to double check.

Turns out, there's another thing I am 2 years late for πŸ˜… ... https://www.macworld.com/article/606996/apple-verification-code.html.

If the site uses an embedded HTML element, called an iframe, the source of the iframe is listed after %, such as %ecommerce.example. (The original spec specifies @; Apple appears to be using % for its texts.)

And right after this, I came across another service utilising this SMS method. Bravo to companies and their efforts to stay ahead of phishing attempts.

Apple Xbox controller support

I tried using my original Xbox One wireless controller to play games on my Mac however the Bluetooth controller couldn't be detected. After a quick search around I found this lovely Apple support page.

Supported Xbox game controllers
  • Xbox Wireless Controller with Bluetooth (Model 1708)
  • Xbox Wireless Controller Series S
  • Xbox Wireless Controller Series X
  • Xbox Elite Wireless Controller Series 2
  • Xbox Adaptive Controller

Unfortunately my original controller model Xbox One Wireless Controller Model 1537 is not supported. Bummer! With my Xbox One pretty much useless to me, I now ALSO have 2 useless controllers 😦

I'll stick to my 8-bit rip-off controller instead.

A new Spotify podcast

I've never been big of podcasts before this month. Either I was too dependent on having video+audio OR I never found a podcast that I found actually useful or educational. Special mention to That Peter Crouch Podcast for keeping me occupied during COVID in 2020.

That all changed when I stumbled upon "Darknet Diaries". This podcast, and the host Jack Rhysider, give detailed stories and first-person accounts on all kinds of cyber incidents. Ranging from penetration testing, data breaches to teenage hacker origins, this podcast has been inspiring and filled my green-hat eyes with much more cyber security-focused content and stories.

Episodes can be as short as 30mins or almost 2hours, giving you the option to listen on the train into the city, or when driving around in traffic. Having been in I.T for +10 years, there is so much to relate to yet so much more to learn.

To name a few top episodes so far:

Social engineering

The Pirate Bay

Red team penetration testers

Well done Jack on your podcast and long may it continue.