Dev Blogging: An Attempt to Maintain Focus

I want to put my effort and focus into my job. I’m finding it difficult lately. For various reasons I’m not feeling very productive, seeing a decreased amount of focus during the day. Yesterday I was able to focus for a few meetings, but the rest of the day I was distracted constantly. Then about 4:30 I felt the energy drain out and my mind felt fuzzy and I was suddenly able to focus. 45 minutes of productivity per day is not enough.

The honesty is difficult. This blog has not been about things like this in a long time. I don’t like the idea of publishing these thoughts forever, they are pretty cringe. At the same time I’ve been watching youtube channels where people do fun projects and also just show the real side of themselves. I don’t think I can do video right now, but I can write and publish a blog. And it might help me when I feel like I need to just get some of the thoughts out of my head. ADHD is difficult to manage and having a place to pour some thoughts out might help.

So that’s this post: a log of my thoughts and accomplishments from one day. An account of what I’m doing to deal with various challenges and tasks.

Today I plan to do the following:

  1. Have several short meetings about current projects.
  2. Edit and Post this file at the end of the day.
  3. Call and set up a Doctor’s appointment.
  4. Create a react-native test application with an embedded webview that can load with injected authentication tokens.

This file will be updated as I proceed.

9:16 AM

Just wrote the above. Listening to Pandora station “Tiësto Radio”.

Installed https://github.com/react-native-webview/react-native-webview in my test project. It’s an expo app. Something weird happened to my project. The start script changed form expo start to react-native start. When I run react-native run-ios it starts up a very slow xcode build process.

I have about 1 hour until my first meeting of the day.

9:29 AM

I did somehow get the simulator to open my project.

expo start --dev-client then click the link in the web UI “Run on iOS Simulator” whick opens a custom URL scheme link on the device.

It shows the app with custom native code inside it. Now can I get it to run on my actual device?

simulator

I want to skip the EAS build service for now. Can I just use the built in Apple tools? Plug in my iphone with USB. Launch XCode. Apple Docs. Add my work apple id to the accounts preferences in XCode. Change the project settings the associate with my work team for apple developer program membership.

Receive error in XCode:

1
2
Failed to register bundle identifier
The app identifier "com.timbly.donewithit" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.

Wat? Go make some more coffee. Just opened a new bag of “Late Night” from Methodical Coffee. Dark roast provided by bottomless.

9:54 AM

Worrying about tornadoes.

9:58 AM

If the proof of concept app doesn’t run on an actual device it doesn’t count as working in my mind. It’s important to carry test projects through the lenght of the development cycle. We call them tracer bullets sometimes. There’s not a lot of meat on the bones, but the project needs to traverse the full length of the process to find any gotchas.

Changing the bundle identifier to something else fixed the error in xcode, because I created the project and gave it a bundle identifier before I added my new apple ID that’s associated with a developer account.

10:05 AM

Build errors relating to expo. errors

Attempting to close xcode and open the .xcworkspace file instead

It’s building for longer - so this feels promising.

No, it failed in the node scripts.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
+ node /Users/tim/Sites/expo/DoneWithIt/node_modules/react-native/cli.js bundle --entry-file index.js --platform ios --dev true --reset-cache --bundle-output /Users/tim/Library/Developer/Xcode/DerivedData/DoneWithIt-hicxjkqmmrjkcrhavcnkptgegaxi/Build/Products/Debug-iphoneos/donewithit.app/main.jsbundle --assets-dest /Users/tim/Library/Developer/Xcode/DerivedData/DoneWithIt-hicxjkqmmrjkcrhavcnkptgegaxi/Build/Products/Debug-iphoneos/donewithit.app
warning: the transform cache was reset.
Welcome to React Native!
Learn once, write anywhere


events.js:167
throw er; // Unhandled 'error' event
^

Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:123:28)
Emitted 'error' event at:
at NodeWatcher.checkedEmitError (/Users/tim/Sites/expo/DoneWithIt/node_modules/sane/src/node_watcher.js:143:12)
at FSWatcher.emit (events.js:182:13)
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:129:12)
+ [[ true != true ]]
Welcome to React Native!
Learn once, write anywhere


node:events:371
throw er; // Unhandled 'error' event
^

Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:204:21)
Emitted 'error' event on NodeWatcher instance at:
at NodeWatcher.checkedEmitError (/Users/tim/Sites/expo/DoneWithIt/node_modules/sane/src/node_watcher.js:143:12)
at FSWatcher.emit (node:events:394:28)
at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:210:12) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
filename: null
}
Command PhaseScriptExecution failed with a nonzero exit code

Googling

Attempting: brew reinstall watchman

Requires XCode command line tools. Attempting xcode-select --install

too long

11:26 AM

Two meetings. Need a break. Time to make some lunch and then watch some youtube.

12:00 PM

I had a confusing meeting that was full of information that I don’t know what to do with it. I have enough to keep me busy this is a confusing thing to try to figure out.

12:21 PM

I feel so lazy. I can’t do anything.

YouTube is stupid. There’s nothing on there. I don’t want to play games.

Time to call that doctor.

Reinstalling watchman again while on hold.

It’s weird that macOS is version 11 now. It’s been OS X v 10.x for almost 20 years.

3:38 PM

Got sick while on hold. Really sick to my stomach. Had to lay down. Took a long nap. I feel like a failure. Back up and trying again. OK, let’s see if the stupid project will build again.

3:43 PM

OK the development app started on my iPhone but I can’t get it to connect to my launcher.

3:50 PM

OK, got it figured out. It seems to be just my laptop’s IP address and port 8081. And it reloads when I change my JS. Now I can start testing it for real on a real device. Success!

4:05 PM

Love this channel: https://www.youtube.com/watch?v=fNxcOON1VNM


Outcomes

Meetings: partial success, had to skip 2 while sick

Posting this file to my blog… waiting until the next day.

Call and set up a Doctor’s appointment: fail.

Create a react-native test application: Partial Success. Still need to test the webview and the auth tokens.