Skip to main content

Posts

Showing posts from June, 2017

Reading List, June 2017

Eric Diaz, The oral history of Star Trek: TNG’s best episode: “The Inner Light” , in Nerdist, 31 May 2017. [Online]: http://nerdist.com/the-oral-history-of-star-trek-tngs-best-episode-the-inner-light/ ‘The Inner Light’ is probably the best Star Trek: TNG episode, and this is a very interesting history on how the episode was conceived and how it made it to its final form. I did not know that we could have had a sequel to this episode. I must say that it was strange that ‘The Inner Light’ was never referenced again except for one small passing reference. Robert Graham, How The Intercept outed Reality Winner , in Errata Security, 5 June 2017. [Online]: https://blog.erratasec.com/2017/06/how-intercept-outed-reality-winner.html All printers insert invisible dots in files that are printed that can identify the model and serial number of the printer as well as the time a document was printed. Just putting this out there, governments mandate printer companies to insert code that tracks the

An Introduction to CTest

I've seen a lot of people (I'm looking at you Daniel Lemire ) praise newer languages like Go , which makes me sad as a C++ programmer. Well, that's until I realise that most of the features touted could be easily incorporated in C++ with just a bit of elbow grease. In this post, I'll show how to add an automated testing system using CTest.

An introduction to Vim macros

Vim is my favourite text editor, because it is minimalist while also being insanely configurable. While I may describe my ideal Vim setup sometime in the future, I do want to share some tips and tricks that make Vim so damn efficient for certain tasks. Today, I shall focus on macros. Here’s the key idea to keep in mind when discussing about Vim. Vim is not just an editor, it is a text manipulation program. Inserting text is just one of the many tasks that Vim can accomplish. A macro is a small Vim program that the user can record in order to make text editing more efficient. Consider a simple use case. Let’s say that I have a CSV file that looks like this New York,NY,USA Seattle,WA,USA Mumbai,MH,India Let’s say that I want to add another column at the beginning of each line that is sequentially numbered, like so 1,New York,NY,USA 2,Seattle,WA,USA 3,Mumbai,MH,India I could go down each line and manually add each column, but there’s a better way. The solution is to prog