Sprint 2.5 - raisercostin/software-wiki GitHub Wiki

Meeting notes

  • Null Object
  • Briciul lui Occam
  • Principles
  • Patterns
  • Netiquette
  • Code review
  • Huge Coding Improvements (the Big Lessons)
    • Basic -> C/C++/Pascal (code & parameters reuse, procedural control structures)
    • C++ -> STL (standard library usage, reuse through libraries)
    • C++ -> Java (automatic memory management & no pointer arithmetic & OS independence)
    • Java -> Spring Framework (adding Dependency Injection)
    • Java -> Scala (get rid of loops and exceptions)
      • functional immutable collections (www.vavr.io, old javaslang.io)
      • lambda expressions (Java8)
      • types for: exceptions, options(java's Optional)
  • Small Lessons
    • use the proper tool
    • discard getters - method getInteger vs field integer breaks Liskov Substitution Principle
    • discard setters - immutable data
    • use public final fields
  • Techniques
  • Merging problems
    • formatting: whitespace, end of lines, tabs, encoding
    • respect location conventions
    • two/three way compare
    • git merge with conflicts: ours, theirs, mixed file
    • copy in other files
    • with totalcmd sync dirs
      • recursive
      • ignoring folders: *.*|.git\ target\
      • by content, ignore date
  • Refactorings
    • extract method
    • rename class/method
    • extract interface
  • TDD
    • create code via quick fix (eclipse : ctrl+1)

Activities

  • merging branches with conflicts
  • standard format
  • Respect TDD Mantra
  • merge with totalcommander
  • allow multiple implementations
  • install ForgeRock OpenIDM from
  • connect to ForgeRock OpenIDM
  • use curl to list all the users
    • windows
    curl -X GET ^
     --header 'Accept: application/json' ^
     --header 'X-Requested-With: Swagger-UI' ^
     --header "X-OpenIDM-Username: openidm-admin" ^
     --header "X-OpenIDM-Password: openidm-admin" ^
     "http://dcs-xps:8080/openidm/managed/user?_prettyPrint=true&_queryId=query-all"
    
    • linux/OSX
    curl -X GET \
    --header 'Accept: application/json' \
    --header 'X-Requested-With: Swagger-UI' \
    --header "X-OpenIDM-Username: openidm-admin" \
    --header "X-OpenIDM-Password: openidm-admin" \
    "http://dcs-xps:8080/openidm/managed/user?_prettyPrint=true&_queryId=query-all"
    
  • create user
    • linux/OSX
    curl -X PUT \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'If-None-Match: *' \
    --header 'X-Requested-With: Swagger-UI' \
    --header "X-OpenIDM-Username: openidm-admin" \
    --header "X-OpenIDM-Password: openidm-admin" \
    -d '{
      "_id": "3242", 
      "mail": "[email protected]", 
      "userName": "PUTstefan", 
      "sn": "sn3242", 
      "givenName": "PUTstefan2name" 
    }' 'http://10.3.67.68:8080/openidm/managed/user/105'
    
    • windows
    curl -X PUT ^
    --header 'Content-Type: application/json' ^
    --header 'Accept: application/json' ^
    --header 'If-None-Match: *' ^
    --header "X-OpenIDM-Username: openidm-admin" ^
    --header "X-OpenIDM-Password: openidm-admin" ^
    --header 'X-Requested-With: Swagger-UI' ^
    -d '{ ^
      "_id": "204", ^
      "mail": "[email protected]", ^
      "userName": "costin4", ^
      "sn": "sn204", ^
      "givenName": "costin4name" ^
    }' ^
    'http://dcs-xps:8080/openidm/managed/user/204'