Problem Reduction

Problem Reduction is what I call when a given problem can be expressed in terms of or solved using a solution to an alternate problem.

Take for instance, the word distance problem: Find the shortest distance between two words in a given set of words. Following is an unanimous solution, I suppose:

Importance of Semantics

semantics1 | /sɪˈmæntɪks/ | noun (functioning as sing)

  1. the branch of linguistics that deals with the study of meaning, changes in meaning, and the principles that govern the relationship between sentences or words and their meanings
  2. the study of the relationships between signs and symbols and what they represent
  3. (logic)
    • the study of interpretations of a formal theory
    • the study of the relationship between the structure of a theory and its subject matter
    • (of a formal theory) the principles that determine the truth or falsehood of sentences within the theory, and the references of its terms

Semantics is ever more important in programming.

Application Models

A typical business application is composed of several flows or use-cases. Also, these flows consist of logical ones like a transaction that spans several flows. Take for instance an e-commerce application which consists of user registration/login, product lookup, and one of the most important interactions in an e-commerce application – the shopping cart, and much more. Although these application flows might appear to be discrete and independent of one another, it is after producing a working solution that we realize that these flows are inherently interrelated for one reason or another. The idea of designing stateless application flows is many times confused with the relation between the flows.

Iterators vs. Generators

Yes, there is a difference. Although both produce the same end effect, an iterator is not the same as a generator. The difference is in the way it is implemented and also consumed.

Mundane vs JINQ Way

New things are not always instantly accepted. Beyond skepticism, new things challenge the comfort people are accustomed to. JINQ wasn’t particularly welcomed. It was either discarded as unknown angel or worse … ridiculed. However, JINQ still promises expressive succinct code.

Text Editors

I am not a *nix commands expert … but a professional?

Selective Combinations

Consider this scenario:

You have a list of strings with which you have generate ordered selective combinations of strings starting with the first string in the list. Let us say the list of strings is abc, def and ghi. I have to generate ordered combinations of the above list restricted to the ones starting with abc.

So that would be as follows:

abc def ghi

abc def

abc ghi

abc

JINQ

In his talk at the CppCon 2014, Bjarne Stroustrup explained, politely and brilliantly, how to write succint expressive yet intent-ful code.

Partial Classes – Java ???

I am really sorry if I tricked you into believing that Java is offering partial class feature. Unfortunately, Java doesn’t. Maybe never will. But I am going to talk about a workaround also presenting the thought process. Hence the length of the post.