Matt Boyle Profile Banner
Matt Boyle Profile
Matt Boyle

@MattJamesBoyle

Followers
11,248
Following
2,824
Media
588
Statuses
9,633

Engineering Manager @cloudflare ; author of Domain-Driven Design with Golang. creator of Ultimate Guide to Debugging in Go Course (see link)

London, England
Joined March 2010
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
Pinned Tweet
@MattJamesBoyle
Matt Boyle
1 month
(RTs massively appreciated) When I started byteSizeGo, I always wanted it to be bigger than just me. Over the past few months it has been a pleasure to partner with @mmontagnino and I'm so excited that her course The Art of Command Line Interfaces is nearly ready for launch!
Tweet media one
3
45
92
@MattJamesBoyle
Matt Boyle
25 days
John Cena is bullish on Postgres too.
@JohnCena
John Cena
25 days
Strive for more relational and less transactional.
816
3K
13K
16
495
5K
@MattJamesBoyle
Matt Boyle
8 months
Tweet media one
3
83
2K
@MattJamesBoyle
Matt Boyle
8 months
@soren_iverson Today, fact is that you might get "Student Driver" without even knowing it. Might be their first day on Uber.
7
2
2K
@MattJamesBoyle
Matt Boyle
9 months
Not a #golang specific tip, but people often give the advice "the best way to get better at any programming language is to write more programs". This is true at the start, but as you begin to get more comfortable with the language, the best way to improve is to read lots of other
42
235
1K
@MattJamesBoyle
Matt Boyle
6 months
@t3dotgg For system design just draw a single square, say you have designed a monolith and refuse to elaborate.
12
15
1K
@MattJamesBoyle
Matt Boyle
7 months
@soren_iverson It could increase the longer it goes unpressed so it becomes a game of chicken. Similar to when airlines need you to volunteer to get off and they keep increasing the voucher
7
6
1K
@MattJamesBoyle
Matt Boyle
8 months
@MKBHD Always surprised these things don’t get caught earlier. Makes you wonder how much real world testing these releases get these days.
31
10
886
@MattJamesBoyle
Matt Boyle
4 months
@MKBHD I’d actually watch at faster than 2x if it was an option
61
14
828
@MattJamesBoyle
Matt Boyle
9 months
The @golang team have been on fire and yesterday the published a blog titled "Perfectly Reproducible, Verified Go Toolchains". Here are the highlights: - Software is often distributed in binaries, which can be difficult to inspect. - We want to protect our software from Supply
Tweet media one
7
140
757
@MattJamesBoyle
Matt Boyle
10 months
Building a #golang container image for production One of the many reasons I love GO is how easy it is to build and containerise. However, it's also important to ensure your production application has the smallest attack surface possible, is portable, and small in size. Let's
Tweet media one
24
130
750
@MattJamesBoyle
Matt Boyle
9 months
Functional Options Pattern in Go The functional options pattern in Go offers a flexible and readable way to configure your structs without exposing internal fields. It is particularly useful when you want to provide optional configuration and there may be more configuration
Tweet media one
Tweet media two
Tweet media three
Tweet media four
25
107
704
@MattJamesBoyle
Matt Boyle
5 months
I miss working at places with random server names for pre-production. “Yeah you can test that on yoda1” “We just promoted that to milhouse360” “Ffs who broke Goldeneye?!” Do you have any cool server names where you work or at home?
192
33
655
@MattJamesBoyle
Matt Boyle
8 months
gRPC & Go You have probably heard of gRPC if you haven't used it. It is particularly popular for inter-service communication due to its efficiency, language agnostic nature and support out of the box for things like MTLS. Here's a really simple example of how you can get
Tweet media one
Tweet media two
Tweet media three
Tweet media four
16
57
607
@MattJamesBoyle
Matt Boyle
1 year
(RTs appreciated). I am very proud to announce that my first book is now available on Amazon! UK link: US link: This really has been a labour of love for the past year, and I hope you enjoy reading it as much as I did writing it!
87
185
568
@MattJamesBoyle
Matt Boyle
8 months
@soren_iverson “Fair usage policy applies. You can not sit on the toilet instead of purchasing a seat”
5
1
487
@MattJamesBoyle
Matt Boyle
3 months
Reddit never fails with its kindness ❤️
Tweet media one
30
8
487
@MattJamesBoyle
Matt Boyle
1 month
@soren_iverson Would work great if you got 20% of the fine if you could prove it by uploading dash cam evidence.
5
3
490
@MattJamesBoyle
Matt Boyle
9 months
Why Context Should Probably Be the First Argument in Most of Your Go Functions In #golang , the context package plays a big role in controlling the lifecycle of your code, especially when it comes to handling timeouts, cancellation signals, and passing request-scoped values. If
Tweet media one
18
84
456
@MattJamesBoyle
Matt Boyle
10 months
Tweet media one
0
11
429
@MattJamesBoyle
Matt Boyle
8 months
@hankgreen Leave it long enough and I’m sure it will take itself out
3
1
427
@MattJamesBoyle
Matt Boyle
8 months
Singleflight Singleflight is a really interesting package that "provides a duplicate function call suppression mechanism." Why use singleflight? Consider an application that fetches data from an API or a database (i.e, pretty much any application in existence). If several
Tweet media one
22
65
420
@MattJamesBoyle
Matt Boyle
8 months
A Brief History of Dependency Management in Go For those of you newer to #golang , it might surprise you to know that go modules was not always part of the language. When Go launched in 2009, it did not have any dependency management solution as Google had no need for one. As Go
Tweet media one
Tweet media two
14
75
412
@MattJamesBoyle
Matt Boyle
6 months
@Grady_Booch A bit disappointed by your lack of desire to change the laws of physics.
5
3
403
@MattJamesBoyle
Matt Boyle
2 months
If you spend time debating on pull requests whether the code you have written is idiomatic or not, consider creating a style guide that can be used as a point of reference. If you are not sure where to start, start with Ubers: and then make changes to
10
63
401
@MattJamesBoyle
Matt Boyle
9 months
errGroups are probably my favourite #golang package. errGroup makes it really easy to take a bunch of tasks and run them in parallel, making your program faster. They do this whilst keeping your code readable. Here's an example of one of my most common use-cases I asked
Tweet media one
17
46
373
@MattJamesBoyle
Matt Boyle
2 years
Happy to announce that I have been promoted to Engineering Manager at @Cloudflare !
33
5
371
@MattJamesBoyle
Matt Boyle
7 months
@SoVeryBritish The free bag of Prawn crackers you got as well as the ones you ordered as you weren’t sure if you were going to get free ones and didn’t want to risk going without.
6
2
370
@MattJamesBoyle
Matt Boyle
9 months
Garbage Collection in Go For most of us, garbage collection is something we have heard of but never need to pay attention to.However, one of the reasons #golang is so efficient and easy to learn is due to its excellent GC. What is Garbage Collection? Garbage collection is the
Tweet media one
4
60
365
@MattJamesBoyle
Matt Boyle
8 months
@SoVeryBritish I wish it wasn’t, but it seems to be “I don’t drink”
10
3
349
@MattJamesBoyle
Matt Boyle
27 days
LinkedIn has peaked
Tweet media one
24
48
351
@MattJamesBoyle
Matt Boyle
10 months
@SoVeryBritish The trains having a timetable.
5
1
340
@MattJamesBoyle
Matt Boyle
9 months
Here's a cool little #golang trick. You can add something like the following: to the top of your code to force a compile time check that a struct satisfies an interface. If it doesn't you'll see an error such as: You shouldn't need to do this all the time, but let me tell you
Tweet media one
Tweet media two
Tweet media three
20
53
340
@MattJamesBoyle
Matt Boyle
10 months
Golang twitter is the nicest tech sub-twitter. Seems to be people mostly trying to learn and be helpful which I love.
17
15
342
@MattJamesBoyle
Matt Boyle
4 months
I have two exciting pieces of news to share! Firstly, I have taken on additional responsibilities at @Cloudflare and will now be responsible for Developer infrastructure as well as Developer productivity going forward. Secondly, I'm hiring! The spec says remote US, but I'm
36
34
341
@MattJamesBoyle
Matt Boyle
5 months
Functional Options Pattern in Go The functional options pattern in #golang offers a flexible and readable way to configure structs without exposing internal fields. It is particularly useful when you want to provide optional configuration and there may be more configuration
Tweet media one
Tweet media two
Tweet media three
Tweet media four
14
56
334
@MattJamesBoyle
Matt Boyle
1 year
When I interview, I would say a good 80-90% of engineers say they have read the @Cloudflare blog and list it as a reason for wanting to join us.
@GergelyOrosz
Gergely Orosz
1 year
An underrated way to attract great engineers to your company (drumroll) Have a great engineering blog. This means ENGINEERS write the blog, not content writers. And they give the "real deal" about challenges, learnings, failures. So few companies do this. A few that do:
165
501
6K
5
14
333
@MattJamesBoyle
Matt Boyle
3 months
Did you hear about the one billion row challenge? It was intended to be a fun exploration of how far modern Java can be pushed for aggregating one billion rows from a text file. So what happens when you try and do the same challenge in #golang ? @shraddhaag expores exactly
3
44
314
@MattJamesBoyle
Matt Boyle
10 months
@iamharaldur My girlfriend has hundreds of these under our bed that she refers to as her “pension”. Let’s see how it works out for her…
11
2
302
@MattJamesBoyle
Matt Boyle
10 months
Here is a quick example of the new context.WithCancelCause introduced in #golang 1.21. The output of the below program is "error from cancel func" So why is this useful? Previously if the context was canceled you either would not get an error back or you would get "Deadline
Tweet media one
2
57
299
@MattJamesBoyle
Matt Boyle
8 months
New Blog Post From the @golang team: Fixing For Loops in Go 1.22 You can read the original blog post here: , summary below. The problem The below should print a,b,c right? It will actually print c,c,c. This is due to Its also
Tweet media one
Tweet media two
9
69
300
@MattJamesBoyle
Matt Boyle
5 months
Retweets massively appreciated. Today, I'm excited to announce the waitlist for my first ever course, The Ultimate Guide to Debugging in Go. Debugging is probably the most important skills that you never get taught. It is usually the first thing I teach folks and it's often
22
159
291
@MattJamesBoyle
Matt Boyle
6 months
Being a generalist isn’t a bad thing, and a lot of teams at @Cloudflare interview for this trait. We love hiring folks who say things like “I don’t know how it works, I used it on this project though and this is what I observed” or “ I don’t know how it works but here is how I
@GergelyOrosz
Gergely Orosz
6 months
Lots of people use the “Jack of all trades, master of none” in a degrading manner. A reminder that the full saying is this: “Jack of all trades, master of none, Oftentimes better than master of one.” It’s how it’s meant to be used and quoted if you do :)
47
268
2K
9
15
290
@MattJamesBoyle
Matt Boyle
9 months
GOMAXPROCS There is an environment variable (GOMAXPROCS) that you can set which determines how many threads your go program will use simultaneously. You can use this great library from Uber() to automatically set the GOMAXPROCS variable to match a Linux
5
48
274
@MattJamesBoyle
Matt Boyle
9 months
@SoVeryBritish “Back in my day mortgages were at 140% and we had to eat coal and we were happy. Your generation don’t know how easy you have it.”
10
5
275
@MattJamesBoyle
Matt Boyle
2 months
I just wrote my ambitious #golang blog post yet! It has taken me weeks to put together; this blog post had me going through my bookcase, all the bookmarks I have made since 2018 and watching 10s of hours of YouTube videos and courses. I really hope it is useful to you! It has a
19
44
272
@MattJamesBoyle
Matt Boyle
11 months
Here's a cool use for a @Cloudflare worker: - Check the header to see which platform you open the link on - direct you to the correct App Store. - Fall back to your website if you can't figure it out. This means you can share one link with folks to download your app.
Tweet media one
8
24
271
@MattJamesBoyle
Matt Boyle
1 year
If you’re looking for your next role in #golang , I made a small test repo for you to practise on: It’s a simple CRUD application but it has lots of smelly code, some security issues and poor design choices. Can you spot them all?
6
54
265
@MattJamesBoyle
Matt Boyle
7 months
First talk, really looking forward to this one @GopherConSG
Tweet media one
14
19
260
@MattJamesBoyle
Matt Boyle
15 days
It arrived!
Tweet media one
16
3
265
@MattJamesBoyle
Matt Boyle
10 months
@SoVeryBritish Trick question; the only wrong answer is not having a roast dinner. Also baked beans.
2
0
262
@MattJamesBoyle
Matt Boyle
1 year
Framed a copy of my book to put up in my office :)
Tweet media one
11
10
255
@MattJamesBoyle
Matt Boyle
7 months
@SoVeryBritish Peanut butter and banana
27
0
249
@MattJamesBoyle
Matt Boyle
1 year
@BillyM2k Best opening of a book since Harry Potter imo. What book is it?
12
3
132
@MattJamesBoyle
Matt Boyle
10 months
@SoVeryBritish *knee slap* right then!
3
4
231
@MattJamesBoyle
Matt Boyle
2 months
Awesome new #golang blog on traces: The blog highlights several key enhancements in Go's execution traces, focused on the runtime/trace package. Here's a summary: - Prior to Go 1.21, the run-time overhead of tracing was somewhere between 10–20% CPU for
Tweet media one
2
37
233
@MattJamesBoyle
Matt Boyle
7 months
Here's the setting I roughly use when defining a #golang http client. What about you?
Tweet media one
20
22
229
@MattJamesBoyle
Matt Boyle
8 months
Return early, return often One of the idiomatic practices in #golang programming is the concept of "return early, return often." Rather than deeply nesting code, which can lead to "arrow code" shape, Go encourages developers to handle conditions (especially errors) and return
Tweet media one
Tweet media two
Tweet media three
Tweet media four
7
41
219
@MattJamesBoyle
Matt Boyle
10 months
Go 1.21 is going to be released sometime in August, and comes with a few nice editions. Here's my highlights: - min and max functions - More specific import ordering - The new go test option -fullpath prints full path names in test log messages, rather than just base names. -
Tweet media one
9
48
216
@MattJamesBoyle
Matt Boyle
1 month
Re-sharing this. This repo contains Golang code that does not follow best practises, contains bugs and security issues. It is intended to be used as an interview exercise or a practise exercise for jr/mid-level #golang engineers. This repo contains, technically, a functional
10
15
214
@MattJamesBoyle
Matt Boyle
9 months
To celebrate reaching 5k followers, @PacktPublishing have kindly provided 3 copies of my book Domain-Driven Design with Golang to give away for free! To win, all you have to do is either like or repost, and reply with your favourite #golang library and why. Feel free to promote
Tweet media one
56
52
208
@MattJamesBoyle
Matt Boyle
2 years
@BillyM2k He was just passing it to these guys
Tweet media one
0
0
202
@MattJamesBoyle
Matt Boyle
10 months
Backwards Compatibility, Testing Changes to the Go Language and GODEBUG Yesterday a blog post by @_rsc was released on . The post is well worth a read but here is a summary of my key takeaways: - The #golang team takes backwards compatibility really
Tweet media one
5
41
208
@MattJamesBoyle
Matt Boyle
5 months
Pointer vs Value Receivers First long-form #golang tweet of 2024 :) When mentoring folks, we usually pause for a little bit to talk about the difference between these two. Here's an example pointer receiver: When you use a pointer receiver in a method, you're working with the
Tweet media one
Tweet media two
18
23
210
@MattJamesBoyle
Matt Boyle
4 months
@bytebytego I find Java’s placement incredibly suprising here
23
1
202
@MattJamesBoyle
Matt Boyle
3 months
I just published a new blog called “How I keep myself alive using Golang”. It’s an adaption of the talk I gave at Gohpercon Singapore this year. I hope you enjoy it and learn a lot about a pretty unique use case for #golang Thanks to @shraddhaag for proof-reading and for the
23
25
197
@MattJamesBoyle
Matt Boyle
7 months
@SoVeryBritish You just have to buy a BMW, it comes with it.
12
1
199
@MattJamesBoyle
Matt Boyle
9 months
Go Build Tags Did you know you can include comments #golang in files that determine whether a file should be included during the build process? For example, the following simple code: will be excluded from builds except on Linux, unless we explicitly pass the build flag. You
Tweet media one
Tweet media two
13
29
195
@MattJamesBoyle
Matt Boyle
5 months
This is why I swapped to a black and white brothers laser
Tweet media one
9
23
191
@MattJamesBoyle
Matt Boyle
10 months
@SoVeryBritish Dr: “how are you?” Me: “Yeah good, you?” Dr: “fine yes, how can I help?” Me: “I don’t want to cause a bother but my leg seems to no longer be attached to my body, could you take a look if it’s not too much trouble? It’s fine if not, sure it will be fine”
1
8
186
@MattJamesBoyle
Matt Boyle
8 months
@SoVeryBritish Y’alright?
3
5
188
@MattJamesBoyle
Matt Boyle
10 months
Should UUID be part of the #golang standard library rather than us all importing 3rd party projects? Is it just me or do you use them on pretty much every project?
31
15
183
@MattJamesBoyle
Matt Boyle
4 months
(Retweets hugely appreciated) To celebrate the release of Go 1.22, I put together a FREE course to teach you about the major changes in go 1.22 in JUST 22 minutes! You can check it out here: Let me know what you think!
@golang
Go
4 months
🥳 Go 1.22.0 is released! 🗒️ Release notes: 📦 Download: #golang
Tweet media one
29
527
2K
7
76
178
@MattJamesBoyle
Matt Boyle
8 months
Its all a little Fuzzy... In #Golang 1.18, support was added for Fuzz testing. Traditional testing methods, like unit tests, are limited by your own foresight. Fuzzing, on the other hand, can uncover unexpected issues by bombarding the program with a vast range of inputs,
Tweet media one
Tweet media two
4
20
177
@MattJamesBoyle
Matt Boyle
10 months
@soren_iverson This is genuinely useful.
2
0
175
@MattJamesBoyle
Matt Boyle
21 days
There is a nice set of #golang books available on humble bundle this week from some amazing authors and one less awesome one (me) You can grab them here:
9
36
178
@MattJamesBoyle
Matt Boyle
10 months
When to use Generics in #golang Adding Generics to Go was a controversial thing to do, and remains so to this day. They have been a huge quality of life improvement for some use cases, but in many instances I have seen them used as too early an abstraction and make code harder
Tweet media one
5
30
172
@MattJamesBoyle
Matt Boyle
9 months
Just Build Something! It might seem counterintuitive, but one of the the best ways to grow as a software Engineer, even if you want to specialise in Backend or #golang , is to build full stack side projects, especially if it means using other languages. Why? Every language has
12
36
173
@MattJamesBoyle
Matt Boyle
1 month
its official; #golang twitter loves sqlc! What is it? sqlc generates type-safe code from SQL. - You write queries in SQL. - You run sqlc to generate code with type-safe interfaces to those queries. - You write application code that calls the generated code. Here's an example.
Tweet media one
Tweet media two
@MattJamesBoyle
Matt Boyle
1 month
What do we all think of ?
61
14
202
14
18
172
@MattJamesBoyle
Matt Boyle
9 months
@SoVeryBritish Being British.
5
0
172
@MattJamesBoyle
Matt Boyle
4 months
Some world class trolling on LinkedIn. How are all you #golang engineers holding up with how unstable Go is? :(
Tweet media one
63
5
172
@MattJamesBoyle
Matt Boyle
8 months
@MKBHD I actually really like the flare, I think it looks really cool.
9
0
168
@MattJamesBoyle
Matt Boyle
9 months
Go Embed The Ability to embed file into your #golang binary was added in Go 1.16. It's really easy to do and really powerful. Let's take a look. As you can see, all we need to do is add what looks like a comment. Comments that start //go: are called compiler directives. You
Tweet media one
20
16
169
@MattJamesBoyle
Matt Boyle
8 months
Sorted! #Golang provides a sort package which by default allows you to sort primitives, but can be extended to sort anything! Firstly, primitives: You can also check to see if a list is sorted: And if you want to, in reverse order: Finally, you can can satisfy the Sort
Tweet media one
Tweet media two
Tweet media three
Tweet media four
6
31
168
@MattJamesBoyle
Matt Boyle
10 months
Great to see that is being revived! It has always been a stable, idiomatic and sensible router to me and I have struggled to find one that I liked as much since it was archived.
5
32
165
@MattJamesBoyle
Matt Boyle
3 months
(Likes and Retweets massively appreciated!) Today I'm proud to announce the launch of my course: The Ultimate guide to Debugging in Go ! Being able to debug locally and in production is a critical skill for any Go engineer, but it is rarely taught explicitly....until now! For
8
58
163
@MattJamesBoyle
Matt Boyle
9 months
Profile-guided optimization in Go 1.21 The @golang team really are doing amazing work with blogging lately. Yesterday they released a blog titled "profile-guided optimization in Go 1.21"(). Here's a TLDR and why you should care: - PGO works by leveraging
2
27
156
@MattJamesBoyle
Matt Boyle
7 months
I mentioned on a podcast with @goinggodotnet a few months ago that I was trying to train a model to answer questions on #golang that would help others learn by directing them to (at least what I believe to be) good resources. I stopped working on this as progress was slow and it
Tweet media one
12
26
154
@MattJamesBoyle
Matt Boyle
10 months
It's taken me longer than it should have (sorry!) but I have finally added some solutions to You can find them here: Hope you find it helpful! #golang
1
34
152
@MattJamesBoyle
Matt Boyle
2 years
I wrote another #golang blogpost on go workspaces; one of the lesser shouted about features of go 1.18 but incredibly useful! You can read what workspaces are and how you can use them here:
2
41
151
@MattJamesBoyle
Matt Boyle
2 years
@Cloudy_Judgemnt @elonmusk @sampullara This is absolutely not the correct way to do it. There are much simpler and safer ways to discover if services are being called, how often and in what user flows.
5
0
142
@MattJamesBoyle
Matt Boyle
10 months
@SoVeryBritish “Did you know the queen owns them all?” (God bless her soul)
10
2
150
@MattJamesBoyle
Matt Boyle
15 days
Tweet media one
8
1
148
@MattJamesBoyle
Matt Boyle
5 months
If you use #golang , your 10 user app probably will scale to 1 million concurrent users
Tweet media one
4
14
142
@MattJamesBoyle
Matt Boyle
9 months
@SoVeryBritish Definitely asparagus. The don’t think anyone actually likes it, it just sounds fancy.
22
1
135
@MattJamesBoyle
Matt Boyle
21 days
😎💅
Tweet media one
9
4
135
@MattJamesBoyle
Matt Boyle
8 months
@soren_iverson 10$ off your ride, your driver will perform their latest comedy set and you give honest feedback.
2
0
134
@MattJamesBoyle
Matt Boyle
1 month
What do you use for logging? Slog? Logrus? Zap? Will write up the results and my thoughts like I did for SQLC. #golang
114
7
134
@MattJamesBoyle
Matt Boyle
8 months
Every time I see people complaining about Go, it’s from people who say the error handling is too verbose and they find it confusing/hate it and are going to go back to Java/C#/php If you feel this way, I challenge you to stick with it for 30 days and then let me know if you feel
33
9
133