This post describes script git-edit-index that allows you to open an editor to stage or unstage files in Git, just like when you perform an interactive rebase. It thus represents a faster alternative to git add -i
or git gui
.
Read More
Category Archives: Software Engineering
Review of Modern C++ Programming with Test-Driven Development
My review of a book written by Jeff Langr entitled Modern C++ Programming with Test-Driven Development: Code Better, Sleep Better.
Read More
Improving C++98 Code With C++11
There are many projects written in C++98. Moreover, lots of programmers are still used to C++98. However, with the standardization of C++11 and C++14, C++98 is becoming obsolete. In this post, I would like to list some of the features of C++11 that can be used to improve C++98 code in situations where it is possible to use the new standard.
Read More
Review of Effective Modern C++
This month, a new book from one of the foremost C++ experts Scott Meyers became available: Effective Modern C++, subtitled 42 Specific Ways to Improve Your Use of C++11 and C++14. The present post gives my humble review of this jewel.
Read More
Indexing Lists in Python With an Integer or Object’s Name
In this post, we will see a way of implementing a list in Python that can be indexed with an integer or string representing the name
attribute of a stored object.
Read More
cpp-bencoding: A New C++ Bencoding Library
Today, I have finished the implementation of a new open-source bencoding library. It is named cpp-bencoding and written in C++11. In the present blog post, I would like to briefly introduce it.
Read More
Unit-Testing With unittest.mock.patch()
Sometimes, you need to unit-test functions that call functions from the standard library that rely on side effects. In this post, I show a way of doing so in Python with unittest.mock.patch()
. More specifically, we implement two context managers that use os.chdir()
to perform actions in the given directory, and show a way of unit-testing them without relying on the file system.
Read More
Restarting a Python Script Within Itself
Sometimes, you may wish to check within a script when a configuration file or the script itself changes, and if so, then automatically restart the script. In this post, you will see a way of doing this in Python.
Read More