Cleaner code with strictness
Writing clean majestic code is something I think we should all strive for in our work and it is important to me. The age-old Code is read more than it is written is a good reason to be writing clean code. This post is about how I have found strictness to be a great tool in the effort to write clean code.
Elasticsearch flakiness in tests
Elasticsearch is an awesome tool for building fast and powerful search experiences. However integration testing with Elasticsearch can be painful. Elasticsearch uses a HTTP REST API to modify, setup, and search indices. The nature of this API is eventually consistent, creating an index will not be done when the HTTP call returns. This eventual consistency can become painful in test since creating, indexing, searching and then removing the index needs to happen in rapid succession.
A new home
I finally took the time to move this site to s3 instead of my previous setup with a digitalocean droplet.
ActiveModel Serializers and caching
We have recently started using ActiveModel::Serializer at FishBrain in favour of jbuilder. During this ongoing switch we have had to deal with a few issues mainly regarding to caching. If you haven’t used ActiveModel::Serializer before I would recommend you check it out.
Starting Open Source
Today I am writing about my experience starting out with open source contributions over at the CocoaPods blog.
You should force push more
Git’s force push feature is the source of a lot of controversy and errors. It’s widely considered to be dangerous and left for use only in extreme situations. I use it every single day.
Custom Control Structures in Swift
Apple’s new language
Swifthas some really nice syntactic sugar for common operations. One of the new features is closures which are similar to blocks in Objective-C, but they have a few tricks that blocks don’t have. When the last argument to a function is a closure it’s possible to put it outside the parenthesis of the call to the function. This makes it possible to write control structures which look(almost) identical to the normal control structures.
You are not the average user
In the latest version of Chrome Canary Google has removed the full URL from the omnibar and instead shows only the domain and HTTPS info. The same feature was introduced in Mobile Safari with iOS 7. This is a good thing. As Jake Archibald outlines in this blog post the new omnibar protects the user from phishing attempts while improving the user experience and hiding the non-vital information in the URL.
My names is Hugo Tunius, as you’re reading this you’ve found my website. This website will slowly be filled with my code, experiments, reflections and thoughts.