Wow, I wouldn't go there in that particular article.

But things like:��

(groups at: (aBlock value: each) ifAbsentPut: [ OrderedCollection new ]) add: each

Especially when they are in Collection>>groupedBy: aBlock

could make cool other articles.

There are also Matrix etc which are understandable by people and add value. I guess you may have some Bio samples here.

Sven, thanks for taking the time to write those articles on medium. They look great and I enjoyed them immensely.

I pushed me to look into how to write for that website. That a step :-)
Phil


On Wed, Jul 9, 2014 at 9:11 AM, Hern��n Morales Durand <hernan.morales@gmail.com> wrote:
Hello Sven,

I will try to give some feedback for you. My major issue is that the objects you use are pretty basic. There is no reason to put limits with so many contributed packages. Visualizations have impact and you could use Roassal, GraphViz, CodeCity, GraphET. SQL is also of interest for many developers. Or Big Data which is a requirement now. An example with Spec and DynamicLayout would be cool. For reverse engineering there is Moose and you could show an overview pyramid maybe? A one-liner with #linesOfCode would be magic :)

About the article: When writing sample code with random, don't forget to add a paragraph explaining the random source. It is /dev/urandom? To randomize a String I write this:

(UUID new asString reject: #isDigit) copyWithoutAll: '-'.

To count digits (doesn't work for 1 digit but I like it):

42 factorial log ceiling.

I don't know how this could be useful besides doing many things: "Split a string on dashes, reverse the order of the elements and join them using slashes". If you could find a example with some real application would be nice too.

For Collection messages people is often interested in speed comparisons. Because audience already knows how to do that in R, Python or other language.

Hope you could find them useful.

Hern��n




2014-07-07 19:21 GMT-03:00 Sven Van Caekenberghe <sven@stfx.eu>:
Hi,

I have written a new article presenting Pharo using a list of 23 short examples.

�� Elegant Pharo Code

�� Beautiful & Powerful One-liners, Expressions and Snippets

�� https://medium.com/@svenvc/elegant-pharo-code-bb590f0856d0

As mentioned at the end of the article, I welcome feedback, remarks, comments, alternative solutions and other examples. The idea is to create yet another way to lure people into exploring Pharo while explaining by example why we like Pharo.

Enjoy!

Sven

--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org