I promised some advice on writing and publishing when I cross 1000 followers on Medium. While I was writing it, it's 2300 already. π€
Anyway, here it is: https://medium.com/@alexey.inkin/how-i-gained-2000-followers-on-medium-and-how-you-can-do-it-faster-96435042ebf7
It shows crucial charts that are not available on Medium. For them, I wrote a custom script, and it is available on my GitHub.
Anyway, here it is: https://medium.com/@alexey.inkin/how-i-gained-2000-followers-on-medium-and-how-you-can-do-it-faster-96435042ebf7
It shows crucial charts that are not available on Medium. For them, I wrote a custom script, and it is available on my GitHub.
Medium
How I gained 2000 followers on Medium, and how you can do it faster
How I gained that audience in two years. How to measure important metrics that Medium does not show you. How to get a boost.
π6π₯2β€1
After my retrospective article, people were asking me how to switch from PHP to another language while minimizing the drop in salary. Here you go:
https://medium.com/@alexey.inkin/how-to-switch-from-php-and-to-what-a740623bfae5
https://medium.com/@alexey.inkin/how-to-switch-from-php-and-to-what-a740623bfae5
Medium
How to switch from PHP, and to what
I was a PHP programmer for 17 years and then switched. How to avoid salary drop when doing that? And how to choose your next language?
π8
Ever wanted to make your backend in Dart? Seen HOWTOs on simple HTTP handlers but still don't know how to make more complex architecture? Here is a tutorial on making just that, end-to-end:
https://medium.com/@alexey.inkin/backend-in-dart-creating-a-pub-sub-handler-in-gke-fcd1396f0d6b
https://medium.com/@alexey.inkin/backend-in-dart-creating-a-pub-sub-handler-in-gke-fcd1396f0d6b
Medium
Backend in Dart: Creating a Pub/Sub handler in GKE
How to write a simple microservice in Dart, wrap it in a Docker container, build in Cloud Build, and deploy to Google Kubernetes Engine.
π3π₯3
Dart 3.3 is out! Go get it with Flutter 3.19.
Traditionally, I was posting an article with new lints for each new Dart version:
3.2: https://medium.com/flutter-senior/the-new-lint-in-dart-3-2-287dbddede51
3.1: https://medium.com/flutter-senior/the-2-new-lints-in-dart-3-1-7ff35434d5f9
3.0: https://medium.com/flutter-senior/the-6-new-lints-in-dart-3-0-bfe174c169d1
2.19: https://medium.com/flutter-senior/the-8-new-lints-in-dart-2-19-765a331139a2
2.18: https://medium.com/flutter-senior/the-3-new-lints-in-dart-2-18-113354ec641e
However, in this version there are no new lints. Dismissed. Good night.
Traditionally, I was posting an article with new lints for each new Dart version:
3.2: https://medium.com/flutter-senior/the-new-lint-in-dart-3-2-287dbddede51
3.1: https://medium.com/flutter-senior/the-2-new-lints-in-dart-3-1-7ff35434d5f9
3.0: https://medium.com/flutter-senior/the-6-new-lints-in-dart-3-0-bfe174c169d1
2.19: https://medium.com/flutter-senior/the-8-new-lints-in-dart-2-19-765a331139a2
2.18: https://medium.com/flutter-senior/the-3-new-lints-in-dart-2-18-113354ec641e
However, in this version there are no new lints. Dismissed. Good night.
π’1
This media is not supported in the widget
VIEW IN TELEGRAM
π₯°14π8π₯3π3
On this day, 20 years ago, I launched my first commercial website, GetSoft.ru, a software marketplace. I deem this the most useful thing I did for myself in the long run although it failed in a few years. It de-trenches your mind from just coding. It gives the sense that you can start your own thing, a sense of business and economy, which adds to any equation you will have for the rest of your life. I highly recommend doing something like this in a young age.
π15π―6
For ages, I had this slug on my LinkedIn:
I thought that's because just
https://www.linkedin.com/in/alexey-inkin/
Go check yours if it's long and messy. Simple URLs are important for marketing.
It's a free feature. Here's how to change your URL:
https://www.linkedin.com/help/linkedin/answer/a542685/manage-your-public-profile-url?lang=en
Also, your default URL will always be with you, so no one will get 404.
alexey-inkin-784b7371I thought that's because just
alexey-inkin was busy. Today I checked, and it wasn't! So I changed to this:https://www.linkedin.com/in/alexey-inkin/
Go check yours if it's long and messy. Simple URLs are important for marketing.
It's a free feature. Here's how to change your URL:
https://www.linkedin.com/help/linkedin/answer/a542685/manage-your-public-profile-url?lang=en
Also, your default URL will always be with you, so no one will get 404.
π9
Are you writing CI/CD workflows for Google Cloud? Here's one thing you should know about. If you have a permission to grant anything, it's never limited to the permissions you have yourself.
I'm now writing the second part of my article on the backend in Dart, and this came as a surprise to me, so I took the time to write this out:
https://medium.com/@alexey.inkin/the-3-permissions-in-google-cloud-you-can-escalate-to-do-anything-f312bb8ab5e7
I'm now writing the second part of my article on the backend in Dart, and this came as a surprise to me, so I took the time to write this out:
https://medium.com/@alexey.inkin/the-3-permissions-in-google-cloud-you-can-escalate-to-do-anything-f312bb8ab5e7
Medium
The 3 permissions in Google Cloud you can escalate to do anything
Think you can only grant access that you have yourself? Thatβs not the case. Here I show examples to give you permissions you didnβt have.
π2πΎ1
My 24th Dart package:
https://pub.dev/packages/wif_workaround
A workaround to use Workload Identity Federation with
You normally use
This package allows you to use Workload Identity Federation if you have locally installed gcloud CLI.
https://pub.dev/packages/wif_workaround
A workaround to use Workload Identity Federation with
googleapis_auth, calls gcloud CLI to get the access token.You normally use
googleapis_auth package to connect to Google Cloud services. It works with service account keys and metadata server, but not with local keys obtained with Workload Identity Federation.This package allows you to use Workload Identity Federation if you have locally installed gcloud CLI.
Dart packages
wif_workaround | Dart package
A workaround to use Workload Identity Federation with googleapis_auth,
calls gcloud CLI to get the access token.
calls gcloud CLI to get the access token.
π4π₯3β€1
Part 2. Earlier we made a simple container and deployed it manually. Time to automate things and take it to the production level:
https://medium.com/@alexey.inkin/making-github-workflows-to-deploy-to-gke-with-terraform-and-workload-identity-federation-074ac83b899c
This tutorial:
- Creates persistent environments.
- Uses Terraform for declarative management of cloud resources.
- Uses GitHub Workflows to automate deployment.
- Creates transient copies of the system to run tests on them.
- Uses Workload Identity Federation to avoid any use of service account keys.
DevOps is surprisingly hard, and it took me 1.5 months to learn and write this. These GitHub workflows failed 108 times for me while debugging, so this should save you tons of try and errors.
https://medium.com/@alexey.inkin/making-github-workflows-to-deploy-to-gke-with-terraform-and-workload-identity-federation-074ac83b899c
This tutorial:
- Creates persistent environments.
- Uses Terraform for declarative management of cloud resources.
- Uses GitHub Workflows to automate deployment.
- Creates transient copies of the system to run tests on them.
- Uses Workload Identity Federation to avoid any use of service account keys.
DevOps is surprisingly hard, and it took me 1.5 months to learn and write this. These GitHub workflows failed 108 times for me while debugging, so this should save you tons of try and errors.
π4π₯2
β What would be the best way to implement CI/CD for flutter apps?
π °οΈ The most tricky part in CI/CD is automated testing. Otherwise, just building and deploying is relatively easy. Then, testing on the Flutter's part isn't hard. In most apps, all you need is click through some use cases. Much harder is the backend to which your app talks. You typically need a copy of the system with its storage, message queues, and all the rest. What of that you can isolate or mock varies widely. So start your CI/CD with the backend. When it's done, its specific architecture usually will hint a straightforward way to add Flutter or any other client on top of it.
See the recent article for the example for the backend.
π °οΈ The most tricky part in CI/CD is automated testing. Otherwise, just building and deploying is relatively easy. Then, testing on the Flutter's part isn't hard. In most apps, all you need is click through some use cases. Much harder is the backend to which your app talks. You typically need a copy of the system with its storage, message queues, and all the rest. What of that you can isolate or mock varies widely. So start your CI/CD with the backend. When it's done, its specific architecture usually will hint a straightforward way to add Flutter or any other client on top of it.
See the recent article for the example for the backend.
π6
I made a tiny package to dump the last HTTP request. It helps a lot in debugging failed requests.
https://pub.dev/packages/http_log
https://pub.dev/packages/http_log
Dart packages
http_log | Dart package
A logger for HTTP requests, stores the last request, can pretty-print it in cURL or raw
π₯5π4
My new article: The 2 new lints in Dart 3.4.
https://medium.com/p/5596edbf3746
https://medium.com/p/5596edbf3746
Medium
The 2 new lints in Dart 3.4
Improve your documentation formatting and clean up deprecated βpart ofβ directives.
π₯3
Playing with Dart 3.5 macros already? I made a CLI tool to show augmentation for a given source file if your IDE is buggy or does not yet support macros:
https://pub.dev/packages/show_augmentation
https://pub.dev/packages/show_augmentation
π₯2
Playing with Dart 3.5 macros already?
Anonymous Poll
8%
I made my own macros already
3%
I tried JsonCodable and want to make my own macros
0%
I just tried JsonCodable
32%
I've heard about Dart 3.5 macros and want to try them
29%
Wow, I never heard of Dart 3.5 macros
29%
I don't care / will wait until it's stable
A first hands-on with custom macros: https://medium.com/@alexey.inkin/creating-your-own-macro-instead-of-code-generation-in-dart-3-5-27274f8a5bf6
Medium
Creating your own macro instead of code generation in Dart 3.5
What a macro is, how it works, learning from JsonCodable macro, and creating our own hello-world macro.
π₯2β€1
I have re-written enum_map package with macros. This package takes an
The most straightforward use of the package is to make sure your Flutter tabs never fall out of sync with the tab controller and tab headers. I use it in every Flutter project in the last ~2 years. The highest it made to is Apache Beam with 7.7k stars. More in my article "Compile-time safety for Flutter tabs" from before.
With macros, you no longer need code generation with build_runner. You just add an annotation to an enum and instantly get the map class ready to use.
Check out the pre-release version.
enum and creates a map class that gives you a compile-time guarantee that the map has an entry for each of the enum constants. No more bangs after getting a value from a map.The most straightforward use of the package is to make sure your Flutter tabs never fall out of sync with the tab controller and tab headers. I use it in every Flutter project in the last ~2 years. The highest it made to is Apache Beam with 7.7k stars. More in my article "Compile-time safety for Flutter tabs" from before.
With macros, you no longer need code generation with build_runner. You just add an annotation to an enum and instantly get the map class ready to use.
Check out the pre-release version.
Dart packages
enum_map | Dart package
A Map with compile-time check that every enum constant has an entry in it.
π11π₯1
Every time I think something is too trivial to go with classes I end up rewriting it with classes. Tomorrow I will lose 1 hour changing
There is "Domain-Driven Development" (DDD) principle. It says to create a classes for logically distinguished things. For instance, you should have classes
Don't neglect DDD.
List<double> into TimeSeries because it "suddenly" needed to be aware of timestamps.There is "Domain-Driven Development" (DDD) principle. It says to create a classes for logically distinguished things. For instance, you should have classes
Password, Url, Username, etc. and not use just String for them. If I followed it and created TimeSeries from the beginning since I was dealing with a time series, I would have saved 1 hour of my life.Don't neglect DDD.
π7β€5