Git tracking differs from staging

I learned some Git principles and judo: tracking differs from staging: i.e.git commit -a stages and commits already-tracked files, and new files won’t be committed; git add . tracks and stages. by definition, files are tracked only when they are first staged/committed. There is no “track but not stage” for new files git diff is “staged - working directory”. git diff –staged is “commit - staged”. git status -s gives a concise description of what’s untracked, modified, and whether the modification is staged or not.

Files modified after staging need to be staged again to commit the latest changes in Git

A mystery of missing GitLab repo files motivated me to read the Pro Git book. I relearned the different VCS-es and models that back them: local, centralized, distributed; patch/delta vs. snapshot. I revisited the three areas a file can be in: working area, staging area, and the git repo. Per Chapter 2, I saw how a file can be both modified in the staging area and the working area at once.

Unquote splicing (`~@`) evaluates before stripping parentheses

To understand macros, I needed to understand unquote splicing. I used to think it peeled the parentheses off, but no: (= `(+ ~@(map #(+ 2 %) [1 2 3 4])) '(clojure.core/+ map #(+ 2 % ) [1 2 3 4]))`. ;;=> false Evident with the ~ unquote symbol, it lets the onion sprout (evaluate) first before peeling its layers 😄: (= `(+ ~@(map #(+ 2 %) [1 2 3 4])) '(clojure.

JS literals (`#js`) improve runtime performance over `clj->js`

I was making a “rapid-scheduling app” that uses the Google Calendar API , which required I convert Clojure maps into JS objects. This means the use of #js or clj->js I saw Paulus Esterhazy’s post which says I should do this: (def config #js {:apiKey "..."} :clientId "[...].apps.googleusercontent.com" :discoveryDocs #js ["https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest"], :scope "https://www.googleapis.com/auth/calendar.readonly")) (.log js/console (.-discoveryDocs config)) ;; => ['https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest'] This turned my vector to a GAPI-friendly array. The #js reader macro (also called a js literal?

Three lessons for JS interop in ClojureScript

A metaphor: I’ve turned my regular hand into this metal claw talon. That is, I’ve ironed out misunderstandings with JavaScript interop: (1) Global variables are in the js namespace (js/gapi not gapi); (2) If one . doesn’t work, use two .. 🙂 (If I’d examine the macro-expansion I’d understand why…); (3) Modeling JS’s obj.prop1.prop2.methodCall().prop3 syntax (i.e. calling all props, method calls, and subsequent props at once) seems out of reach atm– use nested forms: (-prop3 (.

Until something shows up from the background mind, feed it more info.

I should observe either the outside or the inside. If there’s nothing inside from the background mind, observe the outside. If there is something inside, write or act on it. Drafting a paragraph isn’t a very conscious process. While it requires consciousness, it’s giving words to something I see presented from the background mind, crystallizing its idea on the screen. Nothing from it? Instead of feeling frustrated: Feed it more. I should always understand if I should be in background-feeding or receiving mode.

Relax in tiny ways to relax bigly (ha)

While I’ve learned from Psycho-Cybernetics that relaxation is key years ago, it’s only with B.J. Fogg’s Tiny Habits model (video here) that I’m consciously relaxing more consistently. “After I lie down, I will see my head as cement, sinking so far through the mattress that it touches the floor”. Just this, and not all the body parts, is my primary commitment. However, I felt inspired to continue after this initial commitment to relaxation.

Decisions are progress. Ask "What's the next decision?"

Decisions cause actions which cause results. Decisions are progress. Every moment I’m not deciding is less progress, so I want to make sure that I’m deciding as much as I possibly can. I don’t have an Elon Musk-like intellect, so a lot of the decisions won’t be perfect. But I must decide. I must try.

To modify Windows Registry keys, the administrator can't modify the keys nor its own permissions... but it can add a user and give full permissons... makes sense ha

For more streamlined development, I like Powershell to open up to the right directory, so a while back, I set up the context menu for Powershell. To learn to do this, I read How-To Geek’s article and noticed an option to make the option show with I press “shift” with the right click. This involves adding an “Extended” value name (key of a key… Windows registry terms) with blank data. When I satisfied my curiosity and decided to remove it… error.

"Making web dev easy" is hard ha.

While studying Jacek’s Reagent Pro course through my first month of ClojureStream, I’ve learned more about Atom, its keybindings, the lisp-paredit Atom package, and Microsoft’s rules for registry editing than I have Reagent. lisp-paredit fucked me on some keybindings and “features”, so I attempted to tweak some settings. To fix the keybindings, I needed to understand Atom’s rules for it. Atom has CSS-like rules for keymapping yet doesn’t allow cascading/duplicates (gah!