You're using the Web even when you don't think you are.
With the rise of native apps and the Internet of Things (IoT), you might think we’re leaving the Web behind.
Other languages and approaches absolutely have their place, especially in the many environments where constraints matter more than connection, but the Web core is everywhere: in your phone, your apps, the kiosks you find in stores and museums. It lurks invisibly on corporate networks helping databases and messaging systems communicate.
That enormous set of Web-related possibilities includes more than a set of technologies, though. Tools and techniques are great, but applying them yields a richer set of sometimes happy and sometimes controversial conversations.
I’ll be exploring a core set of nine key themes over the next few months, but I’ve started with brief explanations below. These short tellings set the stage for deeper explorations of the Web’s potential for changing both computing and the broader world, as well as what you need to learn to join the fun.
Those pieces digging deeper will appear on this site, but you can also stay in the loop on our latest analysis and coverage through our weekly Web Platform newsletter.
Two approaches to testing lambdafied code.
Over the past 18 months or so I’ve been talking to a lot of people about lambda expressions in Java 8. This isn’t that unusual when you’ve written a book on Java 8 and also run a training course on the topic! One of the questions I often get asked by people is how do lambda expressions alter how they test code? It’s an increasingly pertinent question in a world where more and more people have some kind of automated unit or regression test suite that runs over their project and when many people do Test Driven Development. Let’s explore some of the problems you may encounter when testing code that uses lambdas and streams and how to solve them.
Usually, when writing a unit test you call a method in your test code that gets called in your application. Given some inputs and possibly test doubles, you call these methods to test a certain behavior happening and then specify the changes you expect to result from this behavior.
Lambda expressions pose a slightly different challenge when unit testing code. Because they don’t have a name, it’s impossible to directly call them in your test code. You could choose to copy the body of the lambda expression into your test and then test that copy, but this approach has the unfortunate side effect of not actually testing the behavior of your implementation. If you change the implementation code, your test will still pass even though the implementation is performing a different task.
From design processes to postmortem complexity, here are key insights from Velocity Europe 2014.
Practitioners and experts from the web operations and performance worlds came together in Barcelona, Spain for Velocity Europe 2014. We’ve gathered highlights and insights from the event below.
Managing performance is like herding cats
Aaron Rudger, senior product marketing manager at Keynote Systems, says bridging the communication gap between IT and the marketing and business sectors is a bit like herding cats. Successful communication requires a narrative that discusses performance in the context of key business metrics, such as user engagement, abandonment, impression count, and revenue.
Your data is telling you what you need to know about turnover and age
To really grasp a free/open source software project, you need to know how the community that develops and supports it is evolving. Attracting lots of new members will be a reason for celebrating success in a young project — but you should also check whether they stick around for a long time. In mature projects, however, you can afford not attracting many new members, as long as you are retaining old ones. The ratio of experienced, long-term members to recent ones also tells you about the quality of the code and need to support members.
Think labels, not boxes
Python tuples have a surprising trait: they are immutable, but their values may change. This may happen when a tuple holds a reference to any mutable object, such as a list. If you need to explain this to a colleague who is new to Python, a good first step is to debunk the common notion that variables are like boxes where you store data.
In 1997 I took a summer course about Java at MIT. The professor, Lynn Andrea Stein — an award-winning computer science educator — made the point that the usual “variables as boxes” metaphor actually hinders the understanding of reference variables in OO languages. Python variables are like reference variables in Java, so it’s better to think of them as labels attached to objects.
Here is an example inspired by Lewis Carroll’s Through the Looking-Glass, and What Alice Found There.
Tweedledum and Tweedledee are twins. From the book: “Alice knew which was which in a moment, because one of them had ‘DUM’ embroidered on his collar, and the other ‘DEE’.”
The O'Reilly community shares stories of inspiring women in tech. Who inspired you?
October 14 is Ada Lovelace Day (ALD), an annual global event that recognizes not only the 19th century mathematician and aristocratic super nerd who wrote the first computer program, but other women in our community, too. ALD founder Suw Charman-Anderson’s goal is “to raise the profile of women in science, technology, engineering, and maths by encouraging people around the world to talk about the women whose work they admire.“
Supporting diversity is important to us, so we’re participating in ALD this year. We’ve compiled some stories of women in tech from O’Reilly staff and members of our extended family — you can read about them below.