phjung1 Blog

「😅」

Make Meaningful Distinctions

Make Meaningful Distinctions Programmers create problems for themselves when they write code solely to satisfy a compiler or interpreter. For example, because you can’t use the same name to refer ...

Classic Puzzles

The Fox, the Goose, and the Corn The first classic problem we will discuss is a riddle about a farmer who needs to cross a river. You have probably encountered it previously in one form or another...

Use Intention-Revealing Names

Use Intention-Revealing Names 1 2 3 4 5 6 7 8 9 10 11 12 13 int elapsedTimeInDays; int daysSinceCreation; int daysSinceModification; int fileAgeInDays; public List<int[]> getThem() { List...

Cycle Sort

Cycle Sort Cycle sort is an in-place sorting Algorithm, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array. ...

Meet the Dot Command

Meet the Dot Command The dot command lets us repeat the last change. It is the most powerful and versatile command in Vim. Vim’s documentation simply states that the dot command “repeats the last...

Navigation

Navigation The first thing we need to learn (besides how to type) is how to navigate the file system on our Linux system. In this chapter, we will introduce the following commands: 1 2 3 pwd Prin...

cpp_programs

Programs c++ is a compiled language. For a program to run, its source text has to be processed bu a com-piler, producing object files, which are c ombined by a linker yielding an executable progr...

Pigeonhole Sort

Pigeonhole Sort Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number of elements and the number of possible key values are approximately the sa...

What is the shell?

What Is the Shell? When we speak of the command line, we are really referring to the shell. The shell is a program that takes keyboard commands and passes them to the operating system to carry ou...

Vim Command

Sumulation Vim on the Page Showing the Cursor Position in a Buffer in row 2 we run the dw command to delete the word under the cursor. We can see how the buffer looks immediately after running ...