r/linux • Verified • Dec 01 '14

I'm Greg Kroah-Hartman, Linux kernel developer, AMA!

To get a few easy questions out of the way, here's a short biography about me any my history: https://en.wikipedia.org/wiki/Greg_Kroah-Hartman

Here's a good place to start with that should cover a lot of the basics about what I do and what my hardware / software configuration is. http://greg.kh.usesthis.com/

Also, an old reddit post: https://www.reddit.com/r/linux/comments/18j923/a_year_in_the_life_of_a_kernel_mantainer_by_greg/ explains a bit about what I do, although those numbers are a bit low from what I have been doing this past year, it gives you a good idea of the basics.

And read this one about longterm kernels for how I pick them, as I know that will come up and has been answered before: https://www.reddit.com/r/linux/comments/2i85ud/confusion_about_longterm_kernel_endoflive/

For some basic information about Linux kernel development, how we do what we do, and how to get involved, see the presentation I give all around the world: https://github.com/gregkh/kernel-development

As for hardware, here's the obligatory /r/unixporn screenshot of my laptop: http://i.imgur.com/0Qj5Rru.png

I'm also a true believer of /r/MechanicalKeyboards/ and have two Cherry Blue Filco 10-key-less keyboards that I use whenever not traveling.

Proof: http://www.reddit.com/r/linux/comments/2ny1lz/im_greg_kroahhartman_linux_kernel_developer_ama/ and https://twitter.com/gregkh/status/539439588628893696

1.9k Upvotes

1.0k comments sorted by

View all comments

Show parent comment

19

u/gregkh Verified Dec 01 '14

All code is horrible, especially stuff written by anyone other than yourself.

In other words, if you didn't write it, it's usually hard to understand, so your goal should be to write it in a way that is the easiest to have others understand as you need them to do so to fix your bugs.

The Linux kernel source tree is overall, one of the most readable and easy to understand code bases out there. The huge numbers of developers contributing to it is testament to that. That being said, of course there is hairy kernel code in there, and the "joke" that there are more F1 engine designers in the world than there are people who understand the kernel's memory management system really isn't a joke. So there is always room for improvement, but always realize, if you first are looking at a file and think it is horrid, maybe it's "horrid" because the code has to be that way in order to work properly with the environment given to it (i.e. broken hardware, crazy use cases, zillions of platforms supported, etc.)

1

u/deadowl Dec 02 '14

I have always taken that when someone tells me my code is readable as a huge compliment. Whenever I work with someone who I would consider a peer, it isn't unusual for me to receive this compliment. However, then there's the whole definition of peer to be concerned about.

As far as open source software goes, it's been either goto statements or preprocessing instructions that throw me off. The goto statements threw me off when I was trying to read the Evolution mail client's source code, but I'm not sure whether I was looking at the Google Calendar or Sharepoint part of the code (I believe it had been a recent SoC contribution). Preprocessing instructions, meanwhile, have thrown me off since I can remember. I can imagine that they are particularly important in the kernel. What are your thoughts on this?

Set arithmetic, regular expressions, closures, and even nested for-loops: these are things that many of my coworkers don't have a desire to learn, which in turn is a pain point for me. Is this something you've ever experienced?

3

u/gregkh Verified Dec 02 '14

Set arithmetic, regular expressions, closures, and even nested for-loops: these are things that many of my coworkers don't have a desire to learn, which in turn is a pain point for me. Is this something you've ever experienced?

Nope, it sounds like you need to get better coworkers...

1

u/deadowl Dec 02 '14

For that I need to get a new job which is a pain.

3

u/gregkh Verified Dec 02 '14

Really? Right now is one of the best times ever to get a new job, especially if you have skills in Linux. There is a huge need for developers by companies, and you are almost guaranteed a raise if you change.

In fact, it's one of the few ways to get a big raise in our industry, change jobs, it's worth it, don't be lazy.

1

u/deadowl Dec 02 '14

I'm not sure what the benchmark is for Linux skills.

1

u/minimim Dec 04 '14

Knowing C he says somewhere else. And dealing with lots of e-mail.

1

u/deadowl Dec 04 '14

That depends on context though. C isn't necessary to use tools built on the Linux platform.

1

u/minimim Dec 04 '14

Oh, OK, misunderstood. I read "linux skills" as "kernel skills", my bad.