Week 4 Ruby/Rails Q&A

 

Last week,  I met a very talented guy named Joe DelCioppio who recommended that I checkout a website called www.cleancoders.com So far, I have just watched the first video, but I can already see that the emphasis is on writing not just clean code, but code that will be reusable in the future. I am learning that there are many styles for writing code and I feel fortunate to be learning from several people who have very different preferences. I think this will allow me to have a more well-rounded understanding of why people prefer the different styles that they do.

Recently,  I was invited to pair with someone and was asked if I was familiar with “tmux” which I was not. I had heard it mentioned on some Ruby5 podcasts, but hadn’t yet researched it. As decribed by the website,  tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. My friend Beverly suggested that I watch a codeschool video on tmux, which I did immediately. I then installed tmux and got it running in my terminal, but I still didn’t know how to begin a session with another person. Luckily, my friend James was able to spend a few minutes with me and actually walk me through the process and get a session going. Basically I just had to provide him with my public key so that we could connect via SSH.

Before I could begin my tmux session, I had to know my “public key” which I did not know. My friend James gave me the following two commands, first to find your key, run “cat ~/.ssh/id_rsa.pub” which should display your key. In my case, I did not have one, so I ran “ssh-keygen -t rsa” to generate a new key, then just hit enter when prompted with the next few questions. Now, when I re-entered the first command, I got my public key, which I can then share when using programs like tmux.


Q. What is refactoring? I recently heard this mentioned and decided to do some research.

A. Refactoring is the process of making your code better and more manageable. There are several tools that are used for refactoring which I have not yet used, but I plan on trying some soon to gain the experience. I will post what tools I use and how the process goes.


Have a question? email me at dennis@thecommongeek.com I would love to research the answer for both of us.

If you found this useful, please share.

  • http://twitter.com/TheDelChop Joseph DelCioppio

    James, glad you’re enjoying CleanCoders. Feel free to use my name in your blog, I can use the publicity!

    Joe