Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 8 min 11 sec ago

Wim Leers: OpenTracker

Mon, 02/20/2017 - 22:26
pThis is an ode to Dirk Engling#8217;s a href=http://erdgeist.org/arts/software/opentracker/OpenTracker/a./p pIt#8217;s a a href=https://wiki.theory.org/BitTorrentSpecificationBitTorrent tracker/a./p pIt#8217;s what powered a href=https://en.wikipedia.org/wiki/The_Pirate_Bay#Technical_detailsThe Pirate Bay in 2007–2009/a./p pI#8217;ve been using it to power the downloads on a href=http://driverpacks.nethttp://driverpacks.net/a since the end of November 2010. gt;6 years. It facilitated 9839566 downloads since December 1, 2010 until today. That#8217;s almost 10 millionnbsp;downloads!/p h2Stability/h2 pIt#8217;s one of the most stable pieces of software I ever encountered. I compiled it in 2010, it never oncenbsp;crashed./p precodewim@ajax:~$ ls -al /data/opentracker total 456 drwxr-xr-x 3 wim wim 4096 Feb 11 01:02 . drwxr-x--x 10 root wim 4096 Mar 8 2012 .. -rwxr-xr-x 1 wim wim 84824 Nov 29 2010 opentracker -rw-r--r-- 1 wim wim 3538 Nov 29 2010 opentracker.conf drwxr-xr-x 4 wim wim 4096 Nov 19 2010 src -rw-r--r-- 1 wim wim 243611 Nov 19 2010 src.tgz -rwxrwxrwx 1 wim wim 14022 Dec 24 2012 whitelist /code/pre h2Simplicity/h2 pThe simplicity is fantastic. Getting up and running is fantastically simple: codegit clone git://erdgeist.org/opentracker .; make; ./opentracker/code and you#8217;re up and running. Let me quote a bit from its homepage, to show that it goes the extra mile to make usersnbsp;successful:/p blockquote pemopentracker/em can be run by just typing code./opentracker/code. This will make emopentracker/em bind to code0.0.0.0:6969/code and happily serve all torrents presented to it. strongIf ran as root, emopentracker/em will immediately chroot to code./code and drop all priviliges after binding to whatever tcp or udp ports it isnbsp;requested./strong/p /blockquote pEmphasis mine. And I can#8217;t emphasize my emphasisnbsp;enough./p h2Performance span class=ampamp;/spannbsp;efficiency/h2 pAll the while handling dozens of requests per second, codeopentracker/code causes less load than background processes of the OS. Let me again quote a bit from itsnbsp;homepage:/p blockquote pemopentracker/em can easily serve multiple thousands of requests on a standard plastic span class=capsWLAN/span-router, limited only by your kernels capabilitiesnbsp;;)/p /blockquote pThat#8217;s also what it said in 2010. I didn#8217;t test it on a “plastic span class=capsWLAN/span-router”, but everything I#8217;ve seen confirmsnbsp;it./p h2Flexibility/h2 pIts defaults are sane, but what if you want to have anbsp;whitelist?/p ol liUncomment the code#FEATURES+=-DWANT_ACCESSLIST_WHITE/code line in the codeMakefile/code./li liRecompile./li liCreate a file called codewhitelist/code, with one torrent hash pernbsp;line./li /ol pHave a need to update this whitelist, for example a new release of your software to distribute? Of course you don#8217;t want to reboot your codeopentracker/code instance and lose all current state. It#8217;s got younbsp;covered:/p ol liAppend a line to codewhitelist/code./li liSend the codeSIGHUP/code UNIX signal to make codeopentracker/code reload its whitelistsup id=fnref:3a href=#fn:3 class=footnote-ref1/a/sup./li /ol h2Deployment/h2 pI#8217;ve been in the process of moving off of my current (super reliable, but also expensive) hosting. There are plenty of specialized span class=capsHTTP/span server hostssup id=fnref:1a href=#fn:1 class=footnote-ref2/a/sup and even codersync/code hostssup id=fnref:2a href=#fn:2 class=footnote-ref3/a/sup. Thanks to their standardization and consequent scale, they can offer very lownbsp;prices./p pBut I also needed to continue to run my own BitTorrent tracker. There are no hosts that offer that. I don#8217;t want to rely on another tracker, because I want there to be zero affiliation with illegal files. This is a BitTorrent tracker that does not allow emanything/em to be shared: it only allows the software releases made by a href=http://driverpacks.nethttp://driverpacks.net/a to benbsp;downloaded./p pSo, I found the cheapest span class=capsVPS/span I could find, with the least amount of resources. For span class=capsUSD/span $13.50sup id=fnref:4a href=#fn:4 class=footnote-ref4/a/sup, I got a span class=capsVPS/span with 128 span class=capsMB/span span class=capsRAM/span, 12 span class=capsGB/span of storage and 500 span class=capsGB/span of monthly traffic. Then I set itnbsp;up:/p ol licodessh/code‘d ontonbsp;it./li licodersync/code‘d over the files from my current server (alternatively: codegit clone/code and codemake/code)/li liadded code@reboot /data/opentracker/opentracker -f /data/opentracker/opentracker.conf/code to my codecrontab/code./li liremoved the codeCNAME/code record for codetracker.driverpacks.net/code, and instead made it an codeA/code record pointing to my newnbsp;VPS./li liwatched codehttp://tracker.driverpacks.net:6969/stats?mode=tpbsamp;format=txt/code on both the new and the old server, to verify traffic was moving over to my new cheap codeopentracker/code VPS as the DNS changesnbsp;propagated/li /ol h2Drupalnbsp;module/h2 pSince a href=http://driverpacks.netdriverpacks.net/a runs on a href=https://www.drupal.orgDrupal/a, there of course is an a href=https://www.drupal.org/project/opentrackerOpenTracker Drupal module/a which I wrote. It provides an span class=capsAPI/spannbsp;to:/p ul licreate code.torrent/code files for certain files uploaded tonbsp;Drupal/li liappend to the OpenTracker codewhitelist/code file sup id=fnref:5a href=#fn:5 class=footnote-ref5/a/sup/li liparse the statistics provided by the OpenTrackernbsp;instance/li /ul pYou can see the live stats at a href=http://driverpacks.net/statshttp://driverpacks.net/stats/a./p h2Conclusion/h2 pcodeopentracker/code is the sort of simple, elegant software design that makes it a pleasure to use. And considering the a href=http://erdgeist.org/gitweb/opentracker/log/low commit frequency/a over the past decade, with many of those commits being nitpick fixes, it also seems its simplicity also leads to excellent maintainability. It involves the span class=capsHTTP/span and BitTorrent protocols, yet only relies on a single I/O library, and its source code is very readable. Not only that, but it#8217;s also highlynbsp;scalable./p pIt#8217;s the sort of software many of us aspire tonbsp;write./p pFinally, its license. A glorious licensenbsp;indeed./p blockquote pThe beerware license is very open, close to public domain, but insists on honoring the original author by just not claiming that the code is yours. Instead assume that someone writing Open Source Software in the domain you’re obviously interested in would be a nice match for having a beernbsp;with./p pSo, just keep the name and contact details intact and if you ever meet the author in person, just have an appropriate brand of sparkling beverage choice together. The conversation will be worth the time for both ofnbsp;you./p /blockquote pDirk, if you read this: I#8217;d love to buy you sparkling beverages some timenbsp;:)/p div class=footnotes hr / ol li id=fn:3 pcodekill -s HUP codepidof opentracker/code/code#160;a href=#fnref:3 class=footnote-backref#8617;#xFE0E;/a/p /li li id=fn:1 pI#8217;m using a href=https://www.gandi.net/hosting/simpleGandi#8217;s Simple Hosting/a.#160;a href=#fnref:1 class=footnote-backref#8617;#xFE0E;/a/p /li li id=fn:2 pa href=https://rsync.nethttps://rsync.net/a#160;a href=#fnref:2 class=footnote-backref#8617;#xFE0E;/a/p /li li id=fn:4 p$16.34 including 21% Belgian span class=capsVAT/span.#160;a href=#fnref:4 class=footnote-backref#8617;#xFE0E;/a/p /li li id=fn:5 preload code*/10 * * * * kill -s HUP codepidof opentracker/code/code#160;a href=#fnref:5 class=footnote-backref#8617;#xFE0E;/a/p /li /ol /div ul class=tags lispan class=lineage-item lineage-item-level-0DriverPacks.net/span/li lispan class=lineage-item lineage-item-level-0Drupal/span/li lispan class=lineage-item lineage-item-level-0deployment/span/li lispan class=lineage-item lineage-item-level-0open source/span/li /ul

Web Wash: How to Create Responsive Image Galleries using Juicebox in Drupal 8

Mon, 02/20/2017 - 19:53
There are a lot of image gallery libraries out there, but today I want to show you how to use Juicebox. Juicebox is an HTML5 responsive image gallery and it integrates with Drupal using the Juicebox module. Juicebox is not open source, instead it offers a free version which is fully useable but you are limited to 50 images per gallery. The pro version allows for unlimited images and more features. If you’re looking for an alternative solution look at Slick, which is open source, and it integrates with Drupal via the Slick module. I will cover this module in a future tutorial. In this tutorial, you’ll learn how to display an image gallery from an image field and how to display a gallery using Views.

Chromatic: A Taco-Friendly Guide to Cache Metadata in Drupal 8

Mon, 02/20/2017 - 15:30
pExplaining Drupal 8's cache metadata with the help of tacos./p

Web Omelette: How to render your images with image styles in Drupal 8

Mon, 02/20/2017 - 09:19
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpIn this article we are going to look at how we can render images using image styles in Drupal 8./p pIn Drupal 7, rendering images with a particular style (say the default thumbnail) was by calling the codetheme_image_style()/code theme and passing the image uri and image style you want to render (+ some other optional parameters):/p pre class=brush: php$image = theme('image_style', array('style_name' =gt; 'thumbnail', 'path' =gt; 'public://my-image.png')); /prepYou'll see this pattern all over the place in Drupal 7 codebases./p pThe theme prepares the URL for the image, runs the image through the style processors and returns a themed image (via codetheme_image()/code). The function it uses internally for preparing the url of the image is codeimage_style_url()/code which returns the URL of the location where the image is stored after being prepared. It may not yet exist, but on the first request, it would get generated./p pSo how do we do it in Drupal 8?/p pFirst of all, image styles in Drupal 8 are configuration entities. This means they are created and exported like many other things. Second of all, in Drupal 8 we no longer (should) call theme functions like above directly. What we should do is always return render arrays and expect them to be rendered somewhere down the line. This helps with things like caching etc./p pSo to render an image with a particular image style, we need to do the following:/p pre class=brush: php$render = [ '#theme' =gt; 'image_style', '#style_name' =gt; 'thumbnail', '#uri' =gt; 'public://my-image.png', // optional parameters ]; /prepThis would render the image tag with the image having been processed by the style./p pFinally, if we just want the URL of an image with the image style applied, we need to load the image style config entity and ask it for the URL:/p pre class=brush: php$style = \Drupal::entityTypeManager()-gt;getStorage('image_style')-gt;load('thumbnail'); $url = $style-gt;buildUrl('public://my-image.png'); /prepSo that is it. You now have the image URL which will generate the image upon the first request./p pRemember though to inject the entity type manager if you are in such a context that you can./p /div/div/div

Savas Labs: Docker and the Drupal Pattern Lab Starter Theme

Mon, 02/20/2017 - 01:00
p img src=http://savaslabs.com/assets/img/blog/docker-drupal-pattern-lab.jpg alt=Docker Drupal 8 Pattern Lab logos on a circuited background How to build a Docker Pattern Lab image for local Drupal development with the Pattern Lab Starter theme and/or with other common front-end applications such as npm, Gulp, and Bower. a href=http://savaslabs.com/2017/02/20/drupal-docker-pattern-lab.htmlContinue reading…/a /p

agoradesign: Drupal's great little helpers: Random utility class

Sat, 02/18/2017 - 13:50
div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div class=field-item evenDrupal's API has a huge number of very useful utitlity classes and functions, especially in Drupal 8. Although the API docs are great, it's rather impossible to always find every little feature. Today I want to show you the Random utility class, which I've nearly overseen and found rather by accident./div /div /div

Drupal Association blog: Drupal Association membership campaign: February 20 to March 8

Fri, 02/17/2017 - 19:51
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpa href=http://www.drupal.org/association/campaign/value-2017 rel=nofollowimg alt=Join as a member to keep Drupal.org thriving. Coffee cup with words We are happy to serve you. Drupal Association logo. class=right height=117 src=/files/mem_campaign_2017_q1_300x140.jpg width=251 //astrongDrupal.org/strong is home of the Drupal project and the Drupal community. It has been continuously operating since 2001. The Engineering Team— along with amazing community webmasters— keeps Drupal.org alive and well. As we launch the first membership campaign of 2017, our story is all about this small and productive team./p pJoin us as we celebrate all that the engineering team has accomplished. From helping grow Drupal adoption, to enabling contribution; improving infrastructure to making development faster. The team does a lot of good for the community, the project, and Drupal.org./p pa href=https://www.drupal.org/association/campaign/value-2017 rel=nofollowCheck out/a some of their accomplishments and if you aren't yet a Drupal Association member, join us! Help us continue the work needed to make Drupal.org better, every day./p pShare these stories with others - now until our membership drive ends on March 8./p pimg alt=Facebook logo class=left height=40 src=/files/1475626591_Facebook_Color.png width=40 /a class=action-button href=https://www.facebook.com/sharer/sharer.php?u=https%3A//www.drupal.org/association/campaign/value-2017 title=Facebook rel=nofollowShare/a/p pimg alt=Twitter logo class=left height=40 src=/files/1475626581_Twitter_Color.png width=40 /a class=action-button href=https://twitter.com/home?status=I'm%20a%20member%20because%20%40DrupalAssoc%20brings%20value%20to%20%23Drupal%20and%20to%20you%20%23joinDrupalAssoc%20https%3A//www.drupal.org/association/campaign/value-2017 title=Twitter rel=nofollowTweet/a/p pimg alt=LinkedIn logo class=left height=40 src=/files/1475626586_Linkedin_Color.png width=40 /a class=action-button href=https://www.linkedin.com/shareArticle?mini=trueamp;url=https%3A//www.drupal.org/association/campaign/value-2017amp;title=Drupal%20Association%20brings%20value%20to%20Drupal%20and%20to%20you.amp;summary=I'm%20a%20member%20of%20the%20Drupal%20Association.%20Join%20and%20keep%20the%20home%20of%20the%20Drupal%20community%20thriving.amp;source= title=LinkedIn rel=nofollowShare/a/p pThank you for supporting our work!/p/div/div/div

Gábor Hojtsy: Improving Drupal 8's usability and the impact

Fri, 02/17/2017 - 17:09
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpWe a href=https://groups.drupal.org/node/509409started regular Drupal usability meetings/a twice a week almost a year ago in March 2016. That is a long time and we succeeded in supporting many key initiatives in this time, including reviews on new media handling and library functionality, feedback on workflow user experience, outside-in editing and place block functionality. We helped set scope for the changes required to inline form errors on its way to stability. Those are all supporting existing teams working on their respective features where user interfaces are involved./p pHowever, we also started to look at some Drupal components and whether we can gradually improve them. One of the biggest tasks we took on was a href=https://www.drupal.org/node/665790redesigning the status page/a, where Drupal's system information is presented and errors and warnings are printed for site owners to resolve. While that looks like a huge monster issue, a href=http://yoroy.com/pieces/status-page-redesign-reviewRoy Scholten in fact posted a breakdown of how the process itself went/a. If we were to start a fresh issue (which we should have), the process would be much easier to follow and would be more visible. The result is quite remarkable:/p div style=text-align: center; margin: 2em 0;img src=http://hojtsy.hu/files/status-page__desktop--toggle-left_0.png alt=New status page in Drupal 8.3 //div /div/div/div

Drupal core announcements: Updates from Drupal 8 core initiatives for February 2017

Fri, 02/17/2017 - 16:24
pNow that a href=drupal.org/project/drupal/releases/8.3.0-beta1Drupal 8.3 is in beta/a, it is time to look at progress around core initiatives again and see how you can help move one or more of them forward. Once again I asked initiative contributors to help compile this post to inform you all of progress across the board. This is just a sampling of some improvements, there are a lot more that we could not cover here./p h3Default content and new core theme/h3 pThe default content and new core theme teams decided to join forces because the goals are intertwined. The teams found it hard to demonstrate good default content without a supporting visual look and vice versa. The plan to go with a farmer's market site changed to a more general publication site, but that still allows for plenty of things to showcase. a href=https://groups.drupal.org/node/516091We are looking for a designer / art director for the project (deadline today!)/a./p pa href=https://drupaltwig.slack.com/archives/new-core-theme-designUse the Slack channel/a if you want to help or if you just want to follow our progress. Get an invite at a href=https://drupaltwig-slack.herokuapp.com/https://drupaltwig-slack.herokuapp.com//a./p h3Media/h3 pThe media team a href=http://www.md-systems.ch/en/blog/md-systems/2017/01/09/current-status-of-media-in-drupal-8-core-and-next-stepsheld a sprint in Berlin in December/a. Unfortunately none of these media improvements landed in Drupal 8.3, however we are very close to complete a href=https://www.drupal.org/node/2831274the base media functionality early in Drupal 8.4/a. There was a href=https://www.drupal.org/node/2834729significant progress on the visual media library/a too. Next step is to finalise the plugins for images, documents and oEmbed./p pJoin in the #drupal-media channel on IRC./p h3Migrate/h3 pThe Migrate API became beta in Drupal 8.2.x with 8.2.5 and will apply to 8.3.0 as well. On the other hand other parts of the migration system like the Migrate Drupal API are still alpha stability and received some big updates. Two huge additions are the a href=https://www.drupal.org/node/2669964migration path for Drupal 7 node translations to Drupal 8 content translation/a and a href=https://www.drupal.org/node/2225717support added for configuration translations/a (and implemented initially for user profile fields)./p pJoin in the #drupal-migrate channel on IRC./p h3Multilingual/h3 pMost of the recent progress on the multilingual initiative was in collaboration with the migration team and that is still heavily ongoing. Further feature development around multilingual features is not on the table currently, as most contributors moved on to more pressing areas given the advances achieved in multilingual with Drupal 8 already. Therefore it is being proposed to a href=https://www.drupal.org/node/2850540officially remove the multilingual initiative from the list/a./p h3PHPUnit/h3 pThe work in the PHPUnit initiative is focusing on converting a large part of old Simpletest web tests to PHPUnit based browser tests. The goal is to a href=https://www.drupal.org/node/2735005commit a larger patch on February 21st/a to the Drupal 8.3.x branch. After that one third of Drupal core’s web tests would be converted to PHPUnit browser tests. We are also discussing the a href=https://www.drupal.org/node/2847678timeline for deprecating Simpletest/a./p pWe are also working on improving our JavaScript browser tests in multiple issues. For documentation there is also a a href=https://www.drupal.org/docs/8/phpunit/phpunit-javascript-testing-tutorialJavascript browser test tutorial/a now!/p pIf you want to convert your tests in your contrib / custom module, please read a href=https://www.drupal.org/docs/8/phpunit/phpunit-browser-test-tutorialthe PHPUnit browser test tutorial/a and help out on a href=https://www.drupal.org/node/2794285https://www.drupal.org/node/2794285/a in case you run into problems. Please follow the a href=https://www.drupal.org/node/2807237PHPUnit initiative issue/a for status updates. Join us in IRC in #drupal-phpunit./p p(This update written by klausi amp; dawehner)/p h3Workflow/h3 pThe biggest user facing change with workflows since the last update is the a href=https://www.drupal.org/node/2779647introduction of the Workflows module/a as a separate concept from content moderation. Now other modules can use workflows for user levels, commerce and other needs as well, when the workflow has nothing to do with content moderation. Many API changes were also made including support for moderation of non-translatable entity types and entity types without bundles (as long as revisions are enabled). Publishing entities implementing EntityPublishedInterface is also possible now, not just nodes./p pWondering how to join an initiative? Meeting information for each initiative is listed at a href=https://groups.drupal.org/node/514585 title=https://groups.drupal.org/node/514585https://groups.drupal.org/node/514585/a/p

Drupal core announcements: A big chunk of old tests using WebTestBase wil be converted to PHPUnit BrowserTestBase on Feb 21st

Fri, 02/17/2017 - 15:29
div class=field field-type-datestamp field-field-start7 div class=field-items div class=field-item odd div class=field-label-inline-first Start:nbsp;/div span class=date-display-single2017-02-21 18:00 Europe/Vienna/span /div /div /div div class=field field-type-text field-field-event-type div class=field-labelEvent type:nbsp;/div div class=field-items div class=field-item odd Online meeting (eg. IRC meeting) /div /div /div pAs part of the a href=https://www.drupal.org/node/2807237PHPUnit initiative/a a considerable part of Simpletests will be converted to PHPUnit based browser tests on February 21st 2017. A backwards compatibility layer has been implemented so that many Simpletests can be converted by just using the new BrowserTestBase base class and moving the test file. There is also a script to automatically convert test files in a href=https://www.drupal.org/node/2770921the conversion issue/a./p pDevelopers are encouraged to use BrowserTestBase instead of Simpletest as of Drupal 8.3.0, but both test systems are fully supported during the Drupal 8 release cycle. The timeline for the a href=https://www.drupal.org/node/2847678deprecation of Simpletest's WebTestBase is under discussion/a./p

Lullabot: The Lullabot Approach to Sales

Thu, 02/16/2017 - 22:00
Mike and Matt sit down (literally!) with Lullabot's sales team. Learn how Lullabot does sales, and what it takes to sell large projects.

Valuebound: Beginner’s guide to Mail System in Drupal 7 and 8

Thu, 02/16/2017 - 19:40
pThis blog is all about How Drupal handles the Mail system amp; the stages it has to go through.br / In Drupal to sends an email we need to take care of two rules/p olliDeclare all the required properties under emstronghook_mail()./strong/em/li liCall emstrongdrupal_mail()/strong/em with argument for actually sending the email/li /olpHowever in the scenario like bigger amp; complex site the above steps won’t be enough. But Drupal gives us a Flexibility to customize email sending process, before that it’s necessary to know how stuff works behind the scenes first. In this article I’ll show you how you can customize and extend the Drupal mail system to fulfill your needs./p pWhile sending an email drupal_mail() function uses system class for…/p

Valuebound: What skills should a Drupal Developer have?

Thu, 02/16/2017 - 17:14
p dir=ltrspanWith the ever growing /spana href=http://valuebound.com/resources/blog/what-are-you-giving-back-to-communityspanDrupal Community/span/aspan, a beginner is many a times lost in the vast number of resources, with increasing number of developers in Valuebound, I spoke to some of the seasoned developers on their opinion about the skills that a Drupal developer should have and also sifted through tons of materials from Stackoverflow and some more places. /spanbr /spanThe skillset that we are discussing here will give a clear idea about where you stand, what you know, what you do not know and of course fill me up with what I have missed, and I will quickly add up the suggestions. Before this I have /span…/p

Zivtech: Why Performance Best Practices Aren't Speeding Up Your Site

Thu, 02/16/2017 - 15:00
div class=field-body pThere's no shortage of generic web performance optimization advice out there. You probably have a checklist of things to do to speed up your site. Maybe your hosting company sent you a list of performance best practices. Or maybe you use an automated recommendation service. /p pYou've gone through all the checklist compliance work, but haven't seen any change in your site's speed. What's going on here? You added a CDN. You optimized your image sizes. You removed unused code. You even turned off database logging on your Drupal site and no one can read the logs anymore! But it should be worth it, right? You followed best practice recommendations, so why don't you see an improvement?/p pHere are three reasons why generic performance checklists don't usually help, and what really does./p h21. Micro-Optimizations/h2 pGeneric performance recommendations don't provide you with a sense of scale for how effective they'll be, so how do you know if they're worth doing? /p pPeople will say, Well, if it's an improvement, it's an improvement, and we should do it. You're not against improvements are you? This logic only works if you have infinite time or money. You wouldn't spend $2000 to make changes you knew would only save 1ms time on a 10s current page load. /p pLong performance checklists are usually full of well-meaning suggestions that turn out to be micro-optimizations on your specific site. It makes for an impressive list. We fall for it because it plays into our desire for completion. We think, ROI be damned! There's an item on this list and we have got to do it./p pJust try to remember: ABP. Always Be Prioritizing./p pYou don't have to tackle every item on the list just for completion's sake. You need to measure optimizations to determine whether you're adding a micro-optimization or slaying a serious bottleneck./p h22. Redundant Caching/h2 pIn security, the advice is to add more layers of protection. In caching, not so much. Adding redundant caching will often have little to no effect on your page load time. /p pCaching lets your process take a shortcut the majority of the time. Imagine a kid who takes a shortcut on her walk to school. She cuts through her neighbor's backyard instead of going around the block. One in 10,000 times, there's a rabid squirrel in the yard, so she takes the long way. Her entrepreneurial friend offers to sell her a map to a new shortcut. It's a best practice! It cuts off time from the original full route that she almost never uses but it's longer than her usual shortcut. It will save her a little time on rabid squirrel days. Is it worth the price? /p pThe benefit of a redundancy like this is marginal, but if there's a significant time or cost investment it’s probably not worth it. It's better to focus on getting the most bang for your buck. Keep in mind that the time involved to add caching includes making sure that new caches invalidate properly so that your site does not show stale content (and leave your editors calling support to report a problem when their new post does not appear promptly.) /p h23. Bottlenecks or Bust/h2 pSimply speaking, page load time consists of two main layers. First there is the server-side (back-end) which creates the HTML for a web page. Next, the client-side (front-end) renders it, adding the images, CSS, and JavaScript in your web browser./p pThe first step to effective performance optimization is to determine which layer is slow. It may be both. Developers tend to optimize the layer of their expertise and ignore the other one. It's common to focus efforts on the wrong layer./p pNow on the back-end, a lot of the process occurs in series. One thing happens, and then another. First the web server routes a request. Then a PHP function runs. And another. It calls the database with a query. One task completes and then the next one begins. If you decrease the time of any of the tasks, the total time will decrease. If you do enough micro-optimizations, they can actually add up to something perceptible./p pBut the front-end, generally speaking, is different. The browser tries to do many things all at the same time (in parallel). This changes the game completely./p pImagine you and your brother start a company called Speedy Car Cleaning. You want your customers to get the fastest car cleaning possible, so you decide that while you wash a car, your brother will vacuum at the same time. One step doesn't rely on the other to be completed first, so you'll work in parallel. It takes you five minutes to wash a car, and it takes your brother two minutes to vacuum it. Total time to clean a car? Five minutes. You want to speed things up even more, so your brother buys a more powerful vacuum and now it only takes him one minute. What's the new total time to clean a car?/p pIf you said five minutes, you are correct. When processes run in parallel, the slowest process is the only one that impacts total time./p pThis is a lesson of factory optimization as well. A factory has many machines and stations running in parallel, so if you speed up the process at any point that is not the bottleneck, you'll have no impact on the throughput. Not a small impact - no impact./p h2Ok, then what can we do?/h2 pSo is it worthless to follow best practices to optimize your speed? No. You might get lucky, and those optimizations will make a big impact. They have their place, especially if you have a fairly typical site./p pBut if you don't see results from following guesses about why your site is slow, there's only one sure way to speed things up./p pYou have to find out what's really going on./p pEstablish a benchmark of current performance. Determine which layer contributes the most to the total time. Use profiling tools to find where the big costs are on the back-end and the bottlenecks on the front-end. Measure the effects of your improvements. /p pIf your site's performance is an issue, ask an expert for a performance audit. Make sure they have expertise with your server infrastructure, your CMS or framework, and front-end performance. With methodical analysis and profiling measurements, they'll get to the bottom of it. And don't sweat those 'best practice' checklists./p /div nav role=navigation class=links-inline/nav

Agiledrop.com Blog: AGILEDROP: Drupal Logos in Human and Superhuman Forms

Thu, 02/16/2017 - 10:45
a href=http://www.agiledrop.com/blog/drupal-logos-human-and-superhuman-formsimg src=https://www.agiledrop.com/sites/default/files/2017-02/drupal%20heroe%20loki%202.jpg //a Every brand needs a logo. When Dries Buytaert decided to release the software behind drop.org back in 2001, making Drupal an open source project, he needed a symbol too. So, Kristjan Jansen and Steven Wittens joined their powers and stylized a Druplicon, a drop with eyes, curved nose and a mischievous smile. Since then Druplicon has been an indispensable part of the Drupal Community. Druplicon is relatively easy to manage, moderate and share, so people in Drupal Community like to work with it very much. Back in December 2016, when it was Christmas time, we presented you the possibilities of… a href=http://www.agiledrop.com/blog/drupal-logos-human-and-superhuman-formsREAD MORE/a

Drupal CMS Guides at Daymuse Studios: Product Display: Contextual Field Output in Drupal Commerce

Thu, 02/16/2017 - 01:42
div class=field field--name-field-image field--type-image field--label-hiddendiv class=field__itemsdiv class=field__item evenimg typeof=foaf:Image src=https://www.daymuse.com/sites/daymuse.com/files/product-displays-drupal-commerce-tutorial.png width=861 height=484 alt=Learn Product Display Contextual Field Output in Drupal Commerce Video Tutorial title=Learn Product Display Contextual Field Output in Drupal Commerce Video Tutorial //div/div/divdiv class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item even property=content:encodedpLearn how to contextually output field data in Drupal Commerce with the Product Display tool. YouTube Video Tutorial included for e-commerce projects./p /div/div/div

Drupal Association blog: DrupalCon Vienna Program Changes

Wed, 02/15/2017 - 17:59
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpIt is a href=https://assoc.drupal.org/blog/megansanicki/reorganizing-for-drupal rel=nofollowour goal/a at The Drupal Association to be sustainable, so we can deliver on our mission for years to come. In 2016 we reorganized to achieve this goal, which moved us into healthier financial waters. However, we still have work to do./p pAfter financial analysis, we can see that some programs sustain themselves and some do not. The good news is, most do. Unfortunately, DrupalCon Europe often does not. In the past, we’ve taken a loss because DrupalCon Europe is an important way in which we serve the community. Now, with renewed focus on our financial health, we need to rethink how we achieve this event in a more sustainable way./p pTo make sure we are balanced between serving our mission and making this event sustainable, The Drupal Association and Board created a DrupalCon Europe task force. After looking at the event financials we determined the best way to achieve notable expense savings was to eliminate our Monday programming and activities. This cut includes full day training sessions, the Community Summit and Business Summit, and one day of sprinting./p pDrupalCon training and Business Summit registrations have noticeably declined in attendance in recent years, making them most reasonable to eliminate. The Business Summit cancellation is balanced through increasing value in business track programming, CEO dinner, and organically organized BOFs throughout the week./p pCancelling a day of sprints was a tough decision, however recent feedback shows that numerous sprints are a contributing factor to burn-out, and the eliminated sprint is just one of many we offer during DrupalCon. The sprint was a healthy choice to eliminate both financially and programming-wise./p pWhile some of those individual activities generated revenue or directly supported mission work, the most direct way to achieve notable savings is to eliminate one full day of production: the cost for staff to prepare a venue, run heating and cooling, provide and service WiFi, and catering. Some of the traditional Monday activities will shift to later in the week, for instance, the opening night reception will move to Tuesday evening./p pThe other direct cost saving we can realize without eliminating programming, is to no longer offer free attendee t-shirts and physical tote bags. We know, the free t-shirts are awesome and this is not fun to read. The upside is that sponsors - who do an amazing job helping fund DrupalCon - always bring their t-shirt-best to the exhibit hall. We are evaluating if we can provide a collectible t-shirt for purchase as an alternative option. Additionally, we will be providing electronic tote bags with giveaways from sponsors./p pWe wanted to communicate the notable changes above as soon as possible. But some other, more minor details are still being ironed out. For instance…/p pWe aren't approaching this puzzle from just an expense standpoint. We are also looking at plans to make the event more financially accessible for attendees. We are researching options like ticket discounts for qualified attendees and early bird discounts for Drupal Association members. These are not set in stone, just explorations at this point./p pBeyond the financial accessibility of a DrupalCon ticket, we are looking to expand DrupalCon attendance by inviting new attendees. We need more contributors, a next generation of sprint mentors, on-site DrupalCon volunteers, and enthusiasts who go home and champion Drupal to their colleagues and peers. We will be launching support campaigns to introduce new audiences to DrupalCon, and equip our partners and sponsors with the tools and support to promote DrupalCon to their own circles./p pThis plan is still evolving and things may change. There may still be additional changes as we learn and see the impacts of the decisions we’ve already made. We're working hard to balance costs with benefits, and preserve the strong community experience that makes DrupalCon special. We will continue to communicate as we go - we know DrupalCon is as important to all of you, as it is to us./p/div/div/div

Acquia Developer Center Blog: 247: Diversity, Differentiation, Value(s) with Tim Deeson

Wed, 02/15/2017 - 17:38
div class=field field-name-field-podcast-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg typeof=foaf:Image class=img-responsive src=https://dev.acquia.com/sites/default/files/styles/blog_node_image/public/podcast/images/deeson.jpg?itok=95XFBwei width=340 height=260 alt=Deeson title=Deeson //div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedp While passing through London in late 2016, I sat down with Tim Deeson, lead at the Deeson agency. We talked about the history of his company, delivering value with Drupal is more than delivering code, and Tim's revelations and action regarding diversity at his company and in the tech industry. /p h2 Resources / Mentionedbr //h2 ulli a href=https://www.deeson.co.uk/blog/white-men-digital-our-privilege-blindingWhite men in digital - our privilege is blinding/a - Deeson blog, September, 2016 /li li a href=https://www.deeson.co.uk/blog/progress-update-creating-inclusive-teams-deesonA progress update on creating inclusive teams at Deeson/a - Deeson blog, January, 2017 /li liThe ten actions Tim and Deeson committed to in 2016 to improve diversity in their company: ulliBegin annual salary audits to check for bias and rectify imbalances /li liReport on our progress when we do our quarterly planning /li liImplicit bias training for everyone /li liStop attending conferences that don’t have a credible Code of Conduct /li liDuring hiring, take a more nuanced view on whether a developer has made open source contributions /li liStop participating in all male conference panels /li liImprove our Careers page, including clarity on parental leave /li liStop asking for previous salary during hiring – it can perpetuate pay inequality /li liCreate dialogue and feedback channels within the company to offer better support /li liStay informed and signpost groups working in the industry /li /ul/li /ulh2Conversation Video/h2 piframe width=640 height=360 src=https://www.youtube.com/embed/nPEZBZF5ap8 frameborder=0/iframe/p h2[Full Conversation Transcript]/h2 h2 The Deeson Origin Storybr //h2 p strongjam:/strong Tim Deeson, you run what’s now called the Deeson Agency. Is that right? /p p strongTim:/strong Yes, that’s our social media name, but just “Deeson.” /p p strongjam:/strong Deeson. /p p strongTim:/strong Yes. /p p strongjam:/strong What’s the history of Deeson? /p p strongTim:/strong Deeson is a family business. It was started by my grandfather in the ‘50s, and was a contract publishing company. In 2001, we started the digital agency and that’s the main part of business, but we, actually, still have a small publishing company, too. /p p strongjam:/strong You and I talked several years ago now on the podcast about the origins of the business and coming from print to digital and all of those things, but it’s really one of those stories about like, “Yes, I can build a website, Dad!” /p p strongTim:/strong Yes. I came back from backpacking and a family friend, when I lived in San Francisco, a family friend who worked for Apple, he taught me how to hack around with Macs and stuff. I kind of came from backpacking, needed some money. This was kind of in pre-CSS days, actually, I started making websites, kept picking up clients and kind of went from there. In about 2007, we started doing Drupal. /p p strongjam:/strong Pre-CSS. /p p strongTim:/strong Yes. This was Adobe GoLive ... CSS was just starting to come out there. /p p strongjam:/strong Do you still write your HTML in all caps? /p p strongTim:/strong Yes. I don’t write HTML anymore. /p p strongjam:/strong Do you still use spacer gifs? /p p strongTim:/strong Yes, and I shrink a massive table and it’s mostly made of one-pixel gifs That’s the only way I know, unfortunately. CSS passed me by. /p p strongjam:/strong They let you do the managing now. /p p strongTim:/strong Yes. More the spreadsheets and the blog posts, probably more where my talents lie, in reality. /p p Delivering Value with Drupal /p p strongjam:/strong Can you talk about the difference between delivering code or delivering Drupal and delivering value higher up the value chain? /p p strongTim:/strong Yes. I guess, I always look at these things as kind of nested, you know, often clients don’t necessarily have a strategy that they work to. Looking – things like Drupal are tools that nested within a strategy, you can deliver value because they have certain attributes, but it’s starting, for me, to the top or the bottom to understand if we want to grow sales in Europe, for example. It’s, then, looking at ways to do digital channel to that and how – what’s a cost effective long-term way of delivering their sales reliably and where does that keep stacking up. /p p strongjam:/strong “I want a website” or “I have a website” is no longer transformational, right? /p p strongTim:/strong No. Absolutely. We work really hard with clients to make sure that they understand what’s the business change. We always treat our projects and change management and transformational projects--no one actually wants a website. What they want is happier customers or better-informed surgeons. We’re always looking at the KPIs that will actually measure the business impact of the platform that we’re going to build rather than who should be biggest on a home page or is a carousel a good thing or a bad thing? Whenever we get into those debates, we know that we’ve lost sight of the some key goals that, for the business, are the things that really matter. /p p strongjam:/strong The flipside of that coin is delivering websites, whether Drupal or whatever, is also not necessarily a differentiator anymore. /p h2 Move up the Chainbr //h2 p strongTim:/strong No. Certainly not. Digital agencies, generally, are fighting a kind of commoditization. We think about agency work as kind of, “Do it for me”, “Help me think” or “Think for me”. /p p “Do it for me”, is just do what exactly what you're told, and it’s very easy to make that kind of commoditized. /p p “Help me think”, starts to get into the UX and design side of the work. I want you to help me work out what the features are on the site. /p p “Think for me”, is the strategy. So, they’re coming to you with just a relatively short brief often of, “I need all of the the surgeons in Europe who do heart surgery to understand these training techniques. What are you going to do about it?” That’s where we, actually, can work with them on that kind of overall strategy which will have a strong digital element if they’ve come to us, but it’s an open brief, effectively. /p p strongjam:/strong “Do it for me”, “Help me think”, or, “Think for me.” Okay. /p p strongTim:/strong We kind of look at that as a kind of commoditization curve, really, within the market where if you're just delivering exactly what you’ve been asked to deliver, then that’s very easy to niche or offshore, for example, and you're really competing on cost. /p p strongjam:/strong Or Squarespace or Wix or wordpress.com, right? /p p strongTim:/strong Yes. And increasingly, those tools get more and more sophisticated that the client can actually deliver those solutions themselves. There’s not – you're not adding much value. You're not adding much intellectual value anymore, which means it’s, potentially, not going to be good for rates and retention. /p p strongjam:/strong Right. So, not only do you have to deliver more value, but you have to differentiate, right? /p p strongTim:/strong Yes. Those things are often interlinked, but understanding what is the value that you really adding. Some of them is really hygiene value and reliable code, secure working platforms, but, increasingly, amongst the good agencies. There are not endless amounts, but there are certainly competitor agencies, it’s a significant kind of chunk that I would count as great agencies. How do you, then, differentiate amongst yourself, amongst those agencies, as well? /p h2 Diversity and Differentiationbr //h2 p strongjam:/strong You and I have been talking a bit about one of the things that we might consider a differentiator. I was wondering if you could talk about your recent journey in the worlds that we’ll broadly define as diversity. /p p strongTim:/strong Yes. Probably about nine months ago, we were looking at DrupalCon Europe sponsorships, and it’s been an issue that has been in the back of my mind if do we really – are we representing the kind of communities that we’re part of? I had a kind of a niggle that probably things weren’t – it didn't feel right. Intuitively, I thought we’re probably not doing very well in this issue. It’s morally or ethically commercially initiated, it’s really important that we do improve. We came into DrupalCon, the sponsorship season, and we were looking at some sponsorships and Women in Drupal came up. “Yes, that sounds like – it would be really interesting and useful to support, really happy to do that.” I thought, “Okay. What does this actually mean? What’s the point of Women in Drupal as an event? I thought through that process of analysis. I started doing research where you start to reflect on how we performed as a company. It came to a realization that while we have the kind of positive, well intentioned kind of – “we’re not actively doing anything harmful” like kind of really quickly realized, I guess, we weren’t also doing anything proactively, constructively to kind of address what issues in the industry and certain issues that I can see much closer to home and within the company, too. We had a leadership team that the top four roles, with women – I need one in the top 10 of our roles was a woman. To me that doesn’t really sound like great gender balance if half the population are women, statistically, we kind of seem to be – have quite a quirk in there. /p p strongjam:/strong Gender, of course, is not the only axis of diversity that you need to look at, right? /p p strongTim:/strong Yes. We were looking across the board, I guess, around race, sexuality ... There’s quite a few different characteristics that we realize it would be ... Society is at large, kind of has, historically, not performed well in terms of creating equal opportunities for people ... discrimination. /p p strongjam:/strong Age is another one that, I think, is especially important. I've seen some organizations, large corporate organizations, get to that tough point economically, and then sort of fire everyone between senior management and middle management, because they’re the people in their 50s and they’re too expensive. Then, five years down the track, ten years down the track, make huge organizational mistakes, because there wasn’t a knowledge transfer, and they weren’t the people who’d gone through that mistake, the time that it happened 15 years before. There are so many ways. There have been a lot of studies about the economic and the business value of diversity. I have been part of teams – many different teams, I guess, I should say. I've felt, myself, that the more diverse a team you have, the better a solution that you can arrive to. /p p Talk about getting more value out of your business this way. I mean, that in a positive way. /p p strongTim:/strong Yes. During the research and I wrote a blogpost on this, did a lot of time for research I've done, because I found that wasn’t necessarily an easy starting point to say how do I become better informed on this issue kind of fairly quickly. Unconscious bias with something that I wasn’t really that aware of as a topic, but quickly... /p p strongjam:/strong Well, it is called “unconscious” bias. /p p strongTim:/strong Yes. I guess I get some sort of pass in that. Yes. Really, it’s something unless you are aware of the fact that we all hold these biases unconsciously, and they influence our behavior, our decisions, how we interpret the world unless you're willing to proactively engage with that and think that, as an organization collectively, as well as an individual, this is something that’s going to be even if you're thinking, actually, “I'm not going to be actively trying not to discriminate.” Unless you're a little bit more aware of what could be going on underneath, some of the signals that you could be sending with some of the smaller decisions you could be making are going to be having an influence. That was something that I realized had an impact on our work. We do things that user experience research, design. That’s a very subjective processes where we’re making very subjective decisions all the time. Without that awareness of how those decisions could be influenced, we were probably making poorer quality decisions, we were making decisions that would be – I guess our default or comfort decisions without having really potentially understood the problems space or the possibilities of what we could be doing. That was something I felt, actually, as a company, we really should be training for unless some companies will have management in HR, in hiring roles, trained in unconscious bias; but, actually, it was something that I realized that we were creating solutions to be used in a wider world, often using significant parts of our judgment and evidence wherever we can. Judgment, even the decisions you make about where you're going to research, you're going to have an impact. That was something that I realized I felt really strongly that, actually, we would benefit from as a company. It would produce the quality of our work, but it would also create a fairer workplace, a fairer culture, I guess, too. /p h2 Is Diversity a UX Challenge?br //h2 p strongjam:/strong Actually, while you were saying that, I thought to myself thinking of this as a UX challenge might be a really useful paradigm. There are several things about UX that come to mind, completely and spontaneously now: Some great UX practitioners that I've met are the people who can walk into work every day and look at the same interface and never get comfortable with it. Never get used to that workflow that you have to do that one extra thing that’s really uncomfortable there. They’re never satisfied with that. I, and I think most people, just learn how to click through whatever you do in a day and get on with it. Fighting consciously against unconscious bias by remaining as open and as perceptive as possible, that sounds really great. Then, I suppose if you somehow designed it as a process, then you could then quite well – you could really proactively look for a great user experience of your organization, right? /p p strongTim:/strong Yes. It’s a good way to think of company culture and continuous improvement, and that process might say that you are kind of never done. This isn’t a problem that is going to go away. No matter what we do as a company, we can’t solve, the industry isn’t going to fix it or society isn’t going to fix overnight. The problem with that is it can lead to apathy or that kind of stagnation of like, “Yes, this is terrible. What are you going to do?” Then everyone moves on to the next thing. And actually, I guess what I realized is that it’s made up – there are millions of small things that made this up. Actually, you can nudge change by doing things that you can control. It’s not something that’s just – we’re not going to fix it overnight. That’s even more of a reason to do something, because it’s not that kind of problem. It’s not – we can’t just make a decision and make it go away. /p p strongjam:/strong Nikki Stevens, keynoted Drupal Costa Rica 2016, and in her keynote, she talked about – it was largely about diversity, but also about community and software. She pointed out that any improvement that you can make, no matter how small, even if it’s only for your local community, makes the world better, makes Drupal, in our case, better. That’s a great point that no matter how small a change you make today, it still adds up to making a difference. I like that. /p p strongTim:/strong Yes. That could have an impact even if it positively impacts one person’s life. There is this ripple effect. It does prompt change and reflection in people that could influence the rest of their lives. That’s kind of – there’s something really powerful. It doesn’t often always get – it can get lost in the big company. You kind of - PR kind of spun version of how do you address this kind of thing. It loses the fact that there’s a very – there’s a evolutionary kind of iterative element to this that’s about raising awareness, like it’s not about people being often not be about people being bad or wrong. It’s about just how do you keep nudging this stuff in the right direction rather than just doing one thing and then disappearing for another five years. /p p strongjam:/strong Compare being passively happily open to everyone and accepting of everything and “if you come to us, you’ll have a great experience!” Compare that, which I imagine your state was a year or two ago, to proactively “We want to make Deeson a better company, and one of the measurements that we are going to take for our company’s health and success is our diversity,” so, the passive versus the active. /p p strongTim:/strong Yes. It’s easy to think of, “I don’t consciously discriminate. Therefore, we don’t have a problem.” And just turn around and walk away. That was really the state... /p p strongjam:/strong Tim doesn’t have a problem. You have a problem. /p p strongTim:/strong Exactly. It’s realizing that the problem is much more kind of insipid [insidious] in that in a way. It’s kind of that unconscious bias, I guess, is baked into us as a society and us, as humans, that we just carry these biases with us. That kind of blissful ignorance that we were kind of in before, I guess, “We’re sure we’re not actively doing anything kind of harmful, therefore, we’re fine.” Once I started to gain more awareness, I guess, and realize that that just didn't really cut it. That by even our unconscious actions or our kind of how our careers page was written, for example, would be sending strong signals to candidates about who was welcome or not within the company. If you have that stereotypical kind of startup ... /p p strongjam:/strong “We want rock stars and ninjas and senior, super senior developers!” /p p strongTim:/strong Exactly. The photos of six guys who are paying pool, late at night, drinking beer is where you’ve probably started to send the message for people with families. They if don’t want to see their families any more than they’re ... It’s that kind, you just start to go, actually, maybe if you're a woman and you don’t want to spend the rest of your career surrounded only by men in their 20s, you’ve made an age point, you’ve already started to set it to indicate who’s welcome here, who fits in, who’s kind of the default and who are you. Thinking about how prominently you talk about parental leave, for example, because if you're not talking about parental leave, at all during recruitment, then you really are probably aiming at much of the younger end of the market. There are all these sorts of things. One thing I found is really interesting about – so, we just have a big push on open source contributions. Like if you're being hired for a technical role, we really want to see that you’ve been active in the open source community. What I realized how that could be quite discriminatory, potentially, is if you were, say, a single mum, you're not going to have had – potentially, you're not going to have had the time or the money to be doing loads of free work on open source code, because you're bringing up a family and working to support them. /p p strongjam:/strong Or you might be a great developer of any age, or whatever, who had an employer who didn't include it or permit it at all. And you have a family or you have a hobby. You have an actual life (I wish I knew what that was like. No, I'm kidding.) That’s a great point. The idea of even how you – like what photos you put on your website to talk about your own company, that’s really... /p p strongTim:/strong And what language you use, does it feel like you're competitive, adversarial like you're going to be “top gun” style, or is it about we support people to do their very best. Some really interesting studies that show how that language, how that kind of language will be stereotypically responded to by men versus women, for example. /p p strongjam:/strong Sure. In the very early days of Acquia, and I mean I've been in Acquia for eight years now, some of this ... now the statute of limitations has expired. We had “rock star”, “ninja” hiring language on that page. I know, because I had conversations with people at DrupalCon and what have you ... I had conversations with people at DrupalCon who had said - amazing people. People that would have been great at that phase at Acquia. “Oh, well, I don’t think – I couldn’t come as a rock star. I don’t think I could ever apply to Acquia.” /p p strongTim:/strong Yes. You end up with self-fulfilling prophecies. You hire more and more people like the people you have because it’s a marketing test. Your recruitment, your marketing appeals to a certain type of person, which means it attracts a certain type of person, which means you create a culture which has a certain type of person. That’s often could be a narrow slice of the variety of people that would have really much – bring a lot of benefit to the company, different perspectives that can stop the kind of very narrow groupthink, I think. /p p strongjam:/strong To your point, because it’s unconscious bias, often ... “That sort of just happened to us and we don’t know why, because we would be really open to having everybody, right?” /p p strongTim:/strong But no one applies which – that was kind of one of the points I made in the blog post was around the kind of pipeline problem. “It’s the pipeline. We don’t get applicants, so what can we do?” Actually, one of those issues is that partly you don’t get those applicants because you only appeal to one type of person. You’ve made it clear that it’s only a safe, welcoming place for certain types of people because every single piece of your marketing says that ... unintentionally and unconsciously. That was the other part, just by raising awareness, it’s very rarely a kind of right or wrong cultural decision to make about these things. It’s that raising the awareness and prompting the debates internally, started to change our culture in terms of growing awareness and how an impact of certain language or certain environment choices could have an impact to people. One of the things was the use of kind of “guy”s where we’re talking to a group of people that may or may not include all men. /p p strongjam:/strong The word “guys”. You have just hit on one of my biggest pet peeves. Time out everyone. Land at London Heathrow, any day of the week, especially if you come from a big international flight and the Terminal 5 is really full, you have all those helpful people standing around yelling at you, right? An aircraft - 300, 800 adults, well enough dressed, tired, jetlagged, honestly, the last thing I want to hear – like how about, “Excuse me, ladies and gentlemen. Please go down this way.” I don’t need to be served, right? “Yes, excuse me. Everyone move this way.” All these things would be great. I'm sure there are other good options. Instead, what is it? “Guys, down this way. Yes. Guys, please, move along. Guys.” /p p strongTim:/strong Yes. /p p strongjam:/strong It does my head in that “guys” is now the formal way to address a group. And thanks to Tim Deeson, I now know that this is like a symptom of this unconscious bias, as well. /p p strongTim:/strong Sometimes that debate can get derailed into do I find it offensive or not offensive? In my experience, people generally don’t. It’s actually about sending this really subtle, tiny signal that, actually, the default of people we’re talking to are men in these situations. /p p strongjam:/strong Plus, I have to say that offense is, actually, not a yardstick to measure by, because it’s very subjective and very emotional and it doesn’t exactly matter. Stephen Fry talks a lot about the concept of “your offense is not my business”. That’s a really interesting point, as well. /p p strongTim:/strong I mean, what’s unfortunate about it is often it can kind of veer into this political correctness kind of issue. /p p strongjam:/strong And apologies. So, we’re not talking about anything that needs apologizing for. You were doing something to fix it now, right? /p p strongTim:/strong Yes. /p p strongjam:/strong I don’t like long, self-flagellating kind of conversations about this stuff either. That’s a fair point. /p h2 So where to now?br //h2 p strongjam:/strong Tell me, have you formulated a goal for Deeson in terms of diversity? Is there something – is there a simple statement that you’ve got? /p p strongTim:/strong The end of the book I published 10 things we were going to start doing, start doing basically. For example, only attending conferences that have a credible code of conduct, for example, to ensure that there was consideration of what we’re creating inclusive positive environment for all participants rather than - where in conferences, I mean, some of the reading I did ... If you don’t do the reading, it can sound kind of is this really that big a deal? But, particularly in the US, there’s been incredibly serious, incredibly common incidents to industry conferences where, actually, there is no real consideration paid to kind of large chunks of the audience collectively. We worked out ... I personally don’t believe in targeting percentages, for example, because it can create all sorts of problems. What I found was, actually, it was about the environment we were creating rather than about kind of absolute numbers. You can use percentages as a kind of dipstick of, “Does this feel it represents the communities we’re in” Actually, it was about if we make sure there our recruiting and marketing makes it clear that we’re a welcoming and inclusive environment to everyone, not just the people in a very small group or very narrow group, those kind of knock-on effects, I guess, the behaviors that we take and undertake rather than the kind of being particularly attached to specific outcomes. The outcomes will come through. What you don’t want, I guess, is just to try and force through once we hit certain percentages, then that’s what good looks like and can actually have a change in a few behaviors. That’s where you can end up with really troublesome – you're not going... /p p strongjam:/strong Those are those old conversations about a token woman or a token of whathaveyou. /p p strongTim:/strong Exactly. /p p strongjam:/strong Rather than a concrete statement or a concrete goal, would it be fair to say that you have a process that you are executing on every day and that your end goal is simply improvement on this area? /p p strongTim:/strong Yes. It’s the only way to think about it is continuous improvement and the awareness raising. It’s thinking about the kind of issues, having that awareness of issues just makes you prompt some conversations that don’t otherwise happen. /p p strongjam:/strong Okay. I’ll link to that blogpost for sure. I’ll probably quote your 10 points in the post with this conversation. /p p Tim, thank you for taking the time to talk with me. I really admire your moment of revelation, per se, but, especially that you're acting on it. It would be really cool if we check in again on this at an apropos moment. /p p strongTim:/strong Of course. Thanks so much for having me. /p p strongjam:/strong Great. Thanks, Tim. /p p strongTim:/strong Cheers. /p /div/div/divdiv class=field field-name-field-podcast-audio field-type-file field-label-hiddendiv class=field-itemsdiv class=field-item evenaudio controls=controlssource src=https://dev.acquia.com/sites/default/files/podcast-audio/tim_deeson_diversity.mp3 type=audio/mpeg //audio/div/div/divdiv class=field field-name-field-skill-level field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelSkill Level:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/skill-level/beginner typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Beginner/a/divdiv class=field-item odda href=/skill-level/intermediate typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Intermediate/a/divdiv class=field-item evena href=/skill-level/advanced typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Advanced/a/div/div/div

Lullabot: Using the serialization system in Drupal

Wed, 02/15/2017 - 17:00
div class=rich-textdiv class=rich-text__contentpAs part of the API first initiative I have been working a lot with the serialization module. This module is a strongkey member/strong of the web-service-oriented modules present both in core and contrib./p pThe main focus of the serialization module is to encapsulate a href=http://symfony.com/doc/current/components/serializer.htmlSymfonyapos;s serialization component/a. Note that there is no separate deserialization component. This single component is in charge of serializing and deserializing incoming data./p pWhen I started working with this component the first question that I had was emquot;What does serialize mean? And how is it different from deserializing?quot;/em. In this article I will try to address this question and give a brief introduction on how to use it in Drupal 8./p h2Serializers encoders and normalizers/h2 pSerialization is the process of normalizing and then encoding an input object. Similarly, we refer to deserialization as the process of decoding and then denormalizing an input string. Encoding and decoding are the strongreverse processes of one another/strong, just like normalizing and denormalizing are./p pIn simple terms, we want to be able to turn an object of class codeMyClass/code#xA0;into a particular string representation, and then be able to turn that string back into the original object./p pAn encoder is in charge of strongconverting simple data/strong#x2014;a set of scalars, arrays and codestdClass/code objects#x2014;stronginto a string/strong. The resulting string is a convenient way to store or transport the original object. A decoder performs the opposite function; it will take that encoded string and transform it into an array that#x2019;s ready to use. codejson_encode/code#xA0;and codejson_decode/code#xA0;are good examples of a commonly used (de)encoder. XML is another example of a format to encode to. Note that for an object to be correctly encoded it needs to be normalized first. Consider the following example where we encode and decode an object without any normalization or denormalization./p div class=codepre codespan class=code__classspan class=code__keywordclass/span span class=code__titleMyClass/span /span{} span class=code__variable$obj/span = span class=code__keywordnew/span MyClass(); var_dump(span class=code__variable$obj/span); span class=code__comment// Outputs: object(MyClass) (0) {}/span var_dump(json_decode(json_encode(span class=code__variable$obj/span))); span class=code__comment// Outputs: object(stdClass) (0) {}/span /code/pre/div pYou can see in the code above that the composition of the two inverse operations is not the same original object of type codeMyClass/code. This is because the encoding operation loses information if the input data is not a simple set of scalars, arrays, and codestdClass/code objects. Once that information is lost, the decoder cannot get it back./p /divdiv class=rich-text__embedundefined/divdiv class=rich-text__content pOne of the reasons why we need normalizers and denormalizers is to make sure that data is strongcorrectly emsimplified/em#xA0;before being turned into a string/strong. It also needs to be upcast to a typed object after being parsed from a string. Another reason is that different (de)normalizers allow us to work with different formats of the data. In the REST subsystem we have different normalizers to transform a codeNode/code#xA0;object into the JSON, HAL or JSON API formats. Those are JSON objects with different shapes, but they contain the same information. We also have different denormalizers that will take a simplified JSON, HAL or JSON API payload and turn it into a codeNode/code#xA0;object./p h2(De)Normalization in Drupal/h2 pThe normalization of content entities is a very convenient way to express the content in a strongparticular format and shape/strong. So formatted, the data can be exported to other systems, stored as a text-based document, or served via an HTTP request. The denormalization of content entities is a great way to import content into your Drupal site. Normalization and denormalization strongcan also be combi/strongned to transform a document from one format to another. Imagine that we want to transform a HAL document into a JSON API document. To do so, you need to denormalize the HAL input into a codeNode/code#xA0;object, and then normalize it into the desired JSON API document./p pA good example of the normalization process is the a href=https://github.com/e0ipso/data_modelData Model/a#xA0;module. In this case instead of normalizing content entities such as nodes, the module normalizes the a href=https://www.drupal.org/docs/8/api/typed-data-api/typed-data-api-overviewTyped Data/a#xA0;definitions. The typed data definitions are the internal Drupal objects that define the schemas of the data for things like fields and properties. An integer field will contain a property (the codevalue/code#xA0;property) of type codeIntegerData/code. The Data Model module will take object definitions and simplify (normalize) them. Then they can be converted to a string following the a href=http://json-schema.orgJSON Schema/a#xA0;format to be used in external tools such as a href=http://lbovet.github.io/docson/index.html#/docson/examples/example.jsonbeautiful documentation generators/a. Note how a different serialization could turn this typed data into a Markdown document instead of JSON Schema string./p h3Adding a new (de)normalizer to the system/h3 pIn order to add a new normalizer to the system you need to create a new tagged service in codecustom_module.services.yml/code./p div class=codepre code serializer.custom_module.my_class_normalizer: class: Drupal\custom_module\Normalizer\MyClassNormalizer tags: - { name: normalizer, priority: 25 }/code/pre/div pThe class for this service should implement the normalization interface in the Symfony component codeSymfony\Component\Serializer\Normalizer\NormalizerInterface/code. This normalizer service will be in charge of declaring which types of objects it knows how to normalize and denormalize#x2014;that would be codeMyClass/code#xA0;in our previous example. This way the serialization module uses it when an object of type codeMyClass/code#xA0;needs to be (de)normalized. Since multiple modules may provide a service that supports normalizing codeMyClass/code#xA0;objects, the serialization module will use the codepriority/code#xA0;key in the service definition to resolve the normalizer to be used./p pAs you would expect, strongin Drupal you can alter and replace/strong existing normalizers and denormalizers so they provide the output you need. This is very useful when you are trying to alter the output of the JSON API, JSON or HAL web services./p pIn a next article I will delve deeper into how to create a normalizer and a denormalizer from scratch, by creating an example module that (de)normalizes nodes./p h2Conclusion/h2 pThe serialization component in Symfony allows you to deal with the shape of the data. It is of the utmost importance when you have to use Drupal datastrong in an external system/strong that requires the data to be expressed in a certain way. With this component, you can also perform the reverse process and create objects in Drupal that come from a text representation./p pIn a following article I will show you an introduction on how to actually work with (de)normalizers in Drupal./p /div/div

Janez Urevc: Want to learn Entity browser?

Wed, 02/15/2017 - 16:17
spanWant to learn Entity browser?/span spanspan lang= about=https://janezurevc.name/users/slashrsm typeof=schema:Person property=schema:name datatype= xml:lang=slashrsm/span/span spanWed, 15.02.2017 - 16:17/span div class=field field--name-body field--type-text-with-summary field--label-hidden field--itempOne way to start is to check a href=http://milan2016.drupaldays.org/node/129the session that gave at the Drupal dev days Milano/a in June 2016. I went through the architecture of the module and most common use cases./p p class=embed-responsive embed-responsive-16by9 iframe width=560 height=315 src=https://www.youtube.com/embed/bnUfDRTAcxU frameborder=0 allowfullscreen=/iframe /p pI also proposed a a href=https://seville2017.drupaldays.org/sessions/building-media-site-scratchMedia workshop for Drupal dev days Seville/a where I want to cover the entire Drupal 8 Media ecosystem from the site builder's perspective. Besides that I also proposed a href=https://seville2017.drupaldays.org/sessions/drupaler-drinks-some-elixir-what-happens-nexta session about my recent experiments with Elixir/a. Not necessarily Drupal or PHP related, but I think that looking beyond our bubble can be very beneficial./p /div div class=field field--name-field-related field--type-entity-reference field--label-above div class=field--labelEnjoyed this post? There is more!/div div class=field__items div class=field--itema href=https://janezurevc.name/playing-sculpin-static-site-generator hreflang=enPlaying with the Sculpin static site generator/a/div div class=field--itema href=https://janezurevc.name/possible-solution-knowledge-sharing-drupal-8-media-domain hreflang=enPossible solution for knowledge sharing in the Drupal 8 media domain/a/div div class=field--itema href=https://janezurevc.name/join-us-next-drupal-media-sprint-mountain-camp-davos hreflang=enJoin us at the next Drupal Media sprint at the Mountain camp in Davos!/a/div /div /div