Age | Commit message (Collapse) | Author | Files | Lines |
|
Ambitious at the time, but now dusty...
|
|
Move the variable definitions to the top of the module.
|
|
A couple thoughts:
- Generally, unit tests aren't worth keeping in the same file as the library
- Specifically, *these* unit tests aren't worth keeping
|
|
`irc-freenode` -> `irc/freenode`
|
|
Back to having three monitors :)
I'm also calling `display-arrange-primary` in `exwm-init-hook`, which calls
`xrandr` to ensure my displays are configured as I expect.
|
|
Ch-ch-ch-changes
|
|
Instead of dottime...
|
|
I forgot to remove references to the vertical display that I remove in a
previous commit.
|
|
I can't recall what's changed, but likely I've seen some more movies and updated
the database as a result.
|
|
Today is my first day back in the office at Google (this time at MP2 in
Sunnyvale)! As such, I have a new desk, new monitors, so expect some changes to
my configuration until I stabilize everything.
|
|
I'm using ynab.com for now, so I no longer need this playbook.
|
|
More technical interviews
|
|
`sudo systemctl suspend` wasn't working because it required a secure password
prompt to read the user's password for `sudo`. The recommended way to call
`shell-command` with a `sudo` command (from what I read online) is to set
`default-directory` to `/sudo::` before calling `shell-command`. This works just
fine, so I refactored the function, `window-manager-logout`.
|
|
I'm spending way too much time on Telegram (both on my phone and on my
computer). I'm going to remove it from my computer, so that I can better focus.
|
|
This time, I'm excluding languages like CSS,HTML,Markdown,Org, which I think
makes the output a bit noisier than I'd like it to be.
TODO(wpcarro): Automate this process
Re-run `tokei --hidden --type=<comma-sep'd-langs> --sort code .` to update this
table.
|
|
Most of the errors at the moment are related to line-lengths exceeding my 80
character limit. While these are valid, the linter doesn't currently support
disabling these checks, which means that my Elisp code always fails this CI
step. This creates too much noise and conditions me to care less about CI
failures.
When the Elisp linter support this feature, I will gladly re-enable this step.
|
|
I changed the name of my Pipeline from briefcase -> post-receive, which broke
the URL for the badge.
This is easily fixed by visiting BuildKite's "Pipeline Settings" page.
|
|
To make things easier for testing, I setup the /verify endpoint as a GET, so
that I could email myself clickable URLs. With POST /verify, my options are:
- send email with an HTML button and form that POSTs to /verify
- email myself the curl instruction
I'm preferring the latter for now...
|
|
git-subtree-dir: assessments/tt
git-subtree-mainline: 67e0f93b3bbc386421a276cbd5675f5ac51625ae
git-subtree-split: ee8e75231cd9d3d4aa3ffbbfa0e3b8511712e1ee
|
|
Another challenging but useful LeetCode problem...
|
|
Clerical stuff
|
|
It's been awhile since I've updated this list, and I haven't stopped watching
movies. Adding movies like "The Help", "Three Colours: Red" (and the whole
trilogy for that matter), "The Elephant Man", and others. All worth watching.
|
|
Wahoo! I need to remember that the inorder traversal of a BST should be
sorted. This piece of trivia comes in handy for a variety of BST related
problems.
I also think being able to do a {pre,in,post}-order traversal recursively and
iteratively is a skill that I need to develop.
|
|
Valid Anagram
This one is a classic: `sorted(a) == sorted(b)`
Group Anagrams
Using product of prime numbers to create a key for anagrams is much faster than
sorting the characters in each word. It is also satisfyingly simple.
Encode and Decode Strings
My initial implementation was clumsy and prone to fail for edge-cases. A more
elegant solution is using something like:
```python
def encode(words):
return "".join("{}:{}".format(len(x), x) for x in words)
```
|
|
After solving this, I was immediately stumped by the other DP questions, so I'm
taking a break.
|
|
This is tricky because Python has variable-width integers, so relying on two's
complement to support the sum of negative numbers results in infinite
recursion. I know three ways to combat this:
1. Use Java.
2. Conditionally branch and handle either addition or subtraction accordingly.
3. Use a mask to enforce fixed-width integers in Python.
|
|
Only three more to go!
|
|
Looks like "Rotate Image" is the only Matrix problem that remains. It was nice
to learn more about "Backtracking" -- a term I often encounter -- while
attempting to solve "Word Search".
From my current understanding, it is like Brute Force but with
short-circuiting. It also seems quite similar to Depth First Search, and I'm
currently unaware of how DFS and Backtracking differ. I'm hoping to learn more
though.
|
|
I did these during my flight from LON->NYC without wifi. I managed to get both
correct on the first attempt although I did not find the *optimal* solution for
"Reorder List". IMO "Reorder List" is the best Linked List question I've seen
because it covers a few essential Linked List tricks.
|
|
Tidying things up.
|
|
Looks like I should prioritize the following topics:
- Dynamic Programming
- String
- Graph
Although I'm not sure how common DP questions are in interviews, DP is a useful
dragon to slay IMO.
|
|
Snapshot my progress with Linked Lists...
|
|
Looks like I have a few string questions to solve before closing that chapter.
|
|
Making sure that this document closely approximates the state of my LC
progress.
|
|
TeamBlind.com hosts a curated list of DS&As questions from LeetCode.com that the
author claims appropriately samples the topics worth exploring. I'm creating an
offline list so that I can track my progress and work while I'm traveling.
|
|
Now that I've deployed this, and I have an iPad running in kiosk mode, I
realized that I'd like to show my morning routine and my evening routine.
|
|
Adapting to changes.
|
|
This should be the last hold-out before deploying habit-screens! :)
|
|
As you can see, I was previously `.gitignore`-ing this file, but because my
`default.nix` attempts to `cp output.css`, I need that file available.
|
|
At some point I should document or write a script for how I package Elm projects
with Nix to be deployed on my website. For now, I'm modeling everything after my
previous success LearnPianoChords.
|
|
Since the `default.nix` file is specific to my tooling, I'm ignoring it.
|
|
Also delete redundant `README` from `server` directory.
|
|
Creating a simple HTTP RESTful API for exposing our `Server.semiprime`
function. It supports some help messages, primitive parsing and error handling,
and singular vs. batch processing of arguments.
For more sophisticated parsing and error-checking, I prefer to use Haskell's
Servant library.
|
|
This can be useful downstream for diagnostics.
|
|
I think it's more readable this way.
|
|
Calling `assert` within the `Enum.map` makes the errors more usable.
|
|
- Clear the boilerplate that `mix` generated
- Consume `Math.factor` to test which inputs are semiprimes
- Cache all inputs that are semiprimes as soon as we discover that they are
- semiprimes
I considered a couple things related to the Cache:
- Could save space by storing all semiprime factors in a tree. This would make
the lookups more expensive. Also because the tree's depth would never exceed
two (because all semiprimes only have two factors), the tree would be quite
broad, and we may not be saving enough space for the trade to be worthwhile. I
might be wrong about that though.
- We could consider pre-computing all semiprimes when we start the app, but
without running some tests firsts, I'm not sure whether or not it's worth the
trouble.
|
|
Since I'm often using `iex` for interactive development, these functions are
useful.
|
|
Define a simple in-memory key-value store for our cache.
TL;DR:
- Define `Cache` as a simple state-keeping `Agent`
- Define `Sup`, which starts our Cache process
- Define `App`, which starts our Supervisor process
- Whitelist `App` in `mix.exs`, so that it starts after calling `iex -S mix`
|
|
9 out of 10 doctors agree that every module needs a doc. Ask your doctor if
moduledocs are right for you!
|