Home Blog Page 283

Top 5 Linux Distributions for Development in 2019

One of the most popular tasks undertaken on Linux is development. With good reason: Businesses rely on Linux. Without Linux, technology simply wouldn’t meet the demands of today’s ever-evolving world. Because of that, developers are constantly working to improve the environments with which they work. One way to manage such improvements is to have the right platform to start with. Thankfully, this is Linux, so you always have a plethora of choices.

But sometimes, too many choices can be a problem in and of itself. Which distribution is right for your development needs? That, of course, depends on what you’re developing, but certain distributions that just make sense to use as a foundation for your task. I’ll highlight five distributions I consider the best for developers in 2019.

Ubuntu

Let’s not mince words here. Although the Linux Mint faithful are an incredibly loyal group (with good reason, their distro of choice is fantastic), Ubuntu Linux gets the nod here. Why? Because, thanks to the likes of AWS, Ubuntu is one of the most deployed server operating systems. That means developing on a Ubuntu desktop distribution makes for a much easier translation to Ubuntu Server. And because Ubuntu makes it incredibly easy to develop for, work with, and deploy containers, it makes perfect sense that you’d want to work with this platform. Couple that with Ubuntu’s inclusion of Snap Packages, and Canonical’s operating system gets yet another boost in popularity.

But it’s not just about what you can do with Ubuntu, it’s how easily you can do it. For nearly every task, Ubuntu is an incredibly easy distribution to use. And because Ubuntu is so popular, chances are every tool and IDE you want to work with can be easily installed from the Ubuntu Software GUI (Figure 1).

Figure 1: Developer tools found in the Ubuntu Software tool.

If you’re looking for ease of use, simplicity of migration, and plenty of available tools, you cannot go wrong with Ubuntu as a development platform.

openSUSE

There’s a very specific reason why I add openSUSE to this list. Not only is it an outstanding desktop distribution, it’s also one of the best rolling releases you’ll find on the market. So if you’re wanting to develop with and release for the most recent software available, openSUSE Tumbleweed should be one of your top choices. If you want to leverage the latest releases of your favorite IDEs, if you always want to make sure you’re developing with the most recent libraries and toolkits, Tumbleweed is your platform.

But openSUSE doesn’t just offer a rolling release distribution. If you’d rather make use of a standard release platform, openSUSE Leap is what you want.

Of course, it’s not just about standard or rolling releases. The openSUSE platform also has a Kubernetes-specific release, called Kubic, which is based on Kubernetes atop openSUSE MicroOS. But even if you aren’t developing for Kubernetes, you’ll find plenty of software and tools to work with.

And openSUSE also offers the ability to select your desktop environment, or (should you chose) a generic desktop or server (Figure 2).

Figure 2: The openSUSE Tumbleweed installation in action.

Fedora

Using Fedora as a development platform just makes sense. Why? The distribution itself seems geared toward developers. With a regular, six month release cycle, developers can be sure they won’t be working with out of date software for long. This can be important, when you need the most recent tools and libraries. And if you’re developing for enterprise-level businesses, Fedora makes for an ideal platform, as it is the upstream for Red Hat Enterprise Linux. What that means is the transition to RHEL should be painless. That’s important, especially if you hope to bring your project to a much larger market (one with deeper pockets than a desktop-centric target).

Fedora also offers one of the best GNOME experiences you’ll come across (Figure 3). This translates to a very stable and fast desktops.

Figure 3: The GNOME desktop on Fedora.

But if GNOME isn’t your jam, you can opt to install one of the Fedora spins (which includes KDE, XFCE, LXQT, Mate-Compiz, Cinnamon, LXDE, and SOAS).

Pop!_OS

I’d be remiss if I didn’t include System76’s platform, customized specifically for their hardware (although it does work fine on other hardware). Why would I include such a distribution, especially one that doesn’t really venture far away from the Ubuntu platform for which is is based? Primarily because this is the distribution you want if you plan on purchasing a desktop or laptop from System76. But why would you do that (especially given that Linux works on nearly all off-the-shelf hardware)? Because System76 sells outstanding hardware. With the release of their Thelio desktop, you have available one of the most powerful desktop computers on the market. If you’re developing seriously large applications (especially ones that lean heavily on very large databases or require a lot of processing power for compilation), why not go for the best? And since Pop!_OS is perfectly tuned for System76 hardware, this is a no-brainer.
Since Pop!_OS is based on Ubuntu, you’ll have all the tools available to the base platform at your fingertips (Figure 4).

Figure 4: The Anjunta IDE running on Pop!_OS.

Pop!_OS also defaults to encrypted drives, so you can trust your work will be safe from prying eyes (should your hardware fall into the wrong hands).

Manjaro

For anyone that likes the idea of developing on Arch Linux, but doesn’t want to have to jump through all the hoops of installing and working with Arch Linux, there’s Manjaro. Manjaro makes it easy to have an Arch Linux-based distribution up and running (as easily as installing and using, say, Ubuntu).

But what makes Manjaro developer-friendly (besides enjoying that Arch-y goodness at the base) is how many different flavors you’ll find available for download. From the Manjaro download page, you can grab the following flavors:

  • GNOME

  • XFCE

  • KDE

  • OpenBox

  • Cinnamon

  • I3

  • Awesome

  • Budgie

  • Mate

  • Xfce Developer Preview

  • KDE Developer Preview

  • GNOME Developer Preview

  • Architect

  • Deepin

Of note are the developer editions (which are geared toward testers and developers), the Architect edition (which is for users who want to build Manjaro from the ground up), and the Awesome edition (Figure 5 – which is for developers dealing with everyday tasks). The one caveat to using Manjaro is that, like any rolling release, the code you develop today may not work tomorrow. Because of this, you need to think with a certain level of agility. Of course, if you’re not developing for Manjaro (or Arch), and you’re doing more generic (or web) development, that will only affect you if the tools you use are updated and no longer work for you. Chances of that happening, however, are slim. And like with most Linux distributions, you’ll find a ton of developer tools available for Manjaro.

Figure 5: The Manjaro Awesome Edition is great for developers.

Manjaro also supports the Arch User Repository (a community-driven repository for Arch users), which includes cutting edge software and libraries, as well as proprietary applications like Unity Editor or yEd. A word of warning, however, about the Arch User Repository: It was discovered that the AUR contained software considered to be malicious. So, if you opt to work with that repository, do so carefully and at your own risk.

Any Linux Will Do

Truth be told, if you’re a developer, just about any Linux distribution will work. This is especially true if you do most of your development from the command line. But if you prefer a good GUI running on top of a reliable desktop, give one of these distributions a try, they will not disappoint.

Learn more about Linux through the free “Introduction to Linux” course from The Linux Foundation and edX.

Deep Learning 101 — Role of Deep Learning in Artificial Intelligence

It is important to understand some basic concepts of AI, ML and Deep Learning to get a better sense of What they do and How they can be useful.

  • Artificial intelligence (AI) is an area of computer science that emphasizes the creation of intelligent machines that work and react like human.
  • Machine learning (ML) is an approach to achieve Artificial Intelligence. ML approach provides computers with the ability to learn without being explicitly programmed. At its most basic is the practice of using algorithms to parse data, learn from it, and then make prediction about something in the world.
  • Deep learning (DL) is a technique for implementing Machine Learning. DL is the application of artificial neural networks to learning tasks that contain more than one hidden layer.
  • Artificial neural networks are computing systems inspired by the biological neural networks that constitute animal brains. An artificial neural network is an interconnected group of nodes, akin to the vast network of neurons in a brain. Here, each circular node represents an artificial neuron and an arrow represents a connection from the output of one neuron to the input of another.

Read more at Medium

How Machine Learning Will Change Software Development

Artificial intelligence (AI) is not sci-fi anymore; machines have made their way into our lives with ever-increasing importance. Today, humans are teaching machines and machines already affect the way we live, make choices, and get entertained.

There are many ways we already use AI in our everyday lives:

* We ask our devices to perform simple searching tasks, play music, or send messages without touching them.

* We are overwhelmed with sometimes creepy suggestions of things we “want” to buy or lists of movies we will enjoy watching according to some smart algorithms.

* We’re already used to the idea of self-driving cars.

* And we can’t ignore the convenience of the new auto-fill and follow-up Gmail features.

Machine Learning on Code

As AI technology matures and the number of use cases grows, you would think that developers would already be using machine learning to automate some aspects of the software development lifecycle. However, Machine Learning on Code is actually a field of research that is just starting to materialize into enterprise products. One of the pioneers of movement is a company called source{d}, which is building a series of open source projects turning code into actionable data and training machine learning models to help developers respect technical guidelines.

With every company quickly becoming a software company, intangible assets such as code represent a larger share of their market value. Therefore companies should strive to understand their codebase through meaningful analytic reports to inform engineering decisions and develop a competitive advantage for the business.

On one hand, managers can use tools like the open source source{d} engine to easily retrieve and analyze all their Git repositories via a friendly SQL API. They can run it from any Unix system, and it will automatically parse their companies’ source code in a language-agnostic way to identify trends and measure progress made on key digital transformation initiatives.

For example, as an engineering manager, you can track the evolution of your software portfolio. You can easily see what programming languages, open source or proprietary frameworks are becoming more popular as part of your development process. With that extra visibility, it becomes a whole lot easier to decide who to hire and develop a set of company-wide best practices

On the other hand, developers can save an incredible chunk of time by training bots to review their code as they submit pull requests (PRs). Once enabled across a large set of repositories, this could automate part of the code review process and enable developers to ship secure and qualitative code faster than ever before.

At the moment it checks for common mistakes, makes sure the style and format of each commits is consistent with the existing code base or highlights hotspots that might need closer attention. That’s huge already and clearly can benefit not only developers but companies as well. Imagine how much time and resources you could save from delegating your code review to a bot capable of working 24/7.

Assisted or automated code review is not the only Machine Learning on Code use case. In the coming years, machine learning will be used to automate quality assurance and testing, as well as bug prediction or hardware performance. For now, you can try source{d} Lookout and install it on your repository. It will listen for PRs, run analyzers and comment results directly on GitHub.

This article was produced in partnership with Holberton School.

Ditching Out-of-Date Documentation Infrastructure

Long ago, the Linux kernel started using 00-Index files to list the contents of each documentation directory. This was intended to explain what each of those files documented. Henrik Austad recently pointed out that those files have been out of date for a very long time and were probably not used by anyone anymore. 

He posted a patch to rip them all unceremoniously out of the kernel.

Jonathan Corbet was more reserved. He felt Henrik should distribute the patch among a wider audience and see if it got any resistance. He added:

I’ve not yet decided whether I think this is a good idea or not. We certainly don’t need those files for stuff that’s in the RST doctree, that’s what the index.rst files are for. But I suspect some people might complain about losing them for the rest of the content. I do get patches from people updating them, so some folks do indeed look at them.

Read more at Linux Journal

How Men and Women Approach Open Source Differently

With open source software becoming more and more a requirement for job searchers, job seekers are finding that it is critical to becoming a part of this community. Many would rather see a GitHub profile than a CV.

But currently, only about 10 percent of open source contributors are women.

For this episode of The New Stack Makers podcast, Dr. Anita Sarma, associate professor of computer science in the Department of Electrical Engineering and Computer Science at Oregon State University, joins us to talk about her recent research on how to increase gender inclusivity in open source.

Her recent research focuses on problem-solving facets in which men and women differ statistically. In her research, she has focused on five ways in which men and women statistically differ in how they problem solve.

Read more at The New Stack

Your First Machine Learning Project in R Step-By-Step

Do you want to do machine learning using R, but you’re having trouble getting started?

In this post you will complete your first machine learning project using R.

In this step-by-step tutorial you will:

  1. Download and install R and get the most useful package for machine learning in R.
  2. Load a dataset and understand it’s structure using statistical summaries and data visualization.
  3. Create 5 machine learning models, pick the best and build confidence that the accuracy is reliable.

If you are a machine learning beginner and looking to finally get started using R, this tutorial was designed for you.

Let’s get started!

The best way to learn machine learning is by designing and completing small projects.

R Can Be Intimidating When Getting Started

R provides a scripting language with an odd syntax. There are also hundreds of packages and thousands of functions to choose from, providing multiple ways to do each task. It can feel overwhelming.

The best way to get started using R for machine learning is to complete a project.

  • It will force you to install and start R (at the very least).
  • It will given you a bird’s eye view of how to step through a small project.
  • It will give you confidence, maybe to go on to your own small projects.

Read more at Machine Learning Mastery

LF Edge: Bringing Complementary Initiatives Together to Advance Emerging Applications at the Edge

Earlier today, we announced the launch of LF Edge, a new umbrella organization designed to establish an open, interoperable framework for edge computing independent of hardware, silicon, cloud, or operating system. The goal is to foster a unified, open framework that brings complementary projects under one central umbrella to create collaborative solutions that are compatible and support the ecosystem.

LF Edge is comprised of five anchor projects, which includes the existing Akraino Edge Stack, EdgeX Foundry, and Open Glossary of Edge Computing, as well as two new projects – Home Edge Project, and Project EVE, with seed code and initial architecture donated by Samsung and ZEDEDA, respectively. (More details on these projects are available on the new LF Edge website.)

Everyone is talking about Edge computing, but what does it really mean?

That is the million dollar question. Here’s how I like to define “Edge computing”: it’s a distributed computing paradigm in which computation is largely or completely performed on distributed device nodes known as “smart devices” or “edge devices,”  with between five and 20 milliseconds of latency (as opposed to primarily taking place in a centralized cloud environment). Edge represents a convergence of technologies that have recently matured or are coming to market, including: 5G, Artificial Intelligence, Deep Learning, Analytics, and Hardware. Related, emerging edge applications and convergence of these technologies are also demanding and fueling lower latency and accelerated processing.

Another way to answer the “what is edge” question is: anything that is non-traditional video,or  anything that is not connected that moves (e.g., drones, cars etc). These emerging technologies are really driving the market.  

All that said, there is a strong market opportunity for edge applications, and this spans industrial, enterprise and consumer use cases in complex environments across multiple edges and domains. Primary examples include industrial manufacturing, energy (oil and gas), retail, homes (including B2B2C use cases), automotive, with interest also from sectors such as  fleet/transportation, logistics, building automation, cities and governments, healthcare, and more.

Another leading use case for edge applications is video. Several months ago, IHS Markit interviewed edge computing thought leaders to discover which applications run on edge, deployment timing, revenue potential and the existing and expected barriers and difficulties of deployment. The survey found that 92 percent of the respondents cited video as the top edge application for edge computing, and that 82 percent of edge traffic will be occupied by video applications by 2020. (More details on this research are available in my blog post from September, 2018.)

LF Edge – Why Now?

The current edge market is heavily fragmented, with multiple proprietary stacks for each public cloud. Every application and hardware manufacturer has to certify for individual cloud platforms such as AWS and Microsoft Azure. The open source market for edge is also currently fragmented, with a proliferation of groups working in silos towards similar goals. By adopting the umbrella formula utilized by other existing LF projects such as CNCF and LF Networking, LF Edge will provide an open framework to address market needs for edge and IoT by combining new and existing stacks and consolidating them into one singular, customizable framework.

Additional benefits LF Edge brings to the ecosystem include the establishment of an edge framework that is independent of hardware, silicon, cloud, or operating system protocol and introduces location and latency differentiation to edge applications. LF Edge is well-positioned to collaborate across standards bodies and consortiums (e.g., IIC, AECC, OEC, TIP) by developing code that complements existing industry specifications. The project will also complement existing ecosystems such as AWS and Azure by introducing standard APIs.  

In sum, LF Edge was established to create a common framework for hardware and software specifications and best practices critical to sustaining current and future generations of IoT and edge devices. This new community-forged organization will will help ensure greater harmonization to accelerate deployment among the rapidly growing number of edge devices slated to exceed 20 billion by 2020.

To learn more about LF Edge, read the press release and visit the new website, www.lfedge.org. You can also follow the project on Twitter at @lf_edge.

Understanding Angle Brackets in Bash

Bash provides many important built-in commands, like ls, cd, and mv, as well as regular tools such as grep, awk, and sed. But, it is equally important to know the punctuation marks — the glue in the shape of dots, commas, brackets. and quotes — that allow you to transform and push data from one place to another. Take angle brackets (< >), for example.

Pushing Around

If you are familiar with other programming and scripting languages, you may have used < and > as logical operators to check in a condition whether one value is larger or smaller than another. If you have ever written HTML, you have used angle brackets to enclose tags.

In shell scripting, you can also use brackets to push data from place to place, for example, to a file:

ls > dir_content.txt

In this example, instead of showing the contents of the directory on the command line, > tells the shell to copy it into a file called dir_content.txt. If dir_content.txt doesn’t exist, Bash will create it for you, but if dir_content.txt already exists and is not empty, you will overwrite whatever it contained, so be careful!

You can avoid overwriting existing content by tacking the new stuff onto the end of the old stuff. For that you use >> (instead of >):

ls $HOME > dir_content.txt; wc -l dir_content.txt >> dir_content.txt

This line stores the list of contents of your home directory into dir_content.txt. You then count the number of lines in dir_content.txt (which gives you the number of items in the directory) with wc -l and you tack that value onto the end of the file.

After running the command line on my machine, this is what my dir_content.txt file looks like:

Applications 
bin 
cloud 
Desktop 
Documents 
Downloads 
Games 
ISOs 
lib 
logs 
Music 
OpenSCAD 
Pictures 
Public 
Templates 
test_dir 
Videos 
17 dir_content.txt

The mnemonic here is to look at > and >> as arrows. In fact, the arrows can point the other way, too. Say you have a file called CBActors containing some names of actors and the number of films by the Coen brothers they have been in. Something like this:

John Goodman 5
John Turturro 3
George Clooney 2
Frances McDormand 6
Steve Buscemi 5
Jon Polito 4
Tony Shalhoub 3
James Gandolfini 1

Something like

sort < CBActors # Do this
Frances McDormand 6 # And you get this
George Clooney 2 
James Gandolfini 1 
John Goodman 5 
John Turturro 3 
Jon Polito 4 
Steve Buscemi 5 
Tony Shalhoub 3

Will sort the list alphabetically. But then again, you don’t need < here since sort already expects a file anyway, so sort CBActors will work just as well.

However, if you need to see who is the Coens’ favorite actor, you can check with :

while read name surname films; do echo $films $name $surname > filmsfirst.txt; done < CBActors

Or, to make that a bit more readable:

while read name surname films; 
 do 
   echo $films $name $surname >> filmsfirst; 
 done < CBActors

Let’s break this down, shall we?

  • the while ...; do ... done structure is a loop. The instructions between do and done are repeatedly executed while a condition is met, in this case…
  • … the read instruction has lines to read. read reads from the standard input and will continue reading until there is nothing more to read…
  • … And as standard input is fed in via < and comes from CBActors, that means the while loop will loop until the last line of CBActors is piped into the loop.
  • Getting back to read for a sec, the tool is clever enough to see that there are three distinct fields separated by spaces on each line of the file. That allows you to put the first field from each line in the name variable, the second in surname and the third in films. This comes in handy later, on the line that says echo $films $name $surname >> filmsfirst;, allowing you to reorder the fields and push them into a file called filmsfirst.

At the end of all that, you have a file called filmsfirst that looks like this:

5 John Goodman 
3 John Turturro 
2 George Clooney 
6 Frances McDormand 
5 Steve Buscemi 
4 Jon Polito 
3 Tony Shalhoub 
1 James Gandolfini

which you can now use with sort:

sort -r filmsfirst

to see who is the Coens’ favorite actor. Yes, it is Frances McDormand. (The -r option reverses the sort, so McDormand ends up on top).

We’ll look at more angles on this topic next time!

Working with the Container Storage Library and Tools in Red Hat Enterprise Linux

How containers are stored on disk is often a mystery to users working with the containers. In this post, we’re going to look at how containers images are stored and some of the tools that you can use to work with those images directly –PodmanSkopeo, and Buildah.

Evolution of Container Image Storage

When I first started working with containers, one of the things I did not like about Docker’s architecture was that the daemon hid the information about the image store within itself. The only realistic way someone could use the images was through the daemon. We were working on theatomic tool and wanted a way to mount the container images so that we could scan them. After all a container image was just a mount point under devicemapper or overlay.

The container runtime team at Red Hat created the atomic mountcommand to mount images under Docker and this was used within atomic scan. The issue here was that the daemon did not know about this so if someone attempted to remove the image while we mounted it, the daemon would get confused. The locking and manipulation had to be done within the daemon. …

Container storage configuration is defined in the storage.conf file. For containers engines that run as root, the storage.conf file is stored in /etc/containers/storage.conf. If you are running rootless with a tool like Podman, then the storage.conf file is stored in $HOME/.config/containers/storage.conf.

Read more at Red Hat blog

High Reliability Infrastructure Migrations

On Tuesday I gave a talk at KubeCon called High Reliability Infrastructure Migrations. The abstract was:

For companies with high availability requirements (99.99% uptime or higher), running new software in production comes with a lot of risks. But it’s possible to make significant infrastructure changes while maintaining the availability your customers expect! I’ll give you a toolbox for derisking migrations and making infrastructure changes with confidence, with examples from our Kubernetes & Envoy experience at Stripe.

Here are a few links & notes about things I mentioned in the talk.

skycfg: write functions, not YAML

I talked about how my team is working on non-YAML interfaces for configuring Kubernetes. The demo is at skycfg.fun, and it’s on GitHub here. It’s based on Starlark, a configuration language that’s a subset of Python.

My coworker John has promised that he’ll write a blog post about it at some point, and I’m hoping that’s coming soon 🙂

no haunted forests

I mentioned a deploy system rewrite we did. John has a great blog post about when rewrites are a good idea and how he approached that rewrite called no haunted forests.

Read more at Julia Evans

Watch all the presentations from KubeCon +CloudNativeCon, including Kelsey Hightower’s keynote.