Search
Close this search box.

5 Linux Development Tips for a Happy Life

Share:

Five quick Linux development tips to help with programming productivity

Happy Birthday, Tux!

It’s the 32nd birthday of the Linux operating system this month.

Linux development tips for a happy life - Tux the Linux Mascot

From the inauspicious beginnings of a message posted on a UNIX forum by young Finnish software engineer Linus Torvalds back in 1991, Linux is now part of the technology mainstream.

It’s quite literally all around us these days. Linux is used in a plethora of programmes and devices, including:

  • Fridges
  • CCTV, Security and Access Control
  • In-flight systems
  • Industrial controllers
  • Cars
  • Games consoles
  • Wearable tech
  • Enterprise systems for business

 

Linux is one of the most – if not the most – popular, operating systems in the world. It was originally developed for personal computers based on the Intel x86 architecture.

Since its initial release, Linux has been ported to more platforms than any other operating system featuring distributions such as Linux Mint, Ubuntu, Debian, Manjaro and Fedora.

Here are five quick tips from our Linux software team to help make your life a little easier and improve productivity:

5 Linux Development Tips for a happy life

1  Minimise your changes from upstream

2  Document where your changes came from

3  If you import changes from elsewhere, keep these changes also as close to upstream

4  Use your build system effectively to manage the changes

5  Keep your VCS history simple: rebase, don’t merge

Plus bonus tip!

 

1. Minimise your changes from upstream

Why?

Because you’ll find it much easier to:

•       comprehend what has changed in reviewing and debugging

•       work on when further changes needed

•       update to future software releases

•       re-use work on different projects

 

2. Document where your changes came from

If you import changes or patches from another place, to fix an issue or to implement/extend some feature that’s in another branch of your software, then document it in the changelog as follows:

◦        what you brought across

◦        where it came from

◦        what you changed to fit it in

◦        why all this was done

Check out our other Linux development tips in these articles:

Embedded Linux Security: How to Secure Your IoT devices

Revision Control of your Embedded Linux System

How to tell if hardware has Embedded Linux support

How to debug your Linux Application: Debugging by printf

 

3. If you import changes from elsewhere, keep these changes also as close to upstream

It can help in future understanding if you commit the imported changes as-is and then make a further commit to adjust them to your software environment.

However, be aware that a non-building or non-functioning commit can break automatic problem bisection algorithms such as git-bisect.

Therefore, it’s best to try to have a before-and-after known good state.

 

4. Use your build system effectively to manage the changes

Identify how to override the build system and tweak package configs.

If possible, use overrides rather than importing/editing existing recipes, for example when:

◦        changing build options

◦        updating package version

 

5. Keep your VCS history simple – rebase, don’t merge

Avoid complex multi-threaded branches which diverge for a couple of commits and then rejoin.

It’s fine to keep on using branches for developing specific identifiable features or bugfix developments and merge them in when complete.

But, if two developers are working on one branch, it’s helpful to try to keep that single branch history relatively simple and clear to follow.

For example: if you and a colleague are working on small incremental commits to the same branch, instead of

git pull –merge

consider using

git pull –rebase

You may also need to git stash save beforehand and git stash pop afterwards if you have uncommitted files, but the history will be much cleaner for future developers to understand.

Bonus Tip: Keep an open mind on the best way to implement a change!

 

Get Embedded Linux Development Support

Thinking of outsourcing your embedded Linux development?

Do your software developers need support with your Linux kernel, Linux distributions or other developments involving Linux operating systems?

Contact our technical experts at ByteSnap, who have years of experience in this field and are trusted by companies around the world to deliver secure, robust, Linux software projects.

We’re ready to help!

Further reading

Linux.com

Share:

Related Posts