Are you cruising on autopilot? Frances Buontempo wonders if we need to change direction from time to time.
I volunteered at C++OnSea [C++ On Sea] last week. It was fun but exhausting and, of course, I didn’t get a moment to write an editorial. The conference had a packed schedule, with workshops on Tuesday and talks from Wednesday through Friday. Fortunately, we drove home on the Saturday, giving us a chance to catch up on some sleep over Friday night.
Conferences are a brilliant way to keep your knowledge up to date. They can be expensive though, so if your company won’t pay for you, or you are a student or unemployed, the only way to attend might be as a volunteer. To be honest, that wasn’t my driving factor for volunteering. It is also wholesome to help out when you can. Each volunteer was scheduled to cover reception, be on hand or be in a specific talk to ensure the speaker had what they needed and didn’t run over the allotted time. Rather than having to choose where to be when, I mostly ran on my rails, following the rota. Sometimes cruising on autopilot is a good thing. Decision making can be difficult, so following a timetable means you just ‘do the thing’ and don’t have to decide. I attended talks I might not have considered had I been given a free choice, and each talk was very informative.
There are some situations where running on autopilot with your eyes shut, sleeping at the wheel, may not be ideal. We are promised self-driving cars, which in theory could make this possible. However, we’re not there yet. Even if a car has some technology instigated by self-driving car research, such as automatic braking if you get too close to a vehicle in front, or tech to keep you in a lane on a motorway, you cannot safely fall asleep. “Keep your eyes on the road and your hands upon the wheel”, as the song goes. Keeping your eyes on the road is a way to say watch where you’re going. Where are self-driving cars going? I personally think they are leading to some improvements in car safety, but still wish for transporters or fewer items needing to be driven on roads. As ever, it’s worth pausing and considering what you are trying to achieve. A reliable public transport service would suit me, along with places that are safe to walk or cycle along. Just because you think of a potential new technology doesn’t mean it’s a good idea or even worth pursuing. I am convinced self-driving cars are trying to solve the wrong problem.
So, more generally, we could ask where AI is going. Recently, there has been much discussion around the ethics of AI and whether we need to stop and think about potential dystopian outcomes. Many people are embracing various large language models [Wikipedia-1], including ChatGPT. I mentioned ChatGPT sucking up lots of my time in our last issue [Buontempo23]. Bryce Adelstein Lelbach gave the last keynote at C++OnSea, talking about ‘AI-Assisted Software Engineering’ [Lelbach23]. Specifically, he shared how he tried to cajole ChatGPT into producing code for
std::unique [C++ Reference] allowing for parallel execution. The function eliminates all except the first element from every consecutive group of equivalent elements from a range. ChatGPT frequently eliminated any duplicates, rather than just consecutive duplicates, but did sketch out some code that nearly worked after much prompting. I won’t manage to do the talk justice here, but a take home for me was asking the model for options without any code, and then picking an option and asking for code. This gives an opportunity to backtrack if ChatGPT hallucinates itself into a dead-end or tries to use the function it is supposed to be implementing. It is very easy to find yourself going around in circles otherwise. I’m sure Bryce was perfectly capable of writing the function himself, but the experiment with AI generating code was interesting and informative. It certainly didn’t prove we can do away with programmers and leave AI to write our code for us. Bryce suggested the AI fumbled its way through the implementation in a manner similar to many humans, taking wrong turns, but certainly suggesting some useful ideas.
C++OnSea was a great opportunity to catch up with people and above all, keep learning. No matter how hard you try, there is always more to learn. It’s very easy to stick inside your comfort zone, and not notice new features that might improve your code. C++ is continuing to evolve and there is so much to learn. Taking a step back from the daily grind and taking time to listen and reflect is always good. A conference jam-packed with information is even better. I overheard several people saying “Ooh, I didn’t realise that.” No matter how well informed you think you are, there’s always more to learn. I’m writing a C++ book at the moment, aimed at people who want to catch up on what they have missed since C++11 [Buontempo]. I felt a little shy about mentioning this at a C++ conference, but it turns out several people are interested. I had assumed everyone there would already know everything. I was wrong. There’s nothing wrong with knowing you have gaps in your knowledge and doing something about it. In order to learn, it’s good to have a target, otherwise straying off into sidetracks and erroneous details is a problem. Following a course or reading a book can keep you on track. Even better, proposing a talk or writing an article can focus the mind, and help you discover things you don’t fully understand. Deadlines and external accountability can stop you drifting off track.
All programming languages evolve over time, or at least ones in use do. As a programmer, you can either keep your eyes firmly shut and stick with older idioms, doing what you learnt years ago, or embrace change. Like all knowledge workers, we need time to open our eyes and continue learning. Do you have some topics you want to learn more about? Take a moment to think of a few. Is there something you can’t manage, and your heart sinks each time you need to try it? Multi-threaded code? An algorithm, for example a linked list in an interview? Some UI or database work? Maybe try to think of a tiny project to try for a couple of hours and give yourself time to face your fear. Sometimes you can manage to crack something difficult. You might need help, so ask. The ACCU general email group is always so helpful. Or, try ChatGPT or an alternative (for example, [Amazon]) and see what happens.
Now, we can’t all be brilliant or even competent at everything. It’s OK to know your limits and delegate to someone else instead. Maybe focusing on what you are already good at and getting better at that is acceptable too. I don’t enjoy database or UI work, and can muddle through if needs be, by reading the docs and piecing something basic together. If you need something polished, go ask someone else. Don’t sleepwalk into a place or role you don’t enjoy if you are privileged enough to have options. Doing something you are not competent at, or hate doing, is unsustainable in the long run.
…some forecasts project that in 2030 IT will account for 21% of all energy consumption. The software lifecycle creates direct and indirect carbon emissions: it has a footprint, worsening environmental problems. If we do not change the way we implement software, we will contribute to the increase of the carbon footprint. However, the environmental aspect is not the only one we need to focus on. If we take sustainability seriously, we have to examine software development holistically from these three perspectives: social, economic, and environmental (as defined by the triple bottom line).
Of course, these are some forecasts, and could be wrong, but thinking about environmental impact is important. Jutta frequently mentions taking the environmental, social, and economic footprint of products (and their creation) into account, and encourages exploring how the agile principles can contribute to an organization’s sustainability, and how a greater awareness can change your current way of working and contribute to increased sustainability [Agile]. I’m hoping Jutta will write an article for us one day soon. You could argue that software development is partly asleep at the wheel, using more and more resources. We probably need to wake up. Two people at C++OnSea independently mentioned massive data centre costs due to huge electricity bills, and one lightning talk demonstrated that thinking about the data structures and algorithms we use can reduce power consumption. It turns out using single instruction multiple data (SIMD) [Wikipedia-2] can help to save the world. The speaker, Andrew Drakeford, starting by pointing out that,
Being particularly energy-intensive, the data center industry accounts for around 4% of global electricity consumption and 1% of global greenhouse gas emissions.
His talk clearly showed reduced time and power usage when using SIMD to find the
std::max_element. I think the lightning talks will be online at some point. I’ll let you know.
Running on your rails can be fine. In fact, sometimes we need to do things on autopilot. Having to think about each breath or each step would also be unsustainable. However, things change, so sometimes we need to adapt to survive. Our internet has been somewhat intermittent of late, which has made me aware just how reliant I am on looking things up online. I have resorted to looking things up in books recently. I always used to do this and have a huge library, including many of my father’s mathematics books, along with double copies of many programming books, since my husband codes too. I have caught myself looking for free PDFs of books I own in preference to getting up and walking a few steps to the bookcase. Without a reliable internet, I have dusted off a few books and done some bonus steps. In some ways, the lack of internet has forced a change. We’re switching providers, so normal service may be resumed shortly. It has been interesting to notice just how reliant I am on the internet though. You often don’t realise what you’re doing day to day until something forces you to do differently. They say a change is as good as a rest. That said, I am hoping we find a better ISP soon, because frankly I do rely on the internet for many things. Looking up references in books is great, and I shall endeavour to use the books I spent money on rather than surfing the internet from time to time. However, being able to send emails is easier with some internet.
Life is often a random walk. Even if we have plans, sometimes the accidental interactions and discoveries change our direction. That doesn’t mean we shouldn’t have plans. Being asleep at the wheel is not a good idea. Taking a break from time to time, either to go to a conference, have a holiday or take a sabbatical is a sensible idea. Stepping aside to reflect or do something different can be energizing, and lead to insights inspiring new approaches we wouldn’t otherwise have thought of.
Doing something new is a good thing too. If you’ve never written an article, give it a go. The Overload team is here to help. If you want to do a guest editor spot, get in touch. Overload probably deserves a proper editorial at some point. If you’ve attended a talk, workshop or conference recently, do send us a write-up. And if you haven’t, what’s stopping you?
[Agile] Agile Sustainability Initiative, Agile Alliance, https://www.agilealliance.org/resources/initiatives/agile-sustainability-initiative/
[Amazon] CodeWhisperer: https://aws.amazon.com/codewhisperer/
[Buontempo] Frances Buontempo C++ Bookcamp (unpublished – expected 2024) https://www.manning.com/books/c-plus-plus-bookcamp
[Buontempo23] Frances Buontempo, Editorial: ‘Production and Productivity’ in Overload June 2023, available at https://accu.org/journals/overload/31/175/buontempo/
[C++ On Sea] C++ On Sea conference: http://cpponsea.uk/
std::unique, details at: https://en.cppreference.com/w/cpp/algorithm/unique
[Eckstein] Jutta Eckstein, ‘Agile & Sustainability’ page on her website: https://www.jeckstein.com/sustainability/
[Eckstein22] Jutta Eckstein ‘Software for Future’ at ACCU Conference 2022, details available at: https://accu.org/conf-previous/2022/sessions/software-for-future-whats-the-impact-of-the-agile-manifesto-on-our-carbon-footprint/session/index.html
[Lelbach23] Bryce Adelstein Lelbach ‘Endnote: AI-Assisted Software Engineering’ (abstract), available at: https://cpponsea.uk/2023/sessions/endnote-ai-assisted-software-engineering.html
[Wikipedia-1] Large language model: https://en.wikipedia.org/wiki/Large_language_model
[Wikipedia-2] Single instruction, multiple data: https://en.wikipedia.org/wiki/Single_instruction,_multiple_data
has a BA in Maths + Philosophy, an MSc in Pure Maths and a PhD using AI and data mining. She's written a book about machine learning: Genetic Algorithms and Machine Learning for Programmers. She has been a programmer since the 90s, and learnt to program by reading the manual for her Dad’s BBC model B machine.