Saturday, December 9, 2017

Tools that can help with Identity Management:
Almost any web application would require a user to sign in so that the application can know and keep track of the activities taken by the user. When the users are in the range of hundreds of millions, identity becomes important software in itself. As software engineers take care of maintaining the code base and the processes associated with the release of improvements to the software, they will frequently rely on tools and tests.  The following are some of the tools that can help with this tremendous responsibility.
First, a web application such as this will rely heavily on backend services that may work exclusively for specific purposes such as phone contact information lookup, address information lookup, authentication and auditing, utilities such as issuing tokens for logged in users and many others. Each of these services may also be hosted in different environments that are used to prepare and test the code prior to its release to production. Consequently, these services could very well be counted as a dependency for the software. In order that we keep track of the dependencies and for troubleshooting issues with the software, we could consider command line tools that enable Application Programming Interface (API) calls to the service alone. These tools help use the service in isolation while also provide a command line convenience to gain information on individual resources such as an account or a number lookup. While curl – a popular command line tool can be used to call services via APIs hosted over the HTTPS, most enterprise services are secured and some of these APIs often require a pre-amble where one api called before another.  These tools can come in helpful for this purpose. These tools come in helpful for triage and to work in isolation from the tests and code. Moreover these tools are for the convenience of getting data or setting state and not for operations or monitoring which generally have their own infrastructure based on impact radius.
Second, the entire software consuming the dependencies regardless of its organization may also be considered a service with its own APIs. Writing command line convenience tools to drive this software with an api or a sequence of apis can become very useful for diagnostics and automation. Consider the possibility of writing automations with scripts that are not restricted to writing and testing code. Automation has its own benefits but not having to resort to code widens the audience. Along the lines of automation, we mentioned convenience but we could also site security and policy enforcement.  Since the tools are designed to run independently and with very little encumbrance, they can participate in workflows previous unimagined with existing codebase and processes.
Conclusion: While testing and coding are primary activities for software development in any organization, they can be improved with empowering the individuals who are engaged in these activities. These tools help fill this gap.

#codingexercise
We were discussing finding closest numbers between the elements of three sorted integer arrays. 
Another usage of finding the closest numbers in these arrays to a given input value is to discover overlapping range of sorted numbers. In order to do this on number line, we could choose max(start1,start2,start3) and min(end1,end2,end3) for (start,end) pair for every array. But by finding the closest of the min and max values, we can determine the overlapping range projection on any one of three arrays. Then we can choose the projection with the smallest number of elements 
Determining the overlapping region projections helps shrink the search space for any operations involving all three arrays. It may not be useful for sum, average, mode or median but it is helpful for partitioning the number line to determine the presence of a number in any array. If the number is not in the overlapping range then we exclude one of the arrays and binary search for it outside the projections in other two arrays.

Separation of range helps not only for looking up a number but also in performing similar operations on the overlapping projections in each array. For example, finding the average of  projections just got a whole lot more easier and accurate. And if the numbers are all positive, their product also became easier to approximate.

No comments:

Post a Comment