Tuesday, September 5, 2017

Java Productivity Tips: Top Picks From The Community (Extracted from Freelancer)

Do you find yourself distracted when trying to complete the programming tasks on your to-do list? Many software developers blame Facebook, Twitter, and YouTube for their inefficiencies. Some computer programmers get distracted by PlayStation, and offline computer games.
Are you ready to drop the bad habits that are stopping you being productive?  Incorporate these tips into your professional life:
1. Use Bash scripts
A Bash script is a blank text file that supports a chain of commands. It is superior to the Command Line because you can execute numerous complex commands. This helps a software developer accomplish many tasks through automation. You can also use alias commands to make work easier.
Freelance developers may receive overwhelming orders from clients. A Bash Script comes in handy since it helps them multitask on various complex projects using alias commands. You can access your automation using unlimited shortcuts.
2. Present your code in a reader-friendly format
One common mistake new programmers make is providing codes without reference comments. This makes it hard for a second party to understand certain aspects, or track additional changes, and it can discourage software developers from making valuable additions to the program. Expert computer programmers use one-liner comments to substitute lengthy bits of logic.
A one-liner comment helps you track the logic behind all changes made to the program.  It also minimizes the time spent tracking bugs. Another benefit is obtaining better rankings from credible search engines, since they prefer websites with simple code. Software developers who are working on a group project work more efficiently when using code that is properly formatted. You can learn how to present your code neatly by downloading free samples in various software developers online forums.
3. Do thorough debugging
A bug is a programming error that limits a software’s effectiveness. A software containing numerous bugs may freeze abruptly during use. These bugs hinder users from accessing features because the program cannot execute incomplete commands. Java lets software developers use the internal debugging tool by setting breakpoints.
Breakpoints enable software developers to analyze their programs line by line. You can use different debugging tools to monitor active processes by running the program step by step. This exercise helps you to identify the common mistakes you unknowingly repeat when coding.
For better results you can hire external people at freelancer.com to do the debugging for you.
4. Monitor your system
Software developing involves a variety of stages before the final product gets released to its end users. You need to test it in various scenarios to observe its performance and effectiveness in solving real life problems. Monitoring helps you notice any bugs you might have missed during debugging, and you can spot incompatibility issues that arise when testing the software on various operating systems.
You can use premium tools to monitor your program. Some reliable open sourced tools are  Chef and Puppet.
5. Use Batch processing
Batch processing helps smart software developers execute various recurrent tasks without additional time or costs. You can manage your phone calls, emails, appointments and business social media posts by grouping them into a single batch. Batch processing is popular because no special hardware is required. Most multinational corporations use batch processing for daily data management operations, and handling daily office tasks.
As a team leader, you can use batch processing to handle your group’s daily activities such as posting daily updates of pending projects via email.
6. List the tools you require
Software developers who dive into a project without researching what they require end up wasting time and money. Research helps computer programmers identify software tools that enable them to deliver high-quality results in the shortest time possible. You may realize that you need a different IDE or new library updates to handle a client’s project.
Researching also helps you to identify all possible challenges that may arise during developing and testing. By having an accurate understanding of the project, you’ll formulate a realistic strategy to boost your performance.
7. Develop testable codes
Successful people achieve their dreams by visualizing the desired end product. They develop strategies by beginning with the end in mind. This is a reliable approach to identifying any issues that may pop up during the software’s testing stage. You’ll also spend less time designing a testable code by doing it bit by bit.
Developing testable codes is suitable when working on a group project because it’s easier to track and correct all changes.  Having a testable code ensures you don’t execute your software manually whenever you want to test it.
8. Join online Java forums
Online forums provide unlimited opportunities for both upcoming and established software developers to gain useful knowledge. Popular Java online forums such as StackOverFlowOracle Java Forum or Java Forum are free, and contain links to useful eBooks, video tutorials and blog posts on various Java topics. Many seasoned computer programmers on these forums provide swift answers to questions posted by fellow members.
A majority of novice computer programmers are struggling with Java programming because they lack mentors. It may be difficult to approach a college professor because they might be too busy helping other students. However, it’s easier to approach a fellow Java programmer on an online forum.
9. Tackle new projects
Learning takes place when you expose your mind to different projects that require new skills and programming methods. Handling new programming projects helps budding software developers learn how to use different tools to obtain a variety of results. When you take on a new programming task that’s beyond your current experience, it builds your self-confidence to handle difficult projects.
Various online Java forums host friendly programming tournaments for beginners, intermediate, and expert software developers. These challenges provide ideal opportunities to enhance your programming skills without incurring additional expenses.
To handle new projects, you can utilize the services of other coders at freelancer.com.
10. Maintain a calm state of mind
Software coding is a rigorous mental process that demands attention at all times. A simple distraction could lead to numerous software bugs. To function efficiently, you need 6-8 hours of uninterrupted sleep. Always eat a nutritionally-balanced breakfast to keep your mind alert during your morning coding sessions.  Avoid dwelling on negative situations that increase mental stress, and affect your concentration on pending projects.
How to maximize your daily efficiency
To effectively apply the tips shared above, you need to manage the usual distractions which every software developer deals with on a daily basis.
  • Read your emails towards the end of your day- Your main objective is developing software that functions effectively. This means that you’ll spend a huge portion of your day typing commands and testing the software. Responding to emails at the wrong time distracts your attention from important tasks at hand.
  • Set daily objectives. Most programmers experience slow progress in their projects because they lack goals to guide their efforts. Setting daily goals helps to channel your time and resources to accelerate progress wisely. It’s easy to beat deadlines in good time when you meet your daily objectives.
  • Create a motivating playlist. Did you know that music keeps the mind alert for lengthy periods? It’s a great alternative to consuming coffee and energy drinks to retain alertness. Before commencing on your tasks, take about ten minutes to create a playlist from your favorite songs.
  • Close all idle tabs on your browser. It will prevent you from getting distracted by social media websites.
You don’t need expensive hardware or software to improve your productivity. Simply apply these tips, and you’ll notice improvements in no time.

Sunday, August 13, 2017

JPA - Tips

###  Orphan Removal and  CascadeType

JPA 2 supports an additional and more aggressive remove cascading mode which can be specified using the orphanRemoval element of the @OneToOne and @OneToMany annotations:

@Entity  
class User{ 
  @OneToOne(orphanRemoval=true) 
  private PhoneNum phoneNum;  
}

The difference between the two settings is in the response to disconnecting a relationship. For example, such as when setting the address field to null or to another Address object.

  • If orphanRemoval=true is specified the disconnected Address instance is automatically removed. This is useful for cleaning up dependent objects (e.g.PhoneNum) that should not exist without a
    reference from an owner object (e.g. User).
  • If only cascade=CascadeType.REMOVE is specified no automatic action is taken since disconnecting a relationship is not a remove
    operation.

Saturday, July 29, 2017

Java - Random Helpful Tips

  • Ternary Operator
This  will to reduce line number of  code . 
condition ? ifConditionTrueWhatShouldHappen : ifConditionFalseWhatShouldHappen
 This can  be use instead of ,Normal if  and  else .


  •  Substring
    •     public String substring(int startIndex) : 
   This method returns new String object containing the substring of the given string from specified     startIndex (inclusive). 

    •     public String substring(int startIndex, int endIndex):  
  This method returns new String object containing the substring of the given string from specified     startIndex   to    endIndex (exclusive).
  Index starts  from 0  .Returns index where found, or -1 if not found 
ex :-  
String text = "Here there everywhere";
int a =text.indexOf("there");   // a is 5
int b =text.indexOf("er"); // b is 1 
int c =text.indexOf("eR"); // c is -1, "eR" is not found
  •  For Checking Null
    if(foo != null && foo.bar()) {
       someStuff();
    }
    will use short-circuit evaluation, meaning it ends if the first condition of a logical AND is false.            
  •  The && and || operators "short-circuit", meaning they don't evaluate the right hand side if it isn't        necessary. The & and | operators, when used as logical operators, always evaluate both sides.


  • Variable Arguments (Varargs) in Java
     
  • There can be only one variable argument in a method.
  • Variable argument (varargs) must be the last argument.
  • ex:-
    // Java program to demonstrate varargs
    class Test1
    {
        // A method that takes variable number of intger
        // arguments.
        static void fun(int ...a)
        {
            System.out.println("Number of arguments: " + a.length);
            // using for each loop to display contents of a
            for (int i: a)
                System.out.print(i + " ");
            System.out.println();
        }
        // Driver code
        public static void main(String args[])
        {
            // Calling the varargs method with different number
            // of parameters
            fun(100);         // one parameter
            fun(1, 2, 3, 4);  // four parameters
            fun();            // no parameter
        }
    }

Friday, July 7, 2017

How to Read Out Loud ,Pdf File etc and Listen to Them Later

If  we  able  to  convert    pdf  files   that  we  have  to read  ,to  audio  files ,It  will  be  great   help  to our   studies .


You  can   use   Adobe  Reader    to  read  out  loud , pdf   files  .But  I    there  is  no direct   way  to convert  those   files  to  MP3  files to  listen  later  .










You  can   use these   steps  in  this  web  page  to use    this  useful  method   Link - Simple Ways on How to Convert PDF to MP3 without any Fuss  .



There  is  other  softwares also ,  But   most  of  them  have  to  pay  to  pay  if  we  convert  them  to  MP3 file  , Watch  this video  .  So  i  think   earlier  way  will  be help most .






Hope   this will  help  to  your   studies . Try  it .

Tuesday, May 30, 2017

How to use CMD to recover files from virus infected storage media

If    your data lost or inaccessible due to virus attacks,  you   can  use CMD (command  prompt)   to  recover  those   files . 

#  First  open  cmd .
#  Then  type        ATTRIB  -H  -R  -S   /S    /D  J:\*.*        in  cmd .   Letter  "J"  in that  should  replace  from  your  drive  name  letter .
#  Then , you  will  able  to  view  your   files  that  inaccessible  due  to  virus  attack .
#  Some  times   you  may  get   error  saying , "ATTRIB  is not  recognized as an internal or external command ........"  etc  , Then edit 
  1. Right click My Computer> Properties> Advanced System Settings  or  search   for "Environment variables"  in  find  option .
  2. In the Advanced System Settings Tab, click on Environment variables and look for Path in System variables
  3. Click Edit and add C:\Windows\System32  at the end of the already  have path  variable . MAKE SURE YOU DON'T DELETE THE REST OF THE STRING


Wednesday, May 10, 2017

Components to be created in Spring MVC application.

1.Add maven dependencies  in  porm.xml

2.Add DispatcherServlet in web.xml

3.Configure view-resolver in spring-servlet.xml

4.Create the controller with handler  mappings

5.Finally write the JSP

Some interesting things to explore more

 Here  some  some  things  to  study  more ,     How Google Search works               https://developers.google.com/search/docs/fundamental...