Blog
-
Half-Marathon and Hard Work
November 26, 2017
I recently completed a half marathon with my brother and his friend. This was a lot of hard work. For 3 months I put in long runs every couple days no matter the weather and no matter how I was feeling. Now I do enjoy running but “running” and training for a long distance race are a little different.
Before my training started in earnest, I would do the occasional 3 mile run maybe once or twice a week. By the end of my training, 5 miles was a short day and a long run was 10 miles. This takes a lot of commitment, both in time and motivation. I did not always enjoy it but when race day came I was prepared. Since this would be the first time running 13.1 miles in one run I went in with few expectations starting my training. By the end of my training I hoped to break 2 hours and felt prepared to.
How did I get myself from running 3 miles and being tired to running 13 miles in sub 2 hours? Repeated effort and work. Running has very obvious indicators of compounding work paying off. Running the same distance as last week a little faster or keeping the same pace for an extra mile. This feedback is awesome in letting you know what you are doing is the right thing and you are progressing. I struggle to find this same feedback outside of running though.
Learning and programming don’t feel quite as linear to me. Some days I feel like I’m at the same spot I was a year ago but I keep putting in effort. I think I’m improving but it’s hard to know for sure when I keep getting new challenges and I have moving goals. The best I can do is put in effort, ask for feedback and keep working hard.
At mile 10 in my race I was hitting my effort limits. I was running farther and faster than any of the runs I had done before, but it wasn’t enough. I needed to run an additional 3.1 miles, so what did I do? I just kept running. I kept my pace consistent and kept at it, and guess what? I made it in 1:49! At the end I was proud and it felt great to complete a big milestone.
This half marathon was a great way to reaffirm the benefits to working hard towards my goals outside of running. What keeps you going and working hard?
-
Elasticsearch Curl Commands to Know
April 30, 2017
Lately I have been working on upgrading Elasticsearch from 1.5.x to 5.1.x. Here are a few commands I’ve found myself using.
Elasticsearch Version Number
To find what version of Elasticsearch you are running
$ curl localhost:9200/ { "name" : "1OgvfFN", "cluster_name" : "elasticsearch", "cluster_uuid" : "aoTJMozXSkOIyqG2CIf6wQ", "version" : { "number" : "5.1.2", "build_hash" : "c8c4c16", "build_date" : "2017-01-11T20:18:39.146Z", "build_snapshot" : false, "lucene_version" : "6.3.0" }, "tagline" : "You Know, for Search" }
Health of your Cluster
$ curl localhost:9200/_cat/health 1493150160 19:56:00 elasticsearch yellow 1 1 20 20 0 0 20 0 - 50.0%
Red - no good Yellow - pending or only node in cluster Green - Good
Aliases
To see a list of aliases on a node:
$ curl localhost:9200/_aliases/ {"series-test":{"aliases":{"series_read-test":{},"series_write-test":{}}},"authors":{"aliases":{"authors_read":{},"authors_write":{}}},"authors_1493148178_2148082-test":{"aliases":{"authors_read-test":{},"authors_write-test":{}}},"books-test":{"aliases":{"books_read-test":{},"books_write-test":{}}}}
-
Running Rspec Tests in Vagrant From Vim
March 27, 2017
I have been using Vim to develop for Ruby on Rails for almost a year now and I just recently set myself up so that I could run my tests from Vim, using https://github.com/thoughtbot/vim-rspec. At BookBub we currently run our development applications inside of Vagrant so this only changed the setup a little bit. To get it to work in my Iterm on Macos with Vagrant I installed the
thoughtbot/vim-rspec
plugin and then added the following lines to my configuration:" RSpec.vim mappings let g:rspec_command = "!vagrant ssh -c \"rspec --no-color {spec}\"" let g:rspec_runner = "os_x_iterm" map <Leader>t :call RunCurrentSpecFile()<CR> map <Leader>s :call RunNearestSpec()<CR> map <Leader>l :call RunLastSpec()<CR> map <Leader>a :call RunAllSpecs()<CR>
Let me know if this helped you or have any questions!
-
Post Grad Reading Goals
December 19, 2016
Science tells us we should read and successful people make it a priority, so why have I not been reading regularly? During college it is easy to make excuses and say you are too busy or don’t have time to read. I used these excuses over and over again but I don’t really believe them. This past semester I began reading almost daily and it did not hurt my grades or sleep, but by the end of the semester I had stopped reading altogether. Now that I am done with the semester I am trying to catch up on my goal of reading 18 books this year. To do this I need to read five books before January 1st.
During the semester I started the Elon Musk biography and listening to Sapiens on Audible. Since the semester ended I have since finished both of these and I am on to my next books. My read list is always growing and I want to start reading it down again. Below is my quick reviews of the two books I just finished and a peek at what’s next on the list.
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future by Ashlee Vance
This biography was really engaging and inspiring. As a creative,engineering individual I was motivated by Musk’s enthusiasm, ingenuity, and work ethic. A recommended read for anyone interested in science and engineering or entrepreneurship.
Sapiens: A Brief History of Humankind by Yuval Noah Harari
Sapiens was a thought provoking overview of the rise of homo sapiens as the dominate species. This book challenged a lot of assumptions I had on society and humans. Was extremely interested in the idea that belief in a common fiction is a powerful method of allowing us to work together.
Up Next
To finish off the year I plan on reading the following four books:
- The Ten Day MBA by Steven A. Silbiger (started)
- David & Goliath by Malcolm Gladwell
- Merchants of Doubt by Naomi Oreskes and Erik M. Conway
- Lean In by Sheryl Sandberg
Going forward I hope to build a habit of reading at least a half an hour every day. There are a lot more great books out there to read and much to learn. Have any recommendations for me? Reach out on Twitter @agundy_
-
How I Work
December 13, 2016
The How I Work series on Lifehacker is one of my favorite Lifehacker series. I always enjoy seeing how other people work and see if I an pick up any new tricks. I decided it was time I gave a similar overview.
Location: Boston, MA
Current Gig: RPI College graduate starting in February as a Software Engineer at BookBub
Current mobile device: Nexus 5x (cheap, powerful and solid quality)
Current Computer:
- Dell Chromebook 13 for class and all day battery life.
- Lenovo Thinkpad X1 Carbon 2nd Gen for portable workstation.
- Custom Desktop at home dual booted Ubuntu and Windows 10
Background:
I began programming and experimenting with robotics in high school and I’ve been interested in engineering since I was little. When looking for colleges I applied to schools that I new would challenge me and encourage my inner nerd. I applied and got into Rensselaer Polytechnic Institute and didn’t look back. Freshman year I jumped in heads first getting involved with a bunch of technical clubs on campus and I slowly found what I loved to work on the most, web applications and operations.
How do you organize your work?
I use a combination of Evernote with the Secret Weapon as an organizational system and a Moleskine that I always carry with me. In the Moleskine I have combination of weekly grids, free form notes, to do lists and more. I have found that a combination of Evernote and paper helps with both short term tasks and long term goals.
What tools do you use for development?
I work on a variety of projects and assignments in diverse languages. Almost all code I write gets written in Vim. Vim is powerful and I love being able to control everything through the keyboard. Vim also works great for all the languages I use: Go, Python, Javascript, Ruby and more. Since I have three different machines and am a busy college student who may need to work anywhere I do all of my work through a Tmux session to my desktop. Tmux allows me to work on my desktop, run to class and continue the same work on my Chromebook without missing a beat or worrying about checking out new code.
Besides your phone and compute, what gadget can’t you live without?
Right now this is probably a toss up between my Kindle and my Nexus 7. I use my tablet all the time for everything from recipes, to PDF’s, to controlling the Chromecast. The Kindle is a more recent adition the gadget collection and is beginning to be irreplacable.
What do you listen to while working?
My music tastes are diverse but when working I mostly listen to electronic music with little to no lyrics. I find lyrics distracting and silence does not motivate me to work much.
What are you currently reading?
I just finished the Elon Musk biography and am working through the audiobook version of Homo Sapiens. The Elon Musk book was inspiring and gave me a great picture of what is possible. One part that I really took to heart was the concept of real innovation and creating positive change.
How do you recharge?
One of my favorite ways to recharge is by cooking. I love to cook and eat good food and cooking turns into a social and relaxing time. When stressed or anxious I often go for a run or hit up the gym.
What’s your sleep routine like? When do you work best?
If asked this question last year I would have said that I was a night owl and worked best at night. This semester I began waking up at 7am and getting work in before my first class at 12. This schedule wasn’t always easy or possible to keep but I find I am most focused and motivated when I wake up and begin working around 8am.
-
Ansible and Distributed-Systems Course Project
November 14, 2016
This semester I am taking a bunch of cool fun classes before graduation. One of those classes is Distributed Systems and Algorithms. One of our projects was a simplified implementation of a distributed file system using Raymonds algorithm. Implementation was pretty specific to the class and very constrained but something I wanted to share was my usage of Ansible. The project had to be launched in three separate regions and know information about the other hosts. I saw this as the perfect use for the dynamic inventory abilities of Ansible I’ve used previously.
After creating initial images and keys in Amazon Web Services in each region with the correct permissions I then created a simple playbook to launch new instances.
--- - hosts: 127.0.0.1 connection: local tasks: - name: launch Virginia instance ec2: key_name: raymonds instance_type: t2.micro image: ami-ID wait: yes vpc_subnet_id: subnet-ID group_id: sg-ID count: 1 assign_public_ip: yes region: us-east-1 ec2_url: apigateway.us-east-1.amazonaws.com instance_tags: Name: raymonds - name: launch Frankfurt instance ec2: key_name: raymonds-frankfurt instance_type: t2.micro image: ami-ID wait: yes vpc_subnet_id: subnet-ID group_id: sg-ID count: 1 assign_public_ip: yes region: eu-central-1 instance_tags: Name: raymonds - name: launch Sydney instance ec2: key_name: raymonds-sydney instance_type: t2.micro image: ami-ID wait: yes vpc_subnet_id: subnet-ID group_id: sg-ID count: 1 assign_public_ip: yes region: ap-southeast-2 instance_tags: Name: raymonds
Now with the instances launched and tagged with Raymonds, I could take advantage of the AWS tags to grab all Raymonds servers and copy over the executable and configuration files.
--- - hosts: tag_Name_raymonds user: ubuntu gather_facts: yes vars: node_count: 6 tasks: - name: template production server json to local local_action: template src=servers.json.j2 dest=./server_prod.json run_once: true - template: src=servers.json.j2 dest=/home/ubuntu/servers.json owner=ubuntu mode=0644 - copy: src=raymonds-algorithm dest=/home/ubuntu/raymonds-algorithm owner=ubuntu mode=0744 - copy: src=tree.txt dest=/home/ubuntu/tree.txt owner=ubuntu mode=0644
Because our project relied on shell access and viewing the logs as they happened I didn’t need to set up any services or workers. Two quick playbooks and I could than easily copy over and update the hosts on demand. When it came time to demo the project a new
tree.txt
file was given and one line updated the file to all the hosts.The hardest part of this configuration was created the initial security groups, AMI’s and keys and having Ansible connect to them. Once that was set up it was easy to reason about and update. I had a great experience using Ansible on a small scale (3 node) automation setup and would definitely consider using it in projects again.