Posts

Showing posts from February, 2017

Cloud Computing Best Practices

Cloud is a subscription based software distribution system for delivering services to customer over the network typically using INTERNET. a) The first and foremost step in using Cloud services is to find the right type of the cloud provider that fits the overall needs of the organization. Cloud services and Cloud service providers are generally categorized into three types: Software as a service - Hosting applications on a remote data center to be delivered as services to the customers directly. Platform as a service - Rent hardware, operating systems, storage and network components for running existing or developing new ones. Infrastructure as a service - Outsource hardware components and equipments such as computer hardware, storage and network servers for the purpose of supporting operations. Identifying the appropriate provider and services helps to reduce upfront and maintenance costs of the cloud by taking the existing infrastructures of the organization...

Types of Sort

Another comparison of sorting algorithms using random, ordered and reverse ordered samples. Quick Sort. Find pivot from the list, arrange the elements in a such way that values less than the pivot are moved to the left and values greater than the pivot are moved to right. Apply the above logic recursively until all elements are sorted. Merge Sort. Divided the elements into sub lists containing a single element then repeatedly merge all the sub lists into one single sorted list. Radix Sort. Elements are arranged based on least-significant digit first, followed by the second-least significant digit and so forth and finally the most significant digits. This results in a single sorted list. Heap Sort. Construct a binary tree then remove the highest value from the tree and insert it at the end and repeat for all items to get a single sorted list. Comparison of time taken by different sorting algorithm: Note: Using code and algorithms found in the re...

Immutable: String

The following are the some of the programmer friendly advantages of high level languages like Java, C# or Visual Basic by handling String as immutable as opposed to being mutable in languages like “C” A) Efficient use of memory: High level language make efficient use of memory by incorporating a special type of memory structure called "String Pool", each time any code creates a string literal, the Java Virtual Machine (Java) or Common language runtime checks to see if the String is already defined in the "StringPool" and if it exists, a reference is assigned as opposed to allocating space for every string. For example: If "ABCDEFGHIJKLMNOPQRSTUVWXYZ" is assigned10 times within a code, then in the StringPool, there will be a single copy of “ABCDEFGHIJKLMNOPQRSTUVWXYZ" and 10 references to it. This is a gain in the memory space allocation even though there is additional over head of maintaining “StringPool” memory structure. In ord...

ACID vs BASE

In 1970, Jim Gray defined ACID properties as a reliable means of implementing a transaction system. Atomic – A transaction should be indivisible and it must be all or nothing even when the database goes down due to system failures. Consistency – A transaction should ensure that the data remains valid at all times even in case of application errors and none of the defined rules and constraints on the data must be compromised. Isolation – A transaction must be isolated from other transactions and intermediate results of a transaction must not be seen by other transactions that are concurrently in execution. Durability - A transaction must preserve the state of completed transaction at all times even in the event of system failures. Even though ACID stood the test of time for centralized database system, and we see wide implementation of two-phase commit for distributed databases, scaling databases that are distributed and keeping them highly available has always b...

Create SAS Data Sets w/o SAS

Image
Scope:  Create output in SAS7BDAT (closed binary format for passionate SAS practitioners and experts without installing Base SAS product from SAS Programming Institute. Carolina S-JDBC Driver: Dulles Research – A Virginia based private company offer “Carolina S-JDBC” JDBC driver that replace the need for Base SAS license. License constraints: (Carolina S-JDBC Driver Download, 2016) Annual subscription is $995.00 for a single instance of application server. Quote can be requested from enterprise wide installation. Free for non-commercial use. http://www.dullesresearch.com/sjdbc-download/ Solution:   class. forName ( "com.dullesopen.jdbc.Driver" ).newInstance();               Connection connection = DriverManager. getConnection (                       "jdbc:carolina:v2:libnames= ...