FLOSS Project Planets

Joe Brockmeier: Sharing Apache’s Goodness: How We Should be Telling Apache’s Story

Planet Apache - Mon, 2014-11-24 09:16

The Apache Software Foundation (ASF) gets many things right: its governance model for open source development has served hundreds of projects well. The Apache Software License (ASL) is one of the most successful open source licenses, well-liked by many contributors. But the ASF is not perfect, and it has a few areas where serious improvement is needed.

One of the areas is promoting the ASF and its Top-Level Projects (TlPs). The ASF has more than 150 TLPs, but the odds are most people in the tech industry have only heard of a few of them. The ASF itself is fairly conservative about telling its own story, and most of its TLPs are content to send out the occasional release announcement to their announce@ mailing list – with the barest of details, usually not even noting what the project does – and with no effort to reach out to the larger community via social media or by pitching press. (A wire release is not the same as actually pitching most tech press.)

Why It Matters

What’s the point in making software and then not telling anyone about it? It’s rare indeed for a project to be so mind-bogglingly good and relevant to users immediate needs that word-of-mouth alone can carry it to the full audience that would benefit from it. And, possibly, contribute to it.

It’s the contribute to it that really interests me. You see, Apache is voluunteers. Oh, sure, people get paid to work on Apache projects – but not by Apache. They get paid by IBM, Citrix, SUSE, Red Hat, Microsoft, and hundreds of other companies. Which means that when their $dayjob means not working on Apache software, they almost inevitably slow down contributions – if not stop entirely.

Volunteer contributions ebb and flow. The contributor who put in the most patches for the last release may not have time when she finishes her university studies and has to get a full-time job. The release manager for the current release is going to run out of time in a few weeks when he moves to a new job that doesn’t have anything to do with Apache software. The best contributor you’ve ever had hasn’t sent in a single patch yet, because she’s never heard of your project. You get the point – you need new users to become new contributors to become new committers to become PMC members, and eventually ASF members.

It also matters when it comes to finding donations for the foundation. Apache keeps growing, and the needs of its projects continue to grow. A few years ago a few mailing lists, a Subversion repository, and a Web site were enough to call it good. Now projects want Jenkins, code signing, git repositories (and migrations from Subversion), etc. Storage requirements grow every day. The number of commits grows every day. The number of tickets to Apache Infra – which is not entirely staffed by volunteers – will also increase.

It also matters because Apache does not only need to attract more contributors, but more diverse contributors. That’s a lot more than just publicity, but it’s an important consideration here.

Finally, we need to be promoting The Apache Way rather than becoming complacent. “Open source” (for certain values of “open source”) may have “won,” but The Apache Way certainly hasn’t. Throwing code over the wall on GitHub is no way to grow a community. There’s a lot more to it than that, which projects tend to find if they gather any sort of popularity and start hitting growing pains.

ASF Services

Apache provides quite a few services, including some press/marketing help – but we have one contractor for the ASF’s 150+ projects.

We need to think about how we assist projects in promoting themselves and the foundation.

Another problem: Right now, most of the ASF’s projects are silos. There’s damn little communication between projects, with some notable exceptions (e.g. the Hadoop family of projects). Sure, the ASF members from various projects communicate on some of the private lists, but there’s damn little collaboration between PMCs and committers.

We can do better, and we need to do better.

Marketing@Apache.org

One of the top things we need to do as a foundation is start focusing on publicity overall, and that means actually communicating. Right now, only three of the 150+ TLPs have a marketing list: CouchDB, CloudStack, OpenOffice. I’d wager than only a few actually recognize non-code contributions like marketing assistance as “merit” towards becoming a committern/PMC member.

A few weeks ago, I asked Infra to create a marketing@apache mailing list. There’s a press@ mailing list, but it’s private – only for folks working on marketing for the foundation, or members who’d like to join.

Press@ is needed for things that should be confidential, but there’s a whole host of conversations that can happen in the open. My hope is that folks interested in promoting Apache projects will join and start talking about how their projects can improve their promotional efforts and how projects can work together.

I also have a lot of ideas and suggestions how projects can improve their promotional efforts, but I’ll save that for another post later this week.

The slides from my talk at ApacheCon Europe are below. Have comments? Ping me on Twitter @jzb, or send me a note to my Apache.org email (also “jzb”).

Sharing Apache’s Goodness: How We Should be Telling Apache’s Story from Joe Brockmeier
Categories: FLOSS Project Planets

Mike Driscoll: PyDev of the Week: Carl Trachte

Planet Python - Mon, 2014-11-24 08:30

This week we have Carl Trachte joining us as our PyDev of the Week. Let’s spend some time getting to know our fellow Python programmer!

Can you tell us a little about yourself (hobbies, education, etc):

I’m a geologist for the mining industry by trade. My undergrad was at Delaware. After a short 4 year stint in the Navy, I did my grad degree at Washington State. 

I like some crafts like pysanky and riding my unicycles. OpenBSD is the operating system I use on my laptop at home. Some of my time I spend trying to get a better handle on Unix and it’s tools.


Why did you start using Python?

The mine planning software vendor Mintec (Now MineSight/Hexagon) who supported the mine started using Python as their API around the 1999 to 2001 timeframe. I had been starting to script in VBA and VB6 prior to that. Python was easier and more powerful.

 

What other programming languages do you know and which is your favorite?

SQL, Java, and VBA/VB6/C#/VB.net are the only other ones I’ve used professionally, and of those, SQL, Java, and VBA are the only ones I’d say I “know.”

I’ve read books and taken courses in FORTRAN, LISP, C, JavaScript, and Perl. Really, I’m a dilettante. If I could choose a favorite it would be C, not because it’s fun, but because programming in it leads to a much deeper understanding of what’s going on inside the machine while it crunches your code. The C course I took through Univ. of Washington online just about killed me, but it was essential to any success I’ve had since.

Stuff I take for granted now – compartmentalizing functionality, recognizing ASCII characters as specific integers, integer overflow, the concept of a pointer, how structures are stored in memory and which ones are more efficient – all those things were the result of that painful C course experience, and they come up again and again in my jobs!


What projects are you working on now?

I’ve been doing a mine geologic 3D block model reconciliation for about three years now. It’s a grind, but along the way I’ve found all kinds of ways to streamline the process and optimize the precision and accuracy of it with code. The person doing the reconciliation and reporting on it will never win a popularity contest, but if you like working with data, geometry, and relational data, it’s a fun problem.

At home I keep working on getting my little OpenBSD Thinkpad just the way I want it. I overwrote my last Windows install with OpenBSD about six months ago, so it’s a Unix household. Jen-bear the dachshund approves. :-\

 

Which Python libraries are your favorite (core or 3rd party)?

3rd party: Polygon (http://www.j-raedler.de/projects/polygon/) – it’s been around forever. If you need to roll your own GIS, open pit mine maps, etc., it’s pretty sweet for point-in-polygon and polygon intersection problems. I haven’t used it in a while, but it made my life easier when I had to, and its author has really stuck with maintenance (it’s Python 3 compatible IIRC).

JTS (http://www.vividsolutions.com/jts/JTSHome.htm) (actually, this is Java that works with jython, although I think there’s a JTS inspired Python library now) – another geometry library. Yes, you could roll your own voronoi diagram closed polygon generator, but this is so much nicer.

Core: collections.OrderedDict. I use dictionaries a lot in my code, more than I use classes or lists, for processing information and keeping a list of constants (file paths, file names, etc.). It could be that a lot of my code is just one big anti-pattern, but this feature cleans up and de-crufts my code considerably. I have come to rely on it.

 

Is there anything else you’d like to say?

I belong to the “everyone should know something about coding” camp. Even though I’ve spent most of my professional life in a traditionally (note that I said “traditionally”, not necessarily currently) brute force, non-technical industry like mining, there was no way to escape having to analyze a lot of data all the time. Coding made me more effective at my job and made most tasks more interesting. Open Source software is readily available for a lot of tasks (note the geometry libraries I mentioned above). I wasn’t aware of this when I started out (all I knew was the Excel spreadsheet and then VBA).

Unfortunately I’m a pretty lousy salesperson for the craft. About ten or fifteen years ago I was encouraging a co-worker at the mine, “Marcia, you’re smart, and you know <the job> inside and out, why don’t you learn Python?” Her: “Because then I’d have a sorry ass attitude like you.” :-\ We do the best we can. CBT

Thank You!

Previous PyDevs of the Week
Categories: FLOSS Project Planets

Luke Plant: Handling Django's get_query_set rename is hard

Planet Python - Mon, 2014-11-24 08:07

Handling the rename of get_query_set to get_queryset in Django 1.6 is very tricky - much trickier than it might seem.

For many 3rd party libraries, you will have a few aims:

  1. Maintain compatibility with older Django versions, and older projects (including libraries) that might call your code, or subclass it.
  2. Update your code to be compatible with latest versions of Django
  3. Stop getting warnings when running your code/tests. Warnings you've already addressed are a pain, as they drown out the ones you haven't addressed.

Subclassing makes this much, much harder.

Suppose you have:

class FooManager(models.Manager): def active(self): return self.get_query_set().filter(active=True) def get_query_set(self): return FooQuerySet(model=self.model)

How do you update this code?

The tricky bit is that you need to consider a class that subclasses FooManager, which you don't control. That code might not be updated yet.

A very important example is the RelatedManager class in Django, which dynamically subclasses the default manager on a model to provide access to related objects. You use this all the time, in ORM calls like person.schools.all() — roughly speaking schools returns a dynamic subclass of School.objects. In Django 1.5, this subclass overrides the get_query_set method so that it calls super.get_query_set (e.g. School.objects.get_query_set) and then adds some filters to limit to the particular related object it is attached to.

You certainly need compatibility with this if you want to still support Django 1.5. But there could be other examples of things that subclass FooManager explicitly and are outside your control. Let's represent all these subclasses as follows:

class FooManagerSubClass(FooManager): def get_query_set(self): return super(FooManagerSubClass, self).get_query_set().order_by('bar')

Now, imagine an instance of FooManagerSubClass, and calling the active method on it. The call look like:

FooManager.active -> FooManagerSubClass.get_query_set -> FooManager.get_query_set

So all the defined behaviours combine as they should.

Now you come to update FooManager so that it will still work with Django 1.5, but works on Django 1.6 and later without issuing warnings if everyone is using get_queryset.

How should you rewrite it?

First pass:

class FooManager(models.Manager): def get_queryset(self): return FooQuerySet(model=self.model) get_query_set = get_queryset # Django 1.5 compat def active(self): return self.get_queryset().filter(active=True)

This looks correct, but FooManagerSubClass().active() is now broken, because calling it runs:

FooManager.active -> FooManager.get_queryset

— that is, it misses out FooManagerSubClass.get_query_set, because active is calling get_queryset, and the subclass knows nothing about that, it's only overridden the get_query_set method.

(This type of failure is particularly nasty, because the failure is silent. It applies to related managers, which are going to be broken in a nasty way - they no longer have filtering applied, so person.schools.all() returns all schools, not just the ones related to person. And you probably won't have an explicit unit test for this).

So, now you need something like this:

class FooManager(models.Manager): def get_queryset(self): return FooQuerySet(model=self.model) get_query_set = get_queryset def active(self): m = (self.get_query_set if hasattr(self, 'get_query_set') else self.get_queryset) return m().filter(active=True)

But now you now get warnings emitted when active() is called in some cases, even on Django 1.6 and later - in particular, you get it when you call it via a RelatedManager on Django 1.6 and later, due to the way that Django sticks get_query_set wrappers on manager subclasses that don't define get_query_set explicitly (such as RelatedManager) - via RenamedMethodsBase.

Also, if you reverse the conditional so that get_queryset is called in preference to get_query_set, then active() breaks as above, so you can't do that.

This is trickier than it seems!

Due to the subclassing issue, I can't find a way, even with modifying Django's behaviour, to satisfy all the constraints, at least if you want warnings to be emitted when they need to be, and silenced when you've fixed your code. I've updated the Django docs to my best ideas so far.

Categories: FLOSS Project Planets

Web Omelette: Drupal update hooks with multiple passes

Planet Drupal - Mon, 2014-11-24 08:05

If you do a lot of Drupal development and need to deploy configuration I am sure that you are using update hooks to some extent at least. If you don't use Features and want to create a taxonomy vocabulary or something in code, the hook_update_N() hook is the way to go.

But have you ever needed to perform an update the size of which would exceed PHP's maximum execution time? If you need to create 1000 entities (let's just say as an example), it's not a good idea to trust that the production server will not max out and leave you hanging in the middle of a deploy. So what's the solution?

You can use the batch capability of the update hook. If you were wondering what the &$sandbox argument is for, it's just for that. You use it for two things mainly:

  • store data required for your operations across multiple passes (since it is passed by reference the values remain)
  • tell Drupal when it should stop the process by setting the $sandbox['#finished'] value to 1.

Let me show you how this works. Let's say we want to create a vocabulary and a bunch of taxonomy terms with names from a big array. We want to break this array into chunks and create the terms one chunk at the time so as to avoid the load on the server.

So here is how you do it:

/** * Create all the terms */ function my_module_update_7001(&$sandbox) { $names = array( 'Fiona', 'Jesse', 'Michael', ... 'Sam', 'Nate', ); if (!isset($sandbox['progress'])) { $sandbox['progress'] = 0; $sandbox['limit'] = 5; $sandbox['max'] = count($names); // Create the vocabulary $vocab = (object) array( 'name' => 'Names', 'description' => 'My name vocabulary.', 'machine_name' => 'names_vocabulary', ); taxonomy_vocabulary_save($vocab); $sandbox['vocab'] = taxonomy_vocabulary_machine_name_load('names_vocabulary'); } // Create the terms $chunk = array_slice($names, $sandbox['progress'], $sandbox['limit']); if (!empty($chunk)) { foreach ($chunk as $key => $name) { $term = (object) array( 'name' => $name, 'description' => 'The name is: ' . $name, 'vid' => $sandbox['vocab']->vid, ); taxonomy_term_save($term); $sandbox['progress']++; } } $sandbox['#finished'] = ($sandbox['progress'] / $sandbox['max']); }

So what happens here? First, we are dealing with an array of names (can anybody recognise them by the way?) Then we basically see if we are at the first pass by checking if we had set already the progress key in $sandbox. If we are at the first pass, we set some defaults: a limit of 5 terms per pass out of a total of count($names). Additionally, we create the vocabulary and store it as a loaded object in the sandbox as well (because we need its id for creating the terms).

Then, regardless of the pass we are on, we take a chunk out of the names always offset by the progress of the operation. And with each term created, we increment this progress by one (so with each chunk, the progress increases by 5) and of course create the terms. At the very end, we keep setting the value of $sandbox['#finished'] to the ratio of progress per total. Meaning that with each pass, this value increases from an original of 0 to a maximum of 1 (at which point Drupal knows it needs to stop calling the hook).

And like this, we save a bunch of terms without worrying that PHP will time out or the server will be overloaded. Drupal will keep calling the hook as many times as needed. And depending on the operation, you can set your own sensible chunk sizes.

Hope this helps.

var switchTo5x = true;stLight.options({"publisher":"dr-8de6c3c4-3462-9715-caaf-ce2c161a50c"});
Categories: FLOSS Project Planets

Season of KDE

Planet KDE - Mon, 2014-11-24 07:19

Season of KDE is an outreach program hosted by KDE community. It is a similar program like “Google Summer of Code”. The current round of Season of Code started in October and hope to go until January.

I am selected for Season of KDE with the project “Theme Designing for Pairs”. My mentor is Heena Mahour. Pairs is a KDE educational project focused on preschool children. It helps stimulating memory and logic skills of children. My project will cover the following aspects of “Pairs”.

  • Creating and adding new themes
  • Improve documentation
  • Re factor code base

When I found about SoK, I was looking for opportunities to contribute to open source community. My skills in creativity, technical documentation will help me to achieve the expected results very easily.


Filed under: KDE Tagged: KDE, KDE edu, Open Source Student Opportunities, Pairs, Season of KDE, SoK
Categories: FLOSS Project Planets

Another Drop in the Drupal Sea: R.O.O.S.T.S. && Women in Tech

Planet Drupal - Mon, 2014-11-24 06:57

There was a session at BADCamp this year asking how Men can be better allies for Women in tech. The panelists had experiences with males that ranged from helpful, to innocently bungled, to outright demeaning. There was a small amount of suggestions about what men can do to be better allies.

read more

Categories: FLOSS Project Planets

Hello world post

Planet KDE - Mon, 2014-11-24 06:05

This blog was created by force :)

I thought a long time before doing this. I had several personal pages before, but all ended with the failure. I cannot say that I’m very good programmer, but my writing skill is many times worse than my programming.

Okay, from the next month The Season of KDE will start. Previously I have made a patch that port Python 2 backend for Cantor to Python 3. After a brief review Filipe Saraiva proposed me to continue working on it and port it to KDE Frameworks 5 as a part of the SoK. Therefore, I have to write at least one post a month about it according to the rules (Otherwise I will not receive a fashionable T-Shirt! :) ).

That’s all.

Categories: FLOSS Project Planets

James Strachan: More blog posts now coming on Medium...

Planet Apache - Mon, 2014-11-24 05:53
I've started posting new blog posts on my medium account instead as its got a much nicer writing experience and looks much neater. e.g.



So please follow me on https://medium.com/@jstrachan or on twitter (@jstrachan). Feedback always appreciated. Cheers!
Categories: FLOSS Project Planets

Memorable Quotes – Part 4

LinuxPlanet - Mon, 2014-11-24 05:18
A follow on from: http://dtbnguyen.blogspot.com.au/2013/07/memorable-quotes-part-3.html
- Alan Shore: My, uh, best friend has Alzheimer's, in the, uh, very early stages, it hasn't... He is a grand lover of life, and will be for some time. I believe even when his mind starts to really go, he'll still fish he'll laugh and love, and as it progresses he'll still want to live because there will be value for him, in a friendship, in a cigar... The truth is I don't think he will ever come to me and say, this is the day I want to die, but the day is coming and he won't know it... This is perhaps the, the most insidious thing about Alzheimer's... but you see he trusts me to know when that day has arrive, he trusts me... to safe guard his dignity, his legacy, and self respect. He trusts me to prevent his end from becoming a mindless piece of mush and I will. It will be an unbearably painful... thing for me, but I will do it, because I love him. I will end his suffering, because it is the only decent humane and loving thing a person can do.
http://www.imdb.com/title/tt0993804/quotes
- "We are strategic but we stop at number crunching, we plan but we don't over manage, we inspire but we don't preach, we code but we're not monkeys."
http://www.seek.com.au/Job/calling-all-super-powered-geeks-to-enlist-in-the-fight-against-corporates/in/sydney-sydney/22545415 - It was either Otto von Bismarck or Claud Cockburn who said, "Never believe anything until it has been officially denied." Whoever it was, and the internet seems a little confused on the matter, they were on to something.
http://www.smh.com.au/business/intelligent-investor/australias-most-overpaid-ceo-20130513-2jhmv.html - "Change is a big word that everyone is using. (United States President Barack) Obama uses it, but you have to actually feel it."
http://au.news.yahoo.com/thewest/a/-/world/17135873/adrian-cheng-updating-a-hong-kong-family-empire-for-a-changing-china/
- Sandschneider agrees that personal relations have an impact on political relations: "International politics is not a dehumanized process. It is about people coming together. And it is true that it is easier for two people who get along well to negotiate and solve problems than two people who can't stand each other."
http://www.dw.de/germany-is-first-on-lis-eu-list/a-16834332
- "Skeptics don't make history"
http://www.washingtonpost.com/world/africa/kerry-says-us-drone-program-strict-fair/2013/05/26/80058422-c615-11e2-9cd9-3b9a22a4000a_story.html?tid=pm_world_pop
- "Germany won," said Glasman at the debate. "We have a Champions League final between two supporter-owned and democratically governed football clubs. Tradition and the preservation of institutional virtue are a source of energy and modernisation precisely because change and continuity work together; a balance of power is the best system; a negotiated settlement is better than one that is imposed, the domination of any interest violates the demand of what is good; the discovery of the common good between forces that are estranged is the best good of all. It takes longer to get there but the benefits are more enduring."
http://www.guardian.co.uk/world/2013/jun/01/germany-champion-europe- Secondly, for web site owners. Assume the entire world is out to get you. All of it; and everyone living there. It's easier that way! Do whatever you feel necessary to keep your name out of the press. Then do everything that isn't necessary, because it may-well prove to be necessary in the future. And if you're not sure what I mean, get advice, urgently.
http://www.itwire.com/business-it-news/security/58893-abc-web-site-hacked-by-opponent-to-geert-wilders- In his seminal 1931 book, Equality, R H Tawney lamented that the public did not seem resentful of the rich so much as fascinated by their goings-on. Little has changed. For most Brits, stupendous wealth has always been something that is aspired to more than resented. The post-crash fuss about the 1 per cent often seemed to be a civil dispute between its members: well-heeled activists, journalists and union chiefs castigating those who nabbed the best tables in restaurants or pushed up prices of Tuscan villas. And as successive prime ministers have realised, no government anywhere has helped the low-paid by railing against high wages.

The rich, to adapt Jesus in St Matthew's Gospel, will always be with us; the 1 per cent are likely to pull ever further away. But this has its compensations. The lower-paid half of the British populace have never had to pay a smaller share of income tax than today, because the wealthy have never forked out more. And while there is not much David Cameron can do about the rich, there is still plenty he can do about the poor. He doesn't shout about it. But he has rightly concluded that this is where his attention is best focused.
http://www.telegraph.co.uk/finance/globalbusiness/10202546/Dont-blame-the-best-paid-1per-cent-theyre-worth-it.html- "The problem is not ammunition, it's experience," one said, adding: "If we were fighting Americans we would all have been killed by now. They would have killed us with their drone without even needing to send a tank.

"The rebels are brave but they don't even know the difference between a Kalashnikov bullet and a sniper bullet. That weakens the morale of the men," he said.
http://zeenews.india.com/news/world/syria-iraq-yemen-and-afghan-jihadists-join-war-against-assad_801575.html- Obama said that "at a time when anyone with a cellphone can spread offensive views around the world with the click of a button," the notion that governments can control the flow of information is obsolete.Obama said that "at a time when anyone with a cellphone can spread offensive views around the world with the click of a button," the notion that governments can control the flow of information is obsolete.
http://www.skynews.com.au/topstories/article.aspx?id=799117- Only about 1 in 1,000 Web readers clicks on the average display ad. On Facebook, that number is closer to 1 in 2,000, according to Webtrends. Even ads sent by unsolicited postal mail generate a response rate that is many times higher, according to published industry numbers.
http://www.latimes.com/business/la-fi-facebook-display-ads-20120525,0,4871607.story
- Famous night owls include Winston Churchill, President Obama, Charles Darwin, James Joyce, Marcel Proust, Keith Richards and Elvis Presley. Famous early risers include Napoleon, Ernest Hemingway and George W. Bush.

Professor Jim Horne, of Loughborough University, said: "Evening types tend to be the more extrovert creative types, the poets, artists and inventors, while the morning types are the deducers, as often seen with civil servants and accountants.
http://www.theglobeandmail.com/life/the-hot-button/like-staying-up-late-you-may-be-narcissistic/article13495020/comments/- Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed.
This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter with a half-million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. . . . This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron.[1][4]
http://en.wikipedia.org/wiki/Chance_for_Peace_speech
- Decades of reform. Globalisation, and the global financial crisis. The uncertainties of the post-September 11 world. Eric Knight: "Those circumstances are ripe for misinterpretation, for populist interpretation, interpretation that focuses on the surface of things and often misses the deeper logic of what's happening."
http://www.smh.com.au/opinion/political-news/history-repeats-20120504-1y4ki.html- "Falling in love is very real, but I used to shake my head when people talked about soul mates, poor deluded individuals grasping at some supernatural ideal not intended for mortals but sounded pretty in a poetry book. Then, we met, and everything changed, the cynic has become the converted, the sceptic, an ardent zealot."E.A. Bucchianeri, Brushstrokes of a Gadfly
http://www.goodreads.com/quotes/tag/falling-in-love
- "No one ever fell in love gracefully."Connie Brockway, The Bridal Season
http://www.goodreads.com/quotes/tag/falling-in-love
- "Have you ever longed for someone so much, so deeply that you thought you would die? That your heart would just stop beating? I am longing now, but for whom I don't know. My whole body craves to be held. I am desperate to love and be loved. I want my mind to float into another's. I want to be set free from despair by the love I feel for another. I want to be physically part of someone else. I want to be joined. I want to be open and free to explore every part of them, as though I were exploring myself."Tracey Emin, Strangeland
http://www.goodreads.com/quotes/tag/heartbroken - "Martin's dream is a vision not yet to be realized, a dream yet unfilled, and we have much to do before we can celebrate the dream as reality, as the suppression of voting rights and horrific violence...has so painfully demonstrated."
http://online.wsj.com/article/SB10001424127887324591204579039772530945520.html
- Love is more easily experienced than defined. As a theological virtue, by which we love God above all things and our neighbours as ourselves for his sake, it seems remote until we encounter it enfleshed, so to say, in the life of another - in acts of kindness, generosity and self-sacrifice. Love's the one thing that can never hurt anyone, although it may cost dearly. The paradox of love is that it is supremely free yet attaches us with bonds stronger than death. It cannot be bought or sold; there is nothing it cannot face; love is life's greatest blessing.
http://www.theguardian.com/commentisfree/2012/dec/13/what-is-love-five-theories
Categories: FLOSS Project Planets

Make Foresight to ask continue with update? [Y/n]

LinuxPlanet - Mon, 2014-11-24 04:22

From scratch, you won’t get the question when installing/updating/removing applications. That need to be enabled in your system. It will assume you want to do the action and do it. To make it ask first, you need to open a file and add a setting for it. To do it, follow this guide:

sudo gedit /etc/conaryrc

Add this line on a new row:

interactive True

Save the file, now it will ask like you see below.

 

[tforsman@tforsman ~]$ sudo conary install chromium
[sudo] password for tforsman:
The following updates will be performed:
Install chromium(:rpm)=39.0.2171.65_1.el7.centos-1-1
continue with update? [Y/n]

 

Categories: FLOSS Project Planets

SoK : UPnP Support in PMC progress report

Planet KDE - Mon, 2014-11-24 01:14
Well, it's been a great experience working on an awesome project Plasma Media Center. Till now I have learnt a lot of things, from which using C library in C++ using wrappers is the one I really like the most.
As PMC is being ported to Plasma 5, it would be worthless merging it in qt4 based branch of PMC. So, I am making standalone app based on Qt5 and would merge it later on once it gets ported completely.

I have used GUPnP library for this as it is the best and most stable library available to implement UPnP. I have used gupnp-tools as the reference. Till Now I have successfully finished the very first step of my project, i.e. show up the files of the MediaServer. I am able to browse the files on the Media Server successfully and that media is accessible over HTTP protocol using the URLs which is terminal output.
Here's the screen shots of the working application :



In the root of the tree in application, there's Device name being shown up in the first column and respective IDs in the other column. So, we can expand it down and browse the files further present on the media server. As we keep expanding it down, we will be getting URLs of all the audio, video, image and text files of those directories as the output on the terminal.

As I have got the URLs of the media, now I just have to pass those URLs to the existing PMC backend which would automatically be opening up the media file over the HTTP protocol, process up the metadata and shows all the controls like play, pause etc. But as I have said previously, I would be doing that integrating in PMC stuff later on.
If you wanna try it out, you can get the sources from here.

What's Next :
Now I am gonna work on implementation of Media Server in PMC using the same library. Using that, the user would be able to play the media files from PMC to any other device. I am using some boilerplate code from here which includes some of the examples of UPnP Standard Services like ContentDirectory, ConnectionManager and AVTransport.

Season of KDE participants are required to blog about the work progress report but I am really kinda lazy in that and this is my first blog post I have ever made in my life :p

At last I would like to thank my mentors Shantanu and Bhushan, who helped me in each and every problem where I got stuck.
Categories: FLOSS Project Planets

BlackMesh: Strategies for businesses investing (in Drupal 8) through giving their employees Drupal contribution time

Planet Drupal - Mon, 2014-11-24 00:00

By Cathy Theys, with help from xjm, Michael Schmid, and Donna Benjamin.

Preface

The target audience of this post is decision makers in businesses that are deciding if and how their employees might work on Drupal 8 in a way that helps Drupal 8 be released faster. There are benefits to the individuals and the company from every kind of contribution, even if it does not match the recommendations in this post.

Do not let anything hold you back. Just doing it is better than not doing it at all. Contribution does not have to be perfect. Drupal is great at helping people get involved at whatever level they want to be involved.

See these great resources to help you get started:

People will be helpful and supportive.

Contributing

There are lots of ways that businesses invest in Drupal. Some sponsor events like Drupal camps or DrupalCons. Some help fund travel for key contributors to attend sprints (hearing about the need via word of mouth or an employee who knows of someone in need and brings it to their employer's attention). Some host sprints in their offices. Some have Drupal Association memberships, are Drupal Association Supporting Partners, or join contribution alliances like Large Scale Drupal. Some produce training or documentation. Some contribute funding directly to community members working on a specific project. Some give money to teams or individuals via Drupal Gratipay.

Companies paying their employees to contribute

Some businesses are giving their employees contribution time or are hiring people specifically to contribute.

This post covers some ideas to make employee paid contribution time an even more effective investment, especially when companies want to help with getting Drupal 8 released.

Types of Contribution

Strategies in this post can apply in general to contributing:

  • to any open source project,
  • to a Drupal project, module, theme, distribution,
  • to Drupal core,
  • to Drupal.org infrastructure or testbot (Continuous Integration aka Drupal.org CI 2.0),
  • on the security team
  • by planning an event like DrupalCon, a Drupal camp, or a sprint,
  • by preparing talks or trainings for Drupal events,
  • at a meta level by working in a governance group like the DA board or a Drupal Working Group,
  • to Drupal.org improvements like issue queue workflow, profiles, landing page content, or
  • by building, maintaining, or sponsoring outside tools (like simplytest.me or Drupical).

Drupal is constantly improving its recognition and definition of contribution to include: organizing, communicating, fundraising, testing, documenting, mentoring, designing, architecting, reviewing, and coding.

A particular interest to me is contributing to Drupal 8 and helping it get released sooner. (It is of interest to some businesses too :) which is what inspired this post.)

Contributing to Drupal 8 release

The Drupal 8 branch of the codebase was opened for development in early 2011. The first Drupal 8 beta was released October 1 2014. There are 125 Drupal 8 critical issues (some complex, some straightforward). A Drupal 8 release candidate will be tagged when there are zero critical issues, and once subsequent critical issues are resolved, one such release candidate will become the 8.0.0 release. There will be much rejoicing. (Check the Release cycle page on Drupal.org for up-to-date release cycle information.)

What is really needed to help Drupal 8 get released?

  • Reviewing
    Lack of quality reviews is the biggest problem we have. People get good at giving quality reviews first by just reviewing. Their review skills will get better over time.
  • Keeping critical issue summaries clear and up-to-date
    This is not easy busy work; this is much appreciated and important. Some issues will not be committed without an accurate summary. Summaries help people get involved with, stay involved in, and review issues.
  • Adopting issues
    An issue can have a working patch, but that is not sufficient to get it committed. Sometimes an issue needs someone to adopt it and not give up until it is marked fixed and committed. This person becomes familiar with the issue, and checks in on it to see what it needs: maybe a re-roll, maybe an issue summary update, maybe track down a particular person whose feedback is needed, … they pay attention to the issue and help it get whatever it needs so that issue gets committed.
  • Focusing on development milestones and release blockers
    Unblocking the beta-to-beta upgrade path will enable more early adopters to begin investing resources in Drupal 8. Work on upgrade path issues, other critical Drupal 8 issues which block release, and release-blocking changes to Drupal.org is the most direct way to accelerate the release itself.
  • Paying attention to Drupal 8 news and priorities
    Reading Drupal 8 updates is a good way to stay up-to-date.
Benefits of Contribution

What benefits would a company be looking for?

  • A quicker release of Drupal 8 means your organization can use all of Drupal 8's improvements for real projects, as well as drive growth in Drupal-related businesses (like Drupal hosting and training).
  • Employees with expertise in Drupal 8.
  • Employees with better skills. (Employees will interact with a huge community of experts, and learn from them.)
  • Employees with more skills. All Drupal 8 issues have to pass core gates in: documentation, accessibility, usability, performance, and testing. People who work on core issues learn about those areas.
  • Employees with even more skills. Working with the community builds other valuable skills, that are not strictly about technology, applicable to internal processes as well as to client work.
  • Saving money on training. Businesses just have to pay for one side of the "training", for their employee time. They do not have to pay for the trainer time like they would for on-site training, or pay for training classes for their employees to attend.
  • Making connections with possible future additional employees.
  • Raising the company's profile, brand recognition, and appeal. (See Dries's DrupalCon Amsterdam Keynote on contribution recognition.)
  • Steering the future of Drupal in ways that align with the company and the community.
Strategies for businesses investing in getting Drupal 8 released sooner through giving their employees Drupal contribution time Reduce ramp-up time.

Sometimes people who are experts at their job, in a certain area, can feel ineffective or inefficient while contributing. Before telling everyone "Go contribute", businesses can:

  • consult with an experienced contributor or mentor for advice on structuring your contribution policies or program ,
  • share resources with employees about how to contribute,
  • get employees tools that might help for contributing (they maybe not the same tools necessary for their job), and/or
  • have employees attend a sprint that has mentoring for new contributors, or work with experienced contributors and mentors online in #drupal-contribute in IRC, in #drupal during core mentoring hours, or arrange for an experienced contributor or mentor to hold an event onsite (or virtually) for employees.
Reduce pressure to work on client or internal deadlines.

Not every employee will be interested in spending work time on contribution. Instructing all employees to contribute may not have the best results.

For example, if a company schedules certain time for contribution, say the last Friday of the month, for all employees to optionally spend the day contributing, some people will want to spend that time on client work, or internal projects, maybe because of a deadline, or maybe just because they do not want to contribute that day. People who want to contribute during the scheduled time will see their co-workers working on work projects and feel pressure to also not contribute.

Something that can overcome this, is letting people who want to contribute, contribute during off time, so they are still working while the rest of their team is. They can keep track of their contribution time, and later exchange it for scheduled vacation or professional develop time going to conferences or training.

Consolidate time.

The following strategies center around an idea: Concentrate your resources.

Let's take an example: a business who has 10 employees that is thinking about giving each person 4 hours of contribution time every week (10% time), or having one day a month where everyone contributes (5% time).

4 hours a week, or one day a month is not enough to work on a complicated issue. The time would start with reading any new comments on an issue, maybe changing local environment (requirements are different for Drupal 8 compared to Drupal 7), seeing if any changes in the code base effect the issue, maybe verifying the problem still exists, … thinking, trying ideas, maybe there would be enough time to implement them, and post back to the issue, update the issue summary as needed and explain what was changed and why in a comment, but more likely, there would not be enough time. It depends on the complexity of the problem.

There are things that a person can do with 4 hours a week that are helpful contributions. There are even things on issues blocking Drupal 8 release that people could do… but there are things where after 4 hours, a person is just understanding enough to get started ... and then they are out of time, and have to wait till next week. Where they might need to spend the 4 hours getting back up to speed again.

Consolidate by saving up contribution time.

If employees have 4 hours a week contribution time, let them save it up for a couple months, and then use it in a chunk. For example, if someone does not contribute for 2 months, they could then have 36 hours of contribution time they could save up and take a (almost) full week to tackle a complicated problem, or tackle a bunch of not quite so complicated issues, without having the overhead of ramping up and context switching.

Consolidate by giving fewer people more contribution time.

Instead of 10 people contributing 4 hours a week, pick 2 people from those that that want to contribute, give them each 20 hours a week.

With 20 hours a week, there is time to work on a complex problem, and also respond to feedback quickly. This reduces the overhead of needing to come back up to speed, context switching, or rebasing on a code base that has changed a lot.

With more consecutive time, people can concentrate on more complex problems, and stay up to date better, with less overhead. We can take that even further...

Focus long-term.

If instead of 10 people contributing 4 hours a week, you have 2 people contributing 20 hours a week, let them plan to do that for a few months.

Some issues need someone to look after them, week after week, to see the issue through to completion.

When someone shows they can make a reliable and ongoing contribution to the project, other experienced contributors, or project leaders will invest more into bringing that person up to speed and helping them get things done.

Give people 3-4 months where they can plan on contributing.

Rotate.

After a few months, bring an employee back to full time client billable hours. And give another employee a turn to concentrate on contributing for 3-4 months.

Employees learn so much while contributing. Returning to focus on client projects or in-house work with their team is an opportunity to share that learning with everyone in the company. The company benefits from the improved skills and new community connections that employee gained while contributing directly to the project.

This can also help to protect people from burning out on contributing.

Examples

Here are some examples of businesses having their employees contribute. Some are recent, some have been doing this for years. [These are examples of direct Drupal core contribution by employers. There are many ways to contribute to Drupal, and many businesses contribute in different, valuable ways.]

  • Blink Reaction had a sprint for their employees and brought in local experienced contributors and mentors to help their employee contribution time be effective, and get help targeting issues that are currently relevant. Blink Reaction had their event on non-working hours, a Saturday, so people did not have to stop working during regular hours when they feel like they should be working on projects with deadlines. People who work a full day at the contribution event on Saturday, get a compensation day they can schedule to take later.
  • Pantheon is hiring a contributor, and going to bring in an experienced contributor to mentor that person for a week or two.
  • Acquia has multiple full-time employees working on Drupal 8 issues.
  • Chapter Three employs one of Drupal 8's four branch maintainers to work on Drupal 8.
  • NodeOne (now part of Wunderkraut)), Zivtech, erdfisch, comm-press, Cheppers, Breakthrough Technologies, and New Digital Partnership (among others) dedicated 25-50% of one employee's time for several months to a particular Drupal core initiative.
  • Freelancers and independents like Jennifer Hodgdon (and many others) incorporate contribution work with their billable time.
  • PreviousNext hired Donna (kattekrab) Benjamin to help focus the company's community engagement activities. She spends half her time on client work to ensure her role is sustainable, and half her time on community activity, such as the community working group, Drupal Association board and organising events. She also works with the PreviousNext team to help them find their own niche for making a useful contribution. Lee (larowlan) Rowlands and John Albin also spend some of their paid time mentoring other PreviousNext staff to contribute, who all have 20% time to work on the Drupal project code or community.
  • Amazee Labs built their own company website on Drupal 8 Alpha and continues to implement customer websites on Drupal 8. Employees are paid to: find issues in Drupal 8, open issues in the issue queues, fix them, post the fixes on the issues, and further work on the issues.
  • BlackMesh hired me. :) To work on Drupal 8 issues and to help others contribute to Drupal.
Help for businesses

Sometimes it helps to have someone you can just talk to. You can talk to me. Reach out and ask any questions you have. I can answer them, or connect you with people who can.

Summary

Contribute. Doing it in any way is better than doing it perfectly. These are some strategies for paying employees to contribute that will help Drupal 8 release sooner. Concentrate your resources. Talk to others about what works at their companies. Get help from experienced contributors and mentors.

Corrections

If there are corrections or missing examples, please let me know.

-Cathy
@YesCT or Drupal.org contact form

ps. How to find and contact mentors and experienced contributors

See the list of core mentoring leads in MAINTAINERS.txt, and contact them in #drupal-contribute in IRC or via their Drupal.org contact pages. There are also more mentors beyond the mentoring maintainers, and there is not exactly a list of experienced contributors. So, please feel free to just contact me and I can put you into contact with others.

DrupalContributorSprintsDrupal 8
Categories: FLOSS Project Planets

John Goerzen: My boys love 1986 computing

Planet Debian - Sun, 2014-11-23 22:27

Yesterday, Jacob (age 8) asked to help me put together a 30-year-old computer from parts in my basement. Meanwhile, Oliver (age 5) asked Laura to help him learn cursive. Somehow, this doesn’t seem odd for a Saturday at our place.

Let me tell you how this came about.

I’ve had a project going on for a while now to load data from old floppies. It’s been fun, and had a surprise twist the other day: my parents gave me an old TRS-80 Color Computer II (aka “CoCo 2″). It was, in fact, my first computer, one they got for me when I was in Kindergarten. It is nearly 30 years old.

I have been musing lately about the great disservice Apple did the world by making computers easy to learn — namely the fact that few people ever bother to learn about them. Who bothers to learn about them when, on the iPhone for instance, the case is sealed shut, the lifespan is 1 or 2 years for many purchasers, and the platform is closed in lots of ways?

I had forgotten how finicky computers used to be. But after some days struggling with IDE incompatibilities, booting issues, etc., when I actually managed to get data off a machine that had last booted in 1999, I had quite the sense of accomplishment, which I rarely have lately. I did something that was hard to do in a world where most of the interfaces don’t work with equipment that old (even if nominally they are supposed to.)

The CoCo is one of those computers normally used with a floppy drive or cassette recorder to store programs. You type DIR, and you feel the clack of the drive heads through the desk. You type CLOAD and you hear the relay click closed to turn on the tape motor. You wiggle cables around until they make contact just right. You power-cycle for the times when the reset button doesn’t quite do the job. The details of how it works aren’t abstracted away by innumerable layers of controllers, interfaces, operating system modules, etc. It’s all right there, literally vibrating your desk.

So I thought this could be a great opportunity for Jacob to learn a few more computing concepts, such as the difference between mass storage and RAM, plus a great way to encourage him to practice critical thinking. So we trekked down to the basement and came up with handfulls of parts. We brought up the computer, some joysticks, all sorts of tangled cables. We needed adapters, an old TV. Jacob helped me hook everything up, and then the moment of truth: success! A green BASIC screen!

I added more parts, but struck out when I tried to connect the floppy drive. The thing just wouldn’t start up right whenever the floppy controller cartridge was installed. I cleaned the cartridge. I took it apart, scrubbed the contacts, even did a re-seat of the chips. No dice.

So I fired up my CoCo emulator (xroar), and virtually “saved” some programs to cassette (a .wav file). I then burned those .wav files to an audio CD, brought up an old CD player from the basement, connected the “cassette in” plug to the CD player’s headphone jack, and presto — instant programs. (Well, almost. It takes a couple of minutes to load a program from audio codes.)

The picture above is Oliver cackling at one of the very simplest BASIC programs there is: “number find.” The computer picks a random number between 1 and 2000, and asks the user to guess it, giving a “too low” or “too high” clue with each incorrect guess. Oliver delighted in giving invalid input (way too high numbers, or things that weren’t numbers at all) and cackled at the sarcastic error messages built into the program. During Jacob’s turn, he got very serious about it, and is probably going to be learning about how to calculate halfway points before too long.

But imagine my pride when this morning, Jacob found the new CD I had made last night (correcting a couple recordings), found my one-line instruction on just part of how to load a program, and correctly figured out by himself all the steps to do in order (type CLOAD on the CoCo, advance the CD to the proper track, press play on the player, wait for it to load on the CoCo, then type RUN).

I ordered a replacement floppy controller off eBay tonight, and paid $5 for a coax adapter that should fix some video quality issues. I rescued some 5.25″ floppies from my trash can from another project, so they should have plenty of tools for exploration.

It is so much easier for them to learn how a disk drive works, and even what the heck a track is, when you can look at a floppy drive with the cover off and see the heads move. There are other things we can do with more modern equipment — Jacob has shown a lot of interest in Arduino projects — but I have so far drawn a blank on ways to really let kids discover how a modern PC (let alone a modern phone or tablet) works.

Update Nov. 24: Every so often, the world surprises me by deciding to, well, read one of my random blog posts. For the benefit of those of you that don’t already know my boys, you might want to know that among their common play activites are turning trees into pretend trains, typing at a manual typewriter, reading, writing their own books, using a cassette recorder, building a PC and learning to use bash or xmonad, making long paper tapes with an adding machine, playing records on a record player, building electric gizmos, and even making mud balls.

I am often asked about the role of the computer in the lives, given that my hobby and profession involves computers. The answer: less than that of most of their peers. I look for opportunities for them to learn by doing, discovering, playing, or imagining. I make no presumption that they will develop the passion for computers that I did. What I want is for them to have the curiosity and drive to learn everything there is to know about whatever they do develop a passion for, so they will be great at it.

Categories: FLOSS Project Planets

Bryan Pendleton: Carlson prevails again

Planet Apache - Sun, 2014-11-23 22:20

A beautiful win for Carlson in game eleven and he retains the championship.

Shall I make a prediction? Next up is caruana.

Categories: FLOSS Project Planets

Vasudev Ram: youtube-dl, Python video download tool, on front page of Hacker News

Planet Python - Sun, 2014-11-23 21:50

By Vasudev Ram



youtube-dl is a video download tool written in Python.

I had blogged about youtube-dl a while ago, here:

youtube-dl, a YouTube downloader in Python [1]

and again some days later, here:

How to download PyCon US 2013 videos for offline viewing using youtube-dl

(The comments on the above post give some better / easier ways to download the videos than I gave in the post.)

Today I saw that a Hacker News thread about youtube-dl was on the front page of Hacker News for at least part of the day (up to the time of writing this). The thread is here:

youtube-dl (on Hacker News)

I scanned the thread and saw many comments saying that the tool is good, what different users are using it for, many advanced tips on how to use it, etc. The original creator of youtube-dl, Ricardo Garcia, as well as a top contributor and the current maintainer (Filippo Valsorda and Philipp Hagemeister, respectively) also participated in the HN thread, as HN users rg3, FiloSottile and phihag_, respectively. I got to know from the thread that youtube-dl has many contributors, and that its source code is updated quite frequently (for changes in video site formats and other issues), both points which I did not know earlier. (I did know that you can use it to update itself, using the -U option).

Overall, the HN thread is a worthwhile read, IMO, for people interested in downloading videos for offline viewing. The thread had over 130 comments at the time of writing this post.

(On a personal note, since I first got to know about youtube-dl and downloaded it, I've been using it a fair amount to download videos every now and then, for offline viewing, and it has worked pretty well. There were only a few times when it gave an error saying the video could not be downloaded, and I am not sure whether it was due to a problem with the tool, or with the video site.)

[1] My first post about youtube-dl also had a brief overview of its code, which may be of interest to some Pythonistas.

This other post which mentions youtube-dl may also be of interest:

The most-watched Python repositories on Github

since youtube-dl was one of those most-watched repositories, at the time of writing that post.

- Vasudev Ram - Dancing Bison Enterprises

Signup for emails about new products from me.

Contact me for Python consulting and training.

Share | Vasudev Ram
Categories: FLOSS Project Planets

Justin Mason: Links for 2014-11-23

Planet Apache - Sun, 2014-11-23 18:58
Categories: FLOSS Project Planets

Sergey Beryozkin: Observations about ApacheCon EU 2014

Planet Apache - Sun, 2014-11-23 18:03
You may be thinking now, after reading my previous post, that all I was doing at ApacheCon EU 2014 was looking at T-shirts people were wearing :-). This post is an attempt to convince you it was not the case.

First of all, ApacheCon EU 2014, as it is usually the case with Apache conferences, was a great opportunity to meet the fellow open source developers.
Chatting to the guys I work with at Apache CXF and other projects, sharing a joke or two along the way :-), was really great. 

Some people there are great advocates of doing the software for the good of the world. You do see people there who spend their own free time to make Apache and various projects it hosts succeed and help others.

It was nice to see Talend, my employer, being mentioned as one of Apache sponsors. Even though Apache has great sponsors which contribute much more, it was good to see Talend being recognized. Every contribution counts. The companies involved in the open source have a positive vibe about them, the more they are involved the more recognized and respected in the community at large they become. The world is a small place. Customers would be positive about working with such companies, going the business with such companies, as this post posted awhile back suggested.



Those of us who did the presentations about CXF were lucky to do it on the very first day in a beautiful Corinthia Hotel Ballroom. I kept thinking, there were times people were dancing there accompanied by the music by Franz Liszt and here we are talking the cryptic things about CXF.  The times change. But the beauty of the room is there today.

The other thing I noticed was the visibility of Hortonworks. They had a strong team presenting a number of interesting talks. To be fair to them, their T-shirts are also not bad at all :-), may be they should have some sort of the competition with Tomitribe.

Overall, it was a well organized, great event ! I'm feeling positive and energized after attending it.


Categories: FLOSS Project Planets

Sergey Beryozkin: [OT] The best T-shirt I've seen at Apache Con EU 2014

Planet Apache - Sun, 2014-11-23 17:07
This is the first post about Apache Con EU 2014 held in beautiful Budapest I've been lucky to attend to.

One of the nice things about being an ApacheCon visitor is that one can see lots of cool T-shirts. The official T-shirts (I do treasure them) and other T-shirts with some great lines or digits printed on them. The T-shirts that many software geeks would be happy to wear. And indeed the visitors at ApacheCon EU 2014 had a lot of different T-shirts to demonstrate.

It was at the presentation about TomEE that I realized that while the rest of the room were glued to the presentation screen and being impressed by what TomEE could do I was looking at the T-shirts of TomEE experts doing the presentation and thinking how unfair it was I did not have a T-shirt like that too.

You can see Romain wearing it here.

Tomitribe, the company which did it right once again :-) !






Categories: FLOSS Project Planets

Possible to download recipes – Foresighters repo

LinuxPlanet - Sun, 2014-11-23 16:29

Iv’e been busy to find a way for users to see what’s been added to foresighters repo and able to download the recipe for the package. And now it’s possible.

First, you can see latest added recipes in the widget on the right side and browse all recipes here: https://www.foresightlinux.se/flr-recipes/

Don’t forget to look at Videos section, as Iv’e been planning to make some videos in the near future.

Wondered how Foresight Linux 7 looks like? Take a look at the video below.

Categories: FLOSS Project Planets

orkjerns blogg: Headless Drupal with head fallback

Planet Drupal - Sun, 2014-11-23 16:22
Headless Drupal with head fallback admin Sun, 11/23/2014 - 21:22

I just wanted to take a moment to talk about how I approached the hot word "headless Drupal" on my blog. It uses some sort of "headless" communication with the Drupal site, but it also leverages Drupal in a standard way. For different reasons. (by the way, if you are interested in "headless Drupal", there is a groups.drupal.org page about the subject.)

First of all, let's examine in what way this simple blog is headless. It is not headless in the way that it offers all the functionality of Drupal without using Drupals front-end. For example, these words I am typing is not typed into a decoupled web-app or command-line tool. Its only headless feature is that it loads content pages with ajax through Drupal 8's new REST module. Let's look at a typical set-up for this, and how I approached it differently.

A typical setup

A common way to build a front-end JavaScript application leveraging a REST API, is using a framework of your choice (backbone / angular / or something else *.js) and build a single-page application (or SPA for short). Basically this could mean that you have an index.html file with some JavaScript and stylesheets, and all content is loaded with AJAX. This also means that if you request the site without JavaScript enabled, then you would just see an empty page (except of course if you have some way of scraping the dynamic content and outputting plain HTML as fallback).

Head fallback

I guess the "headless" metaphor sounds strange when I change it around to talk about "head fallback". But what I mean with this is that I want a user to be able to read all pages with no JavaScript enabled, and I want Drupal (the head) to handle this. All URLs should also contain (more or less) the same content if you are browsing with JavaScript or without it. Luckily, making HTML is something Drupal always has done, so let's start there.

Now, this first part should be obvious. If a user comes to the site, we show only the output of each URL as intended with the activated theme. This is a out-of-the box feature with Drupal (and any other CMS). OK, so the fallback is covered. The next step is to leverage the REST module, and load content async with AJAX.

Head first, headless later

A typical scenario would be that for the front page I would want to request the "/node" resource with the header "Accept:application/hal+json" to get a list of nodes. Then I would want to display these in the same way the theme displays it statically on a page load. The usual way of doing this is that when the document is ready, we request the resource and build and render the page, client side. This is impractical in one way: You are waiting to load the entire document to actually render anything at all. Or maybe even worse: You could be waiting for the entire /node list to load, only to destroy the DOM elements with the newly fetched and rendered JSON. This is bad for several reasons, but one concrete example is a smart phone on a slow network. This client could start rendering your page on the first chunk of html transferred, and that would maybe be enough to show what is called the "above the fold content". This is also something that is a criteria in the often used Google PageSpeed. Meaning in theory that our page would get slower (on first page load) by building a SPA on top of the fallback head.

It is very hip with some "headless Drupal" goodness, but not at the cost of performance and speed. So what I do for the first page load, is trust Drupal to do the rendering, and then initializing the JavaScript framework (Mithril.js in my case) when I need it. Let's take for example you, dear visitor, reading this right now. You probably came to this site via a direct link. Now, why would I need to set up all client side routes and re-render this node when all you probably wanted to do, was to read this article?

Results and side-effects

OK, so now I have a fallback for JavaScript that gives me this result (first picture is without JavaScript, second is with JavaScript):

As you can see, the only difference is that the disqus comment count can not be shown on the non-js version. So the result is that I have a consistent style for both js and non-js visitors, and I only initialize the headless part of the site when it is needed.

A fun (and useful) side-effect is the page speed. Measured in Google PageSpeed this now gives me a score of 99 (with the only suggestion to increase the cache lifetime of the google analytics js)

Is it really headless, then?

Yes and no. Given that you request my site with JavaScript enabled, the first page request is a regular Drupal page render. But after that, if you choose to go to the front page or any other articles, all content is fetched with AJAX and rendered client side.

Takeaways and lessons learned

I guess some of these are more obvious than others.

  • Do not punish your visitor for having JavaScript disabled. Make all pages available for all users. Mobile first is one thing, but you could also consider no-js first. Or both?
  • Do not punish your visitor for having JavaScript enabled. If you render the page based on a AJAX request, the time between initial page load and actual render time will be longer, and this is especially bad for mobile.
  • Subsequent pages are way faster to load with AJAX, both for mobile and desktop. You really don't need to download more than the content (that is, the text) of the page you are requesting, when the client already have the assets and wrapper content loaded in the browser.
Disclaimers

First: these techniques might not always be appropriate for everyone. You should obviously consider the use case before using a similar approach

If you, after reading this article, find yourself turning off JavaScript to see what the page looks like, then you might notice that there are no stylesheets any more. Let me just point out that this would not be the case if your _first_ page request were without JavaScript. By requesting and rendering the first page with JavaScript, your subsequent requests will say to my server that you have JavaScript enabled, and thus I also assume you have stored the css in localStorage (as the js does). Please see this article for more information

Let's just sum this up with this bad taste gif in the category "speed":

Tags:
Categories: FLOSS Project Planets
Syndicate content