Alexey Inkin | Flutter GDE
687 subscribers
29 photos
1 video
69 links
Download Telegram
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.
πŸ‘6πŸ”₯2❀1
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
πŸ‘3πŸ”₯3
This media is not supported in the widget
VIEW IN TELEGRAM
πŸ₯°14πŸ‘8πŸ”₯3πŸ‘3
Celebrating the 500 subscribers here. πŸ˜‡
πŸ‘12πŸ”₯6πŸ‘1
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
Alexey Inkin | Flutter GDE
This media is not supported in the widget
VIEW IN TELEGRAM
πŸ‘11
For ages, I had this slug on my LinkedIn: alexey-inkin-784b7371
I 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
πŸ‘2πŸ‘Ύ1
My 24th Dart package:
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.
πŸ‘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.
πŸ‘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.
πŸ‘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
πŸ”₯5πŸ‘4
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
πŸ”₯2
I have re-written enum_map package with macros. This package takes an 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.
πŸ‘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 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