Ethan's Wiki Update #3
Hello! I finished my new blog about JavaScript arrays! And quite a few links added this week.
What’s New
New blog: Reimplement all JavaScript Array Functions with while loops only
Last month, out of curiosity, I reimplemented all 38 JavaScript Array functions (e.g. .forEach()
, .map()
, .sort()
, etc.) with while loops only. As always, I learned something as I work on the all the functions. Some features, edge cases, considerations that I previously do not know about JavaScript. For example:
There are sparse arrays and the pain of handling them
Arrays are objects and its implications
What copy of a reference in JavaScript actually means
What are iterators and generators
Different kinds of equality in JavaScript
Using
.call()
to call a function in JavaScript, and more…
Other than that, there are some less-known functions that I discovered, at least I have not used them before until now, like .copyWithin()
, .splice()
and .with()
.
To be honest, most of the implementation is tedious and repetitive. A lot of effort goes into handling edge cases, which are the interesting things I learned. I also explained the setup of the repo in bun, how some functions are implemented and tested, especially some interesting one like .flat()
and .sort()
.
The full code is available in this repo. You can read the full blog here.
Career Page: The Ideal Candidate Will Be Punched In the Stomach
What is work for? A long fictional story reflection of modern work
A well paid "job", where the only job is to get punched every day, is that OK?
That feeling of boredom, dissatisfaction and lack of interest over time
I particularly like this paragraph at the end
The way you felt at this most recent job, it wasn’t all that different from the way you felt at previous places. That sense of not knowing what value your work provided, the inkling that maybe you were getting paid a lot of money to do nothing of any real consequence, while at the same time feeling a very real stress and anxiety that the whole thing was just a hair’s breadth away from collapsing and taking you down with it, all while quietly suffering abuse under people who would happily climb over your still-warm corpse to get slightly closer to their own selfish goals. The stomach cramps at this job were novel, yes, but these emotions have been there ever since you started in the industry.
The key thing is the realization of that physical stomach pain is not that different from the mental stress and tension. But not to be too cynical, on the other hand, knowing the why and understanding how each individual job contributes to the bigger picture real helps. Humans need reasons and meaning.
Entrepreneurship Page: 3 Financial Plans You Need
C-60: the plan to aim for
60% confidence of hitting
The base plan where growth and burn stays the same
C-10: the place for bonuses and celebrations
10% confidence of hitting
The stretch goal, assume 10-20% more revenue
C-90: the worse case scenario
90% confidence of hitting
Assume 20% less revenue while burn stays the same
Make sure there is a 16+ month runway
Entrepreneurship Page: The profitable startup
Profitability is to survive without investors, ability to focus on vision and mission
Hire slowly and intentionally, keep small and focus team, measure revenue per employee
One article linked in the blog: Ramen Profitability by Paul Graham. A startup doesn't have to be making money in the way it ultimately will, but it should be making some money.
This also reminds me of another Paul Gram blog: Default Alive or Default Dead? If growth and burn stays the same, does the startup turn profitable before runway run out?
AI Page: AI agents switch to sound-level protocol after confirming both are AI agents
A cool video demo:
Two AI agents on phone confirm both are AI assistant, then switch to communicate over a data-over-sound protocol (ggwave)
Git Page: How Core Git Developers Configure Git
Some of the configs that git core devs cannot live without
Like merge conflict style, diff algorithms, branch sort, etc.
If the moon were only 1 pixel, scroll to see the solar system is just space
Space is just a lot of empty space in between objects
Another cool visualization is NASA’s Eyes on the Solar System, visualizing planets, moons, asteroids, and spacecrafts in the solar system
Same message convey by this video by Mark Rober. If Sun is football size, Earth is the size of a pin ~24 meters (~26 yards) away
Random
If you have not checked the Astronomy Page before, I suggest you do. A while ago I added some of my notes on the page explaining what got me interested in space. The Hubble Deep Field image and the Pale Blue Dot image being the two.
Talking about git configurations and the Git Page, if you have not seen it before, I also suggest Git Tips and Tricks (or in video: So You Think You Know Git), and Organizing multiple Git identities. Both are helpful git configurations to set up.
And finally, if you are into programming, checkout my new blog post. Any feedback welcomed!