Coming up in future

5. February 2013 14:24 by Parakh in General  //  Tags: , , , ,   //   Comments

My last post, although not very utilitarian was an exiting one for me, as it allowed me to share my thinking. This post continues the theme of my last post. I wanted to share some of the choicest videos that helps us see a glimpse of what future holds for us. See how research conducted at avant-garde institutes might completely change our lifestyle, our thinking and give and new insights into solving problems ranging from transportation mental disorders.

In the first video Eric Schmidt (Chairman, Google) discusses about how ideas that had been in incubation for a long time are now coming to fruition. This specially ties into my previous post on the how proliferation of cloud computing and bandwidth are intertwined.

Eric Schmidt of Google talks at Princeton about the future of technology

 

I am big fan of innovation coming out of Google. One of them is the project of Google Glasses. It is worth noting how they have captured the facets of life where such a device might be of help. Although I doubt people will just put it on, the moment they wake up.

Project Glass: One day...

 

In the similar tone, here is Microsoft’s 3D Holodeck

Microsoft's HoloDesk - Direct 3D Interactions with a Situated See-Through Display

 

Sebastian Thurn’s Stanley was the winner of the DARPA Grand Challenge 2005. That challenge has inspired both tech industries and auto industry to create driverless cars. Listen to him give a beautiful introduction to the concept.

Sebastian Thrun: Google's driverless car

 

Simplifying complex concepts is an art unto itself and one that takes a lot of deliberate practice. Listening to Juan Enriquez discuss the direction that biotech will take and its implications on the life is mesmerizing.

Juan Enriquez: Using biology to rethink the energy challenge

 

Juan Enriquez: Will our kids be a different species?

 

Juan Enriquez: The next species of human

 

While advancement in technology mostly yields very tangible results in the form of automation, the time spent upon dealing with various problems can also yield simple solutions and a completely new insight. This video shows how VS Ramachandran found new insights on curing the phenomenon of phantom limb.

VS Ramachandran: 3 clues to understanding your brain

These are just some of the videos that help us what future beholds for us and understand the power of science and engineering, and why STEM courses are important for the future of growth of a nation. Just want to sign off this post with this video of Sir Ken Robinson, emphasizing the changes in the education system that needs to be bought to help catalyze and realize the creative thinking.

Sir Ken Robinson: Do schools kill creativity?

 

I hope this post made you as exited as I was when I got to revisit these videos.

Cloud computing and what it means for internet pipes

27. January 2013 13:47 by Parakh in Cloud Computing, General  //  Tags: , , , , ,   //   Comments
Technology companies in order to promote their cloud platform and integrate in our daily lives, might have to take ownership of infrastructure supporting the internet and in the process might also leverage this endeavor to become a service provider.

Key takeaway:

Technology companies in order to promote their cloud platform and integrate in our daily lives, might have to take ownership of infrastructure supporting the internet and in the process might also leverage this endeavor to become a service provider.

Read on:

In the not so distant future, we will be travelling in self-driving cars that would adjust the cabin climate according to the ambient climate and habits of the user, play music from your home server or read news/business reports using a digital subscription, and after dropping you off at the office will go and pick your groceries based off of the list sent to your car by your refrigerator. Once you reach home, you will be greeted with the ambience according to how your schedule went during the day. You will automatically be reminded by your home about your favorite TV serials scheduled for the day and will automatically record them for later playback, in case you are unable to see them when scheduled.

 

Microsoft’s vision of productivity in future

 

 

A Day Made of Glass... Made possible by Corning.

 

You see, that a lot of what I mentioned is already happening around us in or form or the other, it is just that it is not happening in one cohesive form, one mass that can act seamlessly. But that will change in future. A lot of what I mentioned in the opening paragraph requires the following things:

1. Data about you – living style, requirements, frequency and kind of purchases etc.

2. Appliances that operate standard protocols

3. Bandwidth

The big data and analytics movement aims to solve the first requirement and if you look at the concept of shopping recommendations, to a certain extent, it does solve it, and with time and data it will get better. The second requirement of appliances that operate on standard protocols is also being worked upon. The third requirement of bandwidth is the focus of this post and is the most interesting to me at this moment. Let me present my perspective on where things are and where they are heading.

It has been a long time since the term “Cloud Computing” was first coined, and it materialized in the form of Amazon Web Services in 2002. Cloud computing has since then evolved into various kinds of services, the gist of all being that, the consumer of the service is not required to engage in managing IT infrastructure. The service can be in the form of providing an operating system as a service (Windows Azure), which can then become a foundation to run programs written in various programming language(s) supported, or it can be simple Customer Relationship Management (CRM) system (Salesforce). All these are offered as services that are managed by their parent companies, freeing the service consumer to focus of what they do best, and not invest capital and human resources into managing infrastructure.

Now if we take a step back and look at how principles of economics governed the spread of general computing, we will find that general computing first targeted the enterprise space to make them efficient and save cost, and then came down to the general masses. Similarly, cloud computing is currently targeting the enterprise space heavily, enticing them with the convenience and upfront capital cost savings the concept brings with it, but has also started to crawl into the consumer space. Look at DropBox, Google Drive, Microsoft SkyDrive; they are not enterprise storage solutions, but rather consumer facing cloud storage solutions. In the entertainment section look at iTunes, Amazon AutoRip, Google Play and Netflix; they are not enterprise solutions at all, but rather a flavor of cloud services geared towards consumers.

An interesting side effect, of cloud computing is that it can be extended to individual consumers and be used to gather data about their purchasing habits. Applications and services like iTunes, Google Play, Amazon, Netflix etc. take into account your choice of music and based on your past preferences suggest you potential songs, movies, books, goods, services etc.

Since these services rely on internet as the medium of conveyance, the bandwidth available between the offering and the consuming entities can become an issue. This becomes a bigger concern if the service provider hosts a public facing service that is heavy on bandwidth such as video, for example Netflix.

In such situations, the growth of the service provider depends upon meeting the demands of the service consumer, and ensuring that there are reliable and redundant pipes available. Given this, it would bode well, if they have a say in the upkeep of these internet conduits. A more desirable situation from the service provider’s perspective would be to own this essential piece of infrastructure, if they want to grow their cloud platform.

As far as I can see and evaluate, I already see that happening, albeit at a smaller pace. Companies like Google, I believe already have a strategy and have started acting on it in the primary markets. We can see that in the form of high speed fiber connectivity in Kansas City, Missouri. Recently, Google started offering free Wi-Fi in limited areas in New York and in the City of Mountain View. Fast connectivity means more viewing of high definition video, more usage of cloud storage, more video conferencing leading to an alternate source of income for cloud computing provider(s) and ultimately an end to end solution i.e. collection of data about habits leading to predictive analytics leading to automated lifestyle. So it starts with the ownership of internet connectivity in city areas and eventually might end up with transcontinental internet pipes, and in the process becoming a service provider.

It gels well with the philosophy and selling points of cloud computing which are redundant data backups at geographically dispersed locations and content distribution networks which serve content from the data center which is located nearest to the consumer. One more pointer in this direction is the purchase of Motorola Mobility by Google, and now having access to a cache of intellectual property in the form of telecom patents.

One of the primary reasons of this trend is that if you look at history, then it will be apparent that the telecom companies have not done much to push the limits of bandwidth on a pro-active basis. They just offered to the consumers whatever lowest common denominator they could come up with that proved profitable to them. Before the advent of cloud computing, there was in fact no stake of the tech companies either. But all that is changing. More mobile devices, proliferation of video content, video communication, in-app purchases, cloud storage etc. require more and more bandwidth. That’s too much of a responsibility to be left with Ma Bell, especially when they are not getting a cut in the pie. Self-driving cars, home automation, intelligent thermostats, refrigerators etc., all eventually leading to an internet of things, would require a whole lot of bandwidth and redundancy. Retina screens, HD TVs, 4K TVs needs loads of bandwidth in order to render the depth and richness that they have been designed for. Thus, the future depends on how efficiently we carry data to and fro between the serving and consuming points, and that requires discarding off copper conduits and embracing optical and high speed wireless technologies with new standard protocols that work efficiently, precisely what pioneer companies like Google are quietly working on.

See more:

1. The future according to Google's Larry Page

2. The Internet of Things

3. Eight business technology trends to watch

Using DropBox to back up your Source Control repository

15. January 2013 14:28 by Parakh in Cloud Storage, DropBox, Source Control, SVN  //  Tags: , , , ,   //   Comments
Let cloud storage take care of automatically backing up your source control repository.

In organizations of every size, code is generally managed with the help of source control. It is great for keeping a versioned history and doing branched modifications. The code repository is generally kept in a regularly backed up environment, having someone caring for it with all their wit and skills. But the same level of service and peace of mind is not available to the same set of developers working on their weekend projects on their personal computers. Granted they can have the source control, but having a service regularly taking back-up of your repository can be hard; sometimes because of lack of time and/or storage media and at other times because backup is fragmented at different places and we do not have any idea of the whereabouts of the latest one. Cloud storage removes this obstacle and allows us to take care of automatic backups, in fact, instantaneous backups of the repository, whenever anything in repository is revised or added, without the hassle of handling any storage media. This has been made possible fundamentally by the fact that most of the cloud storage services provide a client application that can watch over a certain folder for any changed and/or new bits of information.

Here I will be covering on how to make DropBox’s Windows client application take care of a Tortoise SVN repository.

myImage

Figure 1 Conceptual diagram

Steps involved:

1. Install DropBox’s client application, appropriate for your operating system, with advanced parameters, specifying the name and location of the DropBox folder and choosing selective sync. If you have multiple accounts, make sure you provide the credentials of the account where you want a copy of the repository to be stored.

clip_image001

Figure 2 Advanced installation

 

clip_image002

Figure 3 Location of backed up folder

 

clip_image003

Figure 4 Using selective sync to better use your storage space

 

clip_image005

Figure 5 Installed directory

2. Install Tortoise SVN with default parameters.

3. Go to the folder that is being watched by the DropBox client service for any updates or additions and make a new folder in which you want the repository structure housed.

clip_image007

Figure 6 Create repository in DropBox folder

4. Right click on the folder and create a new repository there. Tortoise SVN will create a new repository there (there will be folders like conf, db etc.). You will be storing your code in this repository.

clip_image009

Figure 7 Create repository

 

clip_image011

Figure 8 Resultant repository structure

5. Once you create a new repository, DropBox application will immediately start synchronizing the backup folder with the one on its servers, replicating the entire repository structure.

6. Now navigate to the location to where you want to have your working copy of code. You have to create a working copy in which you will later be checking in your code and any new assets that you want added to your repository.

clip_image013

Figure 9 Check out from your repository

7. Finally you can add folders which can contain your projects. See the final result. (Create new folder –> Add to repository –> Commit to repository)

clip_image015

Figure 10 Example of directory structure of working copy

8. Once you do any updates to your repository from your working copy, only the bits that change or gets added will be uploaded to your DropBox profile.

It is important to understand that you have to make a backup of the repository structure itself (i.e. the weird structure containing folders such as conf, db, hooks etc.) and not the working copy, since you can always get the working copy from the repository.

Many thanks to my brother Priyanshu Agrawal for letting me use his computer for software installation and resultant screenshots.

Inheritance relationships in classes

5. January 2013 02:33 by Parakh in Architecture, UML  //  Tags: , , , ,   //   Comments

One of the essential skillset in understanding Object Oriented concepts is getting the entities and the relationships among them correct, that make up the domain model. The domain model is the real world representation of the problem area that is required to be solved with software development. The modeling of such a domain model can be done using a variety of modeling techniques, dominant of which these days is the Unified Modeling Language or UML

The traditional approach to inheritance has been to define a superclass and a sub class approach. An example of that would be that of Car being a general class embodying all the common attributes and behavior of a car, and a specific car segment such as sedan, sports car, wagon etc. being a subclass inheriting from the Car class. But in real world relationships among entities are much more complicated than that. As object oriented paradigm matured, object oriented languages also advanced and gave us a lot more fundamental structures that supported abstraction and realization of relationships that did not fit well into the classical inheritance model.

OK, so time to get to the gist of the matter. The following are the principle relationships that can be used to cast a domain model and do programming against:

OK, so time to get to the gist of the matter. The following are the principle relationships that can be used to cast a domain model and do programming against:

1. Generalization relationship

2. Dependency relationship

3. Realization relationship

4. Association relationship

a) Aggregation relationship

b) Composition relationship

A complementary concept that goes hand in hand with the relationships is the concept of multiplicity, explained later in this post.

1. Generalization Relationship

A generalization relationship is a parent class relationship, embodying the classical OOP concept of traditional inheritance. The relationship emphasizes a “is-a” relationship, and the shown with the help of a solid line with a hollow arrow going from the from the derived class and pointing to the parent class.

Example: A manager and a worker both are person on a higher abstract level, hence both Manager and Worker classes can be thought to derive from the Employee class.

clip_image001

Figure 1 Generalization relationship

 

2. Dependency Relationship:

As the name suggests, dependency relationship suggests a dependency of an entity over another. Dependency relationship is also called a client-supplier relationship, in which the client depends upon the supplier for accomplishing something. One important defining characteristic of this kind of relationship is that if the supplier changes in a way, then it affects client in some way. In UML, dependency relationship is shown by a dashed line with an arrow on one end, going from client and pointing to the supplier.

clip_image001[5]

Figure 2 Dependency Relationship

Let’s take an example: I am a developer and I use a laptop to accomplish the objective of writing code. So it is a dependency relationship. If you change the laptop to a tablet, then it certainly affects me as it will have an impact on productivity.

clip_image001[7]

Figure 3 Dependency relationship between me and my computer

In terms if code, it will be the Me class using an object of computer in DevelopCode method.

public class Computer
{
}
 
public class Me
{
    public object DevelopCode(Computer computer)
    {
    }
}

 

3. Realization Relationship:

This form of relationship is primarily used to model classes that implement any interface. In a way, it says that the objects of such classes realize the implemented interface(s). The relationship is depicted by joining the class and interface with a dashed line with a hollow arrow head pointing to the interface realized.

clip_image001[1]

Figure 4 Realization relationship

A practical example in the .Net world is the implementation of the IDisposable interface which needs the public method Dispose() implemented.

public class MyClass:IDisposable
{
    public Dispose();
}

 

4. Association Relationship:

An association relationship signifies a stronger form of relationship between two entities. While generalization relationship signifies a “is-a” relationship, association relationship signifies a “has-a” relationship. This type of relationship comes into play when the relationship between two entities is more of containment than a superclass-subclass relationship. A car “has-a” engine (that “a” should have been “an”, but I just want to make my example clear without getting into English grammar rules). Similarly a library “has” books. A student “has-a” schedule.

Association relationship is shown by a solid line between the two entities sharing the relationship.

clip_image001[3]

Figure 5 Association relationship

 

clip_image002

Figure 6 A Car "has-a" engine

In code this strong relationship manifests in the form of a one entity using the object of the other entity as a class variable or property.

In real life, entities rarely stand all by themselves. They are complex, and they are complex because of their interaction with other entities. If you notice the examples mentioned for association relationship, then you might be thinking, that there are some scenarios in which an entity can have a scope which is dependent/independent of the other entity. An engine can be taken out of a car and fixed into another car, a book can be sold by a library if it does not find any patron for a long time and a schedule has no meaning without a student. In order to take this scenario into account, association relationship can be broken down into aggregation relationship and composition relationship, depending upon the fact whether the lifetime of one entity depends upon the lifetime of the other entity, which in turn is determined by the strength of relationship between the two entities. For example: A car engine can have a life outside of a car, but a schedule cannot have any meaning without a student.

4.1 Aggregation Relationship:

Aggregate relationship is a special form of association relationship. In this relationship, the lifetime of the individual entity is independent of the aggregate entity (complex object). In code, the individual entity’s class object is used as a variable or property in aggregate entity’s class code. Aggregation relationship, in UML is denoted by a solid line between the two entities, with a hollow diamond at one end attached to the aggregate entity.

clip_image001[5]

Figure 7 Aggregation relationship

 

clip_image002[5]

Figure 8 Car has an engine that can exists independently outside of the car

public class Engine
{
    public int EngineCapacity {get; set;}
}
 
public class Car
{
  public Engine Engine {get;set;}
}
 

4.2 Composition Relationship:

Composition relationship is a special form of association relationship in which the lifetime of the individual entity depends on the lifetime of the composited entity (complex object). In code, the individual entity is defined within the composited entity. Composition relationship, in UML is denoted by a solid line between two entities, with a solid diamond at one end attached to the composited entity.

clip_image001[7]

Figure 9 Composition relationship

 

clip_image002[7]

Figure 10 Book is made up of chapter(s)

public class Book
{
    public class Chapter
    {
        public int NoOfPages {get;set;}
    }
 
}

 

I hope this post will help clarify some of the concepts related to inheritance relationships in classes.

References:

1. http://www.uml-diagrams.org/

2. http://en.wikipedia.org

 

Diagrams made with Visual Paradigm for UML Community Edition

clip_image001[11]

Object oriented Thinking

23. September 2012 10:35 by Parakh in Architecture, Object Oriented Paradigm  //  Tags:   //   Comments

The title and subject of this blog post is a tribute to the pioneering course that I am attending at Coursera: An Introduction to Mathematical Thinking. The course is basically a transition course helping students coming from a high school mathematics background transition to university mathematics. So far I have attended two lectures and I must say the course is what I needed when I was still in school and planning my career. Such transition courses, the motive of which is not teaching the hardcore pure subject, or even the applied form of the subject, are the need of the hour, be it any field of science or academia for that matter. These not only help the prospective candidates prime up to what lies ahead, but also helps them evaluate if they are genuinely interested in the subject matter. The reason accurately put up by Prof. Keith Devlin is “For all the time schools devote to the teaching on mathematics, very little (is any) is spent trying to convey just what the subject is about. Instead, the focus is on learning and applying various procedures to solve math problems. That’s a bit like explaining soccer by saying it is executing a series of maneuvers to get the ball into the goal. Both accurately describe various key features, but they miss the “what” and the “why” of the big picture.”

The same reasoning can be extending to computer programming using the Object Oriented paradigm. Of all the learning, students and developers starting in the field of computer programming using modern object oriented languages do, almost all of it is comprised of learning the semantics of the language, and hardly, if any related to thinking in terms of objects. They then wonder about the various constructs available to them in a programming language, and how to use them but are unable to get a clear answer. The situation worsens by the fact that they are supposed to learn about the various supporting frameworks like .NET Framework for doing general programming, Windows Communication Framework (WCF) for creating services, Windows Presentation Framework (WPF) for making presentation layer, ASP.NET etc. apart from the technologies like SQL for data access etc. On top of that developers are always under the constant pressure to develop and deliver the applications in the shortest time possible, leading to a diluted learning experience all along the way. Some of the effects of this diluted experience are:

1. Having a theoretical understanding of advanced constructs offered by an object oriented language like C# or Java, but not a practical understanding as to where they can be used.

2. Trouble understanding the source code of well-constructed, well documented software.

3. The developer ends up creating code, that is hard to maintain.

When these developers come on to more responsible positions, they are not able to effectively lead and mentor the incumbent developers under them.

I believe that technical writers should also take upon the responsibility of including a short section on object oriented thinking before touching upon the technical semantics of object oriented language.

Majority of the developers get their first experience of computer programming in an object oriented language while they are in school. Due to questionable quality of teacher(s) available, they end up learning to use the language in a procedural manner, thus not learning the true nature of the object oriented paradigm. Recently, I was having a discussion with a colleague about a domain model and the kinds of design patterns that we could use to structure things, and he made a thought provoking remark, about how things differ in the Java and .NET world. He made the remark that a Java developer thinks in terms of objects, because of the way Java is taught and maturity of the developers in the Java world, while in .NET arena most of the developers think in terms of screens and the resulting code that can then support those screens. Most of the .NET developers transitioned from the VB6 (a non-object oriented language) and continued software development in more or less the same way in object oriented languages supported by the .NET Framework. Microsoft worked to make the transition easier by emphasizing on VB.NET (an easier language for someone coming from VB6 background) and developing technologies like ASP.NET Web forms which were event based and could be used without a strong understanding of object oriented concepts. Please bear in mind that I am not saying that Web forms are bad, it is just that they are easily misused (I myself am a Web forms developer). It is only recently that Microsoft has started releasing documentation centering around practices which emphasize organized object oriented development, rather than the traditional selling point of Rapid Application Development. Still I feel there is a dearth of simple examples in MSDN that educates the developers on how to develop applications in an object oriented manner. Still a lot of documentation only tangentially touches upon the foundational object oriented concepts. A lot of examples assume a very simple domain model work with the assumption of having a very direct correlation between the data and the object model, resulting in usage of Entity Framework in virtually every example. This further makes the learning from examples a bit harder than it ought to be.

Anyways, I hope for the best and believe that all .NET developers (me included) will learn about the basics of object oriented paradigm in the manner intended. I myself learnt about the languages and frameworks first and later on learnt about the true nature of Object Oriented paradigm and how to use the constructs of an object oriented language (C# in my case) effectively. I list some resources below that have helped me to learn about the object oriented paradigm and how to use the language constructs effectively.

1. Series on how to build layered web applications using Microsoft ASP.NET 2.0 by Imaar Spaanjars

2. Series on how to build n-layered web applications using Microsoft ASP.NET 3.5 by Imaar Spaanjars

3. Beginning C# 2008 Objects: From Concept to Code

4. The Object-Oriented Thought Process

In my next post I hope to touch upon a practical example of object oriented programming using Visual C# and using .NET Framework.

Month List

ParakhSinghal@Twitter.com

Note: For Customization and Configuration, CheckOut Recent Tweets Documentation