exploratory

How to investigate objects/types/etc. from Scala REPL?

我是研究僧i 提交于 2019-11-29 19:32:32
I've been working with Scala for a while now and have written a 10,000+ line program with it, but I'm still confused by some of the inner workings. I came to Scala from Python after already having intimate familiarity with Java, C and Lisp, but even so it's been slow going, and a huge problem is the frustrating difficulty I've often found when trying to investigate the inner workings of objects/types/classes/etc. using the Scala REPL as compared with Python. In Python you can investigate any object foo (type, object in a global variable, built-in function, etc.) using foo to see what the thing

How to find an appropriate event in Magento?

不问归期 提交于 2019-11-29 02:53:34
问题 Sometimes when looking for a convenient event to hook I do a bit of exploratory programming... Modify Mage::dispatchEvent with this extra line: Mage::log($name.'('.implode(',', array_keys($data)).')'); Mark a start point which I know I cannot catch any sooner: Mage::log(__METHOD__.'::START'); Mark an end point which I don't want to catch any later: Mage::log(__METHOD__.'::STOP'); Watch the log and step through the site (eg. order submission, whatever is being investigated) tailf var/log

How to investigate objects/types/etc. from Scala REPL?

跟風遠走 提交于 2019-11-28 15:05:28
问题 I've been working with Scala for a while now and have written a 10,000+ line program with it, but I'm still confused by some of the inner workings. I came to Scala from Python after already having intimate familiarity with Java, C and Lisp, but even so it's been slow going, and a huge problem is the frustrating difficulty I've often found when trying to investigate the inner workings of objects/types/classes/etc. using the Scala REPL as compared with Python. In Python you can investigate any