Iโm over static site generators and am moving back to a blogging platform for normal humans. Things I donโt like about the static site generator experience:
Continue readingAuthor Archives: Mark
3 Key Habits I Used to Learn Chinese
After failing three times, on my third try learning Chinese I actually became conversational. Hereโs what I did, which is generally applicable to any language:
- I used Duolingo for 30 minutes every day for over a year.
- I went to Chinese language exchanges twice a month, for a year and a half.
- I used Hellotalk to find a great language partner to chat and do video calls with. I also used it to crowd source corrections for my bad Chinese.
Thatโs it! The key is consistent effort over a long time (2 years), mixing solo practice and real conversation.
Other tips:
Continue readingThe downside of a novel product
(Originall appears on Indie Hackers)
There are pros and cons to selling a product based on “novel” technology.
Selling has two phases. First, the customer needs to understand the problem they are having. Then, they need to understand how your solution addresses the problem.
Continue readingDon’t sleep on Google Sheets for backend infra!
(Originally from Indie Hackers)
For analytics on Timestamps usage I log directly into a Google Sheet๐
And this actually works great! Minimal infra, structured, fast (no querying GBs of server logs), and I can manually touch up the data (needed for the user column).
Don’t sleep on Google Sheets for backend infra๐คช
Realizing that you are the end of line
(Originally appeared on my Indie Hackers blog)
This was perhaps the most important lesson I learned from being a solo founder.
As the founder and CEO of a small business, you are the end of the line. There is no one else to think for you, or hold your hand. There’s no safety net.
Continue readingDon’t confuse std::move and std::forward
This was a pretty interesting buggy scenario I found while reading the clang-tidy checks. If you’re writing a function that takes a forwarding reference (what looks like an rvalue reference, but whose type is a template argument), you need to be careful to not call std::move
on it. You need to make sure to call std::forward
instead. Otherwise, you might accidentally trigger a move on an object passed by a caller! This would be confusing, since their object would be moved from, and they never explicitly called std::move
on it.
Getting bit by unique_ptr
I got bit by unique_ptr
when implementing a linked list today. You need to be careful to manually release()
the unique_ptr
before resetting or you might accidentally free the entire list. This comes up when doing insertions and stuff like that.
You can use /proc/*/mem to bypass memory protections
Filmed some screencasts today explaining some interesting behavior with /proc/self/mem
— you can use it to write to unwritable memory (including the text of libc!).
Read bits are not enforced for memory mappings
Filmed a screencast exploring some neat mmap behavior — read bits are not enforced for memory mappings. This is because the underlying x86 page table entries have a single bit to toggle between “Read” and “Read/Write”.