I fixed a bug in yum

Well, it was a tiny syntax error in Fedora 17 alpha. For some reason Presto had a tiny typo where a hyphen/minus “-” was used instead of an underscore “_”. The full traceback allowed me to get the file and line number where the error was. I just visually scanned the surrounding code to see what could be wrong. That’s when I realized that replacing the unary minus with the underscore would solve the problem. I made the change and ran su -c 'yum update' again and the problem had been resolved. So a big win for the technologies and people involved.

A win for Python because I was able to make a change in the source and then run the code without having to know about or go through the linking, compiling, executing process.

A win for open source because I was able to view and modify the source code.

A win for Fedora because they are using Python, which made it so easy for me to fix a tiny bug without breaking updates for me.

I’d also like to add that I needed to do something similar for work. Something was broken and I had to read through some Ruby files. Although the syntax didn’t make too much sense to me, I was able to judge what changes I needed to make. I made them and worked around some bugs until they could be fixed. So hooray for Ruby as well.

Politics and Pragmatism in Using Linux Distributions

Recently I’ve been making decisions on which Linux distribution deserves my support when I write how-to or similar articles. I started my journey with Ubuntu. Out of all, this is the distribution closest to my heart and may be it always will be. I ventured into CentOS for work-related reasons and found it to be a workhorse. I forayed into Fedora on a netbook with some success. I have had to use a bit of SLES for more work-related stuff. And I have been attracted to, used, and migrated businesses to Debian. Both politics and pragmatism have played a part each time I used a distribution. And thus this post.

You can see from my recent posts that I have made a decision to go with Fedora. It was mostly for political (philosophical) reasons but also for pragmatism (cutting-edge technology, etc.). When the time came for me to choose something other than Debian or Ubuntu, I chose Fedora over openSUSE mainly for philosophical reasons. And I’ve been re-evaluating my decision ever since.

I am very happy I picked Fedora. It’s making bold decisions in the future direction of a Linux distribution, especially with the two most controversial and highly-debated steps: /usr unification and systemd. I have started using Fedora 17 alpha and find systemd a joy to use. I only care about systemctl enable/disable or systemctl start/stop as a user (or sysadmin) and it does exactly what I want it to. Much better than chkconfig, service or invoke-rc.d. The /usr unification hasn’t affected me so much so far. Package availability has also been excellent for the server use cases to which I have put Fedora 17.

Fedora seems like a good fit for me for now. But a second question still remains: which distribution should I recommend to others for home/workstation use when asked? My gut feeling is Ubuntu because they do a lot of good work for this sort of user. I’m also well-versed in it so I can provide ample support if required. But I also want to provide a different answer for users who don’t want to use Ubuntu. A very valid answer for this would be Linux Mint but it’s so similar to Ubuntu that it might not be an option in some cases. This leaves a few distributions that I would really like others to use (if only because they’ll come to me for answers most of the time).

The first distribution is openSUSE. Yes, I have some misgivings about the whole openSUSE, SUSE, and Microsoft triangle. But purely on technical merits is openSUSE good enough to replace Ubuntu as my default recommendation for others? This is a question I have asked myself and the one I’ll try to answer over the next few months. I’ve decided to be pragmatic about this particular case rather than political. I’m willing to be pragmatic if openSUSE can bring in new users to Linux like Ubuntu has done for a while. It’s a tall order but openSUSE looks like a good candidate from where I stand.

The other distribution I may recommend is Mageia. It’s on its way to the second release. These people have a very pragmatic, user-centric approach to their distribution and them being a community allays many misgivings I have about openSUSE. Technically they also appear to be sure-footed and thus deserve the support of people like me. Maybe Mageia can serve Ubuntu’s role of bring new users to Linux.

I wouldn’t recommend Fedora because of two things: (a) hardware support can mean using other repositories (such as RPMfusion); and (b) it’s too bleeding-edge to keep users on it for a while without too many issues.

Now that I have to give up my moral high ground, how does it feel? Very liberating, actually. When I use FreeBSD license instead of GPL, I consider the freedom of people over freedom of code. So why should I take such hard stances when it comes to Linux? People should matter more than code or a distribution. If Ubuntu or openSUSE are not ideal Linux ecosystem participants, they are productive and willing participants nonetheless. It may be about time I gave up on idealism and focus more on doing good for more people.

I’m with Fedora in 2012

I posted a few months ago that I had gone back to Debian. Recently, though, I wanted to try out something different. The most important thing for me was the philosophy of the distribution. I believe that Debian is a true torch bearer for free and open source software while being pragmatic about proprietary stuff. Ubuntu gives off many mixed signals. OpenSUSE is technically a very good distribution but I fear that any contribution I make to it (tutorials, evangelism, etc.) will end up in SUSE, a product that is not the best representation of the Linux community. Fedora is very similar to Debian, albeit a bit stricter in its support for free and open source software.

Fedora has lots of good attributes that made me choose it for this year. The biggest issue for me was that any contribution I can make to it should help the general Linux community. Fedora’s primary downstream, Red Hat Enterprise Linux, is a product that gives back to the Linux ecosystem much more than some others. So I would rather use Fedora and help RHEL than use OpenSUSE and help SUSE.

I saw a post on reddit recently (Is it legal to sell computers with Ubuntu pre-installed?) and it prompted me to look at the trademark policies of Ubuntu, Debian, and Fedora. Fedora has a very open and friendly policy when compared to Ubuntu’s policy.

Looking at marketing, OpenSUSE talking points are very convincing. Similarly, Fedora’s talking points also give a wonderful overview of the project’s philosophy, goals, and methods. In the end I chose the downstream product as the defining choice (RHEL over SUSE).

Fedora is a community much like Debian. Red Hat does sponsor Fedora but I have not yet seen any overt influence on the direction of Fedora by Red Hat. Ubuntu is a collaboration between a community and a corporate entity (Canonical), with the corporate wing having an overwhelming say in the direction of the project. OpenSUSE is a community but how independent it is from corporate (Novell, SUSE, AttachMate, Microsoft) influence is difficult to understand as an outsider (although I’m certainly interested in learning more about it).

Debian has a very thorough process of becoming a maintainer. Fedora has a similar process to join the package collection maintainers. Both Ubuntu (PPA) and OpenSUSE (OBS) have a lower bar to entry to becoming a package maintainer. But they also have an issue of trust; can I trust the person who created this package? Mostly the answer is no because the maintainer has not gone through the vetting process that Debian and Fedora maintainers go through.

Fedora is known to stick as close to upstream as possible, with minimal patching when required. This unlike Debian and Ubuntu because they are both known to heavily patch upstream code. This means that Fedora gives you a close experience to what the original authors created.

Fedora has almost the same number of packages as Debian (for those that I’m interested in) but has a widely different strategy: cutting-edge versus stable. I also like the quick release cycle of 6 months where new software is released piecemeal (firewalld, systemd, etc.) or held off (BTRFS as default) if it still isn’t good enough.

Finally, I just love the Fedora logo and the logos for its foundations (freedom, friends, features, and first). I highly rate the logos of Fedora and FreeBSD. Debian’s logo is too simple for my taste, Ubuntu has a distinctive and recognizable logo, and OpenSUSE could have at least attempted to make Geeko prettier.

As I use Fedora more and more, I’ll come to know some of its shortcomings and I’ll try to point them out for the benefit of others. One that I came across right off the bat is SELinux. It’s not a shortcoming per se but its complexity causes more headaches for server use than a beginner can handle outright. With time, of course, I’ll learn to use and love it.

I want to give OpenSUSE an honest try but the misgivings about the ulterior motives of its downstream prevents me from using it wholeheartedly. I have said this before that OpenSUSE needs to become independent and then others like me (on the fence) will give it the support it deserves.

I plan to use Fedora as a server although it’s not meant for server use. They are not going to be mission critical servers but hobby projects just to learn how the future RHEL might look and work. I want to push myself in learning something vastly different from the Debian and Ubuntu world and I believe Fedora is a good first step.

Ubuntu is Not Evil

Ubuntu is certainly not evil or sinister. Nor, by extension, is Canonical. Sure they have a different approach that may not fit into everyone’s ideal way of doing things. But the things they are doing are not bad, bad stuff.

The biggest issue I feel with Ubuntu is that they take a ‘my way or the highway’ approach. To some extent this is necessary when it’s time to focus on a goal. Take Unity, for example. With each iteration things have become better, decisions have been reversed, and new ideas explored. If its project leaders, designers, programmers, etc. had been disheartened at the negative feedback, they didn’t show it outright and kept on working. People may not like it (I certainly have a hard time using it) but the work continues to this day, providing an alternative desktop environment with a different set of goals. This focus and dedication can only be achieved with a ‘my way or the highway’ approach. Others, like KDE and GNOME, have done the same and made some revolutionary changes in the process. But giving more control to the community (like Fedora), they can solve this issue.

I also feel that most Ubuntu’s work does not get adopted by a wider community beyond Ubuntu. Other distributions rarely use Ubuntu’s code within their ecosystems. I see an example of Ubuntu working with Cobbler (from Fedora) and using it as part of their Orchestra ecosystem but I don’t see Orchestra being adopted by OpenSUSE in turn. There doesn’t seem to be an effort on Ubuntu’s part to champion their technology to become a part of the Linux distribution community.

Another issue I have with Ubuntu is that their focus is too wide and not deep enough. I really can’t tell if Ubuntu wants to be a consumer OS (phones, tablets, TVs, etc.), a desktop OS (home, business, etc.), or a server OS (home, enterprise). There are certainly people working on all these things simultaneously and they are doing a fantastic job. But when I recommend Ubuntu to someone I really don’t know if their focus on consumers affects Ubuntu as an enterprise server OS. Ubuntu is trying too hard to be something for everyone and sometimes that doesn’t work out.

Of course, all these issues are my perception and it might be because I don’t closely follow the Ubuntu universe. But as a partially involved user this is how I feel. These issues do not make Ubuntu or Canonical evil but they do make it harder for me to adopt Ubuntu as my first choice when picking distributions (although more often than not I default to Ubuntu anyways).

I have deployed Ubuntu (pre-Unity) on the desktop for myself and others. I have used it as a server for different web applications. My own VPS is currently running Ubuntu 11.10 server and has been since Ubuntu 10.10. So I have nothing against Ubuntu as such.

I love Ubuntu’s pragmatism. I would love for only open source and free software to be the dominant way of writing code but it’s not practical. You can’t have $400 billion companies based only on open source or free software. So when Ubuntu recognizes this and provides non-free firmware proprietary drivers and applications, I just love it. They also focus on building on the hard work of others (Debian, Fedora, etc.) and making things easier for certain people.

Canonical is not Red Hat, and I believe they shouldn’t even try to be. Red Hat decided some time ago that to become a billion dollar company they would have to charge for the compiled binaries while giving access to the source code for free; perfectly valid and follows the free software and open source principles. Ubuntu, not yet a billion dollar company, has decided that source code and compiled binaries should be accessible without any charge. No one doubts the contribution of Red Hat to the Linux distribution community while Canonical has yet to gain that respect. If Canonical can take care of the three issues mentioned in this post, I believe they can go a long way toward becoming another billion dollar (and beyond) Linux distribution company. It may also help get Ubuntu and Canonical a more positive image within the community, getting more users and contributors on board.

Why JSON?

I have been working on a tiny, lightweight automated testing framework that can be used to test both Linux and Windows environments, applications, etc. I have got a portion of it to a working state and it’s helping me get some Hyper-V automation done. The basic idea behind the framework is to use PowerShell on Windows and SSH on Linux to get things done. And yes, it’s built using Python 3. Anyways, the focus of this post is not the framework but JSON and why I chose it.

I needed a way to pass test suites to test controllers, run those tests, gather results, and then get the results. Since XML is used quite often for passing data between components, initially I thought of using it. There were two main objectives I had in mind: easy for humans to read/write test suites and easy for programmers to read/write XML in the framework. But as I tried to comprehend the scale of the project, XML fell short.

Reading and writing XML is pretty easy for humans but it can be cumbersome. XML allows a lot of freedom and flexibility in how you want to design your schema but it’s too verbose to quickly write stuff. Reading and writing XML using Python, although not too difficult, was not something I had a lot of time to tinker with. Plus I couldn’t get my head wrapped around DOM, etc.

JSON, on the other hand, looked a lot like using list and dict in Python. So I gave it a try and came to love it. The biggest benefit for me was that I had no translation to do between Python and XML. A list of dicts in Python looks almost exactly the same as a list of dicts in JSON. So while I’m writing JSON, it’s no different than when I write Python code. This got me up and running very quickly.

The Python 3 JSON library took a couple days for me to play around with and see how it would all fit in. I tried natural Python to JSON and back, and also reading JSON from file and writing it to file, etc. In the end, it was all very simple.

By formatting JSON and just looking at it one can also see how easy debugging is. The verbosity of XML can make it difficult to quickly pinpoint where the problem lies. Yes, parsers can point out syntax mistakes but semantic errors are easier (at least for me) to see in JSON. However, it has also been the case that I made less mistakes writing JSON than I do when writing XML. So this requires even less debugging. JSON is very neat to look at, when formatted properly.

Of course, for people already familiar with reading and writing XML, JSON might be a big jump. But I feel that with the simple rules JSON has, it won’t be long before any XML-trained user can be trained to use JSON.

To conclude, the biggest reasons for me to choose JSON were its easy reading, writing, and debugging capabilities. I don’t have to switch context between Python and XML and can simply stay in Python mode even when dealing with JSON. If you are starting a new project give JSON a try. I’m sure it’ll impress you. But don’t try to shoehorn JSON when XML would be the better choice (or vice versa). The right tool for the right job.

Making a case for excluding users from open source

Open source or free software is meant to remove the shackles of proprietary software binding users all over the world. This in itself is a very noble idea and goal. However, it’s also a very tough goal. Not because people are happy with their shackles but because most people don’t care about them. I see around myself people who want to do stuff and it doesn’t matter how they do it. Want to watch some TV show online? Pay Netflix, Hulu, whatever, to watch it. Even with all the hoopla about content piracy, people are signing up in droves for these services.

Computers are complex machines. Not everyone can or is willing to understand how they function. All many people want is to be able to fire up a browser and connect with friends/family using Facebook or to sign in to Hotmail every once in a while. They also want to be able to carry a phone that can play music, games, YouTube, etc.

The computer industry, in my very limited knowledge, is very cyclical. But with each cycle more and more people have become users of technology. But if we look at this technology adoption, it has been forced down the throats of people. TV was a simple device but now it’s a beast; there are so many TVs to choose from, let alone the myriad devices surrounding it. 10 years ago no consumer wanted this but the companies researching and producing these products have forced them onto all consumers. It’s very rare that you find a good old-fashioned TV anymore. Thus, newer technology is quickly replacing older one even if the consumers are satisfied with their perfectly-fine/working technology.

The proponents of open source and free software need to classify users all over the world first. We all need to know who is already using technology and what they are using it for. We also need to know who isn’t using technology and how they will use it if they can. I will take the liberty to classify users myself, with a purely subjective and non-scientific point of view.

There are two digital worlds: the haves and the have-nots. For the have-nots, open source and free software is a godsend. They are able to not only use technology but possibly learn how it functions. I believe they are prime candidates to be targeted for open source. On the other hand, the haves already have access to a plethora of technology and a lot of them have no inclination to ever learn more about it.

If you ever want to lose faith in technology-using humanity, head over to Tales from Tech Support or Not Always Right. No matter how hard we try, such users will never be able to appreciate the hard work and love put into open source. So isn’t it better for our sanity to let them be? Just like I have no idea how my car functions or plumbing works or electricity has been implemented in my home, they have no idea how computers function. But there’s a big difference between computers and cars/plumbing/electricity: their interface is simple enough to learn and repeat over different devices. Computers, on the other hand, have so many interfaces that we can’t expect everyone to learn them easily. Those willing to put an effort into learning them should be supported and welcomed; others left on their own.

Open source should not aim to take over the world. Open source should aim to make products that proponents of open source want to use. If regular users find benefit in these products, chalk that up as a win. But if the same regular users are not served by open source products, do not chalk it up as a loss. If commercial interests merge with open source interests, more users benefit, but even if they diverge the world doesn’t necessarily have to end. They keep doing their thing and we keep doing ours. We can continue to scratch our itch and let users decide whether they have the same itch to scratch. We won’t have many successful commercial ventures this way but at least we will not lose our passion for open source. The same passion we lose when our hard work is questioned for not being as good as shackling proprietary stuff. Open source was and must remain an alternative; if it dominates, well and good, if not, I really don’t see it as a bad thing.

Follow

Get every new post delivered to your Inbox.