|
|
Log in / Subscribe / Register

Building GNOME Builder

By Nathan Willis
February 25, 2015

SCALE 2015

At SCALE 13x in Los Angeles, Christian Hergert presented a session about his recent work on Builder, which is often referred to as an integrated development environment (IDE) for the GNOME desktop. But, as Hergert explained, the game plan for Builder extends far beyond the typical confines of IDE functionality. Builder, as he sees it, is GNOME's opportunity to reach newcomers who are learning about programming for the very first time—then to teach them the software-development skills that will help them become contributors.

Hergert started off by explaining the roots of the Builder project—a tale that began with a brief history of the GNOME project. Over the past 15 or so years, he said, GNOME has always placed a lot of emphasis on providing a good user experience. Often that has put GNOME in a position where it uncovers pain points elsewhere in the stack—many users, for example, first discovered bugs in their video drivers when they tried early versions of GNOME 3. Similar problems were uncovered with PulseAudio configuration and network-connection management when GNOME set out to implement better user interfaces for those subsystems.

One result of all of this work in other parts of the stack, though, is "the GNOME desktop environment" today means something much larger than the window-manager-and-dock that it meant in the early days. It includes a window compositor, media pipelines, input methods, filesystem abstractions, key management, tools for working with printers and devices, and APIs for geolocation and many other services. Thus, every year, the workload to maintain GNOME gets bigger—yet the GNOME community has remained approximately the same size for quite some time. Clearly, something more could be done to attract and cultivate new developers.

[Christian Hergert]

The other side of the story was Hergert's, rather than GNOME's. In 2012, he had published an open offer online, saying he would teach anyone the basics of coding in C if they just emailed him. Although he expected a handful of responses, he actually got thousands. In fact, he said, his inbox is still full of requests he has not had the time to answer. "And I'm a dinosaur," he added, "for using C. Imagine what the numbers would be if we were talking about Python or JavaScript."

Hergert tried to fulfill the C lesson requests students had asked for, he said, but ultimately failed. Initially he blamed himself for that, but, upon more reflection, he stopped taking it personally and started thinking about what sorts of questions the students had asked. The tools available were not up to the challenge: important utilities like Autotools were arcane and difficult to learn. But what struck him the most was that these students were interested in learning about free software, and the inability to "get started" with programming in general was essentially driving them away from GNOME and, presumably, toward other platforms.

What GNOME needs, he decided, is some way to guide newcomers through the getting-started process while also introducing them to the platform. Android, for instance, has a "developer mode" that does more than simply switch on new privileges: it also provides tools and helps the user learn about the software.

Those are the goals of GNOME Builder, the project that Hergert initiated in mid-2014. Builder will include an IDE, but the IDE will be geared toward developing software that works on GNOME—hooking into the build system, project management tools, diagnostics, and much more. Moreover, programming tutorials will be built-in, as will templates for working with GNOME libraries and a code-search tool that is linked to the GNOME source code.

The vision behind Builder is ambitious. Hergert voluntarily quit his day job to start the project; he was able to support himself for about four months working on Builder full-time, and subsequently ran a crowdfunding campaign that will pay for at least six more months of development time. In addition to himself, he said there are about 50 active contributors.

Currently the project involves two distinct pieces: the Builder user interface and the LibIDE shared library. It is "pre-pre-alpha," he said, but is fairly usable with C. Although he ultimately plans of focusing on other languages, Hergert said it was important to get C support working first in order to bootstrap the project. As of now, essential code editing, syntax highlighting, symbol resolution, and code search are working, and there is a sizable collection of boilerplate and template code for GNOME development that Builder can access. The initial keybindings and editor functionality implement a Vim mode, though Hergert said that an Emacs mode had landed just days earlier.

LibIDE is the focus of most of Hergert's development time. One of the more interesting features is live diagnostics: if the user types a syntactic error, the UI can highlight it using squiggly underlines akin to spellchecker warnings. That functionality is possible because the library uses Clang as its back end. Hergert said he would really like to use GCC as the compiler backend, but the GCC project's decision to not implement a library-like API (for things like accessing the abstract syntax tree) makes that impossible.

LibIDE supports Automake and Autotools at present, and will add additional build systems like Meson and CMake next. Similarly, although the library only supports Git version control now, other version-control systems like Bazaar are on the to-do list.

LibIDE is also scriptable with both JavaScript and Python. Hergert showed example scripts for automatically translating newlines on each save and for triggering a rebuild whenever a specific device (say, a Raspberry Pi) is attached over USB. The latter feature relates to Builder's support for cross-compiling—it is a specific goal to make Builder a useful IDE for writing programs for mobile devices and single-board computers. The scripting functionality can also be used to add new code-search providers, build extensions, and refactoring tools, he said.

He also discussed some of the GNOME integration work that is still under development. One example was writing a program that is meant to utilize a specific D-Bus service. The traditional approach might be to allow easy insertion of some boilerplate code, but that still leaves the user with the job of figuring out the right service to connect to and what syntactic sugar is required. Instead, LibIDE will provide a way to bring up a list of the currently running D-Bus services on the local machine; the user will only need to select the service of interest, and Builder will insert the properly customized code, rather than a blank boilerplate. Similarly, he hopes to have Builder automatically "do the right thing" for tasks like putting icons in the correct directory—tasks that, while supposedly simple, are often only dealt with well after development and during the packaging phase.

The session ended with a Q&A period. An audience member asked if writing the tutorials might be an opportunity to collaborate with an existing project like Codecademy. Hergert said that although he would like to do something like that, Codecademy is not a great fit, since it is not written with Linux systems (or GNOME in particular) in mind. Another question dealt with how Builder has uncovered pain points in the GNOME stack, like Hergert had mentioned at the beginning of his talk. He replied that there were some examples; he has decided that the normal GtkTextView widget does not work well for Builder's use case, and speculated that a "text grid" widget might be necessary, to correctly deal with monospaced text navigation.

In conclusion, Hergert commented that much of what goes into making an IDE work is not visible to the user. The Builder UI is minimalist; most of the work takes place behind the scenes: "if we do our jobs right," he said, "you won't have to care about anything but the UI." Looking forward, Hergert said that LibIDE and Builder will probably not be ready for inclusion in the upcoming GNOME 3.16 release (currently expected in approximately five weeks), but he thought that GNOME 3.18 was a reasonable target.

Index entries for this article
ConferenceSouthern California Linux Expo/2015


to post comments

Thanks LWN

Posted Feb 26, 2015 8:49 UTC (Thu) by ovitters (guest, #27950) [Link]

I didn't realize that he was the same person as who provided free help to learn how to code. I read those blogposts, but seem to have missed the connection.

Personal note: He spoke about his Builder plan during GUADEC 2014. At that time I thought he was a little bit out there (quitting your job and so on). Now I think he's entirely right. So much stuff is made much easier all the time, but our development methods haven't improved. This stagnation means we're getting behind because others do improve. Hopefully there will be another fund raising because there seems to be enough improvements to be made to make things easier for (GNOME/GTK+3 app) developers. Also hoping for a multi year long sponsorship and ideally a bigger (full time) team than just one person.

Compare with Eclipse?

Posted Feb 26, 2015 9:39 UTC (Thu) by NAR (subscriber, #1313) [Link] (4 responses)

Why is it necessary to create a whole new IDE instead of an e.g. Eclipse plugin?

Compare with Eclipse?

Posted Feb 26, 2015 11:53 UTC (Thu) by alex (guest, #1355) [Link] (1 responses)

I recall him answering this question on a podcast. Essentially it came down to the fact you end up spending so much time abstracting between Eclipses JAVA based view of the world and the language and environment you are targeting that your code becomes more complex than it needs be. I think he also made reference to the licensing where tools like Eclipse become frameworks which get forked into proprietary non-free IDEs.

Compare with Eclipse?

Posted Feb 26, 2015 15:46 UTC (Thu) by aleXXX (guest, #2742) [Link]

IMO, if you are Ok with starting to work on a huge Java-project, then an Eclipse plugin is fine. Otherwise, if you'd like to stay in the C/C++-world, starting to work on Eclipse is quite a barrier.

Compare with Eclipse?

Posted Mar 1, 2015 22:37 UTC (Sun) by helsleym (guest, #92730) [Link]

Perhaps it has improved recently but my experience with Eclipse was quite negative. It was slow, consumed enormous amounts of memory, did not help get the job done with projects large or small, and just plain got in the way most of the time. The few relatively unique features it advertised were simply not worth it.

Compare with Eclipse?

Posted Mar 7, 2015 12:49 UTC (Sat) by job (guest, #670) [Link]

I've tried using Eclipse a couple of times. Supposedly it's great at handling everything Java related. But I've given up every time since I haven't had a couple of days time to spare. It presents the user with about a billion knobs. There's a lot to desire in the user interface, which is probably what's most important to a new user (and even more to a user new to programming).

Building GNOME Builder

Posted Feb 26, 2015 17:00 UTC (Thu) by sdalley (subscriber, #18550) [Link]

Is there anyone with experience of both that can compare and contrast Builder with KDEvelop ?

Mostly pointless

Posted Mar 5, 2015 15:01 UTC (Thu) by kragil (guest, #34373) [Link] (9 responses)

He may be a nice guy and all, but GTK/Gnome is really the wrong toolkit for what he is trying to archive.
Here is why:
Documentation is bad
Community is at best unhelpful (if you point them at bugs you will get abuse)
Cross platform development is not really a goal, so it totally sucks

I am not the only person to say this
https://www.youtube.com/watch?v=ON0A1dsQOV0

Mostly pointless

Posted Mar 5, 2015 17:44 UTC (Thu) by sramkrishna (subscriber, #72628) [Link] (8 responses)

> Documentation is bad

I agree, as a GNOME person, the bar of entry in writing a GNOME app is too high at times and unless there is some kind of monetary motivation or you're one of those people who have enough time on their hands, it is difficult to write an application. However, we are trying to address problem, we have regular documentation hackfests and the documentation technology - Mallard is one of the best out there.

Builder realizes to have a lot of these docs built in so that it is easy. See, tooling is something we are finally coming to grips with and it is because of projects like Builder we have a way to address the problem.

> Community is at best unhelpful (if you point them at bugs you will get abuse)

Every maintainer has their own way they communicate with their bugs. Sometimes abrasive, sometimes not. It depends on the social responses. I know a lot users who come in feeling entitled. That can sometimes be tiring. But GNOME maintainers should conduct themselves professionally and adhere to the GNOME code of conduct. You do not seem to have given any particular examples.

> Cross platform development is not really a goal, so it totally sucks

I'm sorry, but this is complete bullshit. We are the 'lesser' platform here.. ultimately all the apps that are cross platform are never going to look nice on free desktops because they will conform primarily to Windows. This plays into our competitors advantage not ours. To me, a cross-platform app simply means that you're on your way to becoming a windows or osx app because that will be where the money and support goes. Since everybody on Linux wants all their stuff for free.. (see elementary)

So no, cross platform is only a secondary goal for us. We'd like to have our apps on a Free desktop, not a proprietary one. We are still part of a social movement. So kindly let us focus on our Free platform and make it better. Then we'll focus on cross platform infrastructure so that we can move applications from windows and osx to GNOME.

Mostly pointless

Posted Mar 7, 2015 17:20 UTC (Sat) by flussence (guest, #85566) [Link]

Maybe GNOME could set its sights on a more realistic cross-platform target first - apps that don't malfunction outside GNOME and run on platforms other than RedHat.

Everyone else's DE, WM, GUI toolkit seems to have no problems doing this. GNOME is being a "special snowflake" and gaining utterly nothing by doing so.

Mostly pointless

Posted Mar 8, 2015 11:06 UTC (Sun) by rleigh (guest, #14622) [Link] (6 responses)

There are some fundamental mistaken assumptions here.

The first is the thinking that people (in general) are going to write applications for GNOME specifically. They aren't. It's too niche to risk that, for both commercial and hobbyist developers. It restricts your potential userbase to a small niche (GNOME Linux user) of an already small niche (Linux desktop users). If you want to gain developers, you need to give them a reason to use your stuff, and until it's an acceptable cross-platform solution, it will be ignored. That's the basic reality. If I can write a GNOME application *and* have it work cross-platform, then you've given me a reason to consider using it. Until then, you've made a deliberate choice to limit who can use it, and by extension become a contributor to it.

On top of that, it's technically inferior to what else is readily available. So I have even less reason to consider using it. Even if you fixed the documentation issues, the bigger structural problems remain (and have done so since the start, in retrospect).

I'm lucky enough to work as a full-time free software developer (GPL and BSD libraries and programs for scientific and medical imaging); we're required to make our stuff run on all major operating systems. When time came to write a GUI frontend for one of my libraries, I went with Qt because it was realistically the only sensible option around for a cross-platform OpenGL image visualisation application. Its look and behaviour is completely native on all the major OSes and it works brilliantly. GTK+ doesn't offer that. If it did, it /might/ have been worthy of consideration. But it doesn't, and that means it's automatically excluded from many projects where it could potentially have been used. Until that is fixed, it will remain excluded in its niche. Your assertions about cross-platform applications are simply wrong, I'm afraid; Qt allows us to provide a first-class application on Linux and also on Windows/MacOS/BSDs. GTK+/GNOME would provide a mediocre application on Linux/BSD and a terrible application on Windows/MacOS, if it could be made to work at all. Your comment about "competitive advantage" is odd--both companies and individual developers would generally like to target as big an audience as possible; willingly excluding all but a tiny fraction of users makes no sense. In many situations, Qt allows provision of a Linux build where otherwise development would have been constrained to Windows/Mac; so in many ways is a positive enabler for getting Linux application support.

Regarding the community, yes it could be much better. Contrast it with others (Qt in particular), and there's a world of difference in the attidude and helpfulness of the participants. You know what the biggest difference is? Qt is actively used by many thousands of application developers, and the focus is on writing and delivering usable, functional applications. GTK+ and GNOME do not have that focus; they lost the people that mattered--the application developers--many years ago (I was one of them) and the level of discourse and current lack of direction reflect that.

Back when I was writing GTK+ applications commercially a decade ago, I submitted quite a few tested patches. Many sat unreviewed and unapplied in the GNOME bugzilla **for over a bloody decade**. That's the level of support a developer gets from the GNOME people: being completely ignored. While I was trying to write a free software editor application using the GNOME canvas, and providing patches to fix major problems with it, the GNOME community were busy creating >6 forks of it all of which were defective in different ways and all of which subsequently died. The result: today there is no canvas library (no, Cairo doesn't count since it's not a retained-mode system using the regular signal/event/object system), and GNOME kicked every developer who depended upon the old one. It was removed because it was "unmaintained", but if you don't have the resources to actually apply the patches to keep it going, that speaks volumes about the commitment there. They had the resources to create many incompatible forks, but not to apply a handful of patches?! And removing "old" but perfectly usable libraries just screws over those who are using them; way to kill backward compatibility and enrage all the users! GTK+ and GNOME have always treated third-party developers poorly, and the lack of good cross-platform support is a part of that, as is the lack of commitment to stable interfaces in the longer term. If they had, they would have retained some decent developers and it would still perhaps be a viable choice. As it is, they effectively alienated the very people who would have been their biggest supporters and contributors by marginalising and ignoring them. And the breakage with GTK+3 is just another set of problems on top of those which already existed long before then.

It's not too late for all these problems to be fixed, but it does require a drastic reorganisation of the project's priorities, and I'm not sure the rampant groupthink in the remaining developers will allow it.

Mostly pointless

Posted Mar 12, 2015 10:03 UTC (Thu) by ovitters (guest, #27950) [Link] (4 responses)

It's vastly easier to have a small focus and make that work. Qt has hundreds of paid developers, that's not the case with GTK+. Further, GNOME primary focus is an easy to use desktop, not on providing cross platform development tools. Various infrastructure bits that are needed will be either cross desktop (freedesktop.org), and possibly cross platform. However, making something work all across the board is secondary. It would be nice, nothing against it, but that's it.

I don't really see a benefit about primary focus being on cross platform. It's very difficult, and provides little benefit. What's nice is having something which is easy to use, not that you could do all kinds of cross platform development.

Example: Cross platform doesn't seem to be possible with Android, iOS, Windows Phone, etc. It surely isn't the primary focus.

Mostly pointless

Posted Mar 12, 2015 13:52 UTC (Thu) by hunger (subscriber, #36242) [Link] (1 responses)

Cross-platform support might provide little benefit to people working on a Linux desktop, but it definitely provides a lot of benefit to application developers. I also do not consider "cross-platform" and "easy to use" to be mutually exclusive goals: In fact I consider Qt to the better cross-platform solution compared to GTK as well as easier to use, but that is of course highly personal and other people will disagree.

Cross-platform definitely is possible with all the platforms you listed. Qt demonstrates that by supporting all of them. It is a lot of effort to support all those platforms, you are right there.

Mostly pointless

Posted Mar 12, 2015 14:19 UTC (Thu) by ovitters (guest, #27950) [Link]

That's not what I meant. I meant with primary focus where most attention goes to. That doesn't imply mutually exclusive. The rest is about that: cannot solve everything and that's not needed. That Qt has way more people I already mentioned.

I think you're confused about assuming I said "exclusive".

Mostly pointless

Posted Mar 12, 2015 17:47 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

It's perfectly possible to use QT applications on iOS and Android. It just doesn't make much sense (unless we're talking about tablets) to use the same application on wildly different screen sizes.

Mostly pointless

Posted Mar 13, 2015 2:42 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

> It just doesn't make much sense (unless we're talking about tablets) to use the same application on wildly different screen sizes.

You mean "UI" rather than "application" here. The same app logic can drive different interfaces just fine.

Mostly pointless

Posted Mar 19, 2015 5:38 UTC (Thu) by gwg (guest, #20811) [Link]

rleigh wrote:
> In many situations, Qt allows provision of a Linux build where otherwise
> development would have been constrained to Windows/Mac; so in many ways
> is a positive enabler for getting Linux application support.

Spot on. Of course the other problem with Linux for application writers
is the application distribution :- having Linux distributions compile
up each and every application themselves, whenever they get around to it,
with whatever pet "policy" changes they feel like adding (and not testing),
prevents a vibrant, open application eco-system developing. This perfectly
suits some of the zealots, but it forever relegates Linux to be an
application platform backwater.


Copyright © 2015, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds