Week 02 lab book

  • Working though Codecademy has been useful for practicing syntax and learning actual code, rather than code concepts. Code concepts are more useful in general but eventually you need to know the specifics to do something.
  • Testing as an idea: write tests that fail, tests that only just passes, test in a way that is tidy and repeatable.
  • Abstraction: once something is defined, you don’t need to define it every time you want to refer to it.
  • At work this week, there was a presentation on developing web apps and the instructor was using git to develop the program. They were using JavaScript but it was cool to see the git workflow used in action. Also it was satisfying to understand more of it than I would have before.
  • Challenging but rewarding exercises to work through this week. It was very satisfying to solve them, working through guesses and logic of previous exercises that worked.

More terminal codes

  • ctrl + L : clear the terminal window
  • ls -a : list directory and shows hidden files
  • cd .. : change up one directory
  • cd ../../ : change up two directories

Editor codes

  • alt + F3 : select all that match
  • shift + alt + arrow down : select at a point down multiple lines
  • hold shift + click : place cursors at multiple points
  • ctrl + shift + b : run code in editor

Python codes

  • # comment
  • x**y : exponent, x to the power of y
  • “string”.upper() : uppercase
  • “string”.lower() : lowercase
  • + : concatenate strings

Python lists modifiers

  • list.append() : add to end of list
  • list[index].insert() : insert into list at index
  • list.index(“string”) : return index of string
  • list.sort() : sort list
  • list.remove() : remove item


  • Why does tests.py only run when in the codebase1161 folder and using the code:
    >> ~ python week2/tests.py
    I would have thought this would work too:
    >> week2 ~ python tests.py
Like what you read? Give Alex Lewis a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.