I just learned Rafa died from injuries several days after close encounter with a truck while biking in Costa Rica.

He has always been full of energy, positive drive, and working on something *Very Large*. This is from the last communication from him:

As for me, after seven stormy, interesting and very wild years I have a

*Very large* mathematical scheme to explain dark matter AND dark energy

but the papers have been stranded at Adv.Math.Theo.Phys. …

I am in opposition to ``super-symmetry” which may explain a bit of the bias against publishing my (dangerous?)ideas…

His page at CalTech is…

Not my dream, but a dream I really appreciated

A woman in her 50s, shares the dream in which she lives in a large white noisy house with many friends and two pets: a white puppy and a young bird in the process of learning to fly. The dog is not the same one she actually has (a brown puppy).

The bird is a beautiful creature, with colorful feathers and chirpy cheerful energy. Everyone at the bustling, busy house loved the puppy and the young bird — celebrating at each turn as the bird began to learn to fly. …

I Learn faster by Example

A View cannot change its own FetchRequest after the view has been created. What if we want to modify the query string and update the display based on user input?

This SwiftUI limitation causes a small challenge when coding search boxes and other dynamic queries. The example below shows how this can be done:

  1. A View cannot change its own FetchRequest, but it can change the FetchRequest of one of its sub-Views. Thus, use a sub-View to generate the FetchRequest:

struct AllUsers: View {

@State private var searchTerm: String = “”

var body: some View…

I Learn faster by Example

SwiftUI comes with a set of built-in view modifiers, for example. “.padding()”, that can be added toe Image, Text etc to request more space between views. Once we start to use these modifiers, they stack up and become cumbersome: It is inconvenient to copy-paste a large collection of them to reproduce the same look for similar elements in different part of the code.

This is where making our own custom view modifier becomes useful. For example:

Text(“+”)

.padding(EdgeInsets(top:2,leading:4,bottom:2,trailing:4))

.foregroundColor(.blue)

.overlay(RoundedRectangle(cornerRadius: 20).stroke(.blue, lineWidth: 1))

Becomes →

Text(“+”)

.myCustomStyle()

Here is how:

extension View {

public func myCustomStyle() -> some View {

return padding(EdgeInsets(top:2,leading:4,bottom:2,trailing:4))

Deciding to get donuts is not as hard as deciding how many to get.

Most people feel pretty certain that they want to live. In terms of how and how long, as the popular saying goes, life becomes more complicated. I discovered a simpler answer when I went to the local donut shop this morning.

I have never in my entire life bought just one donut at the donut shop.

Maybe the best deal for the money is the baker’s dozen? Maybe it was because I was younger, of course I was. but there is a deeper reason:

Buying a…

After typing in message and pressing the “Send” button, the keyboard disappears and the message display should now scroll up to show the newly sent message, which is typically at the very bottom of the scrollView right above the text field.

Scrolling Up Programmatically is easy. Understanding it is big step towards knowing how SwiftUI works.

SwiftUI recently added a scrollView.scrollTo method, which moves view to show arbitrary row: scrollView.scrollTo(self.fetchRequest.wrappedValue[self.fetchRequest.wrappedValue.endIndex — 1], anchor:.bottom)

This is tremendously helpful and with additional few ingredients forms an elegant solution.

I organized below the 7 necessary steps, backwards from the actual scrolling to how the scrolling gets triggered by the parent view. …

strings vs. stringsDict, 3 steps from initial setup to easy testing during Xcode 12.3 SwiftUI development.

It is best to build app with Internationalization in mind and support localization from the start of the project. Get these first 3 steps working first, before worrying about stringsDict, Xcode Localization Catalog, XLIFF, etc.

Step 1: Add Localizations to your project info page

  • Make sure “Use Base Internationalization” is checked.
  • Add 1 additional locale in addition to your development language, e.g. Chinese, Traditional (zh-Hant)

Step 2: Add Localizable.strings to your project

Don’t worry about stringsDict yet. stringsDict are for more advanced localization problems such as plurals.

Activate “Localization” in the inspector view of the Localizable.strings file to select and…

Tips for Newbie: FreeCAD, Cura, first 3D printer pitfalls and solutions

3D Printing has been getting easier every year, but it is still not as easy as 2D printing.
3D Printing has been getting easier every year, but it is still not as easy as 2D printing.

The ability to turn any imagined object into actual item-in-the-physical world has been a magical power beyond the reach of the common man.

“Personal” 3D printing gets us closer, but just like in the early days of personal computing, getting started involves struggling with the idiosyncrasies of experimental-stage tools and learning from other people’s mistakes / successes.

I am writing this guide 2 months after getting my first 3D printer. Waiting any longer I will begin to block out the painful beginning.

Buying a Printer

A 3D printer is a device that…

Please Save My Child: Drug Company and Compassionate Use

Today is Father’s Day and if a drug company refused to save my daughter’s life, I imagine I would have also writen a strongly worded Change.Org Petition, like Radha Rangarajan’s mother, Sonal Patel:

On the other hand, the Shire enzyme being developed for metachromatic leukodystrophy (known as SHP611 or HGT1110) has no published data that support its effectiveness. A study of 24 patients appears to have been completed in January 2017, however, as of June 2018, the results have not been disclosed by Shire.

Why is it taking more than a…

Ancient Chinese Dark Humor Labels Our Inability to Rise Above Ourselves, also a Racist Insult

Literally, the monkey gets a good wash and then gets a fancy hat. As the saying goes: a clean monkey wearing a crown is still a monkey.

The story associated with this saying is also interesting. Supposedly it was used as a critique of a failed revolutionary (項羽), depicting his character flaw, vanity, as the root cause of his demise. This is how he was characterized according to the story in a history text:

“人言楚人沐猴而冠耳,果然”

Literally translated: people say that people from the nation of…

Andrew Ho

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store