Wednesday, March 4, 2015

12 Greatest Computer Programmers In History

 The world of programming has come a long way and given rise to the most innovative and advanced programs, some of which were beyond anyone's imagination. But before we got to this, there were men and women who paved the way for what we have today.

Here they are!





1. Ada Lovelace

It may be seen as a new age thing with millions of lines of codes and imensely powerful computers, but one of the pioneers of programming was a woman named Ada Augusta King, a.k.a. Ada Lovelace. She was a mathematician who worked on Charles Babbage's mechanical general purpose computer known as the Analytical Engine.

2. Niklaus Wirth

Widely recognised as one of the pioneer's of programming, this is the man who created languages like Pascal, Euler, Algol and many others.

3. Bill Gates

A list of influential or greatest programmers can never be complete without mentioning the founder and creator of Microsoft. He has both admirers and haters, but no one can deny his contribution.

4. James Gosling

This is the man who created the Java programming language, which is arguably one of the most influential languages of all time.

5. Guido van Rossum

Have you heard of him? You've definitely heard of the language he created. This is the man behind the Python programming language.

6. Kenneth Thompson

Call him Ken because that's what the hacker community calls him. He has worked for Google and developed the Go programming language while working there. He also developed the original Unix operating system and a programming language called B, which was the predecessor to the illustrious C programming language.

7. Donald Knuth

This man is known as the father of anaylsis of algorithms for his contributions to the field of analysis and computational complexity of algorithms.

8. Brian Kernighan

He is the co-creator and developer of the Unix, AWK and AMPL languages.

9. Tim Berners-Lee

If you don't know this name then you should really work on increasing your awareness. This is the man who created the World Wide Web and hence gave us the lives we have today.

10. Bjarne Stroustrup

This man created the C++ programming language. Yes, the language that gave rise to so many of the best known programs and programming languages.

11. Linus Torvalds

Little needs to be said about this man. He's the creator of the Linux kernel, which is the base for so many operating systems.

12. Dennis Ritchie

C++ is an offspring of the C programming language and Dennis Ritchie is the man who created C.


Courtesy:- efytymes

6 Most Common Java Performance Problems

 In today’s age, making an application fast is as important as making it functional. Java application developers are always concerned about the performance of their applications. Most of these performance issues have common root causes. So performance analysts have addressed this issue in three basic categories, Database problems, memory problems and concurrency problems. Today we have listed six common Java performance problems.




1. Persistence Configuration: 

Advance options like Hibernate and JPA implementation provide fine tuning of database access but, there are some more options such as eager or lazy fetching that prolong the database response. Eager fetching makes less but complex database calls while, lazy fetching makes database calls more simple and fast. However, when the load of application increases, it causes database load. Developers need to understand persistence technology to avoid such problems. Using correct configuration options can fix this problem.

2. Caching: 

Caching is used to optimise the application response time. There is large in-memory data that enables fast access to persisted cache. The problem starts when no caching is used. Sometimes cache exhausts the memory. A properly configured cache doesn't cause any problem in application performance. Synchronization is another problem that occurs in distributed caching. Synchronization is important when caches are communicating with multiple server. Cache update is sent to caches in all servers to achieve the consistency. You should examine if your database really needs caching or not. You can determine cache size and ratio metrics. Proper planning of cache is very important to avoid cace problems.

3. Garbage Collector: 

The main functionality of Garbage collector is to reclaim the memory. The procedure is quite lengthy and Garbage collection may temporarily terminate all running threads. Garbage collector requires big response times and it causes CPU spikes. Developers can configure their verbosegc params to fix the system downtime. However, it is next to impossible to avoid the problems caused by Garbage collector. It is advised to limit the process by configuring heap size and JVM.

4. Memory Leaks: 

Memory leaks commonly occur in all the apps. Memory leaks in Java are different in some ways than C or C++. They are more related to reference management issue. In Java apps, reference to an object exists even if it is not required in program again, this leads to OutOfMemory error and forces JVM to restart. Developers can configure JVM params in different way to deal with memory leaks. Make sure that you pay attention to all details related to memory leak, sensitive Java collections and session management while coding an app in Java.

5. Thread Deadlocks: 

Thread deadlocks occur when more than two threads are accessing same resource and one is waiting for the other to release a resource. JVM exhausts all threads when deadlock occurs, this leads to slow processes in application. The only way to solve deadlock problem is to capture the thread dump when threads are deadlocked. You can avoid this problem by making application resources as immutable as possible. 

6. Thread Gridlocks: 

This issue occurs when there is load on synchronisation, too much of time is spent on waiting for single resource. Thread gridlock leads to slow response time and low CPU utilization. There are many threads that accesss same code and wait for the one to finish. You can solve this issue by checking where your threads and waiting. Eliminating thread synchronization according to business requirement can solve the slow processes issue caused by Thread Gridlocks. 



Courtesy:- efytymes

8 ways to manage your email better

If you only use Gmail
Inbox by Gmail is an app that de-clutters your account by categorizing similar emails into groups such as Social, Travel, Finance, Updates, Forums and Promos. For instance, notifications from Facebook and LinkedIn are bundled into Social, while newsletters from your bank will appear within Finance. The app still lets you view all the labels you have created in Gmail and move new emails to them.

In case you want to reply to a missive or call the sender later, just swipe left to set a reminder within the app. Inbox then sounds a notification at the time specified by you, which can either be dismissed or temporarily postponed.

The app even lets you preview and swipe through attachments like images, read shipping information related to your online purchases and more, without opening the email at all.

At present, you will need to visit google.co.in inbox to request an invite before installing the app on your phone.
Android, iOS: Free




For multiple email accounts
CloudMagic lets you access Gmail, iCloud, Outlook, Yahoo!, and IMAP accounts through a single app. You can personalize each account to have its own signature, colour and notification sound. The app lets you view your inboxes individually , or in a unified format.

Swipe left on an e-mail to delete, archive, or mark as read; press and hold to select multiple emails, and even add tools known as "cards" to cloud services like Google Keep, Evernote, OneNote, Pocket and Todoist.For instance, if you need to turn an email into an actionable to-do, use the To do list card, add it to your workflow in Trello, or set a reminder in Keep.

And yes, you can also password protect the app to keep your emails from prying eyes.
Android, iOS: Free

To connect with cloud storage 
If you juggle between multiple email accounts and use Dropbox or Box to store your data then try Boxer. On downloading, this app will only let you setup one email account either AOL, Gmail, iCloud, Outlook, or Yahoo! but if you send out five invites to friends in your address book, you get a free upgrade to the Pro version. Here, you will also be able to customize each account with a signature and colour. Additionally, you can create unlimited quick auto replies and a virtual inbox to view emails from select folders across accounts.

While composing a message, you can attach files saved in your Dropbox or Box account, provided the app is installed on your handset. If required, Boxer also lets you mark an email as an item to your to-do list, or save to your Evernote account.
Android, iOS, Kindle Fire: Free

For productivity 
Acompli Email & Calendar lets you access multiple functions without leaving the app.

You can access emails from multiple accounts: Outlook, Google, iCloud, Yahoo!; set appointments and schedules with the built-in calendar, and send files from your online storage accounts, like OneDrive and Dropbox, as well. The app also lists, by account, the attachments that have been emailed to you. It uses a "focused" filter to only list emails it thinks are important. Everything else be it newsletters, social network updates, bank mailers is under the "Other" filter.

Acompli lets you schedule replies with a simple swipe and view the exchanges (emails, meetings and files) you have had with contacts. Android, iOS, Kindle Fire: Free

For tablets 
Interface is optimized to work better on large-screen devices: correspondence is displayed as cards across the length of the screen. The app provides you with a quick preview of your email's contents, and you can even respond to messages from the dashboard interface itself.

Emails are categorized under labels: Personal, Social and Services. The app displays frequently emailed contacts in the form of photo icons, and you can tap any one to view all the conversations you've had.

Alternatively, tapping a sender's icon in the main list reveals quick actions like reply and archive. Molto also supports swipe gestures to change the viewing mode, or to delete mails.
Android, iOS: Free

Dodge spammers 
Have you ever regretted sharing your email address with people you barely know? And how about those online forms that need an email address and promptly sell it to spammers? With MailDrop, you can create a temporary ID for these purposes. Simply enter a username, then click "Go". You will be taken to your new inbox without a password! You can create any number of pseudo IDs; allowing you to keep separate inboxes for newsletters and websites.

MailDrop keeps it simple and strict: attachments are discarded, the inbox is cleared every 24 hours, and spam is filtered out. You can give your temporary email ID without worrying about being targeted with 'special offers' again.
http:www.maildrop.cc

Analyze your work 
Researchers at the Massachusetts Institute of Technology have developed a tool called Immersion that trawls your Gmail or Yahoo! inbox `To' and `From' only to display its contents as an interactive graphic. It analyzes your inbox to depict all your contacts as `nodes' along with the connections to other contacts (people who have been CC'd in correspondence).

Larger circles mean you have received more emails from that person. Click on any node, and Immersion shows you the number of mails you have exchanged, the date of the first, as well as the last email you have received.

An overall analysis of your inbox reveals the number of emails it in cludes, and the names of your top collaborators. It will display the total number of emails sent and received from the day you signed up for the account. And you can even look at this data for the past year, month, or week.

Finally, when you're done, you can logout and delete this meta data from MIT's servers. Ah yes, don't worry , the service does not read through the contents of your emails.immersion.media.mit.edu

Manage newsletters 
Me Many of us inadvertently subscribe to email newsletters, sometimes when signing up for an online shopping account, when downloading free software, or perhaps when register ing for a new internet service. Well, Unroll Me helps you manage your email subscriptions.s Sign up with your email ID and Unroll Me scans your : inbox for newsletters. These are then displayed on a web page e along with options that let you choose if you want to unsubr scribe; leave the email untouched; or 'add to rollup'.

The service automatically unsubscribes you from all the newsletters you opted out of, while the ones you've added to e your 'Roll Up' will come to you in a daily digest at a time d specified by you simply , a neat and tidy way to take care of all your newsletters.



Courtesy:- times of india

A first look at the Windows 10 universal app platform

Earlier today at Mobile World Congress in Barcelona, I provided developers a first look at the Windows 10 developer platform strategy and universal app platform. I encourage you to tune in to our Build conference in April for the full story.
Windows 10 represents the culmination of our platform convergence journey with Windows now running on a single, unified Windows core. This convergence enables one app to run on every Windows device – on the phone in your pocket, the tablet or laptop in your bag, the PC on your desk, and the Xbox console in your living room. And that’s not even mentioning all the new devices being added to the Windows family, including the HoloLensSurface Hub, and IoT devices like the Raspberry Pi 2. All these Windows devices will now access one Store for app acquisition, distribution and update.
For APIs specific to a given device family (e.g. a phone dialer), the universal platform also provides an easy way to light up that functionality within an app without having to resort to using conditional compiler flags.
Today I’ll briefly touch on how this new platform delivers on the three platform goals I discussed in January:
  1. Driving scale through reach across device type
  2. Delivering unique experiences
  3. Maximizing developer investments
You can expect us to go into all of the universal platform technical details at Build.
Driving scale through reach across device types with mobile experiencesTo understand why we converged Windows into one core and one developer platform, it’s worth examining how the customers’ relationship with their devices and the experience they expect has changed. The explosive growth in mobile devices over the last decade has led to the creation of totally new app experiences and has driven an extension of existing web experiences to enable developers to reach customers in innovative and unique ways. Until now, mobile experiences have largely meant app and web experiences built for mobile devices – most often defined by the phone you carry with you.
But this is increasingly too narrow a definition for a growing number of customers who want their experiences to be mobile across ALL their devices and to use whatever device is most convenient or productive for the task at hand.
We see this preference for mobile experiences manifest itself most profoundly in what customers search for in the Store. Just a year ago, the experiences customers sought on Windows phones were different from tablet, which were different again from laptops and PCs, and different from the game console. This has changed – rapidly. Today, the top Store searches for each device type overlap significantly, both across and within app categories.
Building a platform that supports this new world of mobile experiences requires not only supporting a number of screen sizes, but also providing flexibility in interaction models, whether it be touch, mouse & keyboard, a game controller or a pen. As a customer flows across their devices, they will often quickly transition from touch gestures (e.g. selecting a song or playlist, reading a news feed or document or viewing pictures from a trip) to keyboard & mouse for productivity (e.g. managing their playlist, writing a new blog post, or touching up that video or photo for sharing). To bridge the device gap (how many devices does a customer really want to carry with them?), the industry is seeing the emerging trend of multi-modal devices, like the 2-in-1 Surface Pro 3. Within app experiences, an increasing number of apps handle this exact scenario – except developers are bridging this gap by building one or more mobile apps, a desktop application, and a website. We believe this can and should be easier.
With Windows 10, we are leading a new path forward for mobile experiences – breaking out of the limited box of just mobile devices and empowering customers take full advantage of all of the screens in their life. For Windows, these mobile experiences are powered by our one Windows core and the universal app platform.
Gallo blog 1 v2
As we built the universal app platform, we set out to ensure that all Windows developers would equally benefit from this one core. The platform enables a new class of Windows universal apps – apps that are truly written once, with one set of business logic and one UI. Apps that are delivered to one Store within one package. Apps that are able to reach every Windows 10 device the developer wants to reach. Apps that feel consistent and familiar to the customer on all devices, while also contextually appropriate to each device’s input model and screen size. The new universal app platform completes our developer platform convergence by providing you with the ability to finally create one app that can run on mobile, desktop, console, holographic, and even IoT devices.
Delivering unique and personal experiencesThe universal app platform is designed to help you quickly build these new mobile experiences that are both consistent yet flexible, enabling you to deliver a unique, highly-personalized experience to delight and engage your customers across each device family you target. We do this by providing a number of platform capabilities that do most of the runtime adaptation work for you, and doing so intelligently, allowing you to focus on delighting the customer:
  • Adaptive UX: enables your app’s user interface to fluidly adapt at runtime based on how the customer is interacting with your app and the available device capabilities – rendering an experience that is contextually appropriate.
    • Screen layout: In addition to base app model improvements, we have improved the ViewStateManager to make it easier to create more adaptive experiences. This means that your universal app projects no longer require separate project heads or UI definitions for small and large screens, although we will still provide the option of separate UI definitions should you prefer it.
    • User controls: Windows 10 will determine, at runtime, how the customer is interacting with your app and render the appropriate user experience (e.g. on a laptop with a touch-screen, an app fly-out control will provide larger touch-targets if tapped with touch, as opposed to clicked with a mouse).
  • Natural user inputs: Windows 10 helps you build an app experience that is more personal and more human, by making it easy to incorporate natural user inputs into your app, such as natural speech, inking, gestures, and user gaze. Because Windows handles all of these inputs, we free you from needing to worry about how to parse the input for meaning – you only need to worry about which inputs are appropriate for your app and we’ll determine if they are present and parse the intent for you.
  • Cloud-based Services: Windows provides a number of services for use in your apps, such as Windows Notification Services (WNS), Windows roaming data and the Windows Credential Locker. With Windows 10, we are making more Windows services available to developers, including an expanded Cortana AI, OneDrive, andApplication Insights. Beyond Windows, we continue to make it easier to take advantage of Microsoft Azure using services like Azure Mobile Services and the Azure Notification Hub.
But we know that your mobile experience doesn’t end when the customer closes your app. There are a number of Windows shell advances that are enabled by universal platform advances, making it easier to keep your customers engaged and getting your apps launched more often. Examples include:
  • Cortana integration: Apps now appear (and can be launched) directly in Cortana search results, with installed apps given highest priority in the search results.
  • Action Center: Windows 10 brings a more consistent and actionable notification experience to all Windows devices.
Lastly, I’d like to call out that the universal app platform is at the heart of Windows 10 itself with much of the shell running on the platform, in addition to a number of our key Windows experiences (e.g. a number of in-box apps, the Windows Store, and the ‘Project Spartan’ browser, to name a few). And the same animations, APIs, and controls used by these app experiences are available to you. You can feel confident that this platform has been ‘battle-tested’ and is ready for you to build mobile experiences that delight your customers, just as we are.
Maximizing investments in your app and web codeWindows 10 is about making it easier for you and your code to do more and go further with a new platform built to maximize and extend your existing investments, both in your code and your skills.
We’ve designed Windows 10 to continue to support existing Windows apps and desktop applications on the devices for which they were developed. And we’re working to make it as easy as possible for you to bring those investments forward to the new universal app platform.
For our HTML developers, Windows 10 provides a number of advances for the modern web:
  • New rendering engine: The new engine frees you from having to do platform-specific work to deliver a consistent mobile experience and is included in Internet Explorer 11, in our new ‘Project Spartan’ browser, and will be used by the WebView control.
  • ‘Project Spartan’: The ‘Project Spartan’ browser itself is a Windows universal app and updated via the Store – helping ensure it is always kept up-to-date.
  • Web Apps: Windows 10 will make it easy for you to create a Windows app that packages your website for publishing to the Store. Once installed, your website can update and call Universal APIs from JavaScript, creating a more engaging user experience.
Gallo blog 2v2
Additionally, I’m pleased to announce that we will be delivering our first prototype of the Windows 10 Cordova platform in an Apache branch later next month – giving developers a preview of the update, and to get their feedback.
Getting ready for Windows 10As I said, this is only a first look at the Windows universal app platform. We’ll have much more to share at the Build conference in April. If you’re not planning to attend the event in person, please save the date and plan to attend online – you can watch the keynotes streamed live or the recorded sessions the next day. Check out the Build 2015 website for more information.

8 New Java 8 Features


Default and Static methods in Interface
Lambda Expressions
Optional
Streams
Method References
Data Time API
Nashorn Javascript Engine
Parallel Arrays



1.Default and Static methods in Interface :
    • Java 8 introduces new features to interfaces.
    • Before java 8 interface having only abstract methods but now java 8 added two more type of methods to interface !.
    • First one is default method. A method which is having a default keyword with method body.
    • Actually interfaces wont have any implemented methods  but now with java 8 default method we can add a method with default implementation by using "default " keyword.
    • The classes which are implementing this interface can use these default method and same time it can override the existing method. But its not mandatory to override.

    1. package com.instanceofjava;
    2. interface Java8InterfaceDemo{
    3.  
    4. abstract void add();
    5.   
    6. default void display(){
    7.  
    8. System.out.println("default method of interface");
    9.  
    10. }
    11.  
    12. }

    • The second new method introduced in java 8 is static method.
    • Yes like in classes now we can define a static methods inside interface by using "static".
    • Basically static methods which are defined in interface are interface level only. if we want to call these static methods which are defined in interfaces we need to use interface name so that we can access these methods.

    1. package com.instanceofjava;
    2. interface Java8InterfaceDemo{
    3.  
    4. abstract void add();
    5.   
    6. default void display(){
    7.  
    8. System.out.println("default method of interface");
    9.  
    10. }
    11.  
    12. public static void show(){
    13.  
    14. System.out.println("static method of interface");
    15.  
    16. }
    17.  
    18. }

    2.Lambda Expressions 

    • One of the most awaited and biggest release in java 8 is lamda expressions.
    • Ability to pass functionality/ behavior  to methods as arguments.
    • Allows us to write a method in the same place we are going to use it.

    1. package com.instanceofjava;
    2. interface JavalamdaExpression{
    3.  
    4. public static void main(String[] args){
    5.  
    6.  Arrays.asList( "j", "a", "v" ,"a","8").forEach( e -> System.out.print( e ) );
    7.  // java8
    8. }
    9.  
    10. }

    3.java.util.Optional:

    • One of the best and cool feature of java 8 is Optional class. Which is a final calls from java.util package.
    • The major repeating statement in every project is checking "NullPointerException". Before using any object we need to check whether it is null or not if its not null then only we need to proceed.
    • Optional is just like a container which holds a value of type <T> or "null". By using isPresent() method of Optional class we can check particular object is null not not.

    1. package com.instanceofjava;
    2. import java.util.Optional:
    3. class Java8OptionalDemo{
    4.  

    5.  
    6. public static void main(String[] args ){
    7.  
    8.  Optional< String > str = Optional.ofNullable( null );
    9.  System.out.println( "str having value ? " + str.isPresent() ); // output : str having value ? false
    10.  
    11. }
    12.  
    13. }


    4.Streams:

    • One of the excellent feature from java 8 as java.util.stream.
    • Stream API  introduces real-world functional-style programming into the Java.
    • Provides functional operations on stream of elements such as list , set and map 
    • Supports filtering, mapping and removal of duplicates of elements in collections, are implemented lazily.
    • Now we can get Streams from collections, arrays and bufferedReaders etc.

    1. package com.instanceofjava;
    2. import java.util.Arrays;
    3. class Java8StreamsDemo{
    4.  
    5. public static void main(String[] args ){
    6.  
    7.   Arrays.stream(new int[] {1, 2, 3,4,5})
    8.     .map(n -> 2 * n + 1) 
    9.    .average()
    10.     .ifPresent(System.out::println); // output: 7.0
    11.  
    12.  
    13. }
    14.  
    15. }

    5.Method Reference:

    • We can use lambda expressions to create anonymous methods. 
    • Sometimes, however, a lambda expression does nothing but call an existing method. 
      In those cases, it's often clearer to refer to the existing method by name.
    • Using Method references refer to the existing method by name, they are compact, easy-to-read lambda expressions for methods that already have a name

    1. package com.instanceofjava;
    2. import java.util.Arrays;
    3.  
    4. class Java8MethodRef{
    5.  
    6.   public  void show(String str){
    7.  
    8.         System.out.println(str);
    9.  
    10.    }
    11.  
    12. public static void main(String[] args ){
    13.  
    14.    Arrays.asList("a", "b", "c").forEach(new A()::show); // a b c

    15.  
    16. }
    17.  
    18. }

    6.Data Time API  

    • The next cool feature from java 8 is new date time API(jsr 310) added within java.time package.
    • Before java 8 if we want to format dates we use SimpleDateFormatter class in java 8 while declaring date itself it has constructor to pass format of date.
    •  Some of the new classes introduced in java 8 date time are as follows.
    1. LocalTime
    2. LocalDate 
    3. LocalDateTime
    4. OffsetDate
    5. OffsetTime
    6. OffsetDateTime



    1. package com.instanceofjava;
    2. import java.util.Arrays;
    3.  
    4. class Java8DateTimeAPI{
    5.  
    6. public static void main(String[] args ){
    7.          
    8.     LocalDate currentDate = LocalDate.now();
    9.     System.out.println(currentDate);
    10.     
    11.     LocalDate twentyMarch2015 = LocalDate.of(2015, Month.MARCH, 06);
    12.     System.out.println(twentyMarch2015);  //2015-03-06
    13.  
    14.      LocalDate firstApril2015 = LocalDate.of(2015, 4, 1);
    15.      System.out.println(firstApril2015);//2015-04-01

    16.  
    17. }
    18.  
    19. }

     

    7.Nashorn Javascript Engine


    •  Java 8 come with new Nashorn Javascript Engine which is allowing us to develop and run JavaScript applications.


    1. package com.instanceofjava;
    2.  
    3. import javax.script.ScriptEngine;
    4. import javax.script.ScriptEngineManager;
    5. import javax.script.ScriptException;
    6.  
    7. import java.util.Arrays;
    8.  
    9. class Java8JavaScript{
    10.  
    11. public static void main(String[] args ){
    12.          
    13.   ScriptEngineManager manager = new ScriptEngineManager();
    14.   ScriptEngine engine = manager.getEngineByName( "JavaScript" );
    15.   System.out.println( engine.getClass().getName() );
    16.   System.out.println( "output:" + engine.eval( "function show() { return 10; }; show();" ) );
    17.  
    18. }
    19.  
    20. }

    1. jdk.nashorn.api.scripting.NashornScriptEngine
    2. output:10

    8.Parallel Array Sorting

    • As of now java 7 we already having Arrays.sort() method to sort objects now java 8 introduced parallel sorting which has more speed than arrays.sort() and follows Fork/Join framework introduced in Java 7 to assign the sorting tasks to multiple threads that are available in the thread pool.
    • Java 8 added parallel sorting functionalities to java.util.Arrays to take advantage of multithread machines 


    1. package com.instanceofjava;
    2. import java.util.Arrays;

    3. class Java8JavaScript{
    4.  
    5. public static void main(String[] args ){
    6.          
    7.          int arr[]={1,4,2,8,5};
    8.          Arrays.parallelSort(arr);
    9.  
    10.          for(int i:arr){  
    11.              System.out.println(i);  
    12.            } 
    13.  
    14. }
    15.  
    16. }

    Courtesy:- instanceofjava