What is meant by immutable?

Immutable means that once the constructor for an object has completed execution that instance can’t be altered. This is useful as it means you can pass references to the object around, without worrying that someone else is going to change its contents. Especially when dealing with concurrency, there are no locking issues with objects that … Read more

Why are exclamation marks used in Ruby methods?

In general, methods that end in ! indicate that the method will modify the object it’s called on. Ruby calls these as “dangerous methods” because they change state that someone else might have a reference to. Here’s a simple example for strings: foo = “A STRING” # a string called foo foo.downcase! # modifies foo … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)