What’s The Deal With Snap Packages?

Who would have thought that software packaging software would cause such a hubbub? But such is the case with snap. Developed by Canonical as a faster and easier way to get the latest versions of software installed on Ubuntu systems, the software has ended up starting a fiery debate in the larger Linux community. For the more casual user, snap is just a way to get the software they want as quickly as possible. But for users concerned with the ideology of free and open source software, it’s seen a dangerous step towards the types of proprietary “walled gardens” that may have drove them to Linux in the first place.

Perhaps the most vocal opponent of snap, and certainly the one that’s got the most media attention, is Linux Mint. In a June 1st post on the distribution’s official blog, Mint founder Clement Lefebvre made it very clear that the Ubuntu spin-off does not approve of the new package format and wouldn’t include it on base installs. Further, he announced that Mint 20 would actively block users from installing the snap framework through the package manager. It can still be installed manually, but this move is seen as a way to prevent it from being added to the system without the user’s explicit consent.

The short version of Clement’s complaint is that the snap packager installs from a proprietary Canonical-specific source. If you want to distribute snaps, you have to set up an account with Canonical and host it there. While the underlying software is still open source, the snap packager breaks with long tradition of having the distribution of the software also being open and free. This undoubtedly makes the install simple for naive users, and easier to maintain for Canonical maintainers, but it also takes away freedom of choice and diversity of package sources.

Continue reading “What’s The Deal With Snap Packages?”

Ask Hackaday: Are 80 Characters Per Line Still Reasonable In 2020?

Software developers won’t ever run out of subjects to argue and fight about. Some of them can be fundamental to a project — like choice of language or the programming paradigm to begin with. Others seem more of a personal preference at first, but can end up equally fundamental on a bigger scale — like which character to choose for indentation, where to place the curly braces, or how to handle line breaks. Latest when there’s more than one developer collaborating, it’s time to find a common agreement in form of a coding style guide, which might of course require a bit of compromise.

Regardless of taste, the worst decision is having no decision, and even if you don’t agree with a specific detail, it’s usually best to make peace with it for the benefit of uniformly formatted code. In a professional environment, a style guide was ideally worked out collaboratively inside or between teams, and input and opinions of everyone involved were taken into consideration — and if your company doesn’t have one to begin with, the best step to take is probably one towards the exit.

The situation can get a bit more complex in open source projects though, depending on the structure and size of a project. If no official style guide exists, the graceful thing to do is to simply adopt the code base’s current style when contributing to it. But larger projects that are accustomed to a multitude of random contributors will typically have one defined, which was either worked out by the core developers, or declared by its benevolent dictator for life.

In case of the Linux kernel, that’s of course [Linus Torvalds], who has recently shaken up the community with a mailing list response declaring an overly common, often even unwritten rule of code formatting as essentially obsolete: the 80-character line limitation. Considering the notoriety of his rants and crudeness, his response, which was initiated by a line break change in the submitted patch, seems downright diplomatic this time.

[Linus]’ reasoning against a continuing enforcement of 80-char line limits is primarly the fact that screens are simply big enough today to comfortably fit longer lines, even with multiple terminals (or windows) next to each other. As he puts it, the only reason to stick to the limitation is using an actual VT100, which won’t serve much use in kernel development anyway.

Allowing longer lines on the other hand would encourage the use of more verbose variable names and whitespace, which in turn would actually increase readability. Of course, all to a certain extent, and [Linus] obviously doesn’t call for abolishing line breaks altogether. But he has a point; does it really make sense to stick to a decades old, nowadays rather arbitrary-seeming limitation in 2020?

Continue reading “Ask Hackaday: Are 80 Characters Per Line Still Reasonable In 2020?”

Justice For The Gatwick Two: The Final Chapter In The British Drone Panic Saga

At the end of 2018, a spate of drone sightings caused the temporary closure of London Gatwick Airport, and set in train a chain of events that were simultaneously baffling and comedic as the authorities struggled to keep up with both events and the ever widening gap in their knowledge of the subject.

One of the more inept actions of the Sussex Police was to respond by arresting the first local drone enthusiast they could find on Facebook, locking up a local couple for 36 hours and creating a media frenzy by announcing the apprehension of the villains before shamefacedly releasing them without charge.

In a final twist to the sorry saga, the couple have sued the force for wrongful arrest and false imprisonment, for which the cops have had to make a £200,000 ($250,117) payout including legal fees.

We reported extensively on the events surrounding the case 18 months ago, and then on a follow-up event at London Heathrow airport. The mass media at the time were full of the official line that drone hobbyists must be at fault, but then as now we were more interested in seeing some hard evidence. As we said then: Show us the drone.

So how has the new drone law progressed, since it was decided that Something Must Be Done? Enthusiasts have continued as before, and the multirotor community is as technically creative as ever. We were fortunate enough to host the Lets Drone Out podcast at MK Makerspace back in those halcyon days before the pandemic and see the state of the art in sub-250g craft, and with those and commercial offerings such as the DJI Mavic Mini all requiring no registration there is increasingly little need for an enthusiast to purchase a larger machine. The boost to the British drone industry we were promised has instead been a boost for the Chinese industry as we predicted, and of course we’re still waiting for the public inquiry into the whole mess. Something tells us Hell will freeze over first.

If you’d like the whole backstory in a convenient and entertaining video format, can we direct you to this talk at CCCamp 2019.

Thanks [Stuart Rogers] for the tip.

Keystone Kops header image: Mack Sennett Studios [Public domain].

Surviving The Pandemic As A Hacker: Take Care Of Your Mental Health

As we’ve looked at the subject of face masks in the first two parts of this series, our emphasis has been on a physical step to aid your chances of making it through the COVID-19 pandemic in one piece. But given that the upheaval caused by all the social changes enacted to protect the population are likely to leave an indelible mark on those who live through them, there are significant aspects of surviving all this that go beyond the physical.

This will be a once-in-a-lifetime event for many people, a significant number will find it traumatic in some way, and for many of those people there will be an immediate and then ongoing effect on mental health. If anyone is in doubt as to from what position this is coming, I count myself among that number.

The Pressure Of A Once In A Lifetime Event

Piccadilly Circus, London, during the COVID-19 lockdown. Normally this is packed.
Piccadilly Circus, London, during the COVID-19 lockdown. Normally this is packed. Kwh1050 / CC BY-SA 4.0

Different countries have placed their own public health restrictions on their populations, but it’s likely that many of you are in some form of lockdown situation, with social or communal  activities and locations closed or curtailed, going out restricted, and with all around you in the same situation. A perfect storm of having social outlets removed while simultaneously being stuck at home perhaps with family or housemates you’d prefer not to spend too much time with is not ideal. Add to that the multiple stresses from the pandemic itself as well as other news stories from our turbulent world, and it’s hardly a surprising that it’s taking a toll. Continue reading “Surviving The Pandemic As A Hacker: Take Care Of Your Mental Health”

Samsung’s Leap Month Bug Teaches Not To Skimp On Testing

Date and time handling is hard, that’s an ugly truth about software development we’ll all learn the hard way one day. Sure, it might seem like some trivial everyday thing that you can easily implement yourself without relying on a third-party library. I mean, it’s basically just adding seconds on top of one another, roll them over to minutes, and from there keep rolling to hours, days, months, up until you hit the years. Throw in the occasional extra day every fourth February, and you’re good to go, right?

Well, obviously not. Assuming you thought about leap years in the first place — which sadly isn’t a given — there are a few exceptions that for instance cause the years 1900 and 2100 to be regular years, while the year 2000 was still a leap year. And then there’s leap seconds, which occur irregularly. But there are still more gotchas lying in wait. Case in point: back in May, a faulty lunar leap month handling in the Chinese calendar turned Samsung phones all over China into bricks. And while you may not plan to ever add support for non-Gregorian calendars to your own project, it’s just one more example of unanticipated peculiarities gone wild. Except, Samsung did everything right here.

So what happened?

Continue reading “Samsung’s Leap Month Bug Teaches Not To Skimp On Testing”

Surviving The Pandemic As A Hacker: Making A Mask Of Your Very Own

As the COVID-19 pandemic has continued along its way through the world, our community has responded as it always does, by designing and making things intended to solve the problems thrown up by the situation we find ourselves in. Much of this effort has gone into the production of PPE to plug the gap and many essential staff have been protected by maker-provided equipment, while the remainder of the effort has produced a wide array of clever designs for COVID-related items.

With curves flattened in many areas, Governments around the world are now encouraging the wearing of face masks in everyday social interactions. The purpose of mask for the general public is for droplet catching rather than virus filtering, and home made masks easily accomplish this. So let’s take a look at what you need to know about making a mast of your very own.

Continue reading “Surviving The Pandemic As A Hacker: Making A Mask Of Your Very Own”

Surviving The Pandemic As A Hacker: Peering Behind The Mask

We’re now several months into the global response to the COVID-19 pandemic, with most parts of the world falling somewhere on the lockdown/social distancing/opening up path.

It’s fair to say now that while the medical emergency has not passed, the level of knowledge about it has changed significantly. When communities were fighting to slow the initial spead, the focus was on solving the problem of medical protection gear and other equipment shortages at all costs with some interesting yet possibly hazardous solutions. Now the focus has moved towards protecting the general public when they do need to venture out, and as society learns to get life moving again with safety measures in place.

So, we all need masks of some sort. What type to do you need? Is one type better than another? And how do we all get them when everyone suddenly needs what was once a somewhat niche item?

Continue reading “Surviving The Pandemic As A Hacker: Peering Behind The Mask”