Web News

Newly spotted asteroid slips by Earth and nearby satellites - CNET

Webware - Thu, 01/18/2018 - 6:23pm
It wasn't the big space rock grabbing headlines, but another asteroid came much closer to us without any fanfare this week.
Categories: Web

PreviousNext: Analysing churn in Drupal core

Web - Thu, 01/18/2018 - 5:59pm

After reading a blog post by Matthias Noback on keeping an eye on code churn, I was motivated to run the churn php library over some modules in core to gauge the level of churn.

Is this something you might like to do on your modules? Read on for more information.

by Lee Rowlands / 19 January 2018 What is churn

As Matthias details in his blog post - churn is a measure of the number of times a piece of code has been changed over time. The red flags start to crop up when you have high complexity and high churn.

Enter churn-php

Churn php is a library that analyses PHP code that has its history in git to identify high churn/complexity scores.

You can either install it with composer require bmitch/churn-php --dev or run it using docker docker run --rm -ti -v $PWD:/app dockerizedphp/churn run /path/to/code

Some results from core

So I ran it for some modules I look after in core, as well as the Drupal\Core\Entity namespace.

Block Content File Times Changed Complexity Score core/modules/block_content/src/Entity/BlockContent.php 41 6 1 core/modules/block_content/src/BlockContentForm.php 32 6 0.78 core/modules/block_content/src/Plugin/Block/BlockContentBlock.php 20 6 0.488 core/modules/block_content/src/Tests/BlockContentTestBase.php 16 6 0.39 core/modules/block_content/src/BlockContentTypeForm.php 18 4 0.347 core/modules/block_content/src/Controller/BlockContentController.php 8 6 0.195 Comment File Times Changed Complexity Score core/modules/comment/src/CommentForm.php 60 45 1 core/modules/comment/src/Entity/Comment.php 55 25 0.548 core/modules/comment/src/Tests/CommentTestBase.php 33 29 0.426 core/modules/comment/src/Controller/CommentController.php 32 20 0.274 core/modules/comment/src/CommentViewBuilder.php 37 16 0.25 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php 32 18 0.24 core/modules/comment/src/Form/CommentAdminOverview.php 29 17 0.191 core/modules/comment/src/CommentAccessControlHandler.php 17 28 0.19 core/modules/comment/src/CommentLinkBuilder.php 15 29 0.17 core/modules/comment/src/CommentManager.php 29 15 0.157 Drupal\Core\Entity File Times Changed Complexity Score core/lib/Drupal/Core/Entity/ContentEntityBase.php 115 173 0.808 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php 61 196 0.465 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php 56 203 0.427 core/lib/Drupal/Core/Entity/Entity.php 131 43 0.212 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php 41 105 0.16 Conclusion

So, what to do with these results?

Well I think if you're looking to simplify your code-base and identify places that would warrant refactoring, those with a high 'churn' score would be a good place to start.

What do you think? Let us know in the comments.

Tagged Drupal Core, Code Complexity, Drupal 8
Categories: Web

This Samsung screen patent is full of holes - CNET

Webware - Thu, 01/18/2018 - 5:56pm
Small holes in the display allow for sensors without taking away too much screen real estate.
Categories: Web

See a lifeguard drone help rescue two young swimmers - CNET

Webware - Thu, 01/18/2018 - 5:29pm
A surf-patrolling drone designed to watch for sharks delivers a life-saving package to two distressed swimmers in Australia.
Categories: Web

This Samsung patent could solve the iPhone X's notch problem - CNET

Webware - Thu, 01/18/2018 - 5:10pm
Why have a notch when you can put holes directly into the display?
Categories: Web

Here’s what the final 20 cities offered Amazon for HQ2 - CNET

Webware - Thu, 01/18/2018 - 4:52pm
These 20 cities have made the cut for Amazon’s new headquarters. We take a look at how they’ve tried to sweet-talk the massive company.
Categories: Web

Here's why your next wireless speaker will listen to your every word - CNET

Webware - Thu, 01/18/2018 - 4:47pm
Commentary: Speakers with integrated voice assistants like Alexa and Google Assistant will soon become the norm, not the exception. Here's why.
Categories: Web

Zivtech: How to Avoid Traffic Drops After a Site Redesign

Web - Thu, 01/18/2018 - 4:22pm

During the redesign process of a website, there are many small changes that can ultimately affect the traffic of the new site. The key is to identify any changes that might break SEO, or changes that might affect the way the site looks to search engine spiders ahead of time to avoid traffic drops. In the end, we want the site to look fresh and new while still getting the same traffic, or more, as the old design. 

At Zivtech, we look at many factors in the planning phase of a website redesign project and try to identify those that could cause drops in traffic after the new design is launched. Once these have been identified, we ensure all of these tasks have been completed before launch. Let’s take a look at some of these factors and how to avoid traffic drops on your next website redesign project.

Meta Tags

We typically build sites with Drupal, so the Metatag module handles much of the meta tag configuration and display on the site. If you aren’t using Drupal though, there could be some changes to your front-end design that could affect your meta tags and confuse search engine spiders. You’ll need to make sure that all of your pages have meta tags and that there aren’t any duplicates. 

Broken Links

Broken links are a huge problem during website redesigns. This could be a result of changes in the menu structure or in path structures for content types. Broken links mean that users and search engines can’t find the pages they’re looking for, which can really wreak havoc on your site traffic statistics. 

Read more
Categories: Web

Volvo's Swedish engine factory achieves climate-neutral status - Roadshow

Webware - Thu, 01/18/2018 - 3:54pm
It's the first plant in Volvo's vast network to reach this goal.
Categories: Web

Layoffs strike as Firefox's Mozilla reworks Asian operations - CNET

Webware - Thu, 01/18/2018 - 3:51pm
The nonprofit's cuts focus the Taiwan office more on regional priorities like an Android browser in Indonesia and less on global work to improve Firefox.
Categories: Web

Uber's former CEO said to cash in at $1.4B in Softbank deal - CNET

Webware - Thu, 01/18/2018 - 3:50pm
As a consortium led by Softbank closes a deal to buy a 20 percent stake in Uber, it's looking like some people are about to get very rich.
Categories: Web

Truck buyers not as brand loyal as you'd think, study says - Roadshow

Webware - Thu, 01/18/2018 - 3:35pm
The decline in the number of country songs about specific pickup brands is finally explained.
Categories: Web

'Awesome' Nokia phone or home device launching Feb. 25 - CNET

Webware - Thu, 01/18/2018 - 3:28pm
A tweet teases something "awesome", but it's the official invite that lays on the hints.
Categories: Web

NSA surveillance programs renewed by Senate - CNET

Webware - Thu, 01/18/2018 - 3:10pm
Edward Snowden first revealed the programs, called Upstream and Prism, in 2013.
Categories: Web

After CES 2018, how close are we to the Jetsons? - CNET

Webware - Thu, 01/18/2018 - 3:03pm
With automated homes and consumer-ready robots on the rise, are we ready and able to finally bring the future into the present?
Categories: Web

Amazon HQ2 could be coming to your city soon (The 3:59, Ep. 341) - CNET

Webware - Thu, 01/18/2018 - 2:53pm
The e-commerce titan reveals its shortlist of 20 candidate cities for its next major campus.
Categories: Web

2018 Hyundai Kona achieves competitive 30 mpg combined - Roadshow

Webware - Thu, 01/18/2018 - 2:09pm
All-wheel drive drops that figure to 27.
Categories: Web

Phase2: Estimating Drupal 8 Migration Scope

Web - Thu, 01/18/2018 - 1:21pm

In my last post,  we discussed why marketers might want to migrate their content to Drupal 8, and the strategy and planning required to get started. The spreadsheet we shared with you in that post is the foundation of a good migration, and it usually takes a couple sprints of research, discussion, and documentation to compile.  It’s also a process that’s applicable to all migration of content, no matter the source or destination framework.

Categories: Web

The mirrors at CES had a lot to say about your life and looks - CNET

Webware - Thu, 01/18/2018 - 1:05pm
At this year's tech show in Las Vegas, companies showed off mirrors that analyze your skin, organize your wardrobe and more.
Categories: Web

Smart mirrors, smart mirrors at CES, which ones did we like the best? - CNET

Webware - Thu, 01/18/2018 - 1:01pm
We saw internet-connected mirrors that analyze your skin, organize your wardrobe and more at this year's tech show. Here are the ones that caught our eye.
Categories: Web