TECHNOLOGY Insight Coding for all
I’m wearing my party lights, unplugged
Toby Schachman
Think writing code must be difficult or boring? You’re in for a surprise MANY great ideas start out as scribbles “When people describe algorithms on scraps of paper, as thinking visually they’ll give a spatial analogy almost all is an intuitive way to grapple with the time,” says Schachman. Though abstract concepts. Part of the reason still in its early stages, the ideas behind is the immediacy – thoughts can be the interface could change the way captured and communicated in a programming is done. Think of sketch and, if wrong, changed or interacting with Photoshop. scratched out just as quickly. Not so “The form that you’re working for computer programmers. in resembles the thing that you’re A program is a set of instructions creating,” says Schachman – there is for turning input – such as numerical no need to worry about changing values – into output. The causal chain the underlying code. His prototype is one-way. To change the output, you works in much the same way. have to trace the chain back to the He will present it at the Splash relevant instructions and change what they do with the input. This can make “You can manipulate the hunting down errors in the program or underlying source code by simply dragging parts simply experimenting with different of the fractals around” outputs an unintuitive process of jumping back-and-forth. Artist and programmer Toby programming conference in Tucson, Schachman thinks we can do better. Arizona, in October. As part of his thesis project for the He’s not alone in wanting to simplify Interactive Telecommunications the coding process. Bret Victor, who Program at New York University, has designed user interfaces for Apple, he developed an experimental is another developer who wants to programming interface called open up programming to a wider Recursive Drawing, in which community. “To write code you programmers can incrementally build essentially have to play computer. up complex fractal-like structures. You have to simulate in your head The design lets them manipulate the what each line of code would do,” he underlying source code by simply said in a talk last year at the Canadian dragging parts of the patterns around. University Software Engineering 22 | NewScientist | 25 August 2012
Conference. “So much of creation is about discovery and you can’t discover anything if you can’t see what you’re doing.” Schachman’s approach is a good start, agrees Peter van Roy, a computer scientist at the Catholic University of Louvain (UCL) in Belgium and developer of FractaSketch, a graphical design tool based on fractals that has been used in the fashion industry. “Text-based programming is still the best way to give precise instructions to a computer,” he says. But there’s a big gap between writing the text and seeing what the running program does. “Bringing in graphical ideas like Schachman does can definitely reduce this gap,” he adds Sara Jones at City University in London, who is researching creative techniques for software development, says Recursive Drawing is part of a trend that will help to democratise programming. “It opens up the process of programming to a broader community of people, including artists, architects and designers, for whom the unnecessary translation of ideas into text may constitute a frustrating and unwelcome block to the flow of creative ideas,” she says. Douglas Heaven n
BRYAN HELM/Corbis
Let’s play computer
BATTERIES are going round the bend. A flexible, lithium-ion battery can fit inside the cable for your earphones so you can wear it round your neck. Developed by a team at Pusan National University in South Korea, the battery is made from electrode strands coiled into a hollow core and surrounded by an outer electrode tube. It could make future gadgets lighter because they will no longer need an integrated battery. Flexible displays or wearable electronics will be less bulky too. It might mean you can wear your power source on the wrist, round your neck or any another part of the body, its creators say. In tests, a prototype continuously operated a red LED screen and iPod Shuffle even when researchers tied the battery in a knot. Je Young Kim of Korean firm LG Chem and a co-creator of the device, says the battery can power a small MP3 player for up to 10 hours and provide 5 minutes of emergency calls from a cellphone (Journal of Advanced Materials, doi.org/ fz5rg5). The team’s goal is to have the battery ready for mass production by 2017, for use in MP3 players or as emergency back-up power for cellphones. “This may be the first cornerstone of the wearable energy era,” says Kim. Will Ferguson n