Jon Calhoun

6.2K posts

Jon Calhoun banner
Jon Calhoun

Jon Calhoun

@joncalhoun

Teaching #golang & building fun projects • Want to learn Go? Try https://t.co/qYoY2xodvd and https://t.co/m5PyRJbIY3

Pennsylvania, USA Katılım Mayıs 2008
406 Takip Edilen10.6K Takipçiler
Sabitlenmiş Tweet
Jon Calhoun
Jon Calhoun@joncalhoun·
Interested in learning to code in 2025? Here's some of my tips & advice. 🧵
English
4
5
43
6.1K
Jon Calhoun
Jon Calhoun@joncalhoun·
@kevinxu Trying to rage bait people? I’ve heard more than one rich person express regrets of prioritizing work over everything else. Typically happens when life event causes them to reflect. Eg a close death or health issues that prevent them from enjoying their wealth.
English
10
0
10
799
Kevin Xu
Kevin Xu@kevinxu·
“No one dies wishing they worked more.” Funny how I’ve never heard a rich person say “I worked too hard.” 🤔
English
14
1
128
20.7K
Jon Calhoun retweetledi
Matt Boyle
Matt Boyle@MattJamesBoyle·
I'm hiring for senior Go engineers to join us at @ona_hq! If you are: - AI native; using tools like Cursor, Claude code and Ona daily. - Are excited about building AI agents and the mission control platform that they will run on, entirely in Go. - Have 3-5 years of production Go experience. - Are based in London (remote Europe available too for exceptional folks). Then I'd love to have a virtual coffee with you and see if there is a mutual fit here. Drop me a DM. NOTE: We cannot sponsor visas right now so if you are not already located in Europe then please do not message as there will not be any exceptions.
English
14
30
191
57.7K
Jon Calhoun
Jon Calhoun@joncalhoun·
"Mac usability is characterized by its user-friendly, intuitive interface..." says nobody ever when trying to disable reactions on all video apps. 😫
English
0
0
1
1.1K
Jon Calhoun
Jon Calhoun@joncalhoun·
Did you know that Go's encoding/json package isn't case-sensitive when parsing JSON keys? This is one of the defaults proposed to change in Go's new json/v2 package. #golang #json
Jon Calhoun tweet media
English
1
9
68
4.2K
Jon Calhoun
Jon Calhoun@joncalhoun·
In Go, ExampleXxx functions double as docs & tests. ✅ Tests verify code is working by comparing the output. 📖 godocs embed runnable examples, making it easier for devs to get started. #golang #testing
Jon Calhoun tweet mediaJon Calhoun tweet mediaJon Calhoun tweet media
English
4
7
100
9.2K
Jon Calhoun
Jon Calhoun@joncalhoun·
There are a number of reasons for this. For instance, perhaps the legal team won't approve a third party lib due to issues with the license. Or perhaps the team experienced issues in the past with bloat from third party libs and found the most reliable way to avoid it was to strongly discourage any third party libs. Or maybe a large org had a problem of every project using a different set of third party libraries, which caused a disconnect between teams and made it harder for developers to help out other projects internally. Opting to instead build a few of the most common tools internally could be a net positive here. Or maybe the team had issues in the past with third party libraries being incredibly slow to address security concerns, and opted to use their own library rather than try to monitor code they didn't write. I suspect a lot of this mindset stems from the idiom, "A little copying is better than a little dependency." (see youtube.com/watch?v=PAAkCS…) The idea isn't that we should never use dependencies, but rather we should really weigh the pros & cons of using one, where in many other languages developers always default to adding dependencies, oftentimes to their own detriment. The case of writing your own assert library isn't that wild. Most projects only need ~10 different assertions, and you could pretty easily make the argument that importing a library for 10 simple functions is equally odd.
YouTube video
YouTube
English
0
0
1
18
Maksim
Maksim@nablatnoyvolne·
@joncalhoun I don't understand this philosophy. "We won't use an external library with assertions, but we'll write our own (probably worse one)" From my observations, this approach is only formed in the Golang community. I haven't encountered it in any other language.
English
1
0
0
36
Jon Calhoun
Jon Calhoun@joncalhoun·
💡 In Go tests, mark helper functions like assertEquals and doRequest with t.Helper() This causes the Go tooling to point to the line where the function was called rather than a line in the helper function, which makes it easier to debug a failing test. #golang
Jon Calhoun tweet media
English
6
9
118
5.2K
Jon Calhoun
Jon Calhoun@joncalhoun·
Example: Let's say I have 100 new PPP customers. That means I need to support 100 more users. If I don't have a support staff, chances are 100 PPP sales don't bring in enough $ to hire someone. Instead, I need to take time away from growing the biz to provide support. Not great. On the other hand, if I have a dedicated support person, 100 new customers probably won't overwhelm them, so PPP might be more viable here.
English
0
0
1
490
Jon Calhoun
Jon Calhoun@joncalhoun·
@mattyp @sarahzorah @Padday @intercom Some of these roles pay less than pure tech positions, which seems counterintuitive if you want someone who is both technical and has marketing skills. Feels like once someone has enough technical skills they are better off moving to a tech role.
English
0
0
0
112
matt palmer
matt palmer@mattyp·
There is insane demand for people who can understand and explain technology in a compelling way.
English
1K
1.3K
16.7K
3.5M
Jon Calhoun
Jon Calhoun@joncalhoun·
@orimdominic_ It can be useful for any helper functions. Setup, teardown, a doRequrest helper to perform an http request, etc.
English
0
0
1
47
O. Dominic
O. Dominic@orimdominic_·
@joncalhoun Do you still need to use this if yo don't have assert helper functions?
English
1
0
0
109
Jon Calhoun
Jon Calhoun@joncalhoun·
Sometimes orgs/people don’t want to import a big library, and instead they build a small assertion library that they use internally. This advice also applies to set up and tear down functions, along with other helpers. Basically any scenario where you’d rather the test output point to the caller when an error is encountered.
English
1
0
1
99
Maksim
Maksim@nablatnoyvolne·
@joncalhoun Do people write custom asserts like this in real projects? I thought it's just for tutorials. In real code, I only see libs like stretchr/testify
English
1
0
0
155
Jon Calhoun
Jon Calhoun@joncalhoun·
@vitu_dev I’ve been trying it out for a month or so and plan to write up some comparisons in the future.
English
1
0
1
76
Jon Calhoun
Jon Calhoun@joncalhoun·
There are two ways to create paths in Go depending on your needs. 👉 Constructing a file path in Go? Use filepath.Join from the path/filepath package to get OS-specific separators. 👉 Constructing a slash-seperated path, like a URL? Use path.Join from the path package to get the same results regardless of OS. These may appear to be identical if running a unix-based OS, but they will behave differently in a Windows environment. #golang
Jon Calhoun tweet media
English
0
0
31
1.5K
Jon Calhoun
Jon Calhoun@joncalhoun·
Is there a #golang playground that simulates running code on Windows? Would be nice for demonstrating OS-specific differences, but I recognize it is a pretty niche.
English
0
0
5
1.3K
Jon Calhoun
Jon Calhoun@joncalhoun·
I'm guessing the blog posts just falsely assumed that it would work without testing, but hoping to verify that. The source code appears to use straight string matching via a map key.
English
0
0
1
500
Jon Calhoun
Jon Calhoun@joncalhoun·
The CrossOriginProtection added in Go 1.25 doesn't appear to support wildcard subdomains (https://*.calhoun.io) for trusted origins, yet I've had a few people point me to blog posts that use a wildcard example. Am I missing something? #golang
English
1
0
13
1.6K
Jon Calhoun
Jon Calhoun@joncalhoun·
GoLand users - what are your favorite features and tips? I’ve been trying it out to do a bit of a comparison, but I want to hear from #golang developers who have been using it for a bit.
English
7
1
18
2.8K