Elsewhere

Drupal core announcements: Update: Drupal 8 beta 12 rescheduled for June 29; get ready for hook_update_N() in core

Planet Drupal - Thu, 25/06/2015 - 00:35

We've rescheduled Drupal 8 beta 12 for June 29, 2015 to provide a little more leeway time for Drupal 8 core issues that require an update function. Starting June 29, any Drupal 8 core issue that includes a data model change must include an update function and update path test. See the previously announced core policy on requiring hook_update_N() for more information.

Identify your data model changes now!

If you have any core patches that are currently under development, please start identifying the data model changes in those patches now. Tag any issue that requires a data model change with D8 upgrade path and document the specific data model changes in the issue summary. Or, help triage major issues with specific attention to the data model changes.

It's actually also a good idea to start writing hook_update_N() implementations for your patches now! This will ensure in-progress issues can be committed as soon as possible following the next beta, and if your patch is ready before June 29, your update function will still help provide the corresponding update for the head2head project. Plus, if you uncover a critical limitation with Drupal 8 core's update functionality while working on your update function during the next week, the upcoming D8 Accelerate critical issues sprint will be an opportunity to get that critical issue fixed and unblock your patch.

Note for Drupal site owners and developers

Betas are good testing targets for developers and site builders who are comfortable reporting (and where possible, fixing) their own bugs. Betas are not supported releases of Drupal, and generally are not recommended for non-technical users, nor for production websites. The current beta release includes known critical bugs, including publicly disclosed security vulnerabilities. More information on beta releases.

The addition of update functions for Drupal 8.0.x issues should make it easier for developers to update their existing development sites between beta releases using update.php. However, these update functions may include bugs or even introduce data integrity issues, so developers should always back up the site and be prepared to rebuild it from scratch or manually update or migrate the data in case update.php fails to update it properly.

Categories: Elsewhere

Tom Geller: Moving on from Drupal

Planet Drupal - Thu, 25/06/2015 - 00:12

In the Esperanto language there was a great writer and activist known as "Kabe". After creating magnificent translations and reaching a position of authority, he suddenly left Esperanto life, never to participate again. So notorious was his disappearance, the language gained the verb "Kabei" -- to vanish suddenly from a position of great visibility.

I'd be flattering myself to compare my position in the Drupal world to Kabe's in Esperantio -- the Esperanto world. But my lynda.com courses and other writings about Drupal made me fairly well-recognized in Drupal circles.

I've been absent from those circles for the last couple of years, and feel the need to give closure to -- and recognize -- those I got to know there.

I got started in Drupal because I wanted to build a dynamic website to promote a book I'd written. It was a period of great growth for Drupal, and lynda.com accepted my proposal to create a seven-hour "Essentials" video course. (I think they agreed because their first CMS course -- on WordPress -- was selling pretty well.) That led to seven more, a book, a magazine column, various presentations, and a lot of corporate work.

Was I a "Drupalista"? That's tough to say. I've sincerely enjoyed working with it: Although I've come to recommend WordPress for inexperienced site builders with minimal needs, I'm still thrilled with how much I can accomplish with Drupal and a free afternoon. As I (like most people) have come to live more and more online, Drupal has given me more control over my environment. For example, I'm not afraid that I'll lose a major chunk of my history as LiveJournal slips down the tubes: Through Drupal I made a local copy, privately linking commenters to their real-wold contact information. Those tools, those gifts of the Drupal community, are still with me.

We grew apart. Drupal ceded the mom-and-pop market to other platforms, focusing instead on enterprise needs. That's a fine match... but it's not what interests me, personally. Coding -- a skill I don't have -- eclipsed site-building, evidenced by the increasing percentage of Planet Drupal posts on the subject. And Drupal 8's unexpectedly long development time caused a major writing project to stall after I'd put in a month of work.

But oh! What a fine relationship we've had. I'm scared to list the people who have made my time in "Drupalio" so much fun -- I'm sure I'd miss many. But I want to recognize everybody who helped me on Drupal.org; those involved with Drupal companies I've worked with (Commerce Guys, Mediacurrent, Acquia, Phase2 Technology, DrupalEasy, Tag1 Publishing, TopNotchThemes); those who corresponded privately about Drupal matters; and those who continue to make Drupal great. I'd be very happy to hear from you directly, and will continue to check in on drupal.org (where I'm tgeller) from time to time.

I've gone back to general technology journalism and communications. Lately I've been quite happy working in video, and have started a U.S.-based agency, Tom Geller Productions. Making a monthly video for The Association for Computing Machinery has put me in touch with people doing fundamental research. I intend to do for that community what I've tried to do for the Drupal community: to make their work clear and accessible to those without specialist knowledge.

Esperantio and "Drupalio" are quite different. But they're similar in an important way -- one that's shared by any international community of people gathered for a righteous cause. After a time, the cause changes and falls away, leaving intact relationships that linger. As Wavy Gravy said, "It's all done with people." Although I might kabei, look forward to seeing you people, wherever we meet.

Blog category: Drupal Planet
Categories: Elsewhere

Steinar H. Gunderson: JSONB in Postgres

Planet Debian - Wed, 24/06/2015 - 23:22

PostgreSQL continues to amaze. Load in 45 MB (47 581 294 bytes) of JSON in a single-column table with a generic index, and voila:

sesse=# \timing Timing is on. sesse=# select jsonb_extract_path(contents, 'short_score') from analysis where contents @> '{"position":{"fen":"rnbqkb1r/pp3ppp/2p1pn2/3p2B1/2PP4/2N2N2/PP2PPPP/R2QKB1R b KQkq - 1 5"}}';  jsonb_extract_path \-------------------- "+0.17" (1 row)   Time: 2,286 ms

Millisecond-level arbitrary JSON queries.

(In the end, I designed the database more traditionally SQL-like, but it was fun to see that this would actually work.)

Update to clarify: That's a little over 2 milliseconds, not 2286 milliseconds.

Categories: Elsewhere

Gizra.com: Why PhantomJS When You Can Chrome

Planet Drupal - Wed, 24/06/2015 - 23:00

Following our unfortunate bug in Shoov which caused login to stop working, we decided to write a Behat test that will continuously check the live site and make sure login with GitHub is working properly.

Writing the Behat test was pretty easy, however it had a major problem - it didn't work.

@javascript Scenario: Login to shoov Given I am an anonymous user When I visit the homepage And I login with my GitHub account Then I should wait for the text "My Account" to "appear"

When Behat sees the @javascript tag in the begining of the scenario, it launches it (with the help of Mink extension) in PhantomJS, Firefox or Chrome.
PhantomJS is usually the easiest to configure and hook into the CI workflow later on.

But the test we wrote just failed on all versions of PhantomJS we tried. Which made us switch to Firefox instead. Travis CI is kind enough to have a headless Firefox installed in their machine which we could use. Unfortunately, Firefox didn't like our test either, but for another reason - it couldn't parse the xpath we use to find our text elements.

So after spending some time trying to figure out a workaround, I suddenly stared at the browser I was using to find the answer - Chrome!

Behat test running on headless Chrome, seen via VNC

Continue reading…

Categories: Elsewhere

Forum One: Programmatically Restricting Access to Drupal Content

Planet Drupal - Wed, 24/06/2015 - 19:01

Have a requirement like “I want users to not be able to add, update, delete or view content if some condition is true?” If so, hook_node_access might be all you need. This hook simply allows you to alter access to a node. Now let’s learn how to use it.

How this hook works

Anytime a user accesses a node (to add, update, delete or view it) this hook is called and can be used to alter that access decision. It receives three parameters.

  • $node – Contains information about the node being accessed (or base information, if it is being created)
  • $op – What type of access it is (create, update, delete, view)
  • $account – Information about the user accessing the node

It expects a return value to alter the access, which is; NODE_ACCESS_DENY, NODE_ACCESS_IGNORE or NODE_ACCESS_ALLOW. Best practice is to not use allow and use either deny or ignore (ignore is the default, if no return is given). You get far less permissions headaches this way.

I use this module often for customized workflow requirements. The most recent use case was “I want to deny update access to all users who try to update a node based on a user select field on the node selecting them or not.”

This is all done with one simple hook in a custom module (see below).

NOTE: There are some instances this hook is not called/skipped. Refer to the hook’s link for those cases.

/** * Implements hook_node_access(). * * Enforces our access rules for custom workflow target content to force updates * only if the user is targeted in the user select field */ function mymodule_node_access($node, $op, $account) { // If a node is being updated if ($op == 'update') { // If the user select field exists on this node if (isset($node->field_my_user_select)) { // If the user select field is not empty if (!empty($node->field_my_user_select)) { // If the user id in the user select field does not match the current user if ($node->field_my_user_select[LANGUAGE_NONE][0]['target_id'] != $account->uid) { // The users are not the same. Deny access to update in this case return NODE_ACCESS_DENY; } } } } // Else ignore altering access return NODE_ACCESS_IGNORE; }
Categories: Elsewhere

Palantir: Twin Cities or Bust!

Planet Drupal - Wed, 24/06/2015 - 16:29

We love Drupal Camps for a lot of reasons, and the popular Camp in the Twin Cities is no different. We get to learn about new projects, see old friends, and discover interesting ideas and solutions to challenges in Web development, design, and strategy. In addition, not only does our Senior Web Designer Carl Martens live in the Twin Cities area, we’ve worked with a number of clients there, including the University of Minnesota and PRI, among others.

This year, we have six Palantiri in attendance, presenting sessions on a number of important topics like Drupal 8, testing, technical debt, design systems, and much more. The Camp also gives us a unique opportunity to talk shop with past, current, and potential clients to learn about their projects and understand the challenges our expertise can help solve for them. Heading to the Camp? Please do let us know via our contact form.

We give an overview of our sessions for Twin Cities, and propose why each is important for your project or those working on it. We’ll update this post once the recordings are online.

Rendering HTML With Drupal: Past, Present, and Future

by Steve Persch
Friday, June 26, 10:30am

What is it about?
This presentation will review the mental models used in Drupal theming and propose a workable path forward. For years, Drupal core has encouraged a mindset of altering and overriding its internal data structures. Developers in the Drupal 6 era created a philosophy called “sustainable theming” that relied heavily on CSS to work best with Core’s tendencies. The rapid acceleration in the wider Front-End community in recent years has brought new underlying assumptions and new ways of thinking. Expectations for how to construct Drupal sites have changed. The future holds clear decoupling with Javascript MVC frameworks, Web Components and some traditional HTML frameworks that encapsulate Front-End pieces that can work with multiple data providers. Can you make Drupal’s components be those components? Bonus: the phrase "Headless Drupal" will come up at least a dozen times.

Why is it important for your project?
Knowing the history of a system helps round out your overall knowledge of that system. As such, you'll learn how Drupal's theming system has been shaped by expectations of different eras, and how CSS usage has evolved, ultimately learning how to spot patterns that move toward the future of front-end development. In addition, you’ll learn the importance of discussing with theming choices with team members, and ways to future-proof their code and workflow.

Drupal 8: The Crash Course

by Larry “Crell” Garfield
Friday, June 26, 10:30am

What is it about?
One of the most widely-used and mature Content Management Systems on the planet, Drupal runs more than one in fifty websites in the world. However, it has always been something of an odd duck, with an architecture and design very different than anything else in PHP. Enter Drupal 8: almost a complete rewrite under the hood, Drupal 8 is a modern, PHP 5.4-boasting, REST-capable, object-oriented powerhouse. Now leveraging 3rd party components from no less than 9 different projects, Drupal 8 aims to be the premiere Content Management Platform for PHP.

Why is it important for your project?
A bit of Drupal 8 preparedness never hurt anyone. This session will provide a walkthrough of Drupal's key systems and APIs, intended to give developers a taste of what building with Drupal 8 will be like, and should be able to recognize common patterns in Drupal 8 development, and identify the Drupal 8 equivalents of common tasks from Drupal 7 at the end of it.

Design Systems and Drupal

by Larry “Crell” Garfield and Carl Martens
Saturday, June 27, 10:30am

What is it about?
Modern Web design demands visual systems that ensure content is delivered to our myriad devices, from smartphones to tablets to desktop displays and beyond, in usable ways. It requires thinking in terms of content that gets presented, often in a variety of different ways, rather than simply presentation. In this session, Larry and Carl will provide practical examples for how modern, modular design systems and practices can map directly to Drupal’s Views module, view modes, image styles, panels and other common site building tools.

Why is it important for your project?
You'll walk away with information that will help you leverage Drupal’s strengths through leading edge Web design, to both see and understand the basic concepts of design-system thinking, content strategy, and Drupal as a unified worldview that results in better, faster, and more consistent sites.

Technical Debt Insights from the Lorax

by Andrea Soper and Joe Purcell
Saturday, June 27, 1:00pm

What is it about?
Technical debt is a common analogy to describe the cost of code mess and poor architecture. However, how far can the monetary analogy go? In this session we will look at insights from the Lorax and “environmental debt”. Specifically, Andrea and Joe will build an argument for why the monetary comparison communicates the wrong idea about how technical debt is measured and how it impacts business. They will also include measures and practices to mitigate such technical debt.

Why is it important for your project?
If you deal with the challenge of communicating the business cost of technical debt, want a clearer understanding of what technical debt is and how to measure it, or want advice on how to mitigate against technical debt, this session will help. The goal is cleaner, more sustainable code and architecture for you, your team, your project, and the future.

On PhpSpec and Not the Drupal Way

by Michelle Krejci
Saturday, June 27, 2:15pm

What is it about?
This session gives you an introduction to the distinctions between unit, integration, and system testing, an introduction to behavior driven development (BDD), and, of course, using PhpSpec (a BDD tool) to isolate and spec out functionality in your Drupal codebase. PhpSpec is a toolset for building out testable pieces of functionality strictly designed to meet —and only meet—the project requirements that you have made explicit. Identify your inputs, test your expected outputs. That's it. The bigger question is: how do we as developers mature our skills and deliver testable, functional code while we continue to work on Drupal 7?

Why is it important for your project?
Proper testing breeds successful projects, plain and simple. You'll walk away with not only an understanding of the cost/benefit tradeoff of unit testing vs. system testing, you'll also learn the importance of building out custom functionality in Drupal using PhpSpec. The ultimate goal is helping you write better code and modernize your developer skills. Project Managers are welcome, too!

Heading to Twin Cities? Let us know in the comments, @ reply us on Twitter, or get in touch via email.

Categories: Elsewhere

Localize.drupal.org: Test the staging version of localize.drupal.org on Drupal 7 NOW!

Planet Drupal - Wed, 24/06/2015 - 16:13

What, localize.drupal.org still runs on Drupal 6? Yeah. It is absolutely time to update to Drupal 7 so we can keep improving the site on an up to date platform, so we need your help to try the new staging version out. Sebastien Corbin and Gábor Hojtsy with the invaluable help of the Drupal Association prepared the staging site and hope it is near ready for the upcoming live update. But we need more testers to ensure it actually is. Here is how the test works:

  1. See all instructions for testing at https://www.drupal.org/node/2487972, including how to report issues
  2. Everybody with existing accounts or new staging registrations is welcome (note that the site is not rebuilt, so if you don't already have a drupal.org account, you need to create one on staging)
  3. This public testing runs until the 8th of July (for 2 weeks)

If you test now, we can fix issues ahead of the launch, so you would not need to complain after the update. Any questions? Post on the issue at https://www.drupal.org/node/2487972

read more

Categories: Elsewhere

Realityloop: Giving back to the community: Community Tools

Planet Drupal - Wed, 24/06/2015 - 11:37
24 Jun Brian Gilbert

At DrupalCon Sydney where I was the Community track chair, for the first time at a DrupalCon both Stuart and I had offered to help as mentors at the post conference sprint. We felt in a relatively good position to do this as we’ve been running a mentoring event locally in Melbourne nearly every month since some time in 2010, which is another story in itself.

This naturally led on to us being mentors at DrupalCon Portland. During the mentor BOF’s while mostly listening, I was already thinking how can I make things better and the thing that stuck out to me were the common issues that often came up while getting a first time sprinters set up with a local development stack:

  • Bandwidth usage
  • Different stacks (MAMP, WAMP, XAMPP, etc)
  • Mentors having to support a stack they’re not familiar with
  • Time of setup (some users would take nearly an hour to setup)

Around the same time Stuart and I had been playing around with BitTorrent Sync (BTSync), which at that time was pretty new, but in my mind a promising potential solution to the bandwidth component of the problem.

I also thought that Acquia Dev Desktop (ADD) may be a better option for setting up a local stack than using any of the other *AMP stacks listed above. While also simplifying the support task for mentors that are essentially volunteering their time.

Eventually I started to talk to some of the more seasoned mentors about my ideas and there was some interest in my thoughts on BTSync, but a lot of kickback on using ADD due to previous sprints where various people had been burned trying to use ADD with Drupal 8 in the past.

As luck would have it one of the mentors that worked at Acquia, scor AKA Stéphane Corlosquet, was at these BOF’s also and we exchanged details. See the relevant issue at: https://www.drupal.org/node/2232043.

Attending what is now known as the First Time Sprinters workshop in Portland I was surprised when it was suggested that attendees all go and download MAMP/WAMP/XAMPP “now”.. It was no wonder the wifi had a history of dying during sprints, and it didn’t disappoint this time going down at exactly this point during the Portland sprints.

Needless to say this was enough motivation for me to implement and prove my thoughts, so I started building what eventually became the Community Tools Installation process.

What were the constraints?

There wasn’t that many, but these were the key things:

  • Installation is fast
  • Lean on the network
  • Doesn't break anything existing on a users machine.

It seems common for people to think that we are putting this forward as the ideal development stack, this is not at all the case, it is simply designed to be the fastest way to get someone up and running with a capable stack.

By using BTSync the majority of the network traffic for the tools is served from within the sprint room itself from the laptops of mentors that have pre-synced it.

BTSync has two levels of access to a shared folder, one that is read/write (only known to me) and one that is read only which is given to everyone else. This means we don’t run the risk of spreading malware that could arise through the use of USB keys shared with approximately 200 people.

BTSync also allows for last minute changes to be made that will sync out to all users, meaning we can respond to issues that arise quickly and not have to re-image a bunch of USB keys just before the workshop.

In the beginning there was a lot of pressure to include MAMP and other tools in the package, but I was eventually able to work with Acquia via scor to improve the ADD2 Beta such that it was the clear winner for this specific use case. Related issue: https://www.drupal.org/node/2232043.

ADD2 installs it’s webserver and database using ports for these services that are to my knowledge unique, meaning that it will not conflict with any existing web stack a user has set up.

ADD2’s supplied configurations (PHP/MySQL) also work out of the box with Drupal 8, something that often needed changing with other stacks.

Why this collection of tools?

The components were primarily chosen based on relevance to the typical activities performed by a first time sprinter during the sprint day, these are:

  • Use IRC (Limechat / Hexchat)
  • Edit code (SublimeText)
  • Use Git to apply and create patches (Git)
  • Run Drupal 8 (Acquia Dev Desktop 2)
  • Install Drupal 8 (Drupal Core — dev branch)

Initially the tools came with a PDF that walked you through each of the installation steps, pretty quickly I saw that people weren't reading this and making mistakes in the installation, so fairly promptly I started scripting as much of the installation as possible to reduce the chance of user error and also reduced the installation time. Related issue: https://www.drupal.org/node/2294267.

The OSX scripting was easy but It was fun having to learn how to code a .BAT file after not having used windows for several years.

At this stage the only manual step of the installation apart from selecting which parts you want to install is adding the site in ADD which has substantially reduced the size of the PDF that nobody reads ;)

The script prompts to see if you want to install an IRC client and a code editor, it then checks if you have git installed or not and prompts to install and configure git to d.o standards.

To save bandwidth Drupal 8 core is included in the tools package that is synced, extracted during the installation and then a git pull is executed to only grab recent changes saving again on bandwidth.

At this stage I’m very confident this is as lean as it can get without creating a customised install package specific to each operating system.

How has it performed?

After testing it at local events the concept was proven, the first real test at scale at DrupalCon Austin, about 50 people out of 200 had issues with it syncing but I considered it a success.. and the network stayed up!

We used it again in DrupalCon Amsterdam where I don’t think we had as many issues with people getting it synced but did still have to use USB drives for some people.

And I used it at DrupalSouth Melbourne earlier this year where it synced perhaps the fastest ever and we didn't have to use any USB thumb drives.

What could be improved?

It’s fairly clear that there are some limitations built into BTSync, and that the venue network setup can sometimes cause issues. I am constantly on the lookout for a better transport method (ideally looking for something open source instead of BTSync or for the Sync team to provide a free pro account so that we can share these secrets with unlimited users)

I think having a web server at the venue that could serve the tools would provide the most added benefit to the existing setup, while removing the weakest remaining link (BTSync) and also opening up the possibility of using tools that are larger in file size.

Linux doesn’t have ADD so the current experience is quite different for Linux users, and in my not consistent enough. To some degree we expect these users to already know how to set up a stack which isn’t the best assumption to make.

Statistics

Tools download file sizes:

  • Linux         510MB
  • OS X         247.5MB
  • Windows  290.3MB

External Bandwidth usage during installation:

On OSX Git is installed via download of the command line tools.. ~120MB
For OSX and the rest the only the Git pull to update core ~20MB or less

Installation time:

  • Linux          ~5 minutes
  • OS X           ~4 to 7 minutes depending on if you already had git installed or not
  • Windows     ~5 minutes
Where to from here?

There are several community members that are pushing for vagrant to be for the stack part of this toolset, I think that it will go a long way to resolving the inconsistencies that we currently see with Linux setups, talking about it in the office we all think it needs a pretty control panel to make it easier for as wide a group of end users as possible. But there are some considerations that still need to be factored in. Related issues: https://www.drupal.org/node/2233509 and https://www.drupal.org/node/2232049.

This is a recount of events spanning several years, I've done my best to be as accurate as possible please forgive me if there may be some small factual errors in my recounting of things.

drupal planetdrupal 8
Categories: Elsewhere

Blair Wadman: 19 simple methods to improve the page speed performance of a Drupal site

Planet Drupal - Wed, 24/06/2015 - 11:29

Site speed is one of the most critical factors when running a site. If a site takes too long to load, visitors will hit the back button and go elsewhere. Google is well aware of this, so slower sites will not rank as well as fast sites (all other things being equal).

Drupal performance optimisation can be a complicated specialisation in its own right. Consultants and Drupal agencies can spend days or even weeks investigating performance issues and fixing them. But there are many quick fixes and simple methods that you can implement right away. You don’t have to implement absolutely everything on this list - you can implement some and monitor the difference it makes to the site speed....

Categories: Elsewhere

Modules Unraveled: 140 Using the Math Field Module to Compute Values Without the PHP Filter with Caleb Thorne - Modules Unraveled Podcast

Planet Drupal - Wed, 24/06/2015 - 07:00
Published: Wed, 06/24/15Download this episodeMath Field Module
  • What does the Math Field module do?
  • Why did you develop it? What hole does it fill?
  • You mentioned EntityForm...
  • How does it compare to the Computed Field and other modules?
  • What are the limitations? When wouldn’t you use it?
  • You mentioned before we started recording that you actually rewrote the entire module to use core’s AJAX framework instead of custom jQuery. Why was that? and how did it go?
Use Cases
  • What types of sites do you see this being of most use?
  • I might be using this on an upcoming project
Future
  • What are your plans for D8?
  • What other general features are planned? I saw the note on the project page about issues with multiple parameters and multivalue fields.
Questions from Twitter
  • Rick Nashleanas
    Any performance implications using the Math Field module? drupal.org/node/2484065 (Yea, I know, this is a plant!)
  • David Csonka
    Is there a practical limit to how many Math Field fields you can have calculating in a piece of content? Performance?
  • Rick Nashleanas
    What's the most complicated implementation you've done with the Math Field module?
Episode Links: Caleb on drupal.orgCaleb on TwitterMath Field ModuleBlog Post about Math FieldTags: planet-drupal
Categories: Elsewhere

Russell Coker: Smart Phones Should Measure Charge Speed

Planet Debian - Wed, 24/06/2015 - 04:00

My first mobile phone lasted for days between charges. I never really found out how long it’s battery would last because there was no way that I could use it to deplete the charge in any time that I could spend awake. Even if I had managed to run the battery out the phone was designed to accept 4*AA batteries (it’s rechargeable battery pack was exactly that size) so I could buy spare batteries at any store.

Modern phones are quite different in physical phone design (phones that weigh less than 4*AA batteries aren’t uncommon), functionality (fast CPUs and big screens suck power), and use (games really drain your phone battery). This requires much more effective chargers, when some phones are intensively used (EG playing an action game with Wifi enabled) they can’t be charged as they use more power than the plug-pack supplies. I’ve previously blogged some calculations about resistance and thickness of wires for phone chargers [1], it’s obvious that there are some technical limitations to phone charging based on the decision to use a long cable at ~5V.

My calculations about phone charge rate were based on the theoretical resistance of wires based on their estimated cross-sectional area. One problem with such analysis is that it’s difficult to determine how thick the insulation is without destroying the wire. Another problem is that after repeated use of a charging cable some conductors break due to excessive bending. This can significantly increase the resistance and therefore increase the charging time. Recently a charging cable that used to be really good suddenly became almost useless. My Galaxy Note 2 would claim that it was being charged even though the reported level of charge in the battery was not increasing, it seems that the cable only supplied enough power to keep the phone running not enough to actually charge the battery.

I recently bought a USB current measurement device which is really useful. I have used it to diagnose power supplies and USB cables that didn’t work correctly. But one significant way in which it fails is in the case of problems with the USB connector. Sometimes a cable performs differently when connected via the USB current measurement device.

The CurrentWidget program [2] on my Galaxy Note 2 told me that all of the dedicated USB chargers (the 12V one in my car and all the mains powered ones) supply 1698mA (including the ones rated at 1A) while a PC USB port supplies ~400mA. I don’t think that the Note 2 measurement is particularly reliable. On my Galaxy Note 3 it always says 0mA, I guess that feature isn’t implemented. An old Galaxy S3 reports 999mA of charging even when the USB current measurement device says ~500mA. It seems to me that method the CurrentWidget uses to get the current isn’t accurate if it even works at all.

Android 5 on the Nexus 4/5 phones will tell the amount of time until the phone is charged in some situations (on the Nexus 4 and Nexus 5 that I used for testing it didn’t always display it and I don’t know why). This is an useful but it’s still not good enough.

I think that what we need is to have the phone measure the current that’s being supplied and report it to the user. Then when a phone charges slowly because apps are using some power that won’t be mistaken for a phone charging slowly due to a defective cable or connector.

Related posts:

  1. Cooling Phones According to the bureau of meteorology today is 39C. But...
  2. Dual SIM Phones vs Amaysim vs Contract for Mobile Phones Currently Dick Smith is offering two dual-SIM mobile phones for...
  3. Qi Phone Charging I have just bought a wireless phone charging system based...
Categories: Elsewhere

Open Source Training: The Beginner's Guide to Drupal Security Releases

Planet Drupal - Wed, 24/06/2015 - 02:05

There was a Drupal security release this week.

This release managed to confuse several of our users, because it wasn't clear if they should update their sites.

Security release information is rarely, if ever, written in plain English. And these week's updates were additionally confusing because they only impacted some Drupal sites.

So here, upon request, is our plain English guide to Drupal security releases.

Categories: Elsewhere

Drupal Association News: Drupal Association Board Meeting: 17 June, 2015

Planet Drupal - Tue, 23/06/2015 - 22:59

First things first - an apology. I realize it's been a couple of month since I put up a post about our Board meetings. I definitely apologize, and will try not to let that happen again. However, know that you can always see the meeting minutes, materials, and recordings on our site. And, if you ever have any questions, you can find me on Twitter, D.O, in IRC (drupalhross), or you can send me an email (you know, if you are old school). 

The June board meeting covered the month of May at the Association, which was a rather big month. As usual, we had a number of items to cover in our operational upate, and then we dove into updates from the Drupal.org Working Groups

Operational Update
  • Drupal 8 Accelerate had a great month in May, adding $55,000 to the total of over $213,000 now raised to help close D8 release blockers. Huge thanks to Catalyst IT, Open Source Developers Conference Australia, Siteground, Figleaf Software and Duo Consulting for the $1,000+ donations in May. You can see how every dollar is directly impacting Drupal 8.
  • We had a DrupalCon! We'll give you a full wrap up in August when all the details, including financials are available. 
  • Content Strategy is coming to Drupal.org. In an nutshell, we are excited to have completed a content strategy process with Forum One. With the strategy document complete, we can begin implementation. In the next few months we'll be introducing changes to the site to support the new information architecture and content governenace. When everything is in place, you will see a site that is easier to navigate and gives topic owners more flexibility in the types of content and permissioning they can use. You can see all the details in the DrupalCon LA session we hosted. 
  • As we shared in last week's post, our revenue continues to come in slower than planned. In Executive Session we shared a mid-year adjustment to the plan that we have now begun executing. Although we are not meeting our original goals, we remain excited about the possibilities for the Association - we are still growing. Especially reassuring is that all the Drupal 8 content we release is snapped up quickly.
Working Group Updates

Last quarter the Working Groups met in-person at DrupalCon Los Angeles. During the meeting, the groups discussed their role in producing the Drupal.org roadmap and began the process of re-prioritizing the work. We have definitely discovered a broader need for the Association engineering team across the Drupal ecosystem, and need a better process to allow for unplanned work to be prioritized. A good example is DrupalCI, which morphed from an entirely volunteer-run initiative to work supported heavily by Association staff. 

The Working Groups have also proposed charter changes in to the Executive Committee for review. We are looking to expand the number of community members on each group and further clarify the roles. 

Thanks and see you next month!

That's all we had for this board meeting, but more is planned for July and beyond. Check out all our upcoming board meetings and register to attend. 

Flickr photo: pdjohnson

Categories: Elsewhere

Sandro Tosi: CFEngine: upgrade Debian packages

Planet Debian - Tue, 23/06/2015 - 21:37
say you use CFEngine to install Debian packages on your server, so it's likely you'll have a bundle looking like this:

bundle agent agentname
{
    vars:

        "packages" slist => {
                             "pkg1",
                             "pkg2",
                             "pkg3"
                            };

    packages:

        "$(packages)"
            package_policy => "addupdate",
            package_method => apt_get;

}

this works great to guarantee those packages are installed, but if a newer version is available in the repositories, that wont be installed. If you want CFEngine to do that too, then the web suggests this trick:

    packages:

        "$(packages)"
            package_policy => "addupdate",
            package_version => "999999999",
            package_method => apt_get;

which tweak the install system declaring that you want to install version 999999999 of each package, so if you have available a higher version than the one installed, CFEngine will happily upgrade it for you. It works great.. but sometimes it doesn't. why oh why?

That's because Debian versions can have a epoch: every plain version (like 1.0-1) has an implicit epoch of 0, and same goes for the 999999999 above, that means if any of the installed packages has an epoch, that version will sort higher than 999999999 and the package wont be upgraded. If you want to be sure to upgrade every package, then the right solution is:

    packages:

        "$(packages)"
            package_policy => "addupdate",
            package_version => "9:999999999",
            package_method => apt_get;
Categories: Elsewhere

DrupalCon News: Get an Advantage by Sponsoring at DrupalCon

Planet Drupal - Tue, 23/06/2015 - 20:43

DrupalCon Barcelona is going to be an incredible event in a beautiful city with a great Drupal community. Sponsoring give your organization visibility and recruting benefits you can’t find at another event.

Categories: Elsewhere

mark.ie: Revert a Drupal Database Update

Planet Drupal - Tue, 23/06/2015 - 20:40
Categories: Elsewhere

Red Crackle: Drupal Performance Optimization Checklist

Planet Drupal - Tue, 23/06/2015 - 20:15
You must have read plenty of articles on how to tune your Drupal site to improve its page load times. This post assembles an exhaustive list of all the configurations and tweaks you can do to improve Drupal's performance before increasing RAM and CPU speed of your server. The list contains components from the full stack, including Drupal application and modules, front-end proxies, CDN, webserver, PHP, database, OS and server hardware.
Categories: Elsewhere

InternetDevels: DrupalTour Lviv

Planet Drupal - Tue, 23/06/2015 - 17:25

What do we get if we combine two popular memes: "Keep calm and code on" and "Keep calm and visit Lviv"? And if we add the fast green Drupal bus, good spirits and exciting IT reports? Of course, we get DrupalTour in the city of Lviv which is the capital of the Ukrainian web development services!

Read more
Categories: Elsewhere

DrupalCon News: The Critcal Importance of Sending Your Team to DrupalCon

Planet Drupal - Tue, 23/06/2015 - 16:37
It may not feel like it at first, but choosing to send your team to DrupalCon is one of the best (and most important) decisions your business can make. While it may not immediately be clear what the ROI is for attending DrupalCon, the value of having your company’s employees at the event is huge. Here’s why. 1. Learn About Bleeding Edge Best Practices
Categories: Elsewhere

Pages

Subscribe to jfhovinne aggregator - Elsewhere