Mutability was the "trillion-dollar mistake" and more hot-takes on my podcast:
@HappyPathProg
Disclaimer: I work for
@AWSCloud
& my opinions are my own.
If SQL were built on YAML
SELECT:
- num
- name
FROM:
- customers
WHERE EXISTS:
SELECT:
- name
FROM:
- orders
WHERE:
AND:
- EQUALS:
- customers.num
- orders.customer_num
- LT:
- price
- 50
After 3 years at Google Cloud, I'm moving from one dream job to another. Starting today I'm a Product Manager for Kotlin (still at Google), helping make Kotlin even more awesome. Really looking forward to this new adventure - let me know if there is anything I can do for you.
Most underrated thing about Open Source is skill portability. When teams use proprietary frameworks there is a huge cost to on-boarding. Also developers don't want to invest time learning something that has zero transfer to their next job.
Code reviews that include code style feedback are a total waste of time. Just add an auto-styler / formatter to the code submission process. If styling can't be automated, it's not worth caring about.
Serverless with Cloud Run is awesome sauce! And you know what makes it better?? Commandless! Add a deploy button to your README so users can deploy a repo in two clicks:
With Scala I've learned many programming language idioms that are now essential for me, including: ADTs, expression-orientedness, parametric polymorphism, parametricity, bifunctor IO, referential transparency, immutable data, type inference, pattern matching, do notation.
Woah! What an incredible and unexpected honor! So thankful for all of the amazing people who've been part of my programming journey - now 25 years of working with the Java platform. Looking forward to another 25!
Apparently people are debating Gradle vs Maven. But let’s be honest, we just want a world where we don’t have to think about build tools. I’ve spent years of my life fighting with Ant, Maven, and Gradle. And despite the challenges, Gradle with the Kotlin DSL is my tool of choice.
Thankful for Scala exposing me to many programming concepts being adopted by other languages:
- Functions
- Pattern Matching
- Algebraic Data Types
- Expressions (vs Statements)
- Type Inference
I may not be using Scala in 10 years but I'll likely be using these concepts.
Apr 1 is a tricky day to announce big news, but here goes... Today is my first day as a Developer Advocate at Amazon! Having been an AWS user for 15 years, I'm thrilled to join this exceptional team and contribute to improving the service while helping you get the most out of it.
My Google search rates when working with different programming technologies:
Java = 1/hour
Scala = 5/hour
JavaScript = 20/hour
RegEx = 1/minute
Bash = Too many to count
I know very few people who have really used Kotlin or Scala and been happy going back to Java. Not saying people shouldn’t stick with Java, but to say Kotlin and Scala are going away because Java got records isn’t representative of those who have made the switch.
Many years ago I switched from Eclipse to IntelliJ IDEA but have never paid for it (thanks
@jetbrains
) - until today - because I wanted to express my gratitude for the huge productivity boost it has provided me.
"Dockerfiles are easy" they said. Then I had to handle proper caching, proper security, proper reproducibility, proper config management, proper portability, and proper reusability. Turned out to not be so easy.
Buggy software is predominantly caused by “happy path programming” where languages / frameworks make it too easy to ignore the error conditions that can never happen.
I've been learning Kubernetes and started with "the hard way" (to learn) using
@kelseyhightower
's guide:
Now that I've done it the hard way, I wrote down "the easy way" with
@GCPcloud
:
Almost 5 years ago, amid numerous claims that Java was dying, I wrote about 10 ways we could use it better to avoid the downfall:
Well, Java is not dead and the mainstream has embraced pretty much everything I wrote about. Let's see how...
Service Oriented Architecture -> Service Mesh
Web Service -> Micro Service
XML -> JSON
WSDL -> Swagger
SOAP -> Protobuf
WS-* -> OpenAPI
Service Registry / UDDI -> Open Service Broker API
Direct Binding -> Sidecars
Messages -> Cloud Events
ESB -> Data Pipelines / Stream Processing
I don't know who needs to hear this, but it is an anti-pattern to deploy to prod from: an IDE, a command line, or a web UI.
Sure, if you are kicking the tires on something / learning, go for it. But for real stuff, setup a CI/CD pipeline.
Think Java starts too slow for Serverless? Well, I gave the new Spring Native 0.11 release a try and in ~5 minutes I went from to a Serverless Java app running on Cloud Run with sub-second startup times. Check it out:
I really believe that in 10 years the terms “immutability, referential transparency, ADTs, monads, and effects” will be as common as “inheritance, for loops, and exceptions“ are today.
Mutable programming creates a multi-dimensional graph of possible states. I've finally realized that I can't grok the number of possible states in most programs. This is why I prefer immutable programming where state is a more comprehensible tree.
Maybe we should rename Scala 3 to Python 4. Seems like a win-win for both communities: Python gets a sound type system. Scala doesn’t have to deal with the backlash to major language changes.
Serverless users: I don’t want to think about servers and I want scale to zero.
Also Serverless users: OMG these cold starts!! Can I get some server instances to avoid this??
Serverside Kotlin is on🔥!
Enterprises don't often talk about the tech they use so it is cool to see two Reddit threads where many finserv and other enterprises share about their modernization with Kotlin & Spring Boot:
So far this week I've programmed in Scala, Kotlin, Java, Groovy, Python, JavaScript, Go, and Bash. Realized that my enjoyment of a language is based on:
1) how algebraic / lawful it is
2) how good the tooling is (build system & IDE)
3) how quickly I can get to validated bug-free
Every.builder(should).just(be).a(constructor).build()
// in languages with named params & default values
//
// Goals: prefer immutability & make illegal states unrepresentable
PSA: If you open source something and then someone asks you for something more, it is totally within your rights to say no. If someone has a problem with that, it is their problem.
Me: What is Infrastructure as Code?
Them: It's like code but your infrastructure.
Me: Oh cool! So I can test my CI & prod setups just like I test my application code?
Them: Well...
Just blogged "Comparing containerization methods: Buildpacks, Jib, and Dockerfile" with some GraalVM thrown in because who doesn't like 11MB container images for Java apps?
Woah, now that I'm using it... the new Full Line Code Completion in IntelliJ IDEA 2024.1 is nearly everything I've wanted from an LLM! I might now be a 1.0x developer. (up from a 0.63x developer cause I'm very picky about my code) Thank you
@jetbrains
!
If you want developers to LIKE your library/framework/language/service, have good docs. But if you want developers to LOVE your stuff, have good / directive error messages. This is probably the biggest reason why so many developers love Rust.
With your language & library of choice, how hard is it to race two concurrent http requests with loser cancellation, resource management (pool acquire & release), async/non-blocking IO, explicit timeouts, typed error handling, and comprehensive unit tests?
In under an hour I went from "I need a little sample data server" to "up-and-running on the cloud with instant startup" using Ktor, Kotlin/Native, GitHub Actions, and Cloud Run.
1. Created the app
2. Added SIGTERM handling with suspendapp-ktor
3. Containerized with Jib
4. Setup…
Just blogged about my journey to a globally distributed, scale-on-demand, edge-cached, webapp; bringing together: GraalVM Native Image, Scala, Buildpacks, GitHub Actions, Cloud Run, and a bunch of other stuff.
Yeah, using Linux on the Desktop has some challenges but I’m sure glad Java has never been broken with an OS update. And I’ve been using these two together for 27 years.
Everyone is like “you gotta try Rust” and I was almost convinced… Until I read:
I’m sticking with Kotlin Coroutines and Scala + ZIO. Both are monumentally better programming models for async. Or maybe now there’s an effect system for Rust?
Quarkus has been driving some pretty amazing innovation in developer experience. Their dev mode console and Testcontainer support is next level. The Kotlin support has also improved quite a bit. Kudos to the team!
Holy crap! I just made a Kotlin/Native Linux binary that is only 226k (74k compressed)! Yeah, that is still "large" in the native realm but:
a) there hasn't been much effort for Kotlin/Native to reduce sizes
b) this is a modern, app-level language that works on many platforms
I don't really need Copilot to write code for me, I need it to maintain my code. Dependabot upgrades should come with the code changes. Security & performance issues should have automated patches.
Things that should not appear in Java code in 2019:
- Anonymous Inner Classes
- Getters & Setters
- Mutating loops that can be lambda-based collection operations (map, reduce, filter, etc)
It continues to amaze me how much more productive I am when I separate data transformations from fetching / updating data. And I get more reliable, composable, and testable pieces.