<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andrea Moretti on Medium]]></title>
        <description><![CDATA[Stories by Andrea Moretti on Medium]]></description>
        <link>https://medium.com/@axyz?source=rss-b454b76eefb8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4YCx4SQ-uCi4vs4w.jpeg</url>
            <title>Stories by Andrea Moretti on Medium</title>
            <link>https://medium.com/@axyz?source=rss-b454b76eefb8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 21:39:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@axyz/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Open-Source is an art form]]></title>
            <link>https://medium.com/@axyz/open-source-is-an-art-form-6ae0dead3f72?source=rss-b454b76eefb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ae0dead3f72</guid>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Andrea Moretti]]></dc:creator>
            <pubDate>Sun, 10 Sep 2017 13:16:02 GMT</pubDate>
            <atom:updated>2017-09-23T16:11:23.466Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*fcijw84nKC7eUdB9dkfDOg.jpeg" /></figure><p>Great open-source projects can be compared to great pieces of art and art should always be driven by passion. Only when this driving force is pure and real, art lives forever, no matter the reason it appeared on the first place.</p><p>It all sounds poetic and good and, as a company, I would probably like to proudly invest in these kind of art pieces, but passion cannot be bought with money, never. This simple theorem, since the beginning of time, made business and art two entities with a really complex relationship. It is not uncommon for them to be in a raging state of refusal, then jump to a symbiotic existence or to complete independency.</p><p>Beside of the unanswered question of “how do we make art to happen” (read art as valuable opensource here), the other big, and controversial, question for companies is “why do we need art in the first place”. The artist itself, pretty often, does not know why he needs to do it, he is just reacting to a very intimate needs of expression and sharing.</p><p>If we consider a work of art as the highest expression of a “crafting” activity, it is easy to imagine every artisan to have the “state of the art” as a model for their creations, but it is as well hard to imagine them to slow down their work and risk their income source in order to explore ways to change the state of the art by themselves.</p><p>Relating this topic to software development becomes easy to understand why developers admires (yes they should) open-source as a pure form of “artistic” evolution path for an otherwise purely business driven crafting field. On the other hand making investors accept the risk of allocating resources into open-source it often looks like a snake oil exchange in the old west.</p><p>In lot of ways open-source software is the equivalent of public research papers in other technical fields, the main difference, though, is that given the virtuality of software it is incredibly easy for anyone to share, contribute and create new things that are not only theoretical but, most likely, ready to use. What they share, instead, is the business concern if it would be worth or not to invest in it.</p><p>Some of the business friendly arguments for open-source usually revolves around creating prestige for the brand in order to attract good developers that will eventually help to make more money. In some markets openness is also a way to attract customers and or to get crowdsourced content for free. Someone from the engineering department may also add that is very good for them as it enforces higher standards in code quality and may leads to valuable external contributions and issue spotting.</p><p>These are all good reasons independently of the point of view, and I’m probably missing a lot more, but at some point we all have to face and accept the fact that what we are trying to sell is in fact a necessity, not only for the industry, but for human progress itself. Researching new ways to do things with no guarantee of success or results at all is what progress is all about and no progress in human history coulded happen without sharing these mere product of art in its highest sense.</p><p>from the business perspective, though, it is a lot like gambling: you invest resources on something very uncertain hoping to get some early adoption reward or, more often, a big visibility boost and the hope that the internal culture influence may lead in the end to get more money.</p><p>taking back the similitude with what we traditionally intend with art and science, companies who invest in open-source are like Renaissance courts, the more they could afford to invest in art and science, the more they gained in prestige and attracted more artists and scientists. While the original motivations where probably more business related than purely humanistic, it started a virtuous circle of competition that indeed led to a notable progress for humanity and, by inclusion, for the court itself.</p><p>Would be interesting to analyze how much of that art was commissioned and how much was just “sponsored”. Artists of course have to make a living, but on the other hand art never works that well on demand, and a lot of antiques and modern money driven “art” productions can prove it. A good sponsor should find ways to let it happen without asking for it, a bit like sex. Beside the easy pun, sex involves emotions exactly like art, that’s why they share this untameable nature. You cannot grow white truffles, but you can preserve their habitat, in the same way you cannot create emotions, but you can build a favorable environment, being it dim light and Berry White, or a poplar tree forest.</p><p>Coming back to open-source, we should hope that companies will compete on creating the right environment to let it happen, so that “state of the art” software can evolve. The effort should exist at different level, but mainly developers need to embrace the idea of being part of a progress that still have to be written and sacrifice some short-term productivity in favor a open-source first mindset. At business level, instead, we need to invest on creating the environments where not only open-source first has the space (and pace) to exist, but, more importantly, a “passion-first” researching environment should be favored and encouraged.</p><p>Building the boat dreaming the vastness of the sea is not enough, people should be free to choose their dreams, otherwise we will sail forever but never fly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_b2_HmPpTgmOP8WnYHS7g.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ae0dead3f72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In Search of the Perfect Image Gallery Part 2]]></title>
            <link>https://medium.com/swlh/in-search-of-the-perfect-image-gallery-part-2-48f04c84ac34?source=rss-b454b76eefb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/48f04c84ac34</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Andrea Moretti]]></dc:creator>
            <pubDate>Mon, 31 Aug 2015 22:57:00 GMT</pubDate>
            <atom:updated>2015-08-31T22:57:34.560Z</atom:updated>
            <content:encoded><![CDATA[<p>Just two days after the release of <a href="https://github.com/axyz/perfect-layout">perfect-layout</a>, I have to say that I’m really glad and impressed by the interested it seems to have created.</p><p>By the way I was not really happy with the result so far: in a lot of situations <a href="http://www.chromatic.io/">chromatic.io</a> galleries seems to be way more balanced and with a 7/8-approximation I’d have to get similar results instead. Reading your feedbacks and staring a bit more to my code I’ve realized that with the greedy approach I can only get a very good partition, but with an unpredictable ordering. If I want every picture to be associated with his relative weight (ratio) I had two possibilities: changing the order of my original gallery, or search for another algorithm.</p><p>Obviously I opted for the second solution. The resources on linear partitioning are quite limited and the very slow dynamic programming approach seems to be the most diffused. However it is in fact a bruteforce that cache his intermediate results with a complexity of O(kn^2) and I cannot believe that there aren’t faster approaches.</p><p>I’ve never been a math guy… however my guessing/heuristic way of being suggested me that usually when we struggle with some O(n^2) beasts there is probably a smart guy in Russia that know how to do the same thing in O(n log n) or similar.</p><p>So I’ve started googling about linear partition with keywords such as “recursive” and “binary search” And finally I’ve found what I was looking for:</p><ul><li><a href="http://articles.leetcode.com/2011/04/the-painters-partition-problem.html">http://articles.leetcode.com/2011/04/the-painters-partition-problem.html</a></li><li><a href="http://articles.leetcode.com/2011/04/the-painters-partition-problem-part-ii.html">http://articles.leetcode.com/2011/04/the-painters-partition-problem-part-ii.html</a></li></ul><p>I strongly advice you to give it a look because it is really well written.</p><p>Basically they suggest to use a classical BST like approach, where we look for the right threshold for the sum of the weights on every row, by subsequently evaluate how good performs the middle point between the maximum possible threshold and the minimum one. Then at every step repeat the process on the halved range that must contains the solution.</p><p>All that just assuming that we are never going to need a threshold smaller than the maximum of the weights and we’ll never push it higher than the sum of all the weights.</p><p>So I’ve scratched out my own implementation:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/87e8e3df704b6d7a86b6dd53a88f642a/href">https://medium.com/media/87e8e3df704b6d7a86b6dd53a88f642a/href</a></iframe><p>And guess what… not only it perfectly dispose my images as chromatic.io would do, but it outperform the greedy algorithm as well in terms of speed.</p><p>Here it is an updated <a href="http://jsperf.com/greedy-linear-partitioning/2">jsperf</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DCOdDmQnbSHol_qlgQ5wlA.jpeg" /></figure><p>It is almost 7 times faster than the already very fast greedy algorithm, and it is incredibly fast also on a set with 1000 images to be distributed on 200 rows.</p><p>Just update to the the new 1.1.1 version and let me know what you think.</p><p>thanks for all the interest and the suggestions.</p><p>N.B as clearly stated on the README the jQuery plugin is only an example on how to use the perfectLayout function and I do not recommend to use it on production as it is. There are no guarantees about cross browser behavior and the DOM operations are not optimized.</p><p><a href="https://blog.growth.supply/in-search-of-the-perfect-image-gallery-34f46f7615a1">READ THE FIRST PART</a></p><p><a href="https://github.com/axyz/perfect-layout">perfect-layout</a> on github</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48f04c84ac34" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/in-search-of-the-perfect-image-gallery-part-2-48f04c84ac34">In Search of the Perfect Image Gallery Part 2</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In Search of the Perfect Image Gallery]]></title>
            <link>https://medium.com/swlh/in-search-of-the-perfect-image-gallery-34f46f7615a1?source=rss-b454b76eefb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/34f46f7615a1</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[gallery]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Andrea Moretti]]></dc:creator>
            <pubDate>Sat, 29 Aug 2015 20:57:58 GMT</pubDate>
            <atom:updated>2015-09-05T09:30:10.440Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s face it: displaying images in a responsive world is not that easy.</p><p>In a web-designer’s paradise all the cameras would shot square images, so that our lucky web-designer would easily add a simple list of &lt;img&gt; tags and would eventually play with some float: left or some kind of flexbox awesomeness. They will then close their laptop at 4 p.m. and go out to have some social life.</p><p>Unfortunately for our dear web-designer that’s not how it actually works. Photographs may be horizontal (landscape), vertical (portrait) or square. When you need to put together a bunch of images with different aspect ratios you will struggle to figure out how to make the whole thing look like a professional photo gallery instead of a total mess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*7DIccDlAD_S3IMhEBJc54w.jpeg" /><figcaption>that’s what I mean with “total mess”</figcaption></figure><p>One obvious approach to solve this problem is to think as a magazine photo editor and resize and position the images to look great together. This approach however is not a viable choice as it is based on three assumptions:</p><ol><li>we are good photo editors</li><li>we have the time to carefully resize and position hundreds of photos</li><li>website proportions are fixed</li></ol><p>So, basically what we need is some kind of automation that allows us to blindly add our images to the gallery and then have them beautifully positioned. We also want to be able to look at those kitties on a darn crappy iphone 4 as well as on a IMAX screen.</p><p>All this means that our dear web-designer won’t be able to have a social life as they will have to deal with media queries and percentage based layouts while their clients will start complaining about them wasting all this time for a f***ing simple image gallery that a friend of their cousins woulded be able to do in five minutes.</p><p>Then, when our poor web-designer was starting to loose any hope, a website called <a href="https://www.pinterest.com/">pinterest</a> came out with a possible panacea of all evils: masonry layout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SGAVEweu0amrviE7SAKZDg.jpeg" /><figcaption>masonry layout on pinterest</figcaption></figure><p>Masonry is great! You can throw in whatever image with whatever aspect ratio and that smart piece of JavaScript code will fill the gaps within your photos as well as maintaining a fixed width for all the elements. It is also quite easy to configure it to reduce the number of columns on small screen ending to have just a single column on that crappy old iphone 4.</p><p>This solution however has started to be quite too much popular, so, just when I was starting to have some social life, I’ve decided that I need to search for an alternative.</p><p>On printed layouts it’s quite uncommon to have images positioned an different baselines. While masonry focuses on columns, print designers will usually focus on rows, so I’ve started to search for a way to fix rows height instead of columns width. I’ve found out some nice solutions like <a href="https://github.com/ed-lea/jquery-collagePlus">jquery-collagePlus</a> or <a href="http://miromannino.github.io/Justified-Gallery/">Justified-Gallery</a>, however the one that really blew my mind was the gallery used by <a href="http://www.chromatic.io/">chromatic.io</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FHmZeGua02d7_k9EAHNcpg.jpeg" /><figcaption>chromatic.io gallery</figcaption></figure><p>The greatest features of this gallery are that it will always try to have the height of the rows near to the half of the screen height and that it will always result in a perfect rectangle gallery without leaving any whit space at the end of the page.</p><p>Luckily the guys at chromatic have published an <a href="https://www.crispymtn.com/stories/the-algorithm-for-a-perfectly-balanced-photo-gallery">article</a> with all the research they’ve done to reach this point and I strongly advice you to give it a look.</p><p>Basically what they do is:</p><ul><li>find out the ideal height of a single row dividing the window height by 2</li><li>guess the number of rows we need using the sum of all the images widths assuming that they are resized to fit the ideal height</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4fa96cc3e8069a001945d49b8f8c4f02/href">https://medium.com/media/4fa96cc3e8069a001945d49b8f8c4f02/href</a></iframe><ul><li>solve the linear partition problem using normalized image ratios as weights and the perfectRowsNumber as our k</li><li>calculate what dimensions each image must have to fit our partition array</li><li>finally they simply populate the DOM with divs with those dimensions and use the actual images as a background</li></ul><p>All the needed code is freely available on <a href="https://github.com/crispymtn/chromatic-ui">github</a> and they also offer a <a href="https://github.com/crispymtn/chromatic.js">jquery plugin</a>, however it is not well documented and is quite bloated with a lot of extra features, so I’ve decided to create my own version that does one thing and tries to do it well: given an array of images described by their source and their aspect ratio return an array of images described by their exact dimensions to let them fit our perfect layout.</p><p>Initially I’ve tried to simply convert the linear_partition function from their CoffeeScript source, but suddenly I realized that it was too complex and computationally heavy for what I wanted to reach. So I’ve started to read on the web about possible solutions to the linear partition problem. The approach followed by chromatic is described <a href="http://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/BOOK/BOOK2/NODE45.HTM">here</a> and allows to find an optimal solution.</p><p>Starting to have an headache staring at all those math symbology, I run to ask help to another well known panacea of all evils: <a href="https://en.wikipedia.org/wiki/Partition_problem#The_greedy_algorithm">wikipedia</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*pO-_OkVwt8_wjY5J2SZlUw.jpeg" /></figure><p>According to that article the greedy algorithm that will simply push every element to the smallest available partition is known to give a 7/6-approximation to the optimal solution. So I’ve decided to write a greedy linear partition algorithm to see how it performs compared to the optimal one.</p><p>Here it is my greedyLinearPartition algorithm:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fde053f075bbfd64dc65ae34722dcbd/href">https://medium.com/media/6fde053f075bbfd64dc65ae34722dcbd/href</a></iframe><p>First of all I’ve made a <a href="http://codepen.io/axyz/full/VLJrKr/">pen</a> to see how it performs at positioning the images. It is not exactly the same as the chromatic optimal version but it seems to be quite acceptable to me.</p><p>Now, let’s see how much speed we are going to gain using the greedy algorithm. I’ve prepared a <a href="http://jsperf.com/greedy-linear-partitioning">jsPerf</a> to see how the two algorithm performs on some random sample array, both totally casual and one resembling actual photo proportions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X1Lic0rvlwl07-VjQYFlOg.jpeg" /></figure><p>The results are astonishing, probably the linear_partition code may be optimized: it uses underscore and is converted directly from CoffeScript, however the difference in terms of Ops/sec is really huge, so it will probably make some big difference on slower devices.</p><p>I’ve released the whole code on github as <a href="https://github.com/axyz/perfect-layout">perfect-layout</a>, it is also available on <a href="https://www.npmjs.com/package/perfect-layout">npm</a> and bower.</p><p>Please feel free to use it and contribute, I’d really like to see how it may evolve (I’m thinking of lazy loading and infinite scroll support), but always maintaining a modular approach so that who just need a simple layout will not be bloated with unused code.</p><p><a href="https://medium.com/@axyz/in-search-of-the-perfect-image-gallery-part-2-48f04c84ac34">READ THE SECOND PART</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJ6pLzJD9qnHRthas2vL-Q.jpeg" /></figure><p><em>Published in </em><strong>Startups, Wanderlust, and Life Hacking</strong></p><figure><a href="http://supply.us9.list-manage.com/subscribe?u=310af6eb2240d299c7032ef6c&amp;id=d28d8861ad"><img alt="" src="https://cdn-images-1.medium.com/max/800/1*fSUxWFf6_qlAfAObKJuEAA.png" /></a></figure><figure><a href="https://blog.growth.supply/"><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Me4fgEZDDb-d8j41O5oKaQ.png" /></a></figure><figure><a href="https://twitter.com/swlh_"><img alt="" src="https://cdn-images-1.medium.com/max/800/1*_DMWEyOz7IhTGGNb5tzA0g.png" /></a></figure><p>-</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34f46f7615a1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/in-search-of-the-perfect-image-gallery-34f46f7615a1">In Search of the Perfect Image Gallery</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java and the Photography Market]]></title>
            <link>https://medium.com/@axyz/java-and-the-photography-market-4bf6dbb67778?source=rss-b454b76eefb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bf6dbb67778</guid>
            <dc:creator><![CDATA[Andrea Moretti]]></dc:creator>
            <pubDate>Sat, 05 Apr 2014 15:29:17 GMT</pubDate>
            <atom:updated>2014-04-11T00:26:48.374Z</atom:updated>
            <content:encoded><![CDATA[<p>Coming from a three year experience in the professional photography industry and a computer science background, I can consider myself as a good observer of the ever changing relation between imaging and technology.</p><p>Actually I’m collaborating with <a href="http://eikona.eu/">Eikona Studio</a> where I had the occasion to work on assignment for the major Italian’s magazines, corporations, events and activities. This gave me the hassle (and the opportunity) to deal with complex and various workflows as well as high demanding image storage and deployment necessities.</p><p>Nowadays the daily photographer’s work routine involve a lot of computer work. He does not only need to edit his images, but also store them, backup, deploy to clients, upload to websites and social networks, apply meta-tags, cataloging, etc… while it is quite a diffuse habits for young emerging professionals, for the older and affirmed ones there is still a slow but unstoppable evolution process. Being able to provide practical and flexible tools to simplify those activities is a really good opportunity to watch for as a developer. It could be possible to cover both the market of the tech-savvy newcomers and the old one which need a mass migration.</p><p>Although I’m talking about a specific area as it is photography, these problematics are common to all the situation where we have to organize a big amount of media files. In the IT world we label the software which try to deal with it as DAM (Digital Asset Management), unfortunately the actual DAM’s scenario is far from being able to provide practical and user friendly tools. The available software often needs to be adapted by specialized developer and have to run on costly infrastructures, while the medium sized professional on the best case rely on a small NAS cabinet that is going to have big trouble with big Java applications. These aspects (maybe not absolute, but quite common to all the actual major DAMs) lead to a market that is only able to satisfy the needs of medium-big corporations, having them no problem on hiring an entire IT department and invest on high performance servers.</p><p>Coming to Java, it seems to be one of the preferred platforms to develop a DAM; by the way we have to figure out how much of this preference is due to the “enterprise friendliness” of the JVM and how much is to be researched in the capabilities of the language itself. The first aspect to consider is that Java Developers are a lot, sometimes cheaper and often with an enterprise background. The advent of Java dialects, the rising of android, the opensource effort to produce good java frameworks and the update to Java 8 are all factors which are freeing the language from its previous boundaries, hence the needs to change some old habits of java programming.</p><p>The first thing to do is to avoid to develop application with monolithic cores. With pressing due dates and a closed environments a lot of old school enterprise applications tends to quickly become an enormous monster of code which can be understood only by the people who wrote it and does not deal too much with good interconnection with external resources nor at all with code reusability. Sometimes those big gray “AWT-looking” beasts works quite well too, but when you need to customize them you will practically need to rewrite and recompile enormous pieces of that big core. It is clear that this approach leads to an always worst codebase and a huge and costly effort for every small change to do. These are basic Computer Science concepts by the way, I do not think that old Java programmer are not good programmer, maybe they are, but the environment and the use cases they were usual to face are changing very quickly. In the future there will be no more space for application that works well only on strict boundaries and specific controlled situations. Today everything need to be flexible, extendible, interoperable, cloud and mobile ready.</p><p>Another aspect that has pushed Java in the DAM’s market, and that I think will continue to push it, is speed. Java is one of the faster, if not the fastest, high level, garbage collected languages out there. Having to deal with big media file means having to do a lot of cpu intensive tasks; just imagine what it could mean to batch resize 10000 images with Lanczos filter using a scripting language… Java is a statically typed rock solid language and can reach optimal performances (when used correctly) with his high potentials in terms of scalability and parallelization. Due to these aspects some of the majors web based DAMs out there like <a href="http://www.nuxeo.com/">nuxeo</a> or <a href="http://www.razuna.org/">RAZUNA</a> run on Java, by the way Python alternatives like <a href="http://notredam.org/">NotreDAM</a> are just right behind the corner and I guess that in the future there will be other languages competing on this market. Erlang, for example, is resurrecting thanks to its incredible concurrency capabilities: the world of computing is moving towards a highly distributed structure and being the best at parallelizing over the network (and not only over multiple CPUs) is a killer feature thinking to the future. Application are also moving on browsers and the concept itself of a browser is quickly changing: if a language can be understood by a browser it is going to have a huge impact on the next years. In fact <a href="http://nodejs.org/">node.js</a> is rising at the speed of light. Although it now excels on I/O bound tasks due to his asynchronous structure, I’m ready to bet that libraries such <a href="http://adambom.github.io/parallel.js/">parallel.js</a> and new JS projects such as <a href="http://asmjs.org/">asm.js</a>, will lead in a really short time to have very good performance for CPU bound tasks in JavaScript. Last, but not least, between Java’s competitors as a server side language there is<a href="http://golang.org/">GO</a>. Made in Google it is like a simplified, modernized, concurrency ready C; besides of the syntax the speed is also comparable to C and Java and I’m sure that the big hype around this new kid in town plus the support of “big-daddy” Google will carry it to a glorious future.</p><p>It is clear that Java could not just stay aside watching the world changing, and fortunately it is not what it is doing. Developers tends to undervalue it, but one of the biggest problems with Java is that it is not “sexy”. Coding should be a joy and reviewing source files a pleasure, hence the needs of sexy languages. Dealing with this unresolved desire some smart guys like Guido Van Rossum and Yukihiro Matsumoto in the past years have started developing new languages to resemble all their inner perversions about the beauty of the code. Mixing some of the sexier languages of the past with their modern ideas they gave to life creatures such as <a href="https://www.python.org/">Python</a> and <a href="https://www.ruby-lang.org/">Ruby</a>. A beautiful code is also way quicker to develop in and easier to maintain, due to those (and much more) benefits, also the Java community has done great things. Being able to rely on a structure such as the JVM is an enormous opportunity for language architects to develop idioms which, compiling to JVM bitecode, give them both great visibility and a solid result. I’m particularly referring to <a href="http://www.scala-lang.org/">scala</a> and<a href="http://clojure.org/">clojure</a>, but also <a href="http://groovy.codehaus.org/">groovy</a>, <a href="http://jruby.org/">jruby</a> and <a href="http://www.jython.org/">jython</a>.</p><p>Trying to figure out what are the features that a good future proof DAM should have we could try to understand the daily workflows of a modern photographic studio as a good starting point. Since now we were used to divide the shooting time from the editing time, by the way it is always more common to use live transfers of the images from the camera to a computer, above all during studio, architectural or still-life works. Being able to directly operate with camera drivers is definitely something to research on. While today data transfer speed (particularly in a wireless environment) could be a bottleneck, develop for the future means to assume that this limitation is going to fade away soon. Once obtained the shoots it’s time to discern the good ones from the bad ones, and so decide what are the images to be edited and archived. The passage from the selection and editing stage to the archival one is, to me, an extra layer of complexity that leads both to be more error prone and to a lot of data transfers which could be easily avoided if everything will be done in the same environment. Professionals are usually scared by the idea of editing in place, and prefer to have solid backups to feel safer; by the way this amount of redundancy is a clear waste of memory. In fact today the modern photo editing programs use to be non destructive, this means that every change is recorded as a serialized list of instruction to be applied to the original bitmap, without touching it. This way an edited version of an image could be stored with only a bunch of textual instruction as overhead instead to have two big slightly different images. I like the lightroom approach: for every images it is possible to create virtual copies and various versions (with their own different set of instructions), without edit directly the original one nor copying it multiple times. What i do not like of lightroom (besides being closed source) is that it is quite difficult, if not impossible to use it properly as a shared resource. While there are various software in the photo editing landscape which get their job done quite well, none of them seems to be ready to scale to multiple users and multiple locations.</p><p>Once the images are edited and archived, we need to be able to share them, deploy to clients and also being able to find them years later. Thinking as a developer I imagine resized images being sent in output as streams instead of being saved somewhere, this way the application could decide to send that stream directly over the network on the fly or if save it to a local file. We should avoid to use temporary folders anymore and also feel confident about the increase of network speeds. It is important to be able to create personal workflows, such as take those images and send a small version to facebook with a watermark, then send a hi-res version to that printing service and upload CMYK TIFs to the client’s ftp. It is impossible to know in advance how complex could be one of those workflows, hence the necessity to give the user easy tools to edit them, basically it is always about resize, rename, watermark, upload, etc… those tasks should be core features of every photography targeted DAM; but also it is vital to be able to mix them as needed (easy scripting, visual programming, etc…).</p><p>When it is time to archive for future using, but also when we want our images to be easy searchable on the web, we need to deal seriously with metadata. It is incredible how difficult is to find photography software with a good structured keywords support (read about them on <a href="http://www.controlledvocabulary.com/index.html">controlledvocabulary.com</a>). Tagging and describing images is tedious, but needed, so it is a good idea to invest on researching good methods to deal with it. I think about big data analysis and machine learning to suggest keywords or automatically apply them, but also a rock solid way to edit metadata on the fly, from everywhere and with no effort. Tagging should be considered a core feature and we should be able to include it as a workflow step; imagine for example something like take this bunch of images, apply those tags, then prepare a resized version with keywords collected from <a href="http://axyz.svbtle.com/www.gettyimages.com">gettyimages</a>similar pictures and upload them to <a href="http://www.istockphoto.com/">istockphoto</a>.</p><p>One aspect that we should not underestimate is that clients are changing too, they want to see things while they are still happening: often we have to uploads tons of images to online services such as<a href="http://www.smugmug.com/">smugmug</a> just to create a quick gallery to let them make a selection. Once they point out via mail the images they want to be edited we edit them, then we need to create a new gallery with the final images ready to be downloaded. This is clearly a bad workflow: in my opinion a good platform should permit you to create web galleries on the fly and just allow external users to apply a small subset of metadata to your images (such as star or color rating), then one could work on those images directly and once saved their new version should be automatically available on the same gallery.</p><p>I’ve started to think what could be the best way to implement those kind of services, and I’m also very interested on hearing from you any ideas about it. Basically I think we should treat the whole thing as a strong, solid, minimal backend that implements all the core instructions and offer them to clients trough clear APIs. The server should be wrote with cloud computing in mind and be ready to be distributed over different nodes. Offering a good RESTful interface will permit to interact with the rest of the world in a clear and consistent manner. Noting that can’t be done with <a href="https://jax-rs-spec.java.net/">JAX-RS</a> or with <a href="http://www.scalatra.org/">scalatra</a>. Java also offer awesome tools to treat concurrency and parallelism, we can rely <a href="http://akka.io/">akka</a> a great implementation of the actor model for both pure Java and scala and of course on <a href="http://hadoop.apache.org/">hadoop</a> with his distributed filesystem HDFS. I also would give a try to <a href="http://clojure.org/">Clojure</a>, a lisp dialect that runs on the JVM developed with concurrency in mind.</p><p>Regarding the clients it is vital to avoid the error to make a big swing application that try to make it all. Clients are variegates as they are the use cases, so the main objective to aim for is a clean API which permit the community to create a lot of interfaces to tackle the different necessities. Obviously to furnish a good and stable application to interact with the server is advisable, but I’d avoid to try to push it over the others, instead I’d present it as a good starting point to start hacking. REST API are widely accepted and perfectly usable as an architecture independent interface on the web, so we put no boundaries on the client structure and core technologies. We could easily implement a web application using a JavaScript framework, or a desktop application with python. Using technologies like <a href="https://github.com/rogerwang/node-webkit">node-webkit</a>and <a href="http://phonegap.com/">phonegap</a> it becomes trivial to share a big amount of the code between a web version, a mobile app and a desktop program. As Java developer we could also write native android apps and, why not, rely on <a href="https://developers.google.com/appengine/?csw=1">Google App Engine</a> to write a webapp. Good APIs also mean to help the flourishing of a huge amount of plug-ins to interact with third party software and web services, and in the long terms it could really makes the difference.</p><p>In those terms it looks like this could be an open source friendly approach, and in fact it is, but it doesn’t mean that it won’t be possible to monetize. This is also a clear win for a cloud hosting company: while a big company could rely on his own server, the medium-small studio will be happy to pay a reasonable price for this kind of service. Probably there always will be some uncovered necessities and the possibility to tailor a client, or also some aspect of the backend, on a specific target could lead to new business opportunities. Also as an independent developer it would be possible to write a good mobile client and make some money from it. I also think that as a Java developer the gold coin could also be on being able to scale it on different network and hardware structures.</p><p>Java has still a lot to say, and I think that CPU intensive application like this could be a nice weapon for a Java developer in the future, the most important thing is to adapt ourselves to an ever changing world. While some of my consideration could be labeled as crazy, I guess they will become reality as network speed will be able to deal with 50Mb RAW files. Progress today is way faster than yesterday and to not be on delay we have to start developing with future in mind.</p><h3>links</h3><ul><li><a href="http://www.opensourcedigitalassetmanagement.org/reviews/available-open-source-dam/">http://www.opensourcedigitalassetmanagement.org/reviews/available-open-source-dam/</a></li><li><a href="http://akka.io/">http://akka.io/</a></li><li><a href="http://www.scala-lang.org/">http://www.scala-lang.org/</a></li><li><a href="http://clojure.org/">http://clojure.org/</a></li></ul><h3>About Me</h3><p>I was Born in <strong>1987 </strong>in <strong>Rome </strong>where I’m actually living. After a childhood spent on dreaming to become a scientist, I’ve firstly approached programming languages at 11 when I’ve casually found QBASIC on an old 486 laptop.</p><p>Now I’m still studying <strong>Computer Science </strong>at <strong>“Università La Sapienza”</strong>in Rome. I should have already finished it, but I’m proudly a bad student. Everything I learn, I learn it by myself or working with inspiring people; but this do not help with exams. Then I’ve also spent <strong>1 year</strong>doing my <strong>Erasmus </strong>at <strong>“Universidad de Las Palmas de Gran Canaria”</strong>, this neither helps with exams, but being <strong>able to live and work in a multicultural environment </strong>has no price in my humble opinion.</p><p>I’m collaborating with <strong>Eikona Photography and Digital Imaging </strong>as a<strong>Photographer</strong>, <strong>IT Specialist </strong>and <strong>Web Designer</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bf6dbb67778" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[En el Cambio Está la Evolución]]></title>
            <link>https://medium.com/@axyz/en-el-cambio-esta-la-evolucion-1cf164be6e7f?source=rss-b454b76eefb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cf164be6e7f</guid>
            <dc:creator><![CDATA[Andrea Moretti]]></dc:creator>
            <pubDate>Fri, 17 Jan 2014 21:32:34 GMT</pubDate>
            <atom:updated>2014-03-01T19:04:13.268Z</atom:updated>
            <content:encoded><![CDATA[<h4>Il cambiamento come forma di evoluzione</h4><p>Nell’immaginario comune la natura viene spesso immaginata come una grande madre che si prende cura delle sue creature. Perfino un convinto darwiniano può cadere nel facile errore di antropomorfizzare i processi evolutivi ascrivendogli innate capacità di giudizio: “l’evoluzione ha voluto questo…”, “in risposta a quello si è sviluppato questo…”.</p><p>In realtà la teoria è estremamente più semplice: L’evoluzione avviene grazie ai cambiamenti. Per quanto possa suonare come una banalità è in realtà un concetto ingiustamente sottovalutato e bistrattato dai fatti sul quale vorrei spendere due parole. La natura (se con essa indichiamo il sistema di complessi equilibri tra gli esseri viventi e l’ambiente in cui vivono) è del tutto priva di alcuna capacità decisionale. Quello che avviene è, molto semplicemente, lasciare che le cose cambino più o meno aleatoriamente; tuttavia i mutamenti dei quali prendiamo coscienza sono quelli che perdurano per un tempo sufficientemente lungo e si sviluppano in maniera sufficientemente ampia da poter essere notati, o comunque da poter influenzare la nostra esistenza. In altri termini percepiamo come “evoluzione” la tendenza della natura in quanto sistema dinamico a tendere alla stabilità.</p><p>I cambiamenti non sono altro che coincidenze che si verificano più o meno frequentemente in un sistema caotico; un’infinitesima parte di questi cambiamenti perdurerà nel tempo grazie al suo contribuire alla stabilità del sistema. Talvolta è lecito rimanere sorpresi dall’utilità e dalla speicificità di alcuni cambiamenti che si verificano e si finisce per pensare a qualche intervento divino o a un grande piano già scritto. Bisognerebbe però soffermarsi a pensare al tempo che ha portato a quel mutamento, nonchè ai milioni di altri cambiamenti che semplicemente non si sono rivelati stabili. In altri termini è un po’ come sorprendersi se una goccia di pioggia centrasse una piccolissima tazzina da caffè, nel bel mezzo di un temporale… ben note sono le teorie delle migliaia di scimmie che scrivono Shakespeare e degli orologi che compaiono dal nulla nel deserto.</p><p>La cibernetica ci insegna che lo schema generale di un sistema complesso prevede delle unità che poste in relazione tra loro divengano parte di una nuova unità più grande con caratteristiche che non siano già possedute dai singoli elementi. Basti pensare alla serie atomi, molecole, cellule, organi, esseri viventi, ecosistema; o anche alla scalata dai transistor al web. Questa caratteristica rende particolarmente semplice formulare metafore, ma anche teorie, basate sulla similitudine tra il comportamento degli esseri umani e quello di altre componenti di altri sistemi; o anche, in senso inverso, tendere all’antropomorfizzazione di componenti poste su livelli diversi dal nostro, siano esse le cellule, la società o anche gli ecosistemi naurali.</p><p>Una delle similitudini che ci riguarda particolarmente da vicino è quella con lo sviluppo personale dell’essere umano. Nella nostra vita siamo istintivamente spinti verso il cambiamento, vuoi per curiosità, vuoi per fuggire da una situazione di disagio. Sul lungo termine tendiamo a stabilizzarci in quelle situazioni che molto semplicisticamente ci fanno stare bene. Quello che può sembrare un banale slancio edonistico è in realtà dettato dal mantenimento della stabilità dell’ecosistema sociale e naturale in cui viviamo. Il bisogno di cambiamento, che sopraggiunge ogni qualvolta si manifesta un malessere fisico o mentale,ci spinge verso nuove strade lungo una diramata esplorazione di possibilità che, tutte assieme, ci portano ad evolvere i nostri comportamenti e la nostra società.</p><p>Al contrario di molte altre specie viventi, l’essere umano ha una più profonda concezione di se stesso ed una forte coscienza del poter prendere decisioni. Inoltre siamo molto più soggetti a sperimentare malesseri psicologici, magari anche di futile natura, che ricoprono però un ruolo molto importante. La nostra naturale “irrequietudine” ci porta ad avere un tasso di cambiamento estremamente elevato nella nostra vita, o per lo meno questo è quello a cui la natura ci spinge. Più sono le strade provate più aumentano le possibilità di imboccarne una migliore. Nel tempo questo ci ha portato a cambiare il nostro modo di vivere e di rapportarci con l’ambiente molto più frequentemente rispetto ad una qualunque altra specie animale. In altri termini senza curiosi e insoddisfatti molto probabilmente ci saremmo stabilizzati sulla preistoria, cullati dai ritmi delle nascite e delle carestie.</p><p>Fatta questa premessa e con la dovuta cautela, è possibile distinguere tra i comportamenti umani quelli che siano più o meno “naturali” in un ottica “cibernetico-evoluzionista”. Il bisogno di evadere dalle routine, l’infedeltà, il timore nel prendere decisioni a lungo termine e molte altre tendenza additate spesso come immature e dannose, sono in realtà espressioni della naturale tendenza dell’uomo al cambiamento; senza la quale non ci saremmo evoluti così rapidamente. Comportamenti inntaurali, e purtroppo molto frequenti, sono invece tutti quelli che mirano all’immutabilità dello stato delle cose. Condurre una vita monotona, non cambiare mai lavoro, accettare dei dogmi e via dicendo. Questo non significa che sia necessariamente sbagliato, ad esempio, passare tutta la vita accanto alla stessa persona; ma bisogna tener conto che quanto più si limitano i cambiamenti in una determinata area, tanto più si sentirà il bisogno di compensare nelle altre. Per questo sono portato a supporre che una coppia fedele e felice debba condurre una vita estremamente movimentata; d’altro canto chi si trovasse obbligato a fare per 60 anni una vita sempre uguale sarà enormemente più incline ai tradimenti.</p><p>In questa ottica le religioni risultano essere da sempre una fonte inesauribile di pessimi consigli di vita. Accettare dogmi significa castrare la propria curiosità e forzare le persone ad accettare passivamente lo stato attuale delle cose. Nella maggior parte delle religioni inoltre sono presenti forti componenti ascetiche che, in un modo o nell’altro, mirano a distaccarci dalle nostre irrequietudini donando un sollievo, di fatto temporaneo ed illusorio, che sul lungo termine non fa altro che generare un’ulteriore frustrazione. La negazione dei desideri, la castità e l’abuso di meditazione nelle sue varie forme sono solo alcuni esempi. L’errore commesso in questi casi è quello di cercare una via rapida per la stabilità del sistema attraverso il rifiuto dei cambiamenti. Se la perfezione è raggiunta laddove non è più necessario alcun cambiamento, non significa che posso illudermi di averla raggiunta semplicemente rifiutando i naturali mutamenti. Si tratta di un trucco fin troppo banale, eppure di preoccupante successo.</p><p>Passare il tempo a lamentarsi non è mai stato produttivo. Bisogna capire se i comportamenti che seguiamo e se gli insegnamenti che ci vengono dati ci sospingono dolcemente verso una naturale evoluzione, o se invece ci forzano all’interno di schemi troppo stretti per poter essere accettati senza creare malessere. Bisogna liberarsi del pregiudizio etico che ci porta a condannare il nostro slancio verso il cambiamento. D’altro canto non bisogna nemmeno forzarsi verso improbabili fughe cieche, ma lasciare che ogni vita segua il suo corso placida, ma inarrestabile, come un grande fiume. Non escludo che coi secoli potremmo “trovare pace”, ma a chi vende facili paradisi, rispondo che finchè ci sarà anche una sola persona infelice sulla terra, sarà la dimostrazione vivente che il cammino è ancora lungo e che i loro dogmi non fanno per me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cf164be6e7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>