• Project Euler and Other Programming Challenges

    Looking for something to flex your programming puzzle skills after Advent of Code? Me too, so I was researching some options.

    A perennial favourite in my household, the classic Project Euler is a more mathematics-driven collection of programming puzzles.

    If the maths-driven style is not for you, I also have two lists of programming contests: the obligatory Wikipedia category list of programming challenges (some closed, many ongoing), and the comprehensive CLIST ranking of coding puzzles, challenges and competitions.

    From here, I came across two which seems to resonate with me, akin to AoC and Project Euler: Sphere Online Judge (SPOJ) and Kattis. I’ll certainly be taking a look.

  • Tina Fey’s Rules of Improvisation (and Parenting?)

    Tina Fey’s Bossypants was one of the top 5 books I read this year (that I listened to, actually, but I don’t make the distinction). It’s a great mix of sharp humour, personal anecdotes, and insightful commentary on life and the entertainment industry.

    One part I think of frequently is Fey’s ‘rules of improvisation’. They’re succinct, clear, and applicable to lots of different aspects of life. I’ve thought of it frequently when playing with my kids (although with them I do break rule three more frequently).

    Always agree (say ‘Yes’)

    When you’re improvising, this means you are required to agree with whatever your partner has created. […]

    Now, obviously in real life you’re not always going to agree with everything everyone says. But the Rule of Agreement reminds you to “respect what your partner has created” and to at least start from an open-minded place. Start with a YES and see where that takes you.

    Agree and then add something of your own (say, ‘Yes, and’)

    If I start a scene with “I can’t believe it’s so hot in here,” and you just say, “Yeah…” we’re kind of at a standstill. But if I say, “I can’t believe it’s so hot in here,” and you say, “What did you expect? We’re in hell.” […] now we’re getting somewhere.

    To me YES, AND means don’t be afraid to contribute. It’s your responsibility to contribute. Always make sure you’re adding something to the discussion. Your initiations are worthwhile.

    Make statements

    This is a positive way of saying “Don’t ask questions all the time.” If we’re in a scene and I say, “Who are you? Where are we? What are we doing here? What’s in that box?” I’m putting pressure on you to come up with all the answers.

    In other words: Whatever the problem, be part of the solution. Don’t just sit around raising questions and pointing out obstacles. We’ve all worked with that person. That person is a drag.

    There are no mistakes, only opportunities

    If I start a scene as what I think is very clearly a cop riding a bicycle, but you think I am a hamster in a hamster wheel, guess what? Now I’m a hamster in a hamster wheel. I’m not going to stop everything to explain that it was really supposed to be a bike.

    Who knows? Maybe I’ll end up being a police hamster who’s been put on “hamster wheel” duty because I’m “too much of a loose cannon” in the field. In improv there are no mistakes, only beautiful happy accidents. And many of the world’s greatest discoveries have been by accident.

  • Googlewhacking and Hapax Legomena

    One benefit of following and occasionally being a contributor to the crossword creator community is that its full of linguistics nerds (in the nicest possible sense of the word). Thanks to them, I often find myself diving into obscure Wikipedia holes and learning fascinating new topics.

    One such dive introduced me to hapax legomena: words or phrases so rare that they appear only once in a given corpus—be it a single book, an author’s complete works, or even the entire written record of a language!

    Hapax legomena in ancient texts are usually difficult to decipher, since it is easier to infer meaning from multiple contexts than from just one. For example, many of the remaining undeciphered Mayan glyphs are hapax legomena.

    Classical Chinese and Japanese literature contains many Chinese characters that feature only once in the corpus, and their meaning and pronunciation has often been lost. Known in Japanese as kogo (孤語), literally “lonely characters”, these can be considered a type of hapax legomenon. For example, the Classic of Poetry (c. 1000 BC) uses the character exactly once in the verse 「伯氏吹塤, 仲氏吹篪」, and it was only through the discovery of a description by Guo Pu (276–324 AD) that the character could be associated with a specific type of ancient flute.

    I suppose the irony of a language-wide hapax legomenon is that the moment it’s studied and documented, it loses its uniqueness. It’s no longer solitary.

    This reminds me of Googlewhacking, a game popular during my university years in the early 2000s. The goal was to find two words that returned exactly one Google result. It was oddly satisfying to confirm such a spot—until you shared your find on the Googlewhack website, where it was mirrored, indexed, and the rarity promptly vanished.

  • Comfort Noises and Electric Vehicle ‘Soundscapes’

    Before noise-cancelling microphones, voice activity detection algorithms, and the crisp audio clarity of modern phone and video calling, lulls in conversation were naturally filled with analogue background noise. These imperfections provided continuity, making silence feel natural. Without them, the silence in digital communication would be unsettling.

    To address this, synthetic background ‘comfort noise’ is added to phone and video calls, as well as digital radio transmissions:

    Many radio stations broadcast birdsong, city-traffic or other atmospheric comfort noise during periods of deliberate silence. For example, in the UK, silence is observed on Remembrance Sunday, and London’s quiet city ambiance is used. This is to reassure the listener that the station is on-air, but primarily to prevent silence detection systems at transmitters from automatically starting backup tapes of music.

    This concept of comfort noise reminds me of the evolution of electric vehicle ‘soundscapes’ and the discussions from the late 2000s and early 2010s about adding artificial engine noises—not just for safety, but also as an auditory brand identifier (or “sonic character”):

    BMW hired Hans Zimmer to help score their electric car sound, the inspiration for one model supposedly starting with a chord from a Beatles song. Jaguar has employed the US electronic musician Richard Devine, and Volkswagen hired Leslie Mándoki […].

    When the musician and sound designer Danielle Venne […] was asked to lead the design on the acceleration sound of the Nissan Leaf, she experimented with layering samples of woodwind instruments, flutes, clarinets and synthesisers.

    “It ends up feeling like something out of Star Wars,” Venne says.

    Fiat was the first to sample a human voice in the sound of its electric car, which has been overlaid with a chord from Nino Rota’s soundtrack for the 1973 movie Amarcord – the end result sounds as though you are sitting at a theatre and the curtain has just been raised on a show.

    And then you have the much less pleasing, exaggerated versions, which feel like little more than some kind of aural conspicuous consumption.

  • Locksmiths, Benevolent Deceptions, and the Benefit of Fake Effort

    In my last post, I discussed ‘the labour illusion‘—the idea that transparency about the effort involved in a process can enhance our perception of its value. I think of it as the ‘cousin’ of the IKEA effect.

    More intriguingly, this principle holds true even when the effort and delay is entirely unnecessary and fabricated. We assign greater trust, satisfaction, and value to processes that seem to take longer.

    These entirely fabricated delays and indicators are examples of “benevolent deceptions” (full text pdf). They include familiar examples like “placebo buttons” in elevators and road crossings, tapping in to our action bias. This design pattern is also a common deception used in websites and apps.

    Two great examples of this “artificial waiting” design pattern: TurboTax simulating a fake delay with a progress animation while “double-checking” you tax submission, and Facebook purposefully slowing down its security check interface to create the illusion of thoroughness. In reality both processes are nearly instantaneous, but users perceived them as untrustworthy until these artificial delays were added.

    This phenomenon is similar to a story from Dan Ariely about how locksmiths get more tips if they take longer and appear to make a greater effort:

    this locksmith was penalized for getting better at his profession. He was tipped better when he was an apprentice and it took him longer to pick a lock, even though he would often break the lock! Now that it takes him only a moment, his customers complain that he is overcharging and they don’t tip him. What this reveals is that consumers don’t value goods and services solely by their utility / benefit from the service, but also a sense of fairness relating to how much effort was exerted.

    A Hacker News comment on Ariely’s video suggested that Coinstar’s coin-counting machines might use this design pattern by fabricating sounds and delays to increase trust in the final count.

    It seems we’re hardwired to link (perceived) effort to trust and value.

  • The Labour Illusion, or Why Visible Effort Matters

    The accuracy of loading bars has long been a joke: reaching 66% takes mere moments, but 99% to 100% feels endless. Yet, progress bars—designed to offer “operational transparency”—play a key psychological role in building trust and satisfaction.

    A lot of business and marketing research has gone into identifying ways to improve idle wait times to positively alter the perceptions of waiting customers. However, a 2011 Harvard Business School study looked instead at how to improve the perceptions of the ‘active’ service time, after that wait.

    A lot of research has gone in to identifying ways to improve idle wait times, often focusing on speeding up processes or distracting customers during delays. However, a 2011 Harvard Business School study took a different angle: after the wait, how can we improve perceptions of the ‘active’ service time.

    Coining the effect ‘the labour illusion’, they found that, “people actually prefer websites with longer waits to those that return instantaneous results—even when those results are identical”, provided they can see visible signs of effort and progress being made (full text pdf). The study explains:

    offering services that arrive too quickly or too easily can have costs. In particular, customers draw inferences from their in-process experiences about the value being created. […] Consumers may use service duration as a heuristic to assess its quality, [which] is rooted in the notion that service quality increases with time spent with the service provider. […]

    Although automating service and shielding customers from the complexities of their offerings can promote adoption, these practices may also under-communicate the value of the services being delivered. If perceived value is diminished, then customers engaging with these shielded self-service channels may exhibit diminished willingness to pay, satisfaction, and loyalty.

    The conclusion was simple: transparency of the effort involved in a process leads to stronger feelings of reciprocity and greater perceptions of value.

    The study also found clear limits: for a dating site, a wait beyond 15 seconds led to diminishing returns, while for a travel meta-search engine, the optimal wait time was capped at 30 seconds.

  • Advent of Code

    Looking for a festive programming challenge? Advent of Code might be just what you need:

    Advent of Code is an Advent calendar of small programming puzzles for a variety of skill levels that can be solved in any programming language you like. People use them as interview prep, company training, university coursework, practice problems, a speed contest, or to challenge each other.

    You don’t need a computer science background to participate – just a little programming knowledge and some problem solving skills will get you pretty far.

    Created by Eric Wastl, 2024 marks the tenth edition of these Christmas-themed programming puzzles (previous years’ puzzles remain accessible—just tweak the URL).

    I’ll be diving in for the first time this year. Good luck if you’re joining too!

  • The Cashless Effect: Financial Abstraction Increases Spending

    I previously wrote about the denomination effect, where people spend the coins faster than banknotes because coins are perceived as ‘smaller’, creating fewer psychological barriers.

    This raised the question of whether increased “financial abstraction” leads to higher spending, too. Indeed, research confirms that the lower the payment transparency, the greater the spend. This is the cashless effect, and its impacts are summarised in this graphic from the linked meta-study:

    The findings show that the cashless effect is more pronounced when it comes to conspicuous consumption (wealth or status displays), weaker in prosocial scenarios (like tipping and charity), and not particularly observed for hedonistic purchases (emotional vs. practical purchasing).

    The implications are significant: a ‘cashless society’ would likely disproportionately affect vulnerable consumers and the ‘unbanked’. So we should pay in cash to amplify the ‘pain of payment’ and curb impulse purchases, but companies should increase levels of abstraction to boost sales.

    A related study finding that the lower the payment transparency, the greater the consumption (full text), showed that increasing the abstraction level, making the cost less apparent (“decreasing salience on the amount spent”), and delaying resulting financial outflows all drive higher consumption.

    Just image the perfect storm of a prepaid loyalty card loaded monthly with store-specific ‘credits’!

  • Cats’ Social Intelligence and Rapid Image-Word Learning

    A recent study reveals that cats can learn image-word pairs faster than 14-month-old toddlers. However, it was the study’s introduction that caught my eye.

    It summarises a number of cat behaviour research findings, showing that cats have a complex social intelligence. For instance, they can differentiate between familiar and unfamiliar human voices, match voices to faces, and even learn the names of their feline ‘friends’:

    it has been shown that modern cats read a variety of human’s social cues. […] For example, cats follow human pointing, discriminate human attentional states, refer to a human face when confronted with novelty, and discriminate human emotional expressions.

    [Cats] discriminate their owner’s voice from an unfamiliar person’s voice, mentally map the owner’s position from her voice, predict the owner’s face upon hearing her voice, and match emotional expressions and sounds. Furthermore, […] cats differentiate between their own name and similar-sounding nouns. In addition to this sensitivity to their own name, they even represent a familiar cat’s face upon hearing that cat’s name, suggesting formation of a link between the human utterance (the cat’s name) and “the cat”. The study showed that cats learn a familiar conspecific’s name through routine daily experience, not explicit training involving rewards, which is also how human infants learn other people’s names.

    This study adds to this, finding that cats can associate human speech with specific visual objects. Learning such image-word pairings is a fundamental ability for word acquisition, and the researchers observed that cats “habituated to the stimulus pairing” after only two 9-second trials, compared to “at least four 20-second trials” required by 14-month-old infants.

    I’ve still got Cat Sense and The Trainable Cat on my reading list—both of which I heard about from NPR’s Fresh Air (here and here) and on NPR’s 2013 Book Concierge (earlier). I guess I’ll have to bump them up the list a bit.

  • Cake Mixes, the IKEA Effect, and the Psychology of Effort

    In the index of cognitive biases (previously), I came across the IKEA effect: why do we place disproportionately high value on things we helped to create?

    Similar to the endowment effect (our tendency to overvalue our own belongings), the IKEA effect explains why we’re willing to pay a significant premium (over 60%!) for products that require assembly. Not only that, but we often value our amateur efforts as highly as similar expert creations—and expect others to agree, too.

    The original research article (full text), co-authored by Dan Ariely of Predictably Irrational, provides a great historical example:

    When instant cake mixes were introduced in the 1950s, […] housewives were initially resistant: the mixes made cooking too easy, making their labor and skill seem undervalued. As a result, manufacturers changed the recipe to require adding an egg; [which] led to greater subsequent adoption. […] infusing the task with labor appeared to be a crucial ingredient. Similarly, Build-a-Bear offers people the “opportunity” to construct their own teddy bears, charging customers a premium even as production costs are foisted upon them. […] The notion that labor can increase people’s willingness to pay is an underlying theme.

    This psychological “effort justification” observation wasn’t new. It had been studied since the 1950s and was already being used by marketers (not just in cake mix).

    Completely standardised, mass-produced products, such as those from IKEA and Lego, are classic examples of the effect in action, but there are limits:

    labor leads to love only when labor results in successful completion of tasks; when participants built and then destroyed their creations, or failed to complete them, the IKEA effect dissipated.