2025-04-15
Top-down structure of code

Top-down structure of code

Write code in such a way that the part you want to quickly reference is at the top of the file.

For example, the main() function may depend on func1() and func2(), but that doesn’t mean that the main() function has to be at the bottom of the code.

1
2
3
4
5
6
7
8
9
10
11
12
def main():
func1()
func2()

def func1():
pass

def func2():
pass

if __name__ == '__main__':
main()

Structuring this way is better because now the functionality of the code is more easily apparent without having to scroll down to the bottom of the file.

Read More

2024-04-25
'ControlMaster auto' for reusing SSH connections

Just add these two lines to your ~/.ssh/config and you’re good to go!

Read More

2023-03-03
Passwordless SSH between systems that share a /home

Just thought I’d share this nugget of knowledge with you all. If you work on linux systems that share a /home directory, that may be NFS-mounted across several other systems, then you can take advantage of this so you don’t have to enter your password every time you ssh between the linux systems.

Read More