Java
BNF Parser is one of the step in the compiler theory to analyze the syntax validity of number, program sentence, variable, etc. It is also a perfect recursive algorithm sample when you plan to study and implement this algorithm. I got the question from leetcode.com. It is the hardest question listed in the problem list. That attracts me to study the parser implementation for the problem. I read a compiler theory textbook also two decades ago. I have to go over the first half of a compiler theory book andRead More
......Ref: https://www.martinfowler.com/articles/mocksArentStubs.html http://xunitpatterns.com/Test%20Double.html https://github.com/kensipe/spock-mocks-nfjs http://nilhcem.com/FakeSMTP/. It is hard to not write unit test for your programmer job. Of course, you can quit if you do not like to write and your boss requests. But, anyway, it is better to write to ensure your code is safe to run, and your job is safe to stay. Most of your unit test main object, i.e. system under test (SUT), are relied on dependency object. For example, you have Order class and Warehouse class. When you fill the order in Order.fill method, youRead More
......Most of us uses lots of Java MVC Framework in the software development. The famous will be Spring. Maybe you are scared away to think to implement yours when you saw the huge code in the Spring framework. Actually, it is not so hard that you just implement a simple MVC application without the use of Spring framework. In the article, we will demo a simple MVC of inventory management mobile APP in text mode (not gui), which include product in, product out and inventory tracking. We will use ChainRead More
......
