Xfce is a lightweight desktop environment for UNIX-like operating systems. It aims to be fast and low on system resources, while still being visually appealing and user friendly.
XFCE is awesome, and it has thousands of themes to allow you to make it look just the way you want it to. It’s not as heavy on resources as Gnome 3, and not as nimble as Openbox, but for me it strikes the perfect balance between aesthetics and performance.
XFCE is a stacking window manager, that treats windows like pieces of paper that can be stacked, like in Microsoft Windows or Apple Mac OS. There are also tiling window managers that are much lower on resources but usually don’t offer the aesthetics of a stacking WM. ArchWiki has an extensive list.
While Gnome does offer tiling extensions, I don’t want that high of a resource burden. I like XFCE just fine, but the tiling features that it offers are a little lacking. XFCE 4.12 did introduce quarter screen corner tiling in addition to half screen tiling, but I’d like to define my own grid. On my laptop, I’d like to have my editor take up as much space as it needs for me to have a 100 character line length, and the rest is for my terminal. And I want to be able to tile or un-tile my windows to my grid using hotkeys. And I have no need for window decorations once a window is tiled, but want them back sometimes when it isn’t.
I’ve written a Python script that does exactly that. Here is the grid I’ve defined in the XFCE Settings Editor under xfce4-keyboard-shortcuts
.
1 | Property Value |
This gives me the following setup on my 1366 x 768 laptop:
1 | . . 400px . . . . . . . . . . 966px . . . . . . . . |
This allows me to quickly tile a new window to the left 60% of my screen with Super+Left, open another one and tile it to 40% right with Super+Right.
If I want to move it, I can center the window and turn the window decorations back on with Super+Alt+Up, or hold Alt and drag it with my mouse.
1 | #! /usr/bin/python2.7 |
To download, just copy/paste the thing, save the repo as a zip or run git clone https://github.com/sjaakvandenberg/gtk-tiling.git
. You’ll also need python2
, and pygtk
.
1 | $ ./tiling.py -h |
Make sure to give the script executable permissions with chmod +x tiling.py
. To see it in use, here’s a video walkthrough.
Happy tiling!
]]>Human drivers are so twentieth century. They’re prone to errors, have terrible fuel economy and they tend to get distracted, or sometimes even fall asleep. But in an increasingly connected world, robots will help aid us in our needs for transportation.
The first digitally operated and programmable robot was invented by George Devol in 1954 and was ultimately called the Unimate [1]. The first Unimate was sold in 1960 to General Motors and used in a plant in Trenton, New Jersey to lift and stack hot pieces of metal from a die casting machine. Since then we’ve come a long way and robots
We’ve come a long way since the Unimate, and robots can handle situations of increasing complexity. Using a multitude of sensors, they keep track of every single thing that has even but a remote chance of colliding with the car, both the seen and the unseen. Objects are measured, tracked and the risks assessed continuously. The car knows exactly where it is, and increasingly, what the meaning of the things are around it. It will read signs, take turns, break for a family of ducks, read turn signals, break lights and road conditions. It monitors tire pressure, engine temperature, battery levels, locations of charging stations, weather forecasts, all while playing you the latest movie, massaging your back and receiving messages from your family and friends.
Outsourcing simple tasks to robots allows you to spend your time focusing on other things. If you spend half an hour driving to work every day, that adds up to well over a year that you spend commuting over the course of your career. When your commute becomes part of your productive work day, you will be getting back the time you would have otherwise spent transporting yourself. A traffic jam doesn’t have to be a waste of your time anymore.
According to the U.S. Department of Transportation, about 33,000 [2] people die in traffic crashes every year. Human driver error is responsible for 94% [3] of those crashes. After autonomously driving over a million miles, Google’s fleet of autonomous cars have been in 11 crashes. According to Chris Urmson [4], the director of Google’s self-driving car program, their self-driving cars were not at fault in any of the crashes. Google hasn’t released any DMV reports from the crashes as of yet.
Vehicles from Mercedes-Benz already come equipped with radar-based collision detection as a standard. Autonomous breaking in case of an impending collision is becoming available for all models, and many current higher end models can already park themselves and drive semi-autonomously on public roads today [5].
Cars slipstreaming on highways can save fuel consumption up to 30 percent by reducing drag on the vehicles following the lead car [6]. According to a 1999 study [7], the presence of just 10 percent semi-automated vehicles in manual driving traffic leads to a 7.3 percent lower fuel consumption, and 3.8 - 47.3 percent lower pollution levels.
Aside from saving money on fuel, it will also be cheaper to insure a car that gets into traffic accidents less often. The driver will be injured less often, resulting in lower medical costs, and cheaper health insurance.
In February 2014, federal agencies approved vehicle-to-vehicle (V2V) communications systems [8] that allow cars to talk to each other. Traffic accidents can be even further reduced by improving the vehicle’s awareness of the positions and movements of other nearby vehicles, and take measures to prevent collisions.
It will take time to get to vehicles where all we have to do is tell it where to go, and trust that it will take us there safely. As we trust our cars to make more decisions for us, their complexity under the hood increases.
The NHTSA has defined [9] a range of levels of autonomy, ranging from full manual control to full autonomy.
- No-Automation: The driver is in complete and sole control of the primary vehicle controls – brake, steering, throttle, and motive power – at all times.
- Function-specific Automation: Automation at this level involves one or more specific control functions. Examples include electronic stability control or pre-charged brakes, where the vehicle automatically assists with braking to enable the driver to regain control of the vehicle or stop faster than possible by acting alone.
- Combined Function Automation: This level involves automation of at least two primary control functions designed to work in unison to relieve the driver of control of those functions. An example of combined functions enabling a Level 2 system is adaptive cruise control in combination with lane centering.
- Limited Self-Driving Automation: Vehicles at this level of automation enable the driver to cede full control of all safety-critical functions under certain traffic or environmental conditions and in those conditions to rely heavily on the vehicle to monitor for changes in those conditions requiring transition back to driver control. The driver is expected to be available for occasional control, but with sufficiently comfortable transition time. The Google car is an example of limited self-driving automation.
- Full Self-Driving Automation: The vehicle is designed to perform all safety-critical driving functions and monitor roadway conditions for an entire trip. Such a design anticipates that the driver will provide destination or navigation input, but is not expected to be available for control at any time during the trip. This includes both occupied and unoccupied vehicles.
Level 4 Autonomy is already among us. At Heathrow Airport, autonomous cars built by Ultra Global PRT ferry people back and forth between Heathrow’s Terminal 5 and the Business Car Park. The system already meets Kyoto Protocol 2050 projections, delivering a 50% reduction in per-passenger carbon emissions compared with diesel-powered buses and 70% compared with cars.
An automotive study [10] by IHS forecasts total worldwide sales of self-driving cars will grow from nearly 230,000 in 2025 to 11.8 million in 2035 — 7 million with both driver and autonomous control, and 4.8 million with only autonomous control. In all, there should be nearly 54 million self-driving cars in use globally by 2035. The study anticipates that nearly all of the vehicles in use are likely to be self-driving cars or self-driving commercial vehicles sometime after 2050.
In the summer of 2015, Tesla is introducing Autopilot [11]. It’s a software update that automates some of the actions traditionally performed by human drivers.
Model S will be able to steer to stay within a lane, change lanes with the simple tap of a turn signal, and manage speed by reading road signs and using active, traffic aware cruise control. It will take several months for all Autopilot features to be completed and uploaded to the cars.
Daimler already implements [12] partial autonomous systems in their vehicles, and the technology is improving rapidly. The Freightliner Inspiration Truck has been licensed by the state of Nevada to drive autonomously on highways in the United States today. It operates at Autonomy Level 3, which means that it can drive autonomously on high quality highways with clear demarcations and drive in formation, but a human driver still needs to be present in case the system needs help.
Rolls-Royce’s development team Blue Ocean is working on a project aiming to make intercontinental cargo shipping autonomous [13]. This would allow ships to be redesigned without the need for human-related infrastructure such as heating, air conditioning, lifeboats, crew quarters, water purification, sewage systems, handle rails, walkways and the bridge. It would weigh 5 percent less and use up to 15 percent less fuel. It would also make it a far less attractive target to pirates, unable to take hostages or steer the ship, which can be controlled remotely.
Since the 2000s, 63% of fatal accidents in civilian air travel are due to human error [14]. In 1987, the Airbus A320 was the first aircraft to fly with digital fly-by-wire controls. This system controls the aircraft electronically, instead of mechanically. In April 2013, BAE Systems flew a converted Jetstream aircraft on a 500 mile trip from Warton, Lancashire to Inverness, Scotland without a human pilot controlling the aircraft [15].
Autonomy in transportation of goods and people will decrease costs and improve comfort, safety and fuel economy. As software increases in complexity, autonomy marches on into unchartered waters. It gives rise to new business models and redefine how we think about both medium and long range travel and transportation of goods. And it all starts with a lane change.
When we think of contracts in 2014, most people will think of paperwork, signatures, notaries, lawyers, fees, and hassle. A lot of our traditional contracts are like that, although these days many contracts are digitized and done online. The digital versions of contracts however, aren’t fundamentally different from their physical counterparts. Both are examples of dumb contracts, which is to say, non interactive. They merely outline the rules of a contract and have no ability to act upon them.
What if the rules outlined in contracts were in fact executable? What if the rules of a contract worked like lines of code in a program? What if contracts contained code that could interact with the world?
Smart contracts are computer protocols that facilitate, verify, or enforce the negotiation or performance of a contract, or that obviate the need for a contractual clause. Smart contracts usually also have a user interface and often emulate the logic of contractual clauses. Proponents of smart contracts claim that many kinds of contractual clauses may thus be made partially or fully self-executing, self-enforcing, or both. Smart contracts aim to provide security superior to traditional contract law and to reduce other transaction costs associated with contracting.
Smart contract: A set of promises, including protocols within which the parties perform on the other promises. The protocols are usually implemented with programs on a computer network, or in other forms of digital electronics, thus these contracts are “smarter” than their paper-based ancestors. No use of artificial intelligence is implied.
One of the first papers that was published about smart contracts was in 1997, by Nick Szabo [1]. It’s well worth a read.
Consider an apartment complex where tenancy is registered on the blockchain, managed by programs that control access to the building. Upon payment of the rent (or otherwise agreed upon terms) each tenant’s access to the building is renewed. Owners of registered keys are granted access to the doors, various types of utilities such as washing machines, trash shoots, mail boxes, et cetera. The comparing of the user of a device against the list of allowed users can be seamless by using technology such as NFC, RFID or unique biometric identifiers that are paired with a cryptographic key. When a tenant moves out of the building, access is automatically revoked.
These same principles can be applied to businesses granting access to various parts of a company building, car rental, vacation homes, hotels, et cetera.
This technology can remove the need to exchange keys in person and remember passwords. Access can be limited to certain areas for maintenance personnel or temporary for guests. It would decrease the incentive for theft, as devices that only work with certain cryptographic keys are more difficult aren’t very attractive to steal. Access can be granted, adjusted or revoked based on manual input or automatically triggered by certain conditions.
An oracle is a program that monitors external conditions as triggers for smart property. An oracle’s input can be provided by sensors or certified third parties. In the latter case, consensus averaging, weighting based on factors such as reputation and past accuracy are encouraged to improve data quality. For example, if weather forecasts are an input signal for a crop insurance program for farmers, the average of the five best weather forecast companies could be taken, each input weighted individually.
Another use case is usage tracking. A tenant in our aforementioned building might be granted ten uses of the laundry machines each month. Each time he uses a machine, his counter increments by one. When it reaches ten, access is revoked for that month or continues at a premium rate.
A different example is the distribution of the funds controlled by a will. An oracle connected to a will can monitor death ledgers, in which persons’ deaths are recorded. If the oracle detects that the owner of the will has died, the assets controlled by the will can automatically redistribute ownership as pre-programmed. Marriages, the additional of grandchildren, additional deaths can all be accounted for in the distribution formula.
Sites such as Kickstarter or Indiegogo are currently market leaders in crowd funding. With the help of smart contracts, this can also be done in a decentralized manner. The basic formula of a crowd funded project is that a product will be manufactured if a certain amount is met in pledges from backers. Entrepreneurs’ public reputations and mutual insurance contracts for both backers and entrepreneurs can help mitigate risks. These projects can be done on the scale of a child’s lemonade stand or local charity, or globally for a band’s world tour or launch of a new product.
Uber and Lyft are already changing the landscape of human transportation over medium distances. They undercut cabs’ fares and drivers have rating profiles, encouraging quality. If we peer into the future and remove fallible human drivers, how could this fit in light of smart contracts?
Imagine different autonomous networks of vehicles. Some transport humans, others transport cargo. They specialize. Human transportation needs vary. Passengers with similar destinations can be transported cheaper when grouped together, such as company and school bus services. Others will want to enjoy the privacy and comfort of their private vehicle. Cargo needs vary as well, from intercontinental freight shipping to 5 minute pizza drone delivery services.
Each of the vehicles these networks is autonomous. Programs run their fleets and, like when a printer runs out of ink, can order itself new supplies. Manage profits, taken in by passengers and companies that make use of its services. Buy upgrades. Repairs. Expand. When a service can’t make a profit, it will cease to exist, just like companies in the market do today. The most successful programs will thrive, until better ones arise.
The agricultural revolution automated large parts of the work previously done manually by farm workers and workers’ productivity was diverted to other industries. Distributed, trustless networks will allow some tasks currently done by legal and financial experts, accountants and various kinds of overseers, the be performed automatically. It will lower costs and open up both existing and new markets to new audiences.
[1] N. Szabo, “The Idea of Smart Contracts.” 1997 [Online]. Available: http://szabo.best.vwh.net/idea.html. [Accessed: 2014/10/29]
]]>