This is a fantastic explanation of symbols in Ruby. I love the detail and technical explanation when it comes to storing objects in memory with Ruby yet the elegant simplicity of how you phrase and explain these concepts step by step. I've been working as a junior RoR developer for a few months and this video cleared up a lot of misconceptions for me. Thank you!
@ayuthmang Жыл бұрын
I love you explanination with details and context. I come from other programming languages and stugling syntax in rails for a long time. This video make everything pretty clear.
@GorailsTV Жыл бұрын
Glad we can help! Anything else you've been struggling on with Ruby?
@ayuthmang Жыл бұрын
For me ruby itself is straightforward unless you step into rails world. Things get weird and confusing.
@RR-et6zp Жыл бұрын
Great explanation. You're single handedly carrying the Rails community on your back I swear
@GorailsTV Жыл бұрын
That makes my day!
@ondrejsvoboda62072 жыл бұрын
Underrated content, finally an easily understandable explanation
@jacinyan38934 жыл бұрын
Good gracious, I've been confused about the use of symbols in Rails since started learning it. Thank you so much!!
@jackriminton79594 жыл бұрын
Really great explanation, please do more of these!
@yp5387 Жыл бұрын
It suddenly started to make sense when you did a demo with an object id property.
@jakewoodruff13 Жыл бұрын
Awesome tips! Thanks!
@sherriffs25545 жыл бұрын
Also worth noting with symbol comparison ruby only needs to compare object_id's. With strings ruby has to compare the actual data.
@faizan20064 жыл бұрын
Nice explanation and easy to understand.. Thanks Chris..
@kaysong3800 Жыл бұрын
awesome explaination, thank you so much!
@ClaudineyPerbony5 жыл бұрын
Very clear explanation. Best ROR channel
@aurontz2 жыл бұрын
Amazing tutorial. Thank you very much!
@Ranterd2 жыл бұрын
Excellent explanation of ruby's features. I like your condensed deep dives! i was unaware of the implied optional inclusion of a hash as the last argument of any method call. Also is this more compact representation of hashes good for multi-dimemsional hashes? (Ex: see fortran arrays)
@Rod_Tolledo4 жыл бұрын
Great explanation, thank you!
@Lyrik-Klinge3 жыл бұрын
Very nice explanations! May I ask you what editor you use?
@GorailsTV3 жыл бұрын
MacVim + github.com/excid3/dotfiles
@Lyrik-Klinge3 жыл бұрын
@@GorailsTV Thank you:-)
@karoskibinska40595 жыл бұрын
Very clear explanation, thank you!
@pavlo-vasylkivskyi4 жыл бұрын
Thank you Chris. Is it still relevant to learn ROR in 2021?
@GorailsTV4 жыл бұрын
Absolutely. In fact some really amazing new stuff just came out and the community is growing a lot latrly
@cutliss5 жыл бұрын
what's that intro soundtrack? I heard it once in a game but struggled to find it
@GorailsTV5 жыл бұрын
It's a track I bought on audiojungle. Forget the name.
@RsZ7895 жыл бұрын
Thank you, I now understand symbols. Great job!
@davidlytikainen58152 жыл бұрын
super helpful. thanks man
@GorailsTV2 жыл бұрын
Let me know if there are other concepts you'd like a video on!
@默-c1r Жыл бұрын
thank you! very helpful
@lorieldesamito39982 жыл бұрын
thanks
@dc3665 жыл бұрын
Hard to see this video on mobile
@paulryan62694 жыл бұрын
Awesome
@elisson3575 жыл бұрын
Thanks for Sharing This.
@AlexanderShelestov4 жыл бұрын
Use symbols actually don't make sense anymore, cause every Ruby string is going to be frozen in memory by default. Today you can do it using .freeze method or add this comment line at the top of any ruby file: # frozen_string_literal
@GorailsTV4 жыл бұрын
Yeah the goal is to make static strings closer in performance to symbols. I'm not sure if they are quite as performance as symbols, so I'd still recommend using them over strings. Plus symbols convey that it's something reusable like a hash key, which helps differentiate your code better at a glance.
@AlexanderShelestov4 жыл бұрын
@@GorailsTV I've benchmarked use the different types of keys in a hash. The results: Symbol: 9.550638 0.006868 9.557506 ( 9.571867) String: 15.660584 0.006830 15.667414 ( 15.678722) Frozen String: 10.984252 0.004975 10.989227 ( 10.993361) So the frozen string is performance enough to be used in hashes :)
@AlexanderShelestov4 жыл бұрын
But of course, it's still handier to use ruby symbols for this.
@GorailsTV4 жыл бұрын
That doesn't take into account garbage collection and things right? I can't remember if it handled them differently. Either way, I'd still recommend symbols for keys that never change and strings only when you need dynamic keys.