Tuesday, June 26, 2018

Experiences


Experiences

  1.   Always try to avoid the text box and select box to remain light the browser page. try to use label.
    • experience gather from line item issue of ASD data entry. (vvi)
    • text box disable is not good decision. if never to enable the text box that time try to use label that help you to load faster page
  2.  floor and ceil issue  
    1. example 
      1. Math.floor(3.4) +1 = 4   (i need 4)   so use Math.ceil(3.4) = 4
      2.  but Math.floor(4)+1 = 5 ( i need 4)  use Math.ceil(4) = 4
  3. for for loop issue try to focus on lower bound and upper bound case, it helps you find the bugs.
  4. Try to bring data from database as less as  possible. only bring  required data otherwise it will make the server slow.  After bring data then filter apply is very bed idea. 
  5. in case of multiple condition please use switch case instead of if-else condition. Switch-case condition is more faster then if-else condition  when condition number reached to more than 5/6/10
  6. for excel or csv file import, we shoud be concerned that all row has been imported.
  7.  please avoid the for loop to find the index. please use the hash-map to find the optimize way.   example: (VVI)
    1.  var arrIndex = alreadyExistProviderId('expedition',
                  dataArray[i].id, invoiceNumber, jsonObj);
      function alreadyExistProviderId(flowType, id, invoiceNumber, jsonObj) {
          var returnIndex = -1;
          for (var i = 0; i < jsonObj[flowType].details.length; i++) {
              if (jsonObj[flowType].details[i].id == id
                      &&  jsonObj[flowType].details[i].invoice_number == invoiceNumber) {
                  returnIndex = i;
                  break;
              }
          }
          return returnIndex;
      }
  8.  always try keep note of task that you have finished. so in the release period you can check your finished task is tested or not. I have faced the issue int mirror entry module. just last day QA tested the task. he forgot. so it's very crucial that try to make your task has been tested before release or delivery 
  9. Before starting the project we need ensure the code structure and database structure. 
  10. always insert raw data in database so you not need to be worried about calculation.
    1. ASD data entry: here we calculate threshold during data entry. its not wise decision.  because  during data update and delete  again we need to calculate threshold . it may create many bugs and wrong calculation.
  11.   always keep data in database with all floating value ...  not need to be round before the before insert. just round before showing the report.
    1. 3.999999999 value insert in db so that we need not to be worried about client demand 3.99 or 3.9999 .
    2. if we save 3.99 then client demand like as 3.9999. so not wise decision.
  12. input form system should not be  different place. because
    1. data management difficulty
    2. so posting client ui when we create mission 
    3. mission list
    4. try to manage one one form to mange update and insert
  13.  Always try to avoid multiple variable in program it could be worst.
  14. Need to send data over URL always use database user ID . it will help many disgusting situation. Example. so posting: mission and misson file upload issue
  15. When project is calculative then use sql database. when project is use data but not calculative like post comments  that time use nosql.
  16. dont do like as ASD threshold tracking and etubeworld dashboard calculation. because it could not be a wise database design.
    1. alwayes keep data raw.
    2. no need to take precalculation for faster data retrive
    3. for faster data  retrieve, firstly chack last transection time and deshboard table data update time. compare the time. then update the dashboard data. if already updated then no need to update the dashboard table data to show dashboard like as etube world.
    4. we can make a procedure to update data of dashboard after checking time status and call the procedure;
  17. Sometime middle of the code, we improve the code and keep the previous logic to avoid inconsistency but acttualy we remove bad logic code and fresh the code. It could be if the system is running in production. 
  18. base config is very important because any time can chanage server or any other things. please do everything as much as possible to configurable 
  19. try to code as much as simple, like statement and declaration reprot generate in when current month reproting. current month report generate problem 
  20. need to careful for special char  to insert in database

********************************************************************


     
     

Autoboxing and Unboxing

  Autoboxing  is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper cl...