How to Code Like Bjarne Stroustrup

Question: What is your work setup like?

Bjarne Stroustrup: I travel with a little laptop, the smallest real computer I can get.  So the 12-and-something screen and... but a decent processor speed.  And where I am, I plug it into a dock and I use two screens and such and then I network to any other resources I want.  If at all possible, I would like to make that machine smaller, but... or at least lighter.  Larger and lighter would be nice, but I don’t get it and too light if you’re stuck in a sardine-class seat on a plane, you still should be able to open up and write.  And you can’t do that with one of those bodybuilder’s editions.  So a smaller machine, convenient machine that you can carry with you and plug it into a bigger system network to more resources.  

My laptop is a Windows.  People always ask that.  And they can’t understand why it’s not my Linux.  Well, my Linux happens to sit on my desk and it talks to a traditional Unix through it.  So I use both on a daily basis.  It just happened that it’s easier to carry the Windows books around.

Question:
Do you prefer to work at night or during the day?

Bjarne Stroustrup: Real thinking, real work goes on fairly early in the day. And then in the evening, no, not really sort of thought work, not creative work.  I can polish stuff.  I’m not a night bird like that.  I like to think when I’m fresh.  

Question:
Do you listen to music while writing code?

Bjarne Stroustrup:  Quite often, yes.  I have a mixture of stuff on the computer; I just plug in the earphones and listen.  And there’s a mixture, there’s classical, there’s a bit of rock, there’s a bit of country.  It’s quite surprising what I can actually work with and what I can’t because it really does affect it.  There’s music that sort of takes over and you think about the music, rather than the code.  That’s no good.  And then there’s music that you don’t hear... that doesn’t help either.  And well, so well I found something that works, probably just for me, but I like some music.  

Recorded August 12, 2010
Interviewed by Max Miller

Stroustrup shares some secrets about his work habits.

LinkedIn meets Tinder in this mindful networking app

Swipe right to make the connections that could change your career.

Getty Images
Sponsored
Swipe right. Match. Meet over coffee or set up a call.

No, we aren't talking about Tinder. Introducing Shapr, a free app that helps people with synergistic professional goals and skill sets easily meet and collaborate.

Keep reading Show less

People who engage in fat-shaming tend to score high in this personality trait

A new study explores how certain personality traits affect individuals' attitudes on obesity in others.

Pixabay
Mind & Brain
  • The study compared personality traits and obesity views among more than 3,000 mothers.
  • The results showed that the personality traits neuroticism and extraversion are linked to more negative views and behaviors related to obesity.
  • People who scored high in conscientiousness are more likely to experience "fat phobia.
Keep reading Show less

The most culturally chauvinist people in Europe? Greeks, new research suggests

Meanwhile, Spaniards are the least likely to say their culture is superior to others.

Image: Pew Research Center
Strange Maps
  • Survey by Pew Research Center shows great variation in chauvinism across Europe.
  • Eight most chauvinist countries are in the east, and include Russia.
  • British much more likely than French (and slightly more likely than Germans) to say their culture is "superior" to others.
Keep reading Show less

Reigning in brutality - how one man's outrage led to the Red Cross and the Geneva Conventions

The history of the Geneva Conventions tells us how the international community draws the line on brutality.

Napoleon III at the Battle of Solferino. Painting by Adolphe Yvon. 1861.
Politics & Current Affairs
  • Henry Dunant's work led to the Red Cross and conventions on treating prisoners humanely.
  • Four Geneva Conventions defined the rules for prisoners of war, torture, naval and medical personnel and more.
  • Amendments to the agreements reflect the modern world but have not been ratified by all countries.
Keep reading Show less