Dominik Hofer
Dominik Hofer

My favorite @AliAbdaal quote:

β€œEverything is figureauteable.”

Perfectly sums up the mindset I try to cultivate.

Dominik Hofer
Dominik Hofer

Day 10 #100DaysOfSwiftUI

βœ… Structs
βœ… Computed properties
βœ… Property observers

πŸ”‘ takeaways:
πŸ‘‰ With structs, you can create custom types
πŸ‘‰ Computed properties work like in Vue.js
πŸ‘‰ You can create custom initializers (must provide values for all properties)

Show thread (2 posts)
Dominik Hofer
Dominik Hofer

With the launch of my personal website, I also want to start a bi-weekly newsletter. Nothing too fancy, just a way to send some updates.

What tool should I use?
⟑ @SubstackInc
⟑ @TwitterWrite (Revue)
⟑ @ConvertKit

Any tips/experiences?

Dominik Hofer
Dominik Hofer

Day 9 #100DaysOfSwiftUI

βœ… Closures
βœ… Passing functions
βœ… Checkpoint 5

πŸ”‘ takeaways:
πŸ‘‰ Closures are a special type of function
πŸ‘‰ Trailing closure syntax is handy when you pass a function to a function

Not sure if I solved today's challenge correctly, my brain hurts…

Dominik Hofer
Dominik Hofer

Discovered a handy feature in Xcode by accident:

When holding down CMD, you can click on a variable and refactor it.

See example below πŸ‘‡

Dominik Hofer
Dominik Hofer

One simple trick I learned in therapy:

If you're unsure what your gut feeling is (because you tend to overthink things), simply flip a coin. πŸͺ™

The answer you hope for shortly before the coin hits your hand is usually the right one.

Dominik Hofer
Dominik Hofer

Day 8 #100DaysOfSwiftUI

βœ… Default values
βœ… Throwing functions
βœ… Checkpoint 4

πŸ”‘ takeaways:
πŸ‘‰ = defaultvalue
πŸ‘‰ There is an error Swift type
πŸ‘‰ throws keyword before return type
πŸ‘‰ do try catch keywords

Trickier challenge today, but managed to solve it πŸ™Œ

Dominik Hofer
Dominik Hofer

One of my goals is to buy my next iPhone with money I made from creating iOS apps.

That would surely be an amazing feeling. Still a long way to go but you gotta have dreams πŸ˜‡

Dominik Hofer
Dominik Hofer

Day 7 #100DaysOfSwiftUI

βœ… Functions
βœ… Params
βœ… Return

πŸ”‘ takeaways:
πŸ‘‰ Params are named, type annotated and can have an alias
πŸ‘‰ Return value is annotated with -> Type
πŸ‘‰ Use Tuples to return multiple values (they have a fixed size)
πŸ‘‰ Tuples can be destructed

Dominik Hofer
Dominik Hofer

The best product ideas always come from scratching your own itch.

Nobody is better at solving your own problems than yourself.

Dominik Hofer
Dominik Hofer

The @webflow newsletter is one of my favorite resources to learn about new tools & beautiful sites.

Always looking forward to the next issue πŸ™Œ

Dominik Hofer
Dominik Hofer

Day 6 #100DaysOfSwiftUI

βœ… Loops
βœ… Checkpoint 3

πŸ”‘ takeaways:
πŸ‘‰ Ranges are a unique data type (... and ..<)
πŸ‘‰ Int.random(in: x) for random number
πŸ‘‰ continue & break to exit loops

The challenge was a classic code problem. Below is my solution for β€œFizzBuzz” πŸ‘‡

Dominik Hofer
Dominik Hofer

Day 5 #100DaysOfSwiftUI

βœ… If/else
βœ… Switch
βœ… Ternary operator

πŸ”‘ takeaways:
πŸ‘‰ Switch blocks must be exhaustive
πŸ‘‰ For ternary operators, remember WTF: What ? True : False

Dominik Hofer
Dominik Hofer

Visualizing really is a powerful tool.

I just completed day 2 of @mattdavella's Unstuck Challenge and the β€œideal day in your life” exercise got me thinking quite a bit.

After writing down the visualization, I'm more even more motivated to pursue my dreams! πŸ™Œ

Dominik Hofer
Dominik Hofer

The best products are not those that are simply good, but those that take whatβ€˜s already out there and make it better.

Dominik Hofer
Dominik Hofer

I'm only a few days into my #SwiftUI journey, but I already appreciate the type-safety features of the language.

Helps tremendously to reduce those embarrassing mistakes.

Dominik Hofer
Dominik Hofer

Day 4 #100DaysOfSwiftUI

βœ… Type annotations
βœ… Checkpoint 2

πŸ”‘ takeaways:
πŸ‘‰ Whenever possible, use type inference

Below is my solution for the checkpoint. Wasn't that hard but reinforced my knowledge of sets: Now I know that they are made from arrays πŸ’‘

Dominik Hofer
Dominik Hofer

Day 3 #100DaysOfSwiftUI

βœ… Arrays
βœ… Dictionaries
βœ… Sets
βœ… Enums

πŸ”‘ takeaways:
πŸ‘‰ Use default to access data in dictionaries
πŸ‘‰ Sets are significantly faster in look-up operations than arrays
πŸ‘‰ With enums, you essentially define a new data type with all possible values

Dominik Hofer
Dominik Hofer

”Without activity, we are lifeless and dull. When moving fast and taking action, we come alive.”
β€” @JamesClear

Dominik Hofer
Dominik Hofer

Day 2 #100DaysOfSwiftUI

βœ… Booleans
βœ… String interpolation
βœ… Checkpoint 1

πŸ”‘ takeaways:
πŸ‘‰ String interpolation is more efficient than string concatenation

The checkpoint exercise was a simple Celcius to Fahrenheit converter. Completed it without any problems πŸ™Œ

Dominik Hofer
Dominik Hofer

Day 1 #100DaysOfSwiftUI

βœ… Variables
βœ… Constants
βœ… Strings
βœ… Numbers

πŸ”‘ takeaways:
πŸ‘‰ Use constants whenever possible
πŸ‘‰ Type safety is a very helpful feature of Swift

Dominik Hofer
Dominik Hofer

Going for a bike ride first thing in the morning and enjoying this view is amazing 😍

Really helps clear your head and gives you a sense of accomplishment afterward.

Dominik Hofer
Dominik Hofer

Many problems in our lives come from our non existent ability to delay gratification. And our short attention span.

The Tiktok effect.

Dominik Hofer
Dominik Hofer

I'm currently struggling a bit to decide what to focus my attention on.

So for the next few weeks, I'll:
⟑ work on my personal website
⟑ take the #100daysofswiftui course
⟑ grow my Twitter account, build more connections

Will share my progress here ✌️

Dominik Hofer
Dominik Hofer

Todays @Webflow πŸ’Ž:

Hitting this little button in the top right of the spacing accordion centers an element (with margin: 0 auto).

Follow

RSS Feeds