FLOSS Project Planets

DrupalCon Austin News: DrupalCon Austin 2014 Grant and Scholarship Recipients Have Been Selected

Planet Drupal - Tue, 2014-04-15 11:56

We’re pleased to announce that the grant and scholarship recipients for DrupalCon Austin 2014 have been selected and finalized!

Thanks to generosity from our sponsors, we were able to extend offers of financial aid to 33 individuals worldwide!

There were over 100 applicants for financial aid for DrupalCon Austin, and selecting the best candidates for the convention was difficult work. Every candidate underwent a comprehensive evaluation by a committee of volunteers from the Drupal community.

Categories: FLOSS Project Planets

Digett: Crawling vs. Indexing: Robots.txt and sitemap.xml

Planet Drupal - Tue, 2014-04-15 10:55

Sometimes you need to prevent a site, page or everything at a particular path from showing up in Google search. I've heard people say to just disallow the page in robots.txt file. This is actually incorrect.

read more

Categories: FLOSS Project Planets

Open Source Training: 27 Funny, Imaginative and Odd Drupal Logos

Planet Drupal - Tue, 2014-04-15 10:28

Some organizations are very serious about their logos. They produce exhaustive guidelines on how their logo should and should not be used.

The Drupal community takes the opposite approach. The Drupal logo is called "Druplicon" and is released under the GPL license. That licensing allows designers to do whatever they want with the logo.

That design freedom has led to some funny, imaginative and downright strange variations on the Drupal logo.

Here are 27 of our favorites from events around the world.

Categories: FLOSS Project Planets

DrupalCon Austin News: The Austin Schedule is Live

Planet Drupal - Tue, 2014-04-15 09:36

For a few months now, we have been telling you about all the great content and fun things to do at DrupalCon Austin. Now you can see for yourself! The schedule is live and you can see it here.

You can use the master schedule to build your own personal schedule by clicking the plus or minus on the calendar icons next to the events you wish to attend. You can also access your personal schedule from the master schedule and your profile. See the screenshot below:

Categories: FLOSS Project Planets

Jeff Knupp: How 'DevOps' is Killing the Developer

Planet Python - Tue, 2014-04-15 08:21

There are two recent trends I really hate: DevOps and the notion of the "full-stack" developer. The DevOps movement is so popular that I may as well say I hate the x86 architecture or monolithic kernels. But it's true: I can't stand it. The underlying cause of my pain? This fact: not every company is a start-up, though it appears that every company must act as though they were.

DevOps

"DevOps" is meant to denote a close collaboration and cross-pollination between what were previously purely development roles, purely operations roles, and purely QA roles. Because software needs to be released at an ever-increasing rate, the old "waterfall" develop-test-release cycle is seen as broken. Developers must also take responsibility for the quality of the testing and release environments.

The increasing scope of responsibility of the "developer" (whether or not that term is even appropriate anymore is debatable) has given rise to a chimera-like job candidate: the "full-stack" developer. Such a developer is capable of doing the job of developer, QA team member, operations analyst, sysadmin, and DBA. Before you accuse me of hyperbole, go back and read that list again. Is there any role in the list whose duties you wouldn't expect a "full-stack" developer to be well versed in?

Where did these concepts come from? Start-ups, of course (and the Agile methodology). Start-ups are a peculiar beast and need to function in a very lean way to survive their first few years. I don't deny this. Unfortunately, we've taken the multiple technical roles that engineers at start-ups were forced to play due to lack of resources into a set of minimum qualifications for the role of "developer".

Many Hats

Imagine you're at a start-up with a development team of seven. You're one year into development of a web applications that X's all the Y's and things are going well, though it's always a frantic scramble to keep everything going. If there's a particularly nasty issue that seems to require deep database knowledge, you don't have the liberty of saying "that's not my specialty," and handing it off to a DBA team to investigate. Due to constrained resources, you're forced to take on the role of DBA and fix the issue yourself.

Now expand that scenario across all the roles listed earlier. At any one time, a developer at a start-up may be acting as a developer, QA tester, deployment/operations analyst, sysadmin, or DBA. That's just the nature of the business, and some people thrive in that type of environment. Somewhere along the way, however, we tricked ourselves into thinking that because, at any one time, a start-up developer had to take on different roles he or she should actually be all those things at once.

If such people even existed, "full-stack" developers still wouldn't be used as they should. Rather than temporarily taking on a single role for a short period of time, then transitioning into the next role, they are meant to be performing all the roles, all the time. And here's what really sucks: most good developers can almost pull this off.

The Totem Pole

Good developers are smart people. I know I'm going to get a ton of hate mail, but there is a hierarchy of usefulness of technology roles in an organization. Developer is at the top, followed by sysadmin and DBA. QA teams, "operations" people, release coordinators and the like are at the bottom of the totem pole. Why is it arranged like this?

Because each role can do the job of all roles below it if necessary.

Start-ups taught us this. Good developers can be passable DBAs if need be. They make decent testers, "deployment engineers", and whatever other ridiculous term you'd like to use. Their job requires them to know much of the domain of "lower" roles. There's one big problem with this, and hopefully by now you see it:

It doesn't work in the opposite direction.

A QA person can't just do the job of a developer in a pinch, nor can a build-engineer do the job of a DBA. They never acquired the specialized knowledge required to perform the role. And that's fine. Like it or not, there are hierarchies in every organization, and people have different skill sets and levels of ability. However, when you make developers take on other roles, you don't have anyone to take on the role of development!

An example will make this more clear. My dad is a dentist running his own practice. He employs a secretary, hygienist, and dental assistant. Under some sort of "DentOps" movement, my dad would be making appointments and cleaning people's teeth while trying to find time to drill cavities, perform root canals, etc. My dad can do all of the other jobs in his office, because he has all the specialized knowledge required to do so.

But no one, not even all of his employees combined, can do his job.

Such a movement does a disservice to everyone involved, except (of course) employers. What began as an experiment aimed at increasing software quality has become a farce, where the most talented employees are overworked (while doing less, less useful work) and lower-level positions simply don't exist.

And this is the crux of the issue. All of the positions previously held by people of various levels of ability are made redundant by the "full-stack" engineer. Large companies love this, as it means they can hire far fewer people to do the same amount of work. In the process, though, actual development becomes a vanishingly small part of a developer's job. This is why we see so many developers that can't pass FizzBuzz: they never really had to write any code. All too common a question now, can you imagine interviewing a chef and asking him what portion of the day he actually devotes to cooking?

Jack of All Trades, Master of None

If you are a developer of moderately sized software, you need a deployment system in place. Quick, what are the benefits and drawbacks of the following such systems: Puppet, Chef, Salt, Ansible, Vagrant, Docker. Now implement your deployment solution! Did you even realize which systems had no business being in that list?

We specialize for a reason: human beings are only capable of retaining so much knowledge. Task-switching is cognitively expensive. Forcing developers to take on additional roles traditionally performed by specialists means that they:

  • aren't spending their time developing
  • need to keep up with an enormous domain of knowledge
  • are going to burn out

What's more, by forcing developers to take on "full-stack" responsibilities, they are paying their employees far more than the market average for most of those tasks. If a developer makes 100K a year, you can pay four developers 100K per year to do 50% development and 50% release management on a single, two-person task. Or, simply hire a release manager at, say, 75K and two developers who develop full-time. And notice the time wasted by developers who are part time release-managers but don't always have releases to manage.

Don't Kill the Developer

The effect of all of this is to destroy the role of "developer" and replace it with a sort of "technology utility-player". Every developer I know got into programming because they actually enjoyed doing it (at one point). You do a disservice to everyone involved when you force your brightest people to take on additional roles.

Not every company is a start-up. Start-ups don't make developers wear multiple hats by choice, they do so out of necessity. Your company likely has enough resource constraints without you inventing some. Please, don't confuse "being lean" with "running with the fewest possible employees". And for God's sake, let developers write code!

Categories: FLOSS Project Planets

Drupalize.Me: What is Drupal (8)?

Planet Drupal - Tue, 2014-04-15 08:20

With the release of Drupal 8 approaching, it’s time again to answer and update the age old question: What is Drupal?

Categories: FLOSS Project Planets

Frederick Giasson: Registering an OSF Network in OSF for Drupal (Screencast)

Planet Drupal - Tue, 2014-04-15 08:05

In this screencast, I explain how we can link (register) one or multiple OSF Web Services networks to a single OSF for Drupal instance. I discuss how this OSF Web Services mechanism can be used to bring datasets from multiple different OSF instances into the same Drupal portal. I also cover how we can use the same OSF Web Services network as the backend for multiple Drupal portals (which uses OSF for Drupal).

We briefly discuss the distributed aspect of the Open Semantic Framework (OSF), but this topic will be discussed more in deep in a subsequent screencast.

 


Categories: FLOSS Project Planets

Matt Raible: Spring Break in Florida: Golf, Beaches and Boats!

Planet Apache - Tue, 2014-04-15 07:59

Florida is a beautiful state, with sandy beaches, excellent fishing, fun people and a great enthusiasm for golf. When I dreamed up Trish, I knew she'd have an awesome family, but I never expected her parents to have a house on a golf course. Trish's grandma, Claire Stanley, is a legend in her own right. I've never met her, but I knew I loved her when Trish's dad first told me about her "layered shots". When I saw Claire's name listed several times on the walls of the The Country Club of Naples, a deep respect came over me. Claire picked out her house on the 17th hole (Trish's favorite number) of the Country Club in 1966, when the establishment was founded. My bus was born in 1966.

Today, Trish's parents have turned it into a golf and relaxation oasis, complete with beautiful orchid gardens, a sweet pool and Japanese decorations from the country where they first met.

As a golf enthusiast, I'm embarrassed that we've only visited her parents in Naples once before. We bought Abbie and Jack golf clubs last year for Jack's birthday, and they both like to play the game. To make up for our lack of visiting family in Florida, we took our kids on a golf vacation for this year's Spring Break.

We learned a technique for kids golfing in September 2012: have them tee off from the 150 marker so they have a chance to par the hole. We arrived in Naples on a Saturday, had a nice family brunch on Sunday and played golf with the kids that afternoon. The kids had a really good time, even beating us on a couple holes.

The sunset on Sunday evening was gorgeous, especially with the kids frolicking in the waves.

On Monday, we woke up early and boarded the Key West Express before sunrise.

We arrived in Key West around noon and hung out by our hotel pool for most of the day. That evening, after marveling at the sunset, we took the kids on a Key West Ghost Tour. It was a bit long at 1.5 hours, but the story of Robert the Doll was excellent.

Tuesday morning, we met up with Abbie and Jack's Mom, Julie, and her fiancé Dave. They had Dave's kids with them, and we all headed out for a sailing, parasailing and jet skiing adventure together. Everyone had a great time, as is evidenced by the photos below.

Trish and I handed the kids over to Julie that afternoon and spent a few more hours in Key West. We rented bikes, visited the southernmost point in the US and enjoyed a cocktail on the beach. We especially liked seeing the house that Trish's Mom, Maureen, grew up in.

Around happy hour, after visiting the World of Beer, we boarded the Key West Express and traveled back to Trish's parents.

The rest of the week was an ideal vacation: golfing, swimming in the pool, swimming in the ocean, walking on the beach, dinner on the beach and fishing in the Everglades. Trish's Dad, Joe, booked us a fishing trip in the Everglades, starting from Everglades City. He and I had to wake up before dawn on Friday to meet our guide, who was waiting for us at the dock at 7:30. From there, we spent six hours boating, casting, reeling, catching some, losing some and having a fabulous time. Our catch at the end of the adventure was two Trout and one Flounder (caught by our guide, Tony). Nevertheless, we had a delightful day and savored the sun and the water in a beautiful location.

Saturday, we played some more golf and took an evening flight home. It was a fun spring break and I'm glad the kids got to enjoy it with both parents and multiple grandparents. More than anything, thanks to Trish's parents for their hospitality and fun-loving lifestyle. We had a blast!

For more pictures, checkout Trish's Spring Break 2014 or my Spring Break in Florida.

Categories: FLOSS Project Planets

INsReady: How fast does Drupal grow in China? A perspective from DrupalCampChina 2014

Planet Drupal - Tue, 2014-04-15 06:37

March 22nd, 2014, we have concluded DrupalCampChina 2014 (announcement). This is the second year that Drupal Shanghai Community has teamed up with Techyizu.org (a Shanghai-based volunteer-driven organization and supporters of the China startup and tech community.) to succefully organize DrupalCamp within Barcamp. For those who don't know, Barcamp is the same style as DrupalCamp, but wider topics and larger audience. We organize Barcamp to attract a variety of people in the related industries; In Spring, 2014, this Barcamp received over 700 people. On Drupal side, we also had large attendance, fun discussion & collaboration and a rooftop afterparty. I was very happy to see large increase in presentations and people at the DrupalCamp (comparing to DrupalCampChina 2013), and therefore, I am eager to share my observation publicly.

Keynote attendance doubled
Thanks to The Drupal Community Cultivation Grant (and the Committee), this year we received the grant help again to bring in an international well-known Drupal contributor to speak at our camp keynote. John Albin Wilkins offered the favor and presented "Drupal for a Better Web". During his keynote, I realized there were around 200 people packed in this conference room. I also recognized many local Drupal community leaders from other Chinese cities, such as Beijing, Hangzhou, etc. Comparing to last year keynote, we almost had 100% increase in keynote attendance.

Sessions doubled
Last year, we had one track at the DrupalCamp, and besides a keynote, there were 4 hour-long sessions. This year, we had two tracks and total 8 sessions and a keynote. Thanks to all the presenters at DrupalCamp, you all made this camp succesfull!

Marketing presence
In the past 3 years of my volunteering and community activities in Shanghai, China. I almost exclusively interacted with developers, designers and entrepreneurs who work with Drupal on daily basis. However, at this DrupalCamp, I saw a person with professional cameras and camcorders busy recording all the sessions. I had a pleasure talking to him, and learned that he doesn't use Drupal, but he believes in his partners who develop a business on Drupal, and he decides to dedicate his efforts of Marketing and Sales for Drupal. As many people would agree, in the Drupal world, we are in high demand of talent, but we are even in higher demand of people who market Drupal well and explain what Drupal is to others. I am glad to see the presence of marketing professionals at this camp, which shows the business side of Drupal is promising in China. I believe they are good at helping companies discover and invest in Drupal as their business solution.

Future collaboration
6 Barcamps have been organized in the past 3 years in Shanghai. However, Barcamp didn't get very technical until 2013 we organized DrupalCampChina 2013. This year, we promoted DrupalCamp through the regular channels via Barcamp and media friends. Then at the camp, I saw Javascript, Node.js and a few other stacks of technologies sessions talking about Internet of things. Not only those presenters offered different choices and opinions and helped Drupal to educate the same audience on Internet or Web; but also, most of those presenters support open source and likely the Shanghai Drupal community will extend the communication to those local open source communities for future collaboration.

I am very glad how this camp turned out. I see great collaboration between local Drupal community and Drupal Association on bringing an oversee speaker, the collaboration among different communities to organize a large Barcamp and DrupalCamp, the collaboration within the camp during presentations. This collaboration builds us a good foundation to further advocate Drupal in China, and we will see a larger DrupalCamp next year!

More photos about DrupalCampChina 2014, please see the album on Google+

Files:  PANO_20140322_120703.jpg IMG_2591.JPG IMG_2624.JPG IMG_2575.JPG IMG_2592.JPGTag: Drupal PlanetDrupalCampChina
Categories: FLOSS Project Planets

Bálint Réczey: Proposing amd64-hardened architecture for Debian

Planet Debian - Tue, 2014-04-15 06:02

Facing last week’s Heartbleed bug the need for improving the security of our systems became more apparent than usually. In Debian there are widely used methods for Hardening packages at build time and guidelines for improving the default installations’ security.

Employing such methods usually come at an expense, for example slower code execution of binaries due to additional checks or additional configuration steps when setting up a system. Balancing between usability and security Debian chose an approach which would satisfy the most users by using C/C++ features which only slightly decrease execution speed of built binaries and by using reasonable defaults in package installations.

All the architectures supported by  Debian aims using the same methods for enhancing security but it does not have to stay the same way. Amd64 is the most widely used architecture of Debian according to popcon and amd64 hardware comes with powerful CPU-s. I think there would be a significant amount of people (being one of them :-)) who would happily use a version of Debian with more security features enabled by default sacrificing some CPU power and installing and setting up additional packages.

My proposal for serving those security-focused users is introducing a new architecture targeting amd64 hardware, but with more security related C/C++ features turned on for every package (currently hardening has to be enabled by the maintainers in some way) through compiler flags as a start.

Introducing the new architecture would also let package maintainers enabling additional dependencies and build rules selectively for the new architecture improving the security further. On the users’ side the advantage of having a separate security enhanced architecture instead of a Debian derivative is the potential of installing a set of security enhanced packages using multiarch. You could have a fast amd64 installation as a base and run Apache or any other sensitive server from the amd64-hardened packages!

I have sent the proposal for discussion to debian-dev, too. Please join the discussion there or leave a comment here.

Update: Many of you wondered if amd64-hardened could have prevented the exploitation of the Heartbleed vulnerability. I have posted a proof of concept to show that using -fsanitize=address and disabling custom freelist would have protected systems against stealing data using the exploits.

Disabling the custom freelist-like solutions and enabling-fsanitize=address would be part of amd64-hardened to make memory protection techniques work effectively thus I think if we had this architecture ready at the beginning of April, it would have been immune to Heartbleed.

Categories: FLOSS Project Planets

David Herron: Static HTML website builders (AkashaCMS, etc) slashes web hosting costs to the bone

Planet Drupal - Tue, 2014-04-15 04:52

Today's web is supposedly about fancy software on both server and client, building amazingly flexible applications merging content and functionality from anywhere.  What, then, is the role of old-school HTML websites?  In particular, why am I wasting my time building AkashaCMS and not building websites with Drupal?


Categories: FLOSS Project Planets

Optimal Sailfish SDK workflow with QML auto-reloading

LinuxPlanet - Tue, 2014-04-15 04:37

SailfishOS IDE open. Just press Ctrl+S to save and see app reloading!

Sailfish is the Linux based operating system used in Jolla phones. Those who develop apps for Jolla use the Sailfish SDK (software development kit), which is basically a customized version of Qt Creator. Sailfish OS apps are written using the Qt libraries and typically in the C++ programming language. The user interfaces of Sailfish apps are however written in a declarative language called QML. The syntax of QML is a custom markup language and includes a subset of CSS and JavaScript to define style and actions. QML files are not compiled but stay as plain text files when distributed with the app binaries and are interpreted at run-time.

While SailfishOS IDE (Qt Creator) is probably pretty good for C++ programming with Qt libraries, and the Sailfish flavour comes nicely bundled with complete Sailfish OS instances as virtual machines (one for building binaries and one for emulating running the binaries) the overall workflow is not very optimal from a QML development point of view. Each time a developer presses the Play button to launch his app, Qt Creator builds the app from scratch, packages it, deploys it on the emulator (or a real device if set up to do so) and only then actually runs the app. After doing some changes to the source code, the developer needs to remember to press Stop and then press Play to build, deploy and start the app again. Even on a super fast machine this cycle takes at least 10 seconds.

It would be a much more optimal workflow if relaunching the app after QML source code changes would happen in only 1 second or even less. Using Entr it is possible.

Enter Entr

Entr is an multi platform app which uses the operating system facilities to watch for file changes and to run a command the instant a watched file is changed. To install Entr on a Sailfish OS emulator or device, ssh to the emulator or device, add the community repository chum and install the package entr with (Note the chum for 1.0.5.16 also exists, but the repo is empty.):

ssh nemo@xxx.xxx.xxx.xxx ssu ar chum http://repo.merproject.org/obs/sailfishos:/chum:/1.0.4.20/1.0.4.20_armv7hl/ pkcon refresh pkcon install entr

After this change to the directory where your app and it’s QML files reside and run entr:

cd /usr/share/harbour-seravo-news/qml/ find . -name *.qml | entr -r /usr/bin/harbour-seravo-news

The find command will make sure all QML files in current or any subdirectory will be watched. Running entr with parameter -r will make sure it kills the program before running it again. The name of our app in this example here is seravo-news (available in the Jolla store if you are interested).

With this the app would automatically reload it any of the QML files change. To do this mount the app directory on the emulator (or device) to your local system using SSH:

mkdir mountpoint sshfs nemo@xxx.xxx.xxx.xxx:/usr/share/harbour-seravo-news mountpoint/

Then finally open Qt Creator, point it to the files in the mountpoint directory and start editing. Every time you’ve edited QML files and you feel like you want to see how the result looks like, simply press Ctrl+S to save and watch the magic! It’s even easier than what web developers are used to do then pressing F5 to reload, because on the emulator (or device) there is nothing you need to do, just look at it while the app auto-restarts directly.

Remember to copy or directly git commit your files from the mountpoint directory when you’re completed writing the QML files.

Entr has been packaged for SailfishOS by Seravo staff. Subscribe to our blog to get notified when we post about how to package and build RPM packages using the Open Build System and submit them for inclusion in SailfishOS Chum repository.

Categories: FLOSS Project Planets

Marco Di Sabatino Di Diodoro: Apache Syncope 1.0.9 and 1.1.7 released

Planet Apache - Tue, 2014-04-15 04:20
The Apache Syncope team is pleased to announce the release of Syncope 1.0.9 (Espressivo) and 1.1.7 (Ad libitum): besides other things, these releases contain a security fix for CVE-2014-0111: upgrade from previous 1.0.X / 1.1.X versions is strongly suggested.
Categories: FLOSS Project Planets

flink: "But that's easy in Drupal, isn't it?"

Planet Drupal - Tue, 2014-04-15 04:17

Many a time a customer’s casual challenge of “But that’s easy in Drupal isn’t it?” has resulted in us taking up the gauntlet and putting in some hard yards to indeed "make that easy”.

Clearly 8,500 D7 modules on drupal.org is not enough.

As we were working on a government project last year the question popped up again and we had to rise to the occasion. The project was eventually put on ice, but during its course another module baby was born. We called it Views Aggregator Plus and set her free in Drupalland. It seemed a waste not to share it.

One thing we've learned about releasing modules: you have no idea upfront which ones will thrive. We thought we had created a niche application and planned for one install, namely that single install on that site that never happened. But the module usage statistics prove that it has found applications way beyond its initial purpose. Not bad for a module that wasn't meant to see the light outside that one web site!

As so often in Drupal, further enhancements were very much driven by the needs the community raised, thus taking the module into directions we’d never anticipated, like its application as a Webform submissions post-processor.

For your inspiration we contacted some of the early adopters we came to know through the module's issue queue and collected from them some examples of how Drupal site builders all over the world get value out of Views Aggregator Plus.

We hope you enjoy the screenshots and explanations below. Among these may be just that thing you also needed to be easy in Drupal.

Special thanks to Nick Veenhof of Acquia and Mads Bordinggaard Christensen of Rillbar Records who happily shared screenshots and application stories.

Example 1

by Nick Veenhof of Acquia

"My View displays a list of Search Cores. I configured the module to apply grouping on the customer name. The aggregation functions applied on remaining fields were summations on the column cells of selected fields. This is how the Document Count and Query Count columns were created."

 

 

 

Example 2

by Mads Bordinggaard Christensen of Rillbar Records

"My company is primarily a wholesale distributor of music on vinyl and CD’s. After each quarter I have to send out statements to all the different Record labels who deliver their products to us. The attached PDF is an example of a dummy record company, presenting the amount of sold items within the period.

Dummy Records have 2 different products in their catalogue. The CD has sold 32 items and the vinyl 20 within the period. These sales are however spread out on 6 different orders. So instead of having 6 table rows representing each order, I can use Views Aggregator Plus to compress and group the rows using a unique value, in this case the product SKU.

Before using Views Aggregator Plus each order of the given product had its own line, and it quickly became very unclear and messy. Some products sell a lot of items, but maybe only 1 or 2 on each order, so it can quickly result in a lot of rows (especially for the record labels who had to sum the amount of sold items in order to make an invoice for me).

So Views Aggregator Plus is a really important factor in creating these statements to our suppliers. Apart from that it allows us to quickly pull an exact amount of sold items from the database within a given period (using the date range as a contextual filter)."

 

Example 3

by Rik de Boer, founder of flink

Lastly the use-case for which Views Aggregator Plus was initially developed.

"I've illustrated the construction of the VAP View (bottom) through two intermediate phases, both normal Views. The top one shows a number of government projects (names omitted) by industry, their budgets and their durations (a duration is a Date field with start and end values).

After enabling the Views PHP module a PHP code snippet field (see below) was added to turn the date ranges into more readable keywords: "not started”, “underway” or “closed”. A copy of the PHP field was added thus creating an identical column (with a different title) in preparation for the next step.The duration column was excluded from display.

For the final View the format was flicked from “Table” to “Table with aggregation options”. The “Industry” field was grouped (compressed) and tallied, the budget value field was group-summed.

“No. projects underway” had the “Count (having regexp)” aggregation function applied with “underway” as the regular expression to count. The same aggregation function was applied to “No. projects closed” except that this time the counting parameter was “closed".

To make the “Totals” row, column sum functions were added for all fields except the first. And finally sorting was enabled… voila!"

<?php $start_date = strtotime($data->field_field_duration[0]['raw']['value']); $end_date = strtotime($data->field_field_duration[0]['raw']['value2']); echo time() < $start_date ? 'not started' : (time() < $end_date ? 'underway' : 'closed'); ?> File under:  Planet Drupal
Categories: FLOSS Project Planets

ThinkShout: Refactoring The iATS Drupal Commerce Module

Planet Drupal - Tue, 2014-04-15 03:00

Last month, we wrapped up a project for nonprofit-oriented payment processor, iATS Payments. iATS Payments wanted to invest in gaining wider adoption of their services and enlisted ThinkShout's help in building a PHP wrapper for their existing SOAP API.

Being a bunch of software engineers who have implemented our fair share of APIs (both good and bad), we knew we had to achieve certain goals if we were going to ease the adoption of iATS Payments within PHP applications:

  • Comprehensive: The wrapper handles all communication with the iATS Payments SOAP API, validation of API calls, and error handling.
  • Well documented: We made use of phpDocumentor to generate easily browsable documentation from our code comments.
  • Reliable: Via a comprehensive test suite covering every API call written in PHPUnit.

With the new PHP wrapper finished and unit tests passing, our attention shifted to the project we felt would most benefit from the work we'd done: the Commerce iATS Drupal module. This module leverages Drupal Commerce to facilitate payment processing via iATS Payments on any Drupal website.

We had already integrated Commerce iATS into some of our clients' websites, so we knew it was a great module, but it was written before there was a standard iATS Payments PHP wrapper and contained some unwieldy code that could be eliminated by using the new PHP wrapper. With support from the community and sponsorship from iATS, we rewrote the module, drastically reducing complexity, which any engineer can appreciate, and improved stability, which site owners love even more. We're excited to replicate the success of our partnership with MailChimp, which created a win for the community, the vendor, and, yes, ThinkShout.

Refactoring Commerce iATS

In refactoring Commerce iATS, we didn't just plug in the PHP wrapper and call it a day. While Commerce iATS was originally written with support for only credit card payments, our PHP wrapper supports all payment methods provided by iATS Payments and we wanted to make sure Commerce iATS had room to grow and take advantage of those payment methods.

Some of the problems

Looking through the code of the existing Commerce iATS module, we realized the current design would not scale well as we added additional payment methods.

As an example, take a look at the 2.x-dev release of Commerce iATS.

Here the function commerce_iats_soap_process_submit_form_submit() is being used to handle a lot more logic than a form submit handler ideally would. Breaking it down:

A lot of code in commerce_iats_soap_process_submit_form_submit() is later duplicated when commerce_iats_customer_code_charge_submit_form_submit() is called.

The refactor

We set out to redesign the module's architecture and rebuild it with modularity and expansion in mind. Here's what we did.

Created a new standard payment processing function
  • This function handles the API call, response handling, transaction creation and logging.
  • To handle multiple payment methods, the function accepts a callback function as a parameter. This callback function is the function that makes the API call via the PHP Wrapper and returns the response.

The first lines of commerce_iats_process_payment() demonstrate how the callback function is used:

<?php function commerce_iats_process_payment($payment_method, $payment_data, $order, $charge, $payment_callback) { // Process the payment using the defined callback method. $response = $payment_callback($payment_method, $payment_data, $order, $charge); Broke payment methods out into their own include files

As an example, here's the credit card payment method. Each payment method file contains these standard Commerce functions (where credit_card is the payment method:)

  • commerce_iats_credit_card_settings_form()
  • commerce_iats_credit_card_submit_form()
  • commerce_iats_credit_card_submit_form_validate()
  • commerce_iats_credit_card_submit_form_submit()

Then we added our own callback function, commerce_iats_process_credit_card_payment().

The callback function handles building the API request and getting a response from the API. To show how this works, here's a line from commerce_iats_credit_card_submit_form_submit():

<?php return commerce_iats_process_payment($payment_method, $payment_data, $order, $charge, 'commerce_iats_process_credit_card_payment');

As you can see, all the payment information from the form submit handler is being passed into commerce_iats_process_payment(). That function then calls the callback function commerce_iats_process_credit_card_payment() to make the API call and get the response.

This design is very easy to extend and allows us to add as many additional payment methods as we need in a very clean way. We were able to use this design to implement Commerce Card on File as a submodule of Commerce iATS, eliminating that dependency from the base module.

Roadmap and next steps

All our work on Commerce iATS is currently available in the 2.0-beta1 release. Please take a look and let us know if you have any feedback.

We're already hard at work along with our partners at iATS Payments to integrate more of their payment processing facilities into the Commerce iATS module. While the module currently only supports credit card payments, ACH/EFT and Direct Debit payments will arive before DrupalCon Austin. Speaking of, both ThinkShout and iATS Payments will be attending and spending some time at the iATS booth, number 508. Come find us to say hello and talk some e-commerce.

Keep an eye on the Commerce iATS project page and this blog for more updates.

Categories: FLOSS Project Planets

Andy Todd: Generating Reasonable Passwords with Python

Planet Python - Tue, 2014-04-15 02:33

Thanks to a certain recent Open SSL bug there’s been a lot of attention paid to passwords in the media. I’ve been using KeePassX to manage my passwords for the last few years so it’s easy for me to find accounts that I should update. It’s also a good opportunity to use stronger passwords than ‘banana’.

My problem is that I have always resisted the generation function in KeePassX because the resulting strings are very hard to remember and transcribe. This isn’t an issue if you always use one machine but I tend to chop and change and don’t always have my password database on the machine I’m using. I usually have a copy on my phone but successfully typing ‘Gh46^f27EEGR1p{‘ is a hit and miss affair for me. So I prefer passwords that are long but easy to remember, not unlike the advice from XKCD.

Which leaves a problem. Given that I now have to change quite a lot of passwords how can I create suitably random passwords that aren’t too difficult to remember or transcribe? Quite coincidentally I read an article titled “Using Vim as a password manager”. The advice within it is quite sound and at the bottom there is a Python function to generate a password from word lists (in this case the system dictionary). This does a nice job with the caveat that it I understand from a cryptographic standpoint the passwords it creates are not that strong. But useful enough for sites which aren’t my bank or primary email. For those I’m using stupidly long values generated from KeePassX. When I tried the Python function on my machine there was one drawback, it doesn’t work in Python 3. This is because the use of ‘map’ is discouraged in Python 3. But that’s alright because I can replace it with one of my favourite Python constructs – the list comprehension. Here is an updated version of invert’s function that works in Python 3. Use at your own risk.

def get_password(): import random # Make a list of all of the words in our system dictionary f = open('/usr/share/dict/words') words = [x.strip() for x in f.readlines()] # Pick 2 random words from the list password = '-'.join(random.choice(words) for i in range(2)).capitalize() # Remove any apostrophes password = password.replace("'", "") # Add a random number to the end of our password password += str(random.randint(1, 9999)) return password

Categories: FLOSS Project Planets

Recap post To Dantix@reddit (+all): Wth is Community Design anyway?

Planet KDE - Tue, 2014-04-15 02:13

In which I write my first "recap" post about what's been set and what's been talked about and how things work. Just a little how-to for everyone who just joined us! This time it's about Community Design and why it matters so much.


Photo Jencu "Sharing Toys" CC-SA
I've been meaning to write this post for some time - a sort of recap for people who just joined us in what's going on.
Dantix, a reddit poster was a tad miffed that the editable combobox was the wrong size for it's scroll-down arrow. I'm not trying to call the dude out, I'm sure he (or she) is a brilliant person and didn't mean anything mean, it was just a comment and an apt one so no harm no foul!

But it told me that I need to talk more about this Community Design thing.

...
There are three points I really want to take up:

1) Everything shown will be shown from scratch. Nothing hidden.
Now from a marketing perspective that sucks. Lets be honest - we all like "the big reveal" where some designer in a turtleneck pulls back to curtains and go "tadaaa!". We wont do it like that. You will see it when it's just a mass of scribbles all the way to the finished product.
Why is it like that? Because that way everyone can see the process. It gets demystified and something more accessible and open to all. It shows everyone the trick behind it. Design have become a catch-all for "don't bother me, you wouldn't understand" and I don't think thats a healthy attitude for Open Source to adopt.

2) You are expected to join in if you want to. As long as you play nice the toys are for everyone.
This is the big one. Yeah yeah you've heard it before. But its true. No matter how little of an "eye for design" you have, you have it. Comment, post mockups and try to see the cool things people do and spin off that.
I can't promise that you're work will end up being the official theme for Plasma Next - but I can promise that you will influence it. We actually DO listen to comments. To cool ideas especially.
And that's the bit to remember - its always better to contribute than to comment especially if you're comment is "I don't like that". We have some rules and they are essentially: If you post criticism, what it is you don't like, why you don't like, how it could be fixed and propose a fix it's a gold star comment. If you criticize, specify what it is you don't like and how it could be fixed. Thats a silver star comment. If you criticize and specify what it is you don't like ... thats bronze. As long as you do it in a nice and cooperative way it's ok to post. If you can't say exactly what it is you don't like about something AND can't be nice about it - don't post.
If you have a cool idea on the other hand. Post. Thats the only rule for contributions.
Why is it like this? Because we want to foster a friendly attitude. Design IS communication and communication is hingent on a community. By letting everyone feel like they can contribute with mockups and cool ideas - we get more cool ideas. By playing with the art or design school rules of criticism we make certain that the other nasty and sadly common thing in design is minimized - the nonsense put-downs to make yourself seem "better" or the simple "you suck" comments that does nothing at all for design work.

3) This is a massive social experiment.
Yeah. It is. It's the tricky bit in what I do. On the one hand the goal is to create a stunning visual design for Plasma Next, on the other the plan is to create a community of designers and make design a "thing" within Plasma and KDE and Open Source in general.
I want to change the way we look at people and stop dividing them into experts and "everyone else". I want to tear down those barriers and makes us all feel included, like we're a part (like I felt on the first sprint I was at). I want to change the way we handle design and this work is a test for that.
Why is it like that? Because I am old enough to know that failing is only really good when you fail miserably (that's when you learn things) and that sometimes you got to aim for the moon and skip the tree tops.
When I got into this I talked to some of the other designers who had worked on KDE projects and many of them where more or less burned out. They had worked themselves to the bone and then crashed due to it. I didn't feel like being another one AND I wanted to fix the issue permanently. So I went for the higher goal of it aware that it would mean more work for me personally and a higher risk of failing.

...
Not only so that we all started talking about design more constructively. Not just so everyone felt they could comment and be a part. Not only that there where hundreds of designers where yesterday there where one or two. Not only that.

But so that in the future there would be a model a system in which design would be created without the need for a petty expert-dictator who's presence was ever needed for the work to go forward. Where the load was shared by all. Where the work was more play than backbraking labour.

Maybe it will succeed, maybe it will fail - but if it does fail I think we can all agree that it will be a majestic catastrophe of a failure ;)

Next time I'll talk about the Design Vision (it won't be boring promise) what it is, how we intend to stick to it and where we are now in terms of design guidelines.

Categories: FLOSS Project Planets

Andrew Pollock: [life] Day 77: Port of Brisbane tour

Planet Debian - Tue, 2014-04-15 01:18

Sarah dropped Zoe around this morning at about 8:30am. She was still a bit feverish, but otherwise in good spirits, so I decided to stick with my plan for today, which was a tour of the Port of Brisbane.

Originally the plan had been to do it with Megan and her Dad, Jason, but Jason had some stuff to work on on his house, so I offered to take Megan with us to allow him more time to work on the house uninterrupted.

I was casting around for something to do to pass the time until Jason dropped Megan off at 10:30am, and I thought we could do some foot painting. We searched high and low for something I could use as a foot washing bucket, other than the mop bucket, which I didn't want to use because of potential chemical residue. I gave up because I couldn't anything suitable, and we watched a bit of TV instead.

Jason dropped Megan around, and we immediately jumped in the car and headed out to the Port. I missed the on ramp for the M4 from Lytton Road, and so we took the slightly longer Lytton Road route, which was fine, because we had plenty of time to kill.

The plan was to get there for about 11:30am, have lunch in the observation cafe on the top floor of the visitor's centre building, and then get on the tour bus at 12:30pm. We ended up arriving much earlier than 11:30am, so we looked around the foyer of the visitor's centre for a bit.

It was quite a nice building. The foyer area had some displays, but the most interesting thing (for the girls) was an interactive webcam of the shore bird roost across the street. There was a tablet where you could control the camera and zoom in and out on the birds roosting on a man-made island. That passed the time nicely. One of the staff also gave the girls Easter eggs as we arrived.

We went up to the cafe for lunch next. The view was quite good from the 7th floor. On one side you could look out over the bay, notably Saint Helena Island, and on the other side you got quite a good view of the port operations and the container park.

Lunch didn't take all that long, and the girls were getting a bit rowdy, running around the cafe, so we headed back downstairs to kill some more time looking at the shore birds with the webcam, and then we boarded the bus.

It was just the three of us and three other adults, which was good. The girls were pretty fidgety, and I don't think they got that much out of it. The tour didn't really go anywhere that you couldn't go yourself in your own car, but you did get running commentary from the driver, which made all the difference. The girls spent the first 5 minutes trying to figure out where his voice was coming from (he was wired up with a microphone).

The thing I found most interesting about the port operations was the amount of automation. There were three container terminals, and the two operated by DP World and Hutchinson Ports employed fully automated overhead cranes for moving containers around. Completely unmanned, they'd go pick a container from the stack and place it on a waiting truck below.

What I found even more fascinating was the Patrick terminal, which used fully automated straddle carriers, which would, completely autonomously move about the container park, pick up a container, and then move over to a waiting truck in the loading area and place it on the truck. There were 27 of these things moving around the container park at a fairly decent clip.

Of course the girls didn't really appreciate any of this, and half way through the tour Megan was busting to go to the toilet, despite going before we started the tour. I was worried about her having an accident before we got back, she didn't, so it was all good.

I'd say in terms of a successful excursion, I'd score it about a 4 out of 10, because the girls didn't really enjoy the bus tour all that much. I was hoping we'd see more ships, but there weren't many (if any) in port today. They did enjoy the overall outing. Megan spontaneously thanked me as we were leaving, which was sweet.

We picked up the blank cake I'd ordered from Woolworths on the way through on the way home, and then dropped Megan off. Zoe wanted to play, so we hung around for a little while before returning home.

Zoe watched a bit more TV while we waited for Sarah to pick her up. Her fever picked up a bit more in the afternoon, but she was still very perky.

Categories: FLOSS Project Planets

Bryan Pendleton: My trip to Korea: Bukchon and Namsangol

Planet Apache - Mon, 2014-04-14 22:02

One of the highlights of my visit to Seoul was seeing Bukchon and Namsangol.

On my first full day in Seoul, we went to Bukchon Hanok Village. This is a neighborhood in the Gwanghwamun area between the Gyeongbokgung Palace and the Changdeokgung Palace. Specifically, we visited the cluster of Hanoks that lies along Bukchon-ro 11-gil, which is reached by walking up Bukchon-ro from the Anguk subway station.

A Hanok is a traditional Korean wooden house.

The Hanoks in Bukchon are still actively occupied by residents, so what's really happening here is that you find yourself walking down quiet residential streets, admiring the beautiful houses on either side.

There is at least one museum and at least one cultural center in Bukchon. We briefly poked our heads inside the museum, which was nice, but we were in a hurry, sadly.

There are also a few Hanoks in Bukchon which are now guest houses, cafes, wine bars, and the like. They seemed tasteful enough to me, but I guess this increasing commercialism is controversial.

Bukchon is near some very nice areas, including Insa-Dong and Gwanghwamun Square, and generally is a really delightful place for an afternoon stroll. If you get up near the heights, the views are very good, too.

Later in my visit, near the end of it in fact, we stopped by another Hanok village, Namsangol.

Namsangol is different than Bukchon, as it is a collection of existing Hanoks from elsewhere in Seoul that were all moved to this one location, and were carefully restored within a park-like setting that is intended to be historically representative.

That is, Namsangol is a museum, not a place where people are actually living.

But, that being said, Namsangol is gorgeous! The park is very nicely landscaped, with a peaceful (man-made) creek running through it, and the buildings are all arranged elegantly, with nice sight lines to set them off and emphasize their architectural qualities.

There are lots of informative placques which explain what you are seeing, and for the most part you can wander all about and really get a good look at the buildings.

If time is short, and you can only pick one of the two villages, you can't really go wrong. Bukchon is more authentic, but Namsangol is prettier and more educational.

Instead of worrying about which village to pick, I'd suggest visiting whichever one you happen to be near:

  • If you happen to be visiting one of the palaces of Gyeongbokgung or Changdeokgung, then combine that with a visit to Bukchon, which is right next to either palace.
  • If you happen to be visiting Mt Namsan, or N Seoul Tower, or the Myeong-dong or Chungmuro areas, then combine that with a visit to Namsangol, which is close nearby.

Either way, you'll much enjoy your visit.

Categories: FLOSS Project Planets

Dirk Eddelbuettel: BH release 1.54.0-2

Planet Debian - Mon, 2014-04-14 21:47
Yesterday's release of RcppBDT 0.2.3 lead to an odd build error. If one used at the same time a 32-bit OS, a compiler as recent as g++ 4.7 and the Boost 1.54.0 headers (directly or via the BH package) then the file lexical_cast.hpp barked and failed to compile for lack of an 128-bit integer (which is not a surprise on a 32-bit OS).

After looking at this for a bit, and looking at some related bug report, I came up with a simple fix (which I mentioned in an update to the RcppBDT 0.2.3 release post). Sleeping over it, and comparing to the Boost 1.55 file, showed that the hunch was right, and I have since made a new release 1.54.0-2 of the BH package which contains the fix.

Changes in version 1.54.0-2 (2014-04-14)
  • Bug fix to lexical_cast.hpp which now uses the test for INT128 which the rest of Boost uses, consistent with Boost 1.55 too.

Courtesy of CRANberries, there is also a diffstat report for the most recent release.

Comments and suggestions are welcome via the mailing list or issue tracker at the GitHub repo.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

Categories: FLOSS Project Planets
Syndicate content