Isaac


  • Home

  • Archives

Transfer to a new MAC

Posted on 2020-04-12

Recently to work from home, my mac has already upgraded to mac os catalina, however it can not connect to my company’s VPN. So IT from our company ask me to reinstall the mac. Though I have timemachine, many things have changed recently, hence I decide to make my mac brand new and only install the software I trust.

Applications

  • 1Password 6

This is because I bought the license for 6 only, maybe nexttime I will try to subscribe this app to use the latest one.

  • Adobe

To be honest, I almost do not use PS, PR, AE anymore since I enter the graduate school.

  • Alfred 4

I use Alfred more than spotlight search, workflow is very helpful if you know how to write script.

  • Bartender 3

To hide the item on menu bar, which is very helpful since my MAC is 13 inches and the space is very limited.

  • Dropbox
  • FileZilla
  • IINA

Great open source video software

  • iStat Menus

To monitor the CPU, MEM, Network usage.

  • To Do

The next version of wunderlist, to be honest, I like wunderlist more but it will gone after May.

  • ShadowsocksX, surge
  • Specatacle
  • Typora, Ulysses

Markdown writer.

  • Hexo

Transfer to a new PC

Posted on 2019-05-17 | Edited on 2020-01-24

Since new life is start, I need switch to a new PC, here is the reminder that I will need to get in case to forget to set up my PC.

IDE

When it comes to IDE, normally I choose intellij’s product. It’s cool and easy to use. What’s best is that I can use educational version of IDE.

Text Editor

At first, I will choose Sublime Text2. I have tried Sublime Text3 and atom, they feel all right. As time goes by, VS code is much powerful than Sublime now. What is more, VS code is free to use, I do not need to click the button to miss the notification from Sublime Text2.

Here is some extension:

  • git lens for every useful git information, especially git blame :D
  • C/C++
  • Python

Shell

iterm2 + ZSH + oh-my-zsh, this is the comfortable set for me on MAC. Easy to install and powerful.

For windows, I still do not figure out if there is any useful set.

For linux, I am trying Tmux and terminal + ZSH + oh-my-zsh.

  • here is the thing, I can not direct change default shell to zsh in .profile, which will cause some weird bug that I can not log in. So I change the open scripts to .bashrc, and I get the dafault ZSH.

Git cz

I am so tired about writing git commit message without any format help, so I definitely will choose to install git cz.

zsh-z

Very useful to get some directory recently used. Totally time saver.

auto-suggestion

helpful when long command should be input.

Firefox

some pluggins related to github, help me to go through github as I want.

Octree

Python Code Style Exploration(PEP 8)

Posted on 2019-05-16 | Edited on 2019-05-23

During internship, I will focus on python programming. Let’s explore PEP 8 Style python code.

code is read much more often than it is written

Readability counts. Also, if applying the guideline make the code less readable, I will choose not follow it.

Absolute imports are recommended, explicit relative imports are acceptable.

If using relavtive import can avoid complex import layouts, it is acceptable. However, it also means we should design package layout more clearly.

If operators with different priorities are used, need to conly add whitespce around the lowest priority. Not every operator.

Usually, I just add a whitespace to every operator, will adjust my style after this.

Don’t use spaces around the = sign when used to indicate a
keyword argument, or when used to indicate a default value for an
unannotated function parameter.

Python code sometimes is likely to be compact.

When combining an argument annotation with a default value, however, do use > spaces around the = sign

Never use the characters ‘l’ (lowercase letter el), ‘O’ (uppercase
letter oh), or ‘I’ (uppercase letter eye) as single character variable
names.

Considering the number 0, 1, this is very reasonable

Use ''.startswith() and ''.endswith() instead of string
slicing to check for prefixes or suffixes.

When checking if an object is a string, keep in mind that it might
be a unicode string too! In Python 2, str and unicode have a
common base class

Need to take care of type of string.

There is still many rules that I do not very deep in. After using python for several month, this may be more clear to me.

Google Java style exploration

Posted on 2019-04-11 | Edited on 2019-05-29

As a student major in computer science, I used Java at most of my time. Many times I found others code easy to understand but not mine. Finally, I force myself to work on a guide this time.

2.1 File name

The source file name consists of the case-sensitive name of the top-level class it contains (of which there is exactly one), plus the .java extension

Its intuitive to think keep all class name together. However, when I was only a beginner, I once wrote 2 class in a file in Sublime Text, made me hard to find out where bug is.

2.3.1 Whitespace characters

​ Aside from the line terminator sequence, the ASCII horizontal space character (0x20) is the only whitespace character that appears anywhere in a source file. This implies that:

  1. All other whitespace characters in string and character literals are escaped.
  2. Tab characters are not used for indentation.

usually I like use tab to indentation, when final came out, maybe can transfer \t -> 4 whitespaces.

3.3.1 No wildcard imports

​ Wildcard imports, static or otherwise, are not used.

even use * to import is very easy, but it will cause confusion, take the namespace, make the compiler import wrong package without error. It is better to only import the one we need. (Useful details)

Ordering of class contents

​ What is important is that each class uses some logical order, which its maintainer could explain if asked. For example, new methods are not just habitually added to the end of the class, as that would yield “chronological by date added” ordering, which is not a logical ordering.

Try to make code assemble as a logical block, this also works for every place.

5.2.1Package namesimg

Package names are all lowercase, with consecutive words simply concatenated together (no underscores). For example, com.example.deepspace, not com.example.deepSpace or com.example.deep_space.

Class names are written in UpperCamelCase.

Method names are written in lowerCamelCase.

Just follow the rule and improve the code. except static final variable, most of them follow lowerCamelCase

Hello World

Posted on 2018-04-23

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

Isaac Mu

IsaacMu's thinking of world

5 posts
3 tags
© 2020 Isaac Mu
Powered by Hexo v3.7.1
|
Theme — NexT.Muse v6.2.0