SwiftUI by Example – Free Course on SwiftUI

Paul Hudson, creator of Hacking with Swift:

Yes, that’s a full course on SwiftUI already available online, for free!

Sections include:

  • Introduction: A brief explanation of the basics of SwiftUI
  • Text and Images: Getting started with basic controls
  • View Layout: Position views in a grid structure
  • Reading input: Respond to interaction and control your program state
  • Lists: Create scrolling tables of data
  • Containers: Place your views inside a navigation controller
  • Alerts and action sheets: Show modal notifications when something happens
  • Presenting views: Move your user from one view to another
  • Transforming views: Clip, size, scale, spin, and more
  • Animation: Bring your views to life with movement


SwiftUI by Example →

TIP: Do note that the order of statements in SwiftUI is important:

React Hooks: When to useMemo and useCallback

Insightful post by Kent C. Dodds on the costs and benefits of React’s useMemo and useCallback.

We hear a lot that you should use React.useCallback to improve performance and that “inline functions can be problematic for performance,” so how could it ever be better to not useCallback?

Just take a step back from React and consider this: Every line of code which is executed comes with a cost.

Measure, and optimize responsibly.

When to useMemo and useCallback →

PHP Insights – Analyze the Code Quality of your PHP Projects

PHP Insights is a Static Analysis Tool for your PHP code. It contains built-in checks for making code reliable, loosely coupled, simple, and clean. Works out-of-the-box with the current set of popular frameworks.

# First, install:
composer require nunomaduro/phpinsights --dev

# Then, use it:

PHP Insights →

The North Face – Top of Images

When you first start planning a big trip, step one will likely happen at the Google search bar. Step two might be clicking onto the images of your target destination. The North Face, in a campaign with agency Leo Burnett Tailor Made, took advantage of this consumer behavior to keep its name top of mind with travelers considering an adventure sports excursion.

What they did was replace photos for famous locations on Wikipedia with their own photos, which had The North Face brand clearly visible in them. That way the brand would appear in the top of Google image search results when consumers researched any of those locations.

A plan so cunning you could put a tail on it and call it a weasel! Except: they bragged about it online, and thus Wikipedia moderators took action by replacing the photos, or cropping the uploaded photos so that the logos were no longer in view …

The North Face – Top of Images →
Wikimedia Foundation: Let’s talk about The North Face defacing Wikipedia →

Unraveling the JPEG

“Unraveling the JPEG” is a great deep dive into the JPEG image format.

This article is about how to decode a JPEG image. In other words, it’s about what it takes to convert the compressed data stored on your computer to the image that appears on the screen. It’s worth learning about not just because it’s important to understand the technology we all use everyday, but also because, as we unravel the layers of compression, we learn a bit about perception and vision, and about what details our eyes are most sensitive to.

Comes with interactive editors which allow you to adjust the JPEG data, and directly see how it affects the image.

Great stuff to play with!

Unraveling the JPEG →


Yesterday, next to revealing a $999 monitor stand, Apple announced SwiftUI which got me quite excited.

SwiftUI is an innovative, exceptionally simple way to build user interfaces across all Apple platforms with the power of Swift. Build user interfaces for any Apple device using just one set of tools and APIs. With a declarative Swift syntax that’s easy to read and natural to write, SwiftUI works seamlessly with new Xcode design tools to keep your code and design perfectly in sync.

The code samples feels very React Native like imho:

List(landmarks) { landmark in
   HStack {
      if landmark.isFavorite {
         Image(systemName: "star.fill")

As @orta noted:

SwiftUI →

🤔 Wondering how fast one could build stuff when SwiftUI is combined with the also announced Combine Framework

The Economics of Open Source // Introducing Entropic, a federated package registry

At JSConf EU 2019, CJ Silverio – former CTO at NPM Inc – gave this talk on why a VC-funded private package registry (read: the one ran by NPM Inc) holds many dangers.

The JS package commons is in the hands of a for-profit entity. We trust NPM Inc with our shared code, but we have no way to hold NPM Inc accountable for its behavior. A trust-based system cannot function without accountability, but somebody still has to pay for the servers. How did we get here, and what should JavaScript do now?

At the end of the talk she announced Entropic, a federated package registry for anything; but mostly JavaScript.

Entropic assumes many registries co-existing and interoperating as a part of your normal workflow. All Entropic packages are namespaced, and a full Entropic package spec also includes the hostname of its registry.

Entropic: a federated package registry for anything →

macOS Mojava: Disable the floating screenshot thumbnail (using defaults write)

A tweet that’s been making rounds this week is on how to disable macOS Mojave’s floating screenshot preview thumbnail (and remove that delay along with it).

Nice, but there’s also a way to do this from the CLI:

defaults write com.apple.screencapture show-thumbnail -bool FALSE
killall SystemUIServer

There, much better 😉

Happy Screenshotting! 📸

☝ I’ve also added this tweak to ./freshinstall, a tool which I built to automatically configure my MacBook (Preferences, Dotfiles, Installed Software, etc)

Did this help you out? Like what you see?
Consider donating.

I don’t run ads on my blog nor do I do this for profit. A donation however would always put a smile on my face though. Thanks!

☕️ Buy me a Coffee ($3)