The Search For Class:0x00000027b59290
chrisarcand.com
chrisarcand.com
Wow, that sounds incredibly dangerous... how do you even test for not introducing a bug like that somewhere? I am not so familiar with Ruby, is there a linter or something that can catch these?
.col-md-8
#{@record.name} / #{@record.description}
- binding.pry
= check_box_tag(display, true, @record.display, :disabled => true)
= _('Display in Catalog')
Ruby syntax is terrifying. There is so much going on here I can't even begin to figure out what this code is supposed to do.Don't let this poor example turn you off from Ruby, its syntax is amazing. One of my biggest struggles with using other languages is just how ugly the syntax is, even in the best case.
Basics of it: indentation nests html elements. each line is basically an element or a control structure. = is run this ruby code and display it. - is run this ruby code but don't display it. a period with something after it is shorthand for create a div with that as a class. the fact that it creates nicely formatted html that is automatically closed for you is a bonus. the #{} part is string interpolation that comes from ruby and those items inside that are just ruby objects with functions/attributes on them.
Give ruby a chance and you will likely fall in love with the syntax.
The conclusion of the story is anti-climactic, since from the problem statement itself, it was clear an object was trying to print itself. Then the given line showed the issue exactly, but the author didn't know about "display" in Ruby.
If he used the variable name "Mmmmmk" instead, rather than "display", it would have been more clear.
This is a lie.
In my native language, meh = girl/daughter, schweet = dessert, mmmk = closest meaning would be "thinking", like "hmmm" in English.
I'm curious what is your native language where people don't use colloquial terms and only speak "regular"?
Every written human language has a vernacular versus a written form, typically with a cline between them. English is the closest in correspondence between the two, among the languages I know, but the difference remains.
I do read English every day, but it is much slower for me when people use neologisms that don't have germanic, greek, or roman antecedents, as most English words do. I don't mind learning new vocabulary, especially when it is more precise or apt, as is often the case in math, philosophy, art, or in technical works.
The neologisms this author chose to use are interjections, and I still don't see what power was added to his prose by their use. I suppose they act as shibboleths, signalling his class identity in some way. The entries on urbandictionary.com do give a clue: the origins appear to be "Bill Cosby", "The Simpsons" and "South Park". The OP likes comedy and cartoons? Or marijuana? It's common to hear people talking about getting stoned and watching "The Simpsons" or "South Park" all day. And, that may partially explain his inability to debug his code.
Thanks again.