RR 324: Developer Horror Stories episode artwork

EPISODE · Aug 22, 2017 · 51 MIN

RR 324: Developer Horror Stories

from Ruby Rogues · host Charles M Wood

RR 324: Developer Horror StoriesThe panel for this episode of Ruby Rogues is Dave Kimura, Eric Berry, and Charles Max Well. They are telling developer horror stories this week. Tune in to listen to their stories![00:01:40] Eric’s Story Eric tells a story that happened today. He was working on a report on live data at work. While doing this, he sent texts to hundreds of people that shouldn’t be getting them. The moral of the story is that everyone makes mistakes, even seasoned developers.[00:02:58] How could that have been avoided? Eric has a fail-safe that has to override with an environment variable so that it won’t truncate the tables. Once that happens, no messages will be sent. He works at a company, which is a B to C texting platform that allows customer retention through mass, etc. He commented out stuff, not realizing that it would start sending messages. He needed live data to generate reports so he did not truncate the data. His advice is not to comment out code until you know why you are doing so.Dave says that same thing can also happen with an email service. Instead of commenting out code, make sure they are set up to a mail server or mail dev to where it actually never sends out to the real world but stays in a send box environment. Amazon SES has a way to do this where things stay internally.[00:05:10] Dave’s StoryAround seven years ago Dave needed to store some images. He did not want to use a storage on the local computer because he would have multiple web servers and he did not want to use external storage because he was “lazy.” So he stored the images in the database. It worked for years until one day he saw that the table was 30 GB, which was much larger than it should have been. He had to extract and rewrite because any test to undo it would be substantial. It would be a long running process because 30 GB is a lot of data.In hindsight, Dave’s advice is that you don’t have to prematurely optimize but you also don’t have to make bad decisions. Do not store globs of binary data in your database. If it can be stored as a jpeg, do that.[00:08:04] Charles’ StoryCharles’ story focuses on time zones. He was working on test first development. He wrote tests for a feature and his coworker checked them. The database was running in UTC and doing checks in Mountain Time, so the checks would fail from 6pm until midnight. The CI server would show that tests were not passing for a chunk of the day.It was a simple fix. He learned that you can write a test that passes but may be overlooking something simple that may change when in a different place or a different time.[00:11:05] ErrorsErrors are hard to track down. The hardest ones to find are the ones that only happen occasionally. The worst ones are those that are critical errors that only happen occasionally. Because they only happen sometimes, it is hard to know how to fix them.[00:19:13] Using a Technology Too SoonEric used a technology too soon, which was Rails. Nobody could take over once he left the company. He had to go back to the company and rebuild it in PHP so that others could use it. The lesson from this mistake is that when you chose a technology you have to choose one that supports the buzz factor.  Everyone has a responsibility to the people they are working for to add value. If you leave them with a maintenance nightmare you are not helping, you are hurting. Make sure you are locking things down.[00:22:35] Gems and Poll RequestsDave watches Gems to see what and how often they are updating. He checks to see if his poll request was accepted and reverts back to the original gem. He calls it “free maintenance from other people.” He doesn’t think you should deviate from it too much. An option is to use a proxy as well.[00:27:41] Have you ever had to make patches in your Rails app knowing that those patches were coming in a future release?Eric has had to in the past. His mentor had to patch Rails, apply it, but every time it ran it said,  “if you upgrade rails, upgrade me.” It was a reminder to make sure everyone stays in sync.[00:29:30] MigrationDave and Charles have both had problems with migration. Take snapshots of database before you use migrations. The moral of story is if you’re going to migrate data, make sure you back up your database before you change the data. And don’t do data modifications in your migrations. Also set up a replica of your database. There is no excuse except for laziness or inexperience.[00:32:10] Materialized views. Eric used to work for social media company that had a lot of data coming in from various forms of social media. Helped build sub products that handled intake of data. Decided to use materialized views. It is a view that self updates as data changes in the database. In other words, it creates a fake table and can simplify the application side of things.It got a little messy and they had no idea what was updating things when. Because of this, they had to convert the materialized views to stored procedures. The materialized views killed the database because it triggered things when it shouldn’t be.[00:37:23] Caching Caching is a big problem with development. There are complex cache keys built around different queries and combinations of objects. There is a value with using caches but there is a caution with not using caches too early. A lot of problems have resulted from caching wrong results.  The moral is to measure and make sure that you are working on the right problems. Sometimes premature optimization does not matter. Sometimes caching is just not needed and messes programs up rather than helping them.[00:40:34] How do you populate data with unrealistic data?It depends on how big the application is, but larger ones generate ten to twenty thousand records. For these, Dave uses Active Record Import. He used the Faker Gem to create fakes names. Without using Active Record Import it would take ten to fifteen minutes to 50,000 but instead it took two minutes with using it, saving a lot of time.PicksDave:Gem in a boxActive Record ImportEric:udemy – Stephen GriderCode Sponsor Charles:AudibleMeditation appFind something that helps you re-centerRuby Dev SummitAdvertising Inquiries: https://redcircle.com/brandsPrivacy & Opt-Out: https://redcircle.com/privacyBecome a supporter of this podcast: https://www.spreaker.com/podcast/ruby-rogues--6102073/support.

RR 324: Developer Horror StoriesThe panel for this episode of Ruby Rogues is Dave Kimura, Eric Berry, and Charles Max Well. They are telling developer horror stories this week. Tune in to listen to their stories![00:01:40] Eric’s Story Eric tells a story that happened today. He was working on a report on live data at work. While doing this, he sent texts to hundreds of people that shouldn’t be getting them. The moral of the story is that everyone makes mistakes, even seasoned developers.[00:02:58] How could that have been avoided? Eric has a fail-safe that has to override with an environment variable so that it won’t truncate the tables. Once that happens, no messages will be sent. He works at a company, which is a B to C texting platform that allows customer retention through mass, etc. He commented out stuff, not realizing that it would start sending messages. He needed live data to generate reports so he did not truncate the data. His advice is not to comment out code until you know why you are doing so.Dave says that same thing can also happen with an email service. Instead of commenting out code, make sure they are set up to a mail server or mail dev to where it actually never sends out to the real world but stays in a send box environment. Amazon SES has a way to do this where things stay internally.[00:05:10] Dave’s StoryAround seven years ago Dave needed to store some images. He did not want to use a storage on the local computer because he would have multiple web servers and he did not want to use external storage because he was “lazy.” So he stored the images in the database. It worked for years until one day he saw that the table was 30 GB, which was much larger than it should have been. He had to extract and rewrite because any test to undo it would be substantial. It would be a long running process because 30 GB is a lot of data.In hindsight, Dave’s advice is that you don’t have to prematurely optimize but you also don’t have to make bad decisions. Do not store globs of binary data in your database. If it can be stored as a jpeg, do that.[00:08:04] Charles’ StoryCharles’ story focuses on time zones. He was working on test first development. He wrote tests for a feature and his coworker checked them. The database was running in UTC and doing checks in Mountain Time, so the checks would fail from 6pm until midnight. The CI server would show that tests were not passing for a chunk of the day.It was a simple fix. He learned that you can write a test that passes but may be overlooking something simple that may change when in a different place or a different time.[00:11:05] ErrorsErrors are hard to track down. The hardest ones to find are the ones that only happen occasionally. The worst ones are those that are critical errors that only happen occasionally. Because they only happen sometimes, it is hard to know how to fix them.[00:19:13] Using a Technology Too SoonEric used a technology too soon, which was Rails. Nobody could take over once he left the company. He had to go back to the company and rebuild it in PHP so that others could use it. The lesson from this mistake is that when you chose a technology you have to choose one that supports the buzz factor.  Everyone has a responsibility to the people they are working for to add value. If you leave them with a maintenance nightmare you are not helping, you are hurting. Make sure you are locking things down.[00:22:35] Gems and Poll RequestsDave watches Gems to see what and how often they are updating. He checks to see if his poll request was accepted and reverts back to the original gem. He calls it “free maintenance from other people.” He doesn’t think you should deviate from it too much. An option is to use a proxy as well.[00:27:41] Have you ever had to make patches in your Rails app knowing that those patches were coming in a future release?Eric has had to in the past. His mentor had to patch Rails, apply it, but every time it ran it said,  “if you upgrade...

NOW PLAYING

RR 324: Developer Horror Stories

0:00 51:49

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

JFK The Enduring Secret Jeff Crudele An in depth tutorial and discussion around the assassination of John F. Kennedy, (JFK) the country's 35th president who was brutally murdered in Dallas Texas on November 22, 1963. The series comprehensively explores the major facts, themes, and events leading up to the assassination in Dealey Plaza and the equally gripping stories surrounding the subsequent investigation. We review key elements of the Warren Commission Report , and the role of the CIA and FBI. We explore the possible involvement of the Mafia in the murder and the review of that topic by the government's House Select Committee on Assassinations in the 1970's. We explore the Jim Garrison investigation and the work of other key figures such as Mark Lane and others. Learn more about Lee Harvey Oswald the suspected killer and Jack Ruby the distraught Dallas night club owner with underworld ties and the man that killed Oswald as a national TV audience was watching. Stay with us as we take you through the facts and theorie Explicit 暗黑森林 The Dark Forest 榮忠豪/Ruby 盧春如/Joanna Wang 王若琳 社會總是希望人人都活在明亮。但一旦人的黑暗面露出的時候,社會會怎麼反應? 人性的黑暗總是被壓抑的而不被允許顯露, 但若這些邪惡的行為無法被壓下來 會有什麼事情發生? 本播客想透過真實殺人案件與其他暗黑的故事來探索人的黑暗面,但就像暗黑的森林,在黑暗的樹枝之中還是看得到光芒,提醒人們黑暗之處還是有希望的存在。 除了只關注故事的黑暗,『暗黑森林』也會專注在人們對於彼此的關懷,同情,與自我保護的重要性。來吧!跟著主持人 榮忠豪/Joanna 王若琳/Ruby 盧春如 一起走進 「暗黑森林」 Powered by Firstory Hosting Explicit Rogues Gallery 27th Letter Productions Kristen, M.J., and Chris investigate pop culture's most memorable villains, antiheroes, and misunderstood monsters to find out how they make being bad look so good. New episodes every other Thursday. Explicit Ruby Ryder – Pegging Paradise Ruby Ryder Your guide for pegging, anal sex, and bdsm Explicit

Frequently Asked Questions

How long is this episode of Ruby Rogues?

This episode is 51 minutes long.

When was this Ruby Rogues episode published?

This episode was published on August 22, 2017.

What is this episode about?

RR 324: Developer Horror StoriesThe panel for this episode of Ruby Rogues is Dave Kimura, Eric Berry, and Charles Max Well. They are telling developer horror stories this week. Tune in to listen to their stories![00:01:40] Eric’s Story Eric tells a...

Can I download this Ruby Rogues episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!