Skip to main content

Log: 202204

· 4 min read

Achievement

  • One web service releaced
    • python
      • django
    • typescript/javascript
      • react
        • next.js

In Progress

Review since Feburary

  • one of the busiest days in my life
    • Feburary and March
  • develop and release a web app by a team for the first time

Good

  • knowledge about
    • django
      • especially ORM, QuerySet and Q object
  • make common react components from scratch
    • such as
      • list select
      • pagination
      • multi-sortable table
      • login required layout
    • i know there are libraries for these components and it's better to use them for a production development
    • but i wanted to write them by my hand once
  • write abstract functions in functional fashion in python
    • deep map
    • deep filter
    • deep zip
    • flatten
    • fit
  • make github actions
    • auto-deploy
  • write sql for data migration
    • make sqls written by a teamate more faster
      • first make a big table by joining source tables, then select from it

Bad

wrote a lot of, complex tests

I wanted to
  • check for any pattern of parameters each test
  • make each test more general
Why Bad
  • hard to maintain tests
    • tests are broken even when i changed source code a bit
    • readers else, other teamates can't understand what the test is for at a glance
      • they should followed the logic in the test
      • they need to debug to make the failed test pass
      • it's much burden to write tests like so by themselves
        • tests are written not only by me but also teamates
So I should
  • prefer simplicity to generality when it's difficult to make a test general while keeping the simplicity
    • writing tests that cannot be maintained is the same as not writing tests at all
    • it's a good and sipmle method for getting a test more general to make factory methods (fixtures) to make objects used in tests repeatedly
    • don't use if statement in a test
      • divide the test into two or more
    • keep the number of objects used in a test the least
  • don't repeat the same test cases tested in other tests
    • if the same test cases should be checked in several tests, it might be good to modularize source code to separate the test cases

BTW

Windows > Mac for me now

  • peformance of docker on mac is too poor
    • slow
    • typescript extension and prettier in vscode remote container often die
  • linux compatibility
    • i can use ubuntu in windowns thanks to WSL
  • mouse > trackpad
    • my shoulder, arm and hand often hurts using trackpad
  • keyboard
    • mac compatible keyboards less
      • mac compatible mechanical keyboards much less
      • HHK is out because of the keyboard layout
      • i had no choice but to use realforce but ... i don't like realforce keyboard so much
        • (why USB is type-A but for mac?)
    • HyperX Alloy FPS Pro is the best keyboard for me now
      • (although i don't play FPS)
  • cost
    • mac is too expensive

Team Development

  • do write documents and tests
    • don't think that it's ok if i know it or i can do it
    • if there is no document and test
      • new teamate will take long time to understand the project, the system and the source code
        • we cannot get help when we want help
      • we cannot share information about our project
        • we don't want to touch the thing we don't know well
          • motivateion and teamwork down
        • we have to explain about our project reatedly
          • it's lazy to explain so some part of work get more dependent on one developer
      • developer also need to maintain the developed part by him/herself
        • because only he/she knows about how it works

Music

  • LIFE / YUI
    • listened over ten years ago when i was a elementary school student, and listen now too