Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Ruby

Ruby Summer Special: AppSignal Academy Top 5 Guides สำหรับ Mastering Custom Exceptions

จำได้ไหมตอนเป็นเด็ก คุณซื้อ omnibus double edition comics มาอ่าน? อ่านแล้วสนุกมากใช่ไหม? เราจะไม่ pretend ว่านี้จะ unforgettable เท่าเดิม แต่เราคิดว่าเรารวบรวม Best-of AppSignal Academy selection ที่ extra-chunky ไว้ให้คุณอ่านที่ beach, park, หรือแค่ lazy Sunday ที่จะ make your day แน่นอน

นี่คือ top 5 hammock reads ของเรา:

Custom Exceptions in Ruby

เกือบทุกอย่างใน Ruby เป็น object และ errors ไม่ใช่ exception #dadjokes

Ensuring Execution, Retrying Failures and Re-raising Exceptions in Ruby

นอกจาก rescue Ruby มี ways มากกว่านั้นในการ handle exceptions เราจะใช้ keywords retry และ ensure รวมถึง reraised exceptions เพื่อสร้าง resilient web API client

Ruby's Redo, Retry และ Next Keywords

Post เกี่ยวกับ retry เป็น super popular ตอน holiday ที่แล้ว Little-known counterpart redo ทำงานคล้ายกัน แต่ reruns loop iterations แทน whole blocks

ActiveRecord Performance: The N+1 Queries Anti-Pattern

เหมือน squirrels ใน summer forest N+1 queries problem เป็น common แต่ usually easy to spot nuisance, อืม, performance anti-pattern ที่บางครั้ง caused by lazy loading associations

Russian Doll Caching in Rails

ด้วยการ nest cache fragments views เกือบไม่ถูก render completely แม้ data จะเปลี่ยน most ของ rendered pages ถูก serve straight จาก cache

Enjoy!