Today via Lobsters: Write code that is easy to delete, not easy to extend. I think I like programmingisterrible.com.
Tag Archives: delete
Delete until next character occurrence in Vim
In vim, to search for next ‘>’ use: f>
To delete until next ‘”‘ use: df”
To delete an *ML attribute, e.g. use: df”.
How to remove a post from a mailman archive?
Found this article.
Basically you have to edit the .mbox file. I used mutt to do that with:
# mutt -f list.mbox/list.mbox
Then ran mailman ./bin/arch to recreate the archive.
The difference between delete and delete[] in C++
I just learned about the difference between delete and delete[] in C++ by reading this article from StackOverflow. Basically you use delete[] to delete arrays, and delete for everything else. There was conflicting information about whether C++ runs the destructors on objects in an array when the array is deleted. Some people said it did, others said it didn’t. I should do an experiment to see one day. The reason for the difference between delete and delete[] seems to be that when C++ allocates an array it allocates memory for storing the size of the array as well as the array elements, and then returns a pointer to the first array element, which is beyond the start of the allocated memory, because the array size takes up the first bit of space.