“But as adults, we never try new things because it just becomes so easy to keep doing the exact same thing with the same exact people. Who doesn’t want easy?” - Natalie, The Bear
Interesting links for the week
Instead of sending a bunch of random links your way, these are all things I’ve read or seen and found interesting enough to share!
Something that sparked my curiosity
I’ve been thinking about the first video in the interesting links section up above. If you haven’t seen it, it makes a really great argument in the favour of continuing to learn things (programming specifically) in the world of AI. We see a lot of influencers and famous people pushing the agenda of how software engineering or certain other professions will be irrelevant soon and it’s not worth learning those things. The video makes a really interesting point about how if you choose to not do anything because of such statements you end up fulfilling their prophecy by default. But it goes further to make the argument that despite all this if you do choose to learn and level up, you have nothing to lose! In a world where all software is generated by AI, having the understanding of how the building blocks work is definitely going to be better than not knowing and simply relying on AI.
Golang puzzle of the week
Shoutout to Ashish Pathak and Ramiro Berrelleza for solving last week’s puzzle. Here’s the one for this week :)
Ted Lasso is preparing the lineup for AFC Richmond’s next match. Each player has been assigned a number on their jersey, and the team is practicing in a specific order. Ted wants to group the players based on their jersey numbers to figure out who works well together.
As Coach Beard Ted has asked for your help to write a function to identify all unique groups of players (subarrays) where the sum of their jersey numbers equals a given target value.
Input: An array of integers representing the jersey numbers of players and a target integer value.
Output: A slice of slices, where each inner slice is a group of players whose jersey numbers sum up to the target value.
// example input
jerseyNumbers := []int{7, 9, 2, 4, 1, 5, 3}
target := 10
// example output
Jersey Numbers: [7 9 2 4 1 5 3]
Target Sum: 10
Lineup Groups:
[7 2 1]
[7 3]
[9 1]
[2 4 1 3]
[2 5 3]
[4 1 5]
Here’s a code template to help you get started:
package main
import (
"fmt"
)
// findLineupGroups identifies all unique groups of players (subarrays) where the sum of their jersey numbers equals the target value.
func findLineupGroups(jerseyNumbers []int, target int) [][]int {
// TODO: write your code here
}
func main() {
// Example input
jerseyNumbers := []int{7, 9, 2, 4, 1, 5, 3}
target := 10
// Call the function
result := findLineupGroups(jerseyNumbers, target)
// Display the output
fmt.Println("Jersey Numbers:", jerseyNumbers)
fmt.Println("Target Sum:", target)
fmt.Println("Lineup Groups:")
for _, group := range result {
fmt.Println(group)
}
}
You can write solutions to this in the Go Playground and share the link with me on LinkedIn to get a shoutout in next week’s newsletter!
Who’s hiring?
Sourcegraph is hiring for a remote Developer Advocate in San Francisco.
InfraCloud is hiring for a remote Product Engineer in India.
Spotify is hiring for a Senior Solutions Architect for their Backstage team in London