By Madeleine Pramoedya, Intern at Zero One Group (ZOG)
ZOG recently launched its Intern Blog Series, highlighting the experiences of summer interns in various divisions. In this series, interns discuss what they have learned and how ZOG is preparing them for the working world.
This is the third and final week of my Zero One journey and the main focus of this week was to get started on coding in Python. You can read Part 1 of my journey: Getting to Know the Shell here, and Part 2: Learning About Version Control and Cryptography here.
One of the things I had to do before beginning was to make sure my text editor was configured properly to run Python scripts. The text editor I am currently using is neovim. To set up neovim properly I first had to install vim-plug, which is a simple vim plugin manager. To use vim-plug, I created a neovim configuration file called init.vim in the directory called .config in my home directory. In this file, I set it up to download specific plugins in this format:
In this case ‘davidhalter/jedi-vim’ is the plugin that is targeted for installation. All plugin installation commands must be inserted between the two call commands for the process to work properly. The plugins that I installed to make Python manageable on neovim were:
- Deoplete — an autocompletion plugin
The second line is the minimum setting required to have deoplete run upon the startup of neovim.
For Python specifically, deoplete-jedi is required which also has dependency packages such as pynvim. These will need to be installed using pip after which I could then install the plugin.
- Vim-airline — status bar plugin
After installing vim-airline there are also other airline themes which one can switch to. To do this I also installed another plugin for vim-airline-themes.
- Auto-pairs — autocomplete brackets and quotations
This plugin required no other extra settings just the plugin command:
- Nerdtree — file managing and exploration
After installation, you can open up the file navigation window in a neovim file by typing :NERDTree in the neovim command line to open the directory the current file is in. To open a file press o while the cursor is hovering above the file. To switch between the navigation window and neovim press ctrl then w quickly two times.
- Neomake — syntax check code using linters
- Must download language-specific linters, in this case, I installed pylint
- Vim-highlightedyank — highlight yank area
In addition, I also downloaded several other plugins to change my neovim theme so any code would be easier to read. I used one of the more popular themes called Gruvbox in dark mode and used the install method below.
To install these plugins on neovim I wrote the init.vim file first with :w and then reopened the file and entered :PlugInstall. Then I reset neovim again to see the plugins take effect.
Overall, although this process was mostly straightforward and very repetitive, I still learned from it as this was the first time I used a plugin manager. I also found that there are lots of other interesting plugins online which I can add to my configuration when I need to. For example, since setting all this up I have already installed vim-slime a plugin for vim that allows for the sending of code from one window to another.
As my internship series is coming to an end, what I learned this week and the previous two weeks have been incredibly enlightening. I have learned a lot more about my own computer and gained valuable skills and experience in basic engineering. I have also gained a lot more confidence in my own abilities to learn new skills with little to no previous experience. It will be exciting to see how what I have learned here at the Zero One Group will benefit my career in the future and I would like to express my gratitude for all involved in my internship experience.
Follow Zero One Group at Instagram, Twitter, Facebook, and LinkedIn. Visit our website at www.zero-one-group.com