Skip to content
Snippets Groups Projects
journey_henrik.md 12 KiB
Newer Older
Henrik Jochum's avatar
Henrik Jochum committed
### A first update (21:50)
Henrik Jochum's avatar
Henrik Jochum committed
- So it took quiet some time for this first update to appear, as I had some difficulty partitioning my HDD. In the end it was a Windows problem, bug, I'm not sure.
Henrik Jochum's avatar
Henrik Jochum committed
I solved it by using a third party software, even though sadly it wasn't open source, the free version did it's job.
Henrik Jochum's avatar
Henrik Jochum committed
- I will now go into actually installing Ubuntu. Let's see how this one goes.
Henrik Jochum's avatar
Henrik Jochum committed
- Success! At least the very scary part is over, accessing the BIOS. Luckily I've done this before, so I wasn't too intimidated. I'm currently installing Ubuntu, which already at first glance has a very nice interface! So that's a big plus.
Henrik Jochum's avatar
Henrik Jochum committed
- Had a little problem when choosing the settings where to install everything. The "root file system" wasn't defined for whatever reason, but a quick Google solved the problem. Currently everything's installing and looking good.
Henrik Jochum's avatar
Henrik Jochum committed

### Second Update (22:40)

![And we're live](live.png "And we're live")

... Though I haven't figured out how to embed this picture. Hmm, this seems to be how
Henrik Jochum's avatar
Henrik Jochum committed

### First impressions

On first glance, this seems like a very neat and minimalistic OS. Right off the bat it feels a little more responsive in some regards in comparison with windows, but this might just be the placebo-effect.
Henrik Jochum's avatar
Henrik Jochum committed
A number of tightly memorized shortcuts and muscle-memories are different, which is a little annoying (e.g. changing tabs with alt+1/2/3 instead of ctrl+1/2/3) but I think that's just a matter of time.
Henrik Jochum's avatar
Henrik Jochum committed
Other than that, it seems like it's pretty much a white paper (for a non-hardcore-geek), so no unnecessary software, gimmicks, information and all that jazz. Now the question is, if all the software, which
I'm interested in for a proper worksflow (also outside DigiZeit) is available. If that's the case, great, if not I'll have to look for a workaround.

I'll follow up on that tomorrow, as it's getting late.
Henrik Jochum's avatar
Henrik Jochum committed

Just a little comment before I log off for today: I just accidentally disabled my touchpad in the setting and am now struggling to turn it on again. I guess curiosity killed the cat. Fun times.
Henrik Jochum's avatar
Henrik Jochum committed
Update (23:30) I fixed it, painfully, but what pains me even more is the question: why even put in this setting, without at the same time giving an easy solution.
Henrik Jochum's avatar
Henrik Jochum committed

### The morning after

So I've been playing around, installing programs, etc. this morning and have to say using Linux is pretty comfortable in some regards. One thing which is really cool is being able to install programs using the
terminal. You can use a one line command to install a program, because (at least from what I've gathered so far) if you know the directory of the program and its name you simply can select it without any
Henrik Jochum's avatar
Henrik Jochum committed
graphical interface. No clients, no hidden software and toolbars which suddenly appear.
Henrik Jochum's avatar
Henrik Jochum committed

On the other hand, I've been having some trouble with certain programs. SWITCHdrive, my cloud-service of choice, sadly doesn't have a dedicated Linux client and at the moment I'm not able to install the alternative,
the ownCloud-client. Something something unmet dependencies, I'll have to get to the bottom of that. I have the feeling that after a pretty steep learning curve I'll be able to work more effeciently not just in a
Henrik Jochum's avatar
Henrik Jochum committed
Git and programming enviroment, but for work in general. It's probably a test in tenacity as well, because - oh boy - some issues get frustrating.

Henrik Jochum's avatar
Henrik Jochum committed
Still fighting with unmet dependencies and the ownCloud-Client. Somewhat the last missing piece in being able to do everything I want in Windows as well as Linux.

Hurray! I successfully solved! After a fair bit of trial and error (I was right) it worked. I think it was a version problem, so the OS version I currently use (Ubuntu 18.04.4 LTS) didn't match with the version of the program I tried to install. After finding the right one, it worked as planned. I'm slowly beginning to really like the Ubuntu workflow, it feels more streamlined and organizing software, files etc. is rather easy and intuitive (after a while).

So I found another big thing: hidden files. I had to debug an Atom package and all the internet advice sent me to a hidden directory, /.atom. Couldn't find it so I searched help - again - on the internet. The dot before the name hides the directory, file or whatever. This can be solved by pushing `strg+h` inside the files or - for checking it in the terminal - `ls -a`.
So I noticed that when you clone a repository it only clones the `master` of the project. If you want to edit another existing branch you first have to add the branch to a remote branch on your machine. 
You do this by looking for an option in the editor of your choice called `Create Branch From Remote Branch`. This will create a remote branch based on the branch from the project repository, which you will be able to edit on your local machine.
Basically that's it. Like the link above says, `git clone` is supposed to do that (it's not a bug, it's a feature!). In my opinion not really self-explanatory, so it might result in some confusion.

Small edit: So I found out how it works in Sublime (both on Linux and Windows), but still struggling to repeat the same in Atom. I'm able to pull all the branches and checkout the branch I want in GitBash, but then getting the branch into Atom appears to be diffult. 

Small edit-edit: Okay, I think I figured out how it works in Atom. So after doing what I described in the previous paragraph, one has to go to the braching selection, go to `New Branch`, type in the same name of the branch and then fetch said branch with Right-click and fetch. I'm not sure if this is the intended way, but it works. To be honest, doing it in Sublime was much more intuitive. 
In other news, I'm still having some trouble with my touchpad, so I started disabling it via Terminal (just Linux things). Which works pretty well as I'm slowly getting more adapt to navigating with my keyboard.
I'm slowly beginning to really like Ubuntu, even though it at times can be frustrating. It's a love-hate relationship. The great thing about Linux is: it does what you tell it to do. The bad thing about Linux is: it does what you tell it to do. I think as soon as I'm settled in with all the software I need and am comfortable with everything, it'll be a very enjoyable experience working on Linux. What I really need to get into are the different file-types on Linux. I'm sometimes not sure how to do installations or what to do with other files. But I think this will improve over time.

### (26.3.20)

So, I like Linux. Outside the whole Git/Atom/coding stuff it's just really nice to work with. Opening stuff with one click (for example in Files) is so comfortable. Most software I use also remembers which tabs I had open after I restarted the computer. Which saves me some thoughts everytime I have to restart. After finding the right software (PDF, text editor etc.) for my needs everything works well, without having to wait for features to load which I don't even use. It's quick, intuitive, and visually appealing. So after about 1.5 weeks in quarantine and with Linux I definitely recommend Linux for someone who want to improve their workflow. It has a steep learning curve, but after a few weeks it just feels nice to work. Like I already said, it does what you tell it to do. That's a nice thing and a bad thing. 

I'm currently thinking about and preparing to write either already my current papers or my DigiZeit paper in LaTeX. My expectation is that the learning experience is going to be similar, but the nerves not lost over Word formatting will be worth it. 

Let's see how that'll go, I'm going to keep updating this .md or a separate one. Maybe even in a LaTeX based PDF file.

### Competent Linux guidance

To have Dannys work not be in vain, I'll be adding some of his "better-written" linux summaries below. 

Since you might find yourself inside the Terminal (command prompt) more often on Linux, do try to document which commands you find yourself using, and what they do. You'll probably paste a few in from Google/stack overflow answers. Some of the common commands:

* `ls` -> show contents of directory (`ls -alh`, show it more readably)
* `cd` -> change directory (learn `cd /`, `cd ~`, `cd ..` for moving around using relative, rather than absolute paths to things)
* `find` -> print paths to files/folders matching some criteria
* `grep` -> use regular expressions to find lines in files that match some search string
* `cat <file.txt>` -> print contents of file to terminal
* `less <file.txt>` -> print the first part of a file, allowing you to scroll up and down. ctrl+c to get out
* `echo "something"` -> print "something" in terminal
* `mkdir my-folder/touch file.md` -> make new folders/files
* `history` -> print my previously entered commands
* `apt and apt-get` -> linux commands for installing packages
* `clear` -> clear your terminal screen
* `yes` -> keep printing the word yes, truly amazing command
* `mv <source-path> <target-path>` -> move a file from source to target
* `cp -R <source-dir> <target-dir>` -> copy a directory and its contents recursively to a new location
* `rm file.txt` -> delete a file
* `rm -r -f <directory>` -> remove a folder and everything inside it recursively. be careful with this, you could rm most of your system by mistake...
* `man <other-command` -> show me the manual (i.e. documentation) for another command. Learn to read these man pages, they typically have all the info you need
* `ctrl+r` -> find from your command history (really useful, learn to use this one as an instinct!)
* `git` -> this one you know!

All programming is, is stringing together a bunch of commands in a file, and then executing that file (i.e. running the script). For example, you could write a nice little script that pulls the latest for every git repository in your home folder. It might look something like:

Henrik Jochum's avatar
Henrik Jochum committed
```bash
Danny McDonald's avatar
Danny McDonald committed
#!/usr/bin/env bash

cd ~  # go to your home folder
cd digizeit  # go into our repo, assuming it was cloned to ~/digizeit
git checkout master  # make sure you're on master branch
git pull  # get latest
cd ..  # go to parent directory
cd <other-project>  # some other project you're working on, same thing
git checkout master
git pull
cd ~
echo "Finished! I am now a computer programmer"
```

The first line of the script, called a shebang, tells your system which language the program is written in (bash, the default language of your terminal). You'd save this as `update.sh`, then you'd tell Linux you want to be able to execute the file with:


You can then do ./update.sh to run your script. If it prints the Finished line, it worked, and you're a programmer now. You can even move the file to /usr/bin, and then you can run it from any directory at any time just by typing update.sh! But, since you're a programmer now, you actually make a repository containing all your cool scripts, and you keep this and other scripts that you write under version control in that repository. That way you can improve it over time, while keeping its history, blah blah.

Henrik Jochum's avatar
Henrik Jochum committed
#### One interesting thing to try:

Open a terminal and use the following command to install telnet:

```bash
sudo apt install telnet
```

And then use this command to watch Star Wars in ASCII art.

```bash
telnet towel.blinkenlights.nl
```

One other thing you'll want to do quite quickly, install Atom and/or Sublime Text, and then set those in terminal as your default editor, so that files are opened for editing using those apps, rather than in the terminal's default (terminal-based) editor (nano or vim, both of which require some practice).

https://askubuntu.com/questions/777410/how-to-set-atom-editor-to-main-editor

These instructions tell you something really valuable, that you can add lines to this `~/.bashrc file`. This file contains your terminal preferences and shortcuts and so on. For example, I add:

```bash
alias la="ls -alh"
```

And then do `source ~/.bashrc` to reload the settings. This gives me a new command, `la`, which is just the same as doing `ls -alh` but shorter. So yeah, back to the *point*, you use this same preferences file to store your preferred text editor, so that when you do things in terminal requiring a text editor, it'll open the file with Atom, much easier than learning `vim` right now.