Wednesday, February 28, 2018

struts 1.x redirecting to another action without using actionform

ActionRedirect redirect = new ActionRedirect(mapping.findForward("send"));
redirect.addParameter("commonInt", formA.getCommonInt());
return redirect;
 

form problem

  1. input type hidden parameter although written in capital on jsp but being obtained as old values
  2. is it being picked up cache?
    1. it could be because i was using the old output page
  3. how to disable all the caches
    1. browser
    2. tomcat
    3. ide

coding practices

  1. no space in item name 
  2. all capital
  3. same spelling throughout

Project log required

  1. All Project related changes must be logged in a central place
  2. All change request must the entered in a change server or table

project documentation requirement

  1. Description of the entire workflow .ie from web page to controller to model to data access object to view (may be through sequence diagram etc)
  2. domain model
  3. use case scenario
  4. user story

github merge error because of multiple team members

error
The following untracked working tree files would be overwritten by merge:
and a list is displayed

syncing github and bithub repositories

relational vs non-relational databases

  1. https://www.pluralsight.com/blog/software-development/relational-non-relational-databases
  2. Use cases for NoSQL databases
    1 To store documents
    2 Flexible schema and flexible data type
    3 Fast Key Value Access and massive write performance
    4 Distributed System Support and Schema migration

    Use cases for relational databases
    1 To implement transactions
    2 To apply referential integrity 
    3 To use mature ORM framework like hibernate to map objects to the rows of a table

scalability

Tuesday, February 27, 2018

clean coding

  1. https://www.butterfly.com.au/blog/website-development/clean-high-quality-code-a-guide-on-how-to-become-a-better-programmer
  2.  1 No Comments with code
    It becomes hard to understand the  purpose of a method or the changes made to the repository
    2 Not choosing self explanatory names and the naming convention
    self explanatory names describe the purpose and by following naming convention our code works everywhere as in the case of java bean
    3 One function  performing more than one task 
    We lose the flexibility to combine the functions in desired way and also get the undesired side effect
    4 Not handling the runtime exception by using try catch
    it is better to display a meaningful message than the absurd technical exception as well as it continues the execution in most of the cases
    5 Not grouping the related classes and interfaces in  packages
    It adds to the complexity as the classes and interaces grow in number

MEAN

  1. M=Mongodb
  2. E=Expressjs
  3. A=Angularjs
  4. N=nodejs

git clone

when we clone a git repository it creates a older with the name of the repository in the current folder


Successul Project Completion Requirement

  1. DevOps expertise wit CI/CD
  2. Anytime access to experts. good relation with experts or domain experts  
  3. Use case scenario
  4.  e r diagram
  5. dfd etc
  6. user story
  7. step by step plan o achieving the task
  8. domain knowledge document
  9. very good documentation
  10. Very good Algorithm and data structure knowledge
  11. Strong Linux and Ubuntu Knowledge
  12. Certiication
    1. OCJP
    2. OCWCD
    3. OCEA
  13. solid JAVA knowledge
    1. effective java
    2. performance
    3. JVM tuning
    4. profiling
  14.  testing expertise
    1. JUnit
    2. Mockito
    3. Selenium
    4. JMeter
    5. TestNG
  15. agile and scrum methodology expertise
  16. UML expertise
  17. git and github and bitbucket expertise
  18. aws expertise
  19. database and queries expertise
  20. expertise in front end
    1. html
    2. css
    3. javascript
    4. jquery
    5. bootstrap
    6. json
    7. xml
    8. web services
      1. soap
      2. rest
  21. build tool expertise
    1. maven
    2. gradle
  22. deep knowledge of framework
    1. spring
    2. hibernate
    3. JPA
  23. Strong Android knowledge including ndk 
  24. Strong Security knowledge
  25. Strong Server knowledge
    1. Tomcat
    2. Websphere or weblogic
    3. Messaging server or kafka
  26. Strong Ecommerce knowledge
  27. Latest technology knowledge
    1. MEAN
    2. reactjs
      1. can be used as view layer with angularjs
    3. ElasticSearch

git knowledge

head points to last commit
  1. git remote -v (lists all the remote repositories)
  2. git reset --hard (do not have idea about its effects)

unable to pull from private github repository because public repository also attached

 https://astrofloyd.wordpress.com/2015/05/05/git-pushing-to-and-pulling-from-multiple-remote-locations-remote-url-and-pushurl/


to solve the problem following can be done
https://help.github.com/articles/importing-a-git-repository-using-the-command-line/
  1. backing up the whole project at a different location just in case anything goes wrong
  2. removing .git repository (note dot before git folder)
    1. rd .git/s (windows) 
      1. type y when prompted
  3. cloning the remote repository as follows:
    1. git clone repository uri
    2. enter user name and password when prompted
    3. staging and pulling further changes like
      1. git add .
      2. git commit -m "files changed description"
      3. git origin master
      4. if getting any error then pull and after that try to push again
      5. do not push forcefully through -f as it will discard the changes made by the other team members and whole past efforts can be wasted


github commit workflow

  1. each commit must mention the files that have been changed or newly created
  2. each developer must work with separate branch
  3. the master committer must review the pull request by checking its test report that should include the build report plus test report and deployment and if the new pull request is valid then it must be merged with the master and then the master branch must be built and deployed and tested before pushing it to the production server

eclipse IDE basics

  1. we can not import copy of same project with the same name from different location

github pushing to github as well as bitbucket

git hub team working guide

  1. pull before you push
  2. if you push forcefully without pulling first then you may lose team member's work
  3. if any confusion at any stage take backup of the repository at different location

Monday, February 26, 2018

json

hello struts 1.2.7 on ubuntu 14.04 LTS


  1. https://www.eclipse.org/downloads/packages/release/Helios/SR2
  2. http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html
  3.  https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html#BJFCDAIB
  4.  https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-7-on-ubuntu-14-04-via-apt-get
  5.  https://askubuntu.com/questions/15093/how-can-i-install-a-bin-file
  6. installing jdk in ubuntu
  7. first download the 32 bit .bin installation file for the required jdk
  8. goto home directory e.g: /home/vijay
  9. copy the .bin file here
  10. open the terminal through ctrl + alt+ t
  11. chmod a+x jdkfilename.bin
  12. ./bin
  13. click on more
  14. type yes
  15. path setting in ubuntu
    1. open terminal through ctrl+alt+t
    2. cd /    (to change to root directory)
    3. cd etc
    4. sudo gedit bash.bashrc
    5. enter the password for root
    6. goto path entry
    7. copy the location of bin of jdk directory
    8. goto the beginning of path value
    9. paste the value and put a colon
    10. exit the terminal
    11. open a new terminal
    12. test the new java version through the following java -version

Sunday, February 25, 2018

required implementations

  1. removing one of multiple remote repositories from local repositories ie dissociating one of the repositories while keeping the other
  2. applying not null,default,foreign key,primary key constraint to the login and user type tables;
  3. switching to ubuntu
  4. maven
  5. jquery
  6. json 

Saturday, February 24, 2018

struts 1.2 documentation

github error when commiting to the new repository by the same user

This post is about switching to new repository at the same github account. earlier i had public repository then  i wanted to commit to private repository. thats when i got the following error:

fatal: remote origin already exists

to resolve the above error I did the following:
  1. git remote set-url --add origin https://github.com/username/newrepository.git
  2. git init
  3. git add .
  4. git commit -a -m "Initial commit"
  5. git pull origin master
  6. git push -f origin master ( to push forcefully)
  7. Enter the credentials when prompted for user name and password. 
  8. https://stackoverflow.com/questions/10904339/github-fatal-remote-origin-already-exists 
  9.  

Friday, February 23, 2018

tomcat error

  1. was getting port already in use error
    1. opened process details through ctrl+alt+delete
    2. selected catalina daemon process and selected end task

oracle 11g doubt

  1. select * from tab does not show the sequences

oracle 11g

  1. https://stackoverflow.com/questions/203469/how-to-use-enums-in-oracle
  2. https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT012
  3. https://docs.oracle.com/cd/B12037_01/server.101/b10759/statements_6014.htm
  4. https://serverfault.com/questions/10477/differences-between-classes12-jar-ojdbc14-jar-ojdbc5-jar-and-ojdbc6-jar  
  5. http://www.oracle.com/technetwork/topics/jdbc-faq-090281.html 
  6. start oracle service in the services
  7. also start oraclexetnslistener service in the services
  8. create user  abc identified by xyz;
  9. grant dba to abc;
  10. select * from user_sequences;// to list all sequences
  11. drop sequence sequencename; //to drop  sequence
  12. do not forget to commit after each dml statement

Thursday, February 22, 2018

struts 1.x example

copying text from picture

reading whatsApp messages programmatically

elasticbeanstalk deployment

  1. we can deploy only one web application at one time through deploy option
  2. we can go to any previous version of the application to redeploy it  
  3. if we create new environment it will launch new ec2 instance and associated platforms and elastic ips and corresponding cost will also increase

AWS

  1. elastic beanstalk
  2. environment
    1. two environment means two ec2 instances. yes it is true
  3. application
  4. VPC
    1. what is it?
    2. what is its advantages? what is its pricing ?
    3.  

github branch

  1. branch can be created by a develoer
  2. changes can be made to the branch
  3. pull request can be made
  4. the reviewer can review it and merge it with the master

Wednesday, February 21, 2018

github team working

  1. select a particular repository
  2. goto settings
  3. choose collaborators
  4. search by username,email id or full name 
  5. click on add collaborator

github working practices

  1. install git client if not installed
  2. find out the project location through project properties in IDE
  3. open command prompt
  4. goto to project root
  5. execute git commands
  6. come back to project in the IDE
  7. refresh it and see the changes

travis ci

  1.  getting-started
  2. goto 
    1. travis-ci.org for github public  repositories
    2. travis-ci.com for github private repositories
  3. sign in with github account
  4. authorize travis ci
  5. sync repository
  6. create .travis.yml file
  7. add the entries into it
  8. now commit changes to github
  9. github should have build script
  10. travis-ci can build test and deploy to the desired platform like aws etc
  11. https://docs.travis-ci.com/user/deployment/elasticbeanstalk/
  12.  

github basics

Monday, February 19, 2018

water

maven

oracle

struts 1.x

Infrastructure as code

wireframing

team collaboration

Agile

profiler


Issue tracking

  1. jira

DevOps


  1. flow-diagram-of-tools-used-in-devops-b8d9f944ef21
  2.  5-tools-to-complete-your-CI-pipeline
  3.  devops-diagram-generator
  4.  why-we-use-terraform-and-not-chef-puppet-ansible-saltstack-or-cloudformation-7989dad2865c
  5.  https://blog.gruntwork.io/
  6.  cloudformation-vs-terraform-vs-ansible
  7.  cicd-tools-throwdown-jenkins-vs-teamcity-vs-bamboo
  8.  bamboo-vs-jenkins
  9.  CAPS (Chef, Ansible, Puppet, Salt) are mainly for centrally controlling what lives inside a large number of instances. I.e. processes, files, etc. • Terraform and CloudFormation are mainly for creating instances themselves (and other cloud resources like load balancers etc). • I say "mainly" because both bleed a little into the other domain. E.g. CAPS often have capabilities to create instances etc, although not with as much power as terraform / CF. Likewise, one can use Terraform & CF to control the insides of instances at least at startup (via init scripts) and on GCE if you set up a metadata hook you can do it ongoingly as well. I read also other things but more or less the summary is this , use the CAPS tool to do what they were created for (configuration management) and the same for Terraform/Cloudformation create infrastructure. There is only one case where I choose a CAPS tool to build infrastructure and it is when I need a simple infrastructure with virtual machines and I need also to configure these machines. In this case I have the benefit to use 1 tool instead of 2 so I reduce complexity
  10.  Which-is-best-Bamboo-or-Jenkins-CI
  11.  what-is-the-point-of-a-build-server
  12.  

design process

  1. wireframe
  2. domain model
  3. user story
  4. use case
    1. pre condition
    2. post condition


Sunday, February 18, 2018

crossover recruitment

  1. basic information filling 
    1. skype id 
    2. current CV
  2. voice-recorder- recording top 3 skills related to the job
  3. technical test 
    1. last question as programming question
    2. scenario based question
    3. 10-15 questions based on the downloaded code or mini project
    4. multiple answers as checkboxes
    5. questions related to 
      1. AWS
        1. RDS
        2. Aurora
        3. SQS
        4. Kinesis
        5. cloudwatch 
          1. QlikView
      2. DevOps
        1. Jenkins
        2. CI
        3. CD
      3. GitCommand
      4. Maven
      5. Custom class loader
      6. JNI
        1. JNI
        2. javah
        3. javap
        4. xjc
      7. RMI
      8. EJB
      9. JPA
      10. Hibernate
        1. n+1 problem
      11. Algorithmic Complexity
      12. Data Structure
      13. JMS
      14. Enterise Service Bus Architecture
      15. Javascript
        1. ===vs !==
      16. String handling
        1. stringiied name
      17.  
      18. lambda expression
      19. hash collision example
      20. cluster computing vs cloud computing
      21. Microservices
      22. Design Pattern
      23. XML
      24. Web Services
        1. SOA
          1. EDA vs SOA
        2. SOAP
      25. REST
      26. RDBMS
        1. MySQL Query nested syntax error
          1. util.Date vs sql.Date
        2.  PostgreSQL
        3. Mongodb
      27. AngularJS
      28. Agile
      29. Scrum
      30. HTML
      31. CSS
      32. JSON
      33. BootStrap
      34. Certification questions
      35. Web Crawler
      36. Collection
        1. Transfer Queue
        2. Blocking Queue
  4.  

agile

Tuesday, February 13, 2018

debugging nullpointer exception at application startup

  1. tables not existing
  2. turning on hibernate logging and debugging
  3. incomplete service and repositories
  4. incomplete values in the rdbms tables
  5. spring data jpa misconfiguration
  6. completing service and repository classes
  7. set vs list in collection mapping
  8. ensuring uniqueness of collections to be returned
  9. get training on 
    1. spring data jpa
    2. spring boot
    3. testing
    4. debugging
    5. UML
    6.  

Saturday, February 10, 2018

coding guidelines

  1. deep knowledge of UML
  2. Unit testing 
  3. Integration testing
  4. Performance testing
  5. Automation testing
  6. Security testing
  7. Load testing

Wednesday, February 7, 2018

validation

design pattern

  1. DTO
    • Data Transfer (value) Object (DTO)


    • While transferring huge amount of data or values between two layers of application instead of sending between two layer multiple number of time it is recommended to combine all these multiple values into single object and send that object to destination layer
    • due to this round trips between layers "sending and receiving values will become easy"