vknabel
Valentin Knabel
Developer, cyclist, coffee nerd, human. Open Source, kindness, honesty, vegan. It is fine to be imperfect, as long as we are honest and have fun along the way.
Top Words
- swift
- code
- hugo
- swiftui
- async
- simple
- reminder
- manager
- debugging
- vapor
- angular
- language
All posts (109)
This is planned to be a series of blog posts about designing and developing my own programming language, where I want to share some pitfalls, my learnings, design decisions, experience and the development process. While this series will not teach you how to write your first own programming language on its own, it...
When iterating over an array of objects in Angular, the change detection compares the references of the objects to detect changes. If the object reference now change too, like when updating local data from the network, Angular will discard the identity of all nested components within the ngFor and re-render the...
You can run your Go program or your tests with the Data Race detection enabled. This might cost some performance and memory, but in case a data race is being detected, that’s worth it! Perfect for your CI! go run --race ./cmd/app go test --race ./...
I have never done anything productive with Kubernetes before. But it is a really tough topic to get started with. It’s overwhelming. Luckily I found an excellent Kubernetes tutorial on Youtube. I made some personal notes while watching. Mostly to keep some overview for all the different concepts. Today I haven’t...
Iterating over a map in Go is not predictable. This is a design decision to avoid relying on memory layout. for k, v := range map { // always prints different results! fmt.Printf("%s: %s\n", k, v) }
I had completely forgotten about NSDataAsset. Maybe I should move some of my JSON files into asset catalogs. According to @emergetools that should remove some code signing overhead from the app size. Tweet by @simonbs
When using auto layout with a UIScrollView, subviews may not attach to the top edge of the scroll view’s parent. Else you cannot scroll, but the handle shrinks the more you scroll. Setting left and right is ok to fix the width if you do not plan to scroll horizontally.
Starting with Swift 5.6 the Swift Package Manager can automatically detect Breaking API changes. Really great for libs! https://twitter.com/fabianfett/status/1504393754412822530?s=12
Async tests do not work on Linux, only on macOS. Instead you need to implement a helper function that runs the test async by relying on expectations. https://www.swiftbysundell.com/articles/unit-testing-code-that-uses-async-await/
Cookies in WKWebView are broken. When manually setting a Cookie using the Configuration, it will be ignored by the web view. Workaround: add a UserScript with the following code: document.cookies = 'cookie_optin=essential:1|analytics:0' That’s a great way to automatically reject Cookies and especially to disable...
Sometimes you need your local IP address on the command line to automatically pass it to a script. ifconfig en0 |awk '/inet / {print $2; }'
If the default Table Of Contents / Index Set for iOS does not fit your use cases. This library might be interesting: https://iosexample.com/table-of-contents-selector-built-with-swift/
Page 5 of 10