For a big overview I like to grab a book. It probably seems old-fashioned, but when someone writes a technical book they commit to the topic for a really long time. This often means they give you examples that are more built out. When I first looked at books on Amazon I saw some from my favorites for other languages - namely “Kotlin in Action” and “Head First Kotlin”. Both books are seriously out of date. Old books don’t really surprise me. It is really hard to keep books up to date when the tech underneath them continues to evolve. I imagine it is better to have new versions of a language and old books, then old both.
I was interested in looking at:
Functional Programming in Kotlin since that is my preferred paradigm these days.
I also saw a very positive review for Kotlin In-Depth - it looks like this used to be two books, and it has been merged into a single updated volume.
How to Build Adroid Apps with Kotlin Since Android apps is really my main focus - this is the sort of book that combines the learning while you apply it - which usually results in a better outcome.
I noticed that all the books had very few reviews. I’m going to plunge ahead into the free resources and if I find myself enjoying Kotlin I’ll come back for these.
Since the language was created by JetBrains I figured they might be a good place to start for resources. I found a Learn Kotlin at JetBrain Academy This lead me to a free core Kotlin course that was hosted at HyperSkill.org. I started down the path as was quickly disappointed. The course is free but
very annoying. Basically on the free plan you get the course. You read some content then you take a quiz. You can only answer 10 quiz questions a day. I have completed two days and I’m still at the part of Kotlin training where they explain there is a var,val, and const. This isn’t going to work.
The Kotlin Lang site actually has a good getting started page. You can pick what you are going to do with Kotlin, and they point you from there. I picked Android App, and they offered to send me off to Google (I had already started something there which I’ll link to in a second). They also pointed me at udacity - Developing Android Apps with Kotlin.
On the first page of the course, it has a small message on the first class -
1 | In order to take full advantage of this course, we recommend |
So of course I continued the yak shave by adding Kotlin Bootcamp for Programmers Course. I haven’t had a chance to start it, so we will see if it is better than the Hyperskill course.
While I was looking at all this I started a simpler course from Google Build Your First Android App in Kotlin. I managed to finish it. It quickly taught me some important things about working in this environment.
After messing around I got the app to work. I even shared out the version that works now My First Kotlin App. This was simple 10 step lesson with two screens and 4 buttons. There was a hell of a lot of fiddling involved. Now I’m more surprised that React Native worked at all. The amount of stuff they are trying to insulate the developer from is truly mind-boggling.
]]>That means I’d like to look at some other languages or programming environments. I briefly considered going into TypeScript. I ended up deciding I’ll look at really work on it when I’m on a team again. Especially after having it summarized as a linter by a big fan.
When I built my last mobil application I used React Native. The goal was to avoid getting bogged down in the details of the mobile platform and be able to re-use all my web skills. As the build manager for the project, I often ended up in situations where I couldn’t tell if the problem was the React Native environment or something about my mobile environment. I made a note at the time that maybe it would be useful to learn more mobile native. so I could at least see the seams between the two.
I’ve avoided Java for most of my career. I did C/C++ when I started out. Once I got access to dynamic languages I never looked back. I took a run at Objective-C once and I just did need it enough at the time to power through all the things about it that drove me nuts.
Modern mobile development seems to have caught up to the idea that maybe Java/Objective-C aren’t the answer for everyone. Now you can build in Swift and Kotlin. I might have thought about Swift, but I have an Android phone and Linux desktop, so it wasn’t really that big of a leap to pick Kotlin.
I’ve spent the last several years in Elixir land. It has had a really profound effect on the way I tackle problems even when I’m not writing Elixir. I’ve seen several languages claim to be multi-paradigm.
From Kotlin Lang Website
1 | Kotlin combines all the major programming paradigms in an elegant way, |
I’m suspicious of the claims. I read a whole book where they said you could do JavaScript in a functional style, but the amount of work made it feel like it was a fool’s errand. Again, I’ve been really spoiled by Elixir on concurrency and parallelism. But if the only way to sort the fact from fiction is to take the plunge.
So I guess I’m learning Kotlin
]]>We have been through a lot of different setups to build and run react apps. We have:
I was hoping that last one was going to stick, but NextJS 13 + SSR + AppRouter has just made things harder
in SPA land. So I started looking for something else. I ended up getting guided to Vite.
I needed to migrate/remove a bunch of stuff to make our SPA work with Vite. Basically we had modified a lot of the entry
points to make it more compatible with NextJS. We didn’t need a bunch of wrapper projects and other stuff we used to adapt
to NextJS. It also looks like get to defer the use of “use client” since I’m not turning SSR on in Vite.
Most of the changes were just renaming files from .js -> .jsx (Vite cares a lot about file endings).
I was really starting to enjoy the Vite environment when I hit a big wall. As I started to move more to the app over,
Chrome would either spin forever or crash with segfault. This was unbelievably frustrating! I thought that Vite was hitting
a circular dependency that was buried in the code, but after using some tools to look for them that was the problem.
I searched for “vite chrome spinning forever” and I found this bug. It looks like this
problem was happening at the OS level. I was blaming Vite the whole time but it is a open file setting that caused the problem.
Since it was happening at such a low level none of my webstack gave me any info to debug. I tried to follow the directions in the
report but there were extra steps needed for Ubuntu.
For Ubuntu 22.10 I needed to modify three files to get things to apply:
In the /etc/security/limits.conf
1 | * soft nproc 65535 |
in /etc/systemd/system.conf
DefaultLimitNOFILE=65535:524288
in /etc/systemd/user.conf
DefaultLimitNOFILE=65535:524288
reboot
Once you are logged in you can use this command:
ulimit -a |grep open
This should confirm that the limit has taken effect.
1 | delmendo@cu:~$ ulimit -a |grep open |
Now I get to get back to work on moving from Redux(https://react-redux.js.org/) -> Zustand(https://github.com/pmndrs/zustand)
]]>We create software systems that make people’s lives easier.
Computers do certain things very well—mostly repetitive and boring.
People do other things very well—mostly creative and exciting.
Software and technology, in general, should make sure everyone is doing the right job.
We have assembled a small, agile team delivering software that can be quickly adjusted to customer feedback.
We create web-based apps with a ReactJS frontend talking to an elixir backend, CQRS-style if needed, over GraphQL.
We take on:
Here’s how they can do it. First, they can work with cities to help build more housing, which would reduce housing prices. They can support efforts to liberalize outdated zoning and building codes to enable more housing construction, and invest in the development of more affordable housing for service and blue-collar workers.
Second, they can work for, support, and invest in the development of more and better public transit to connect outlying areas to booming cores and tech clusters where employment is—and to spur and generate denser real estate and business development around those stops and stations.
Third, they can engage the wider business community and government to upgrade the jobs of low-wage service workers—who now make up more than 45 percent of the national workforce—into higher-paying, family-supporting work.
]]>