Lea Verou

Lea is a front-end web developer located in Greece. She is passionate about JavaScript and CSS3 and shares her love for Web Standards at various events around the world (including the prestigious SXSW, Web Directions @media, Fronteers, JSConfEU, and Frontend) and through her blog, lea.verou.me. Lea is a contributor to publications such as .net Magazine, Smashing Magazine, and 24ways, and the creator of famous web applications that demonstrate the possibilities of CSS3.

Lea also tweets @LeaVerou.

Published Thoughts

My last Pastry Box thought is due to be published on December 29th. It’s already the 28th and I’m way past my deadline. I’m sitting in a hospital room, next to my mother who was admitted ten days ago. Even before that, my life had already taken a pretty tumultuous turn and started to resemble a fully-fledged soap opera. It had everything a good TV series does: Drama, disappointment, plot twists, even villains. With all the craziness that’s been going on, don’t expect this to be another tech-related post. Instead, I decided to write a coping mechanism that helped me get over many disappointments over the years: forgiveness. It even fits with the theme of these days.

It all started a little over 20 years ago. My mother had a very old unabridged edition of Victor Hugo’s “Les Misérables”, which she read to me every night as I was growing up. She had inherited it from her own mother who also read it at her bedside when she was little. Eventually I grew more confident of my own reading skills and finished it by myself. That novel is how I learned my very first lessons on morals, justice and love. I’ve read many other books since then, but that one always holds a very special place in my heart, as it practically shaped my character.

It taught me to strive to see the good in others, even when they are doing everything in their power to hide it. Our mistrust is our armor and we’re terrified that giving it up will lead to more pain and disappointment. However, I’ve found that expecting good often brings out the best in others too. People are rarely evil, most are just weak, misguided or both.

It taught me to do my best to understand before I judge, because no matter how reprehensible someone’s actions look, we’re usually not as far from doing the same as we think.

Most importantly, it taught me to opt for forgiveness over vengeance, because responding to wrongdoings with kindness can change people. Love and compassion are infectious, whereas revenge will only make everyone poorer. After all, when you understand someone’s motivations and weaknesses, it becomes impossible to hold a grudge.

Contrary to popular belief, forgiveness is not primarily altruistic, which is why I called it a coping mechanism. Resentment builds up inside you and makes you bitter. Instead, holding no grudges leads to peace of mind, a prerequisite of happiness. Being able to forgive and move on does way more good to yourself than to anyone else.

Forgiveness and self-preservation aren’t mutually exclusive. It would certainly be masochistic to have people around you that constantly disappoint and hurt you, wouldn’t it? Forgiving doesn’t mean you have to be a martyr and allow toxic people to continue poisoning your life. You can both forgive someone and distance yourself from them.

Naïve as it may sound, this way of thinking has always helped me get over disappointments more quickly and prevented many more. Let this new year bring more happiness and less resentment. You won’t regret it.

I bet that many years from now, the memories that will make us smile won’t be those of us being cowards. Neither will they be the hours of debugging pesky code or bikeshedding in meetings. It will be the transgressions, the passion, the risks, all those times we stepped out of our comfort zones and took a leap in the dark. Those times when our life was turned upside down and we didn’t know what tomorrow would bring. Sometimes it leads us to fall on our face, but the regret is only temporary. Deep down we knew it from the very beginning: We’re proud about ourselves, because we dared, and boy, did we enjoy the ride! I’m always wary of complacency. Comfort is not what we’ll remember if we get too old to make new leaps. Those who call you foolish today are the ones who will regret not having lived tomorrow. It’s never too late to switch sides.

These days, we almost all unequivocally embrace graceful degradation and progressive enhancement. It’s the extent that people disagree on, since everyone has a different definition of what is “graceful” and what is “enhancement”. Is a solid color an acceptable fallback for a pattern? What if your lightbox has no overlay? What if your stripes become a solid color? What if your transitions are not there? What if your code has no syntax highlighting? That’s the true challenge: How different can they look? Is it sufficient if the content is accessible in IE8 or does it also have to be pretty? How pretty? Those are the questions you need to agree on with your team to ensure you’re all on the same page. An agreement on the basic premise that websites don’t have to look the same in every browser is far from enough. Graceful degradation is not black & white, it’s a spectrum. You need to find where you lie on that spectrum and where your colleagues lie on it too, otherwise expect a lot of tension every time decisions need to be made.

People often think it’s hard to change my mind, that I’m too fixated on my own opinions. The reason I give this impression is that I will fiercely defend them. However, I will only do so until I see compelling arguments for the other side. I always try to keep an open mind to being wrong, and it has only made me better.

In the past few months I’ve been witnessing myself slowly change my views regarding yet another major life issue: The place I want to live in. Moving to the US has been a life goal for me ever since I first visited, almost fifteen years ago. However, as I spend more time there and get closer to moving, I’ve started noticing things that I don’t like so much. I’ve tried to ignore them, but they keep being there, giving me the finger like dead pixels on a brand new screen. I might go forward with it anyway, or I might pick another country, but this is yet another experience that has taught me to avoid being dogmatic.

We are all, and should be, subject to change. Whoever insists in their rigid convictions reminds me of software whose bugs never get fixed. You are the only maintainer of that software. Be vigilant enough to discover and fix your own bugs. Be open-minded enough to listen to other people’s bug reports about it. Most people forget to do this after a certain age. They become so arrogant that they think they don’t have any more bugs to fix, or so insecure that they believe they can’t fix any more. That’s the turning point where the years that pass by start to become “aging”, instead of “growing up”. Aging doesn’t have to do with how long you’re on this planet, it has to do with giving up on yourself. To stop being subject to change is to start being stagnant.

We all teach from time to time, whether it’s explaining something to a colleague, writing a blog post about the cool CSS technique we discovered, or giving a technical talk. If you are serious about becoming better at it, I’d strongly recommend reading up on psychology and neuroscience. If you don’t have the time to, here’s one fact that I’ve found most useful: Humans have incredibly impressive pattern recognition skills. We use them in pretty much everything we do, from learning our native language as kids, to escaping predators in the wild.

How does that help you teach more effectively? In one word: Examples, examples, examples. No matter how good you are at explaining the rules, nothing beats a few good examples of their application in practice. Our abstract thinking is not nearly as good as our pattern recognition skills.

However, don’t be fooled into thinking that theory is useless. Often, multiple explanations fit a given example. The theory helps us pick the one that fits, which might not be the one we initially recognized.

I’ve found that this principle applies to pretty much everything I’ve taught or have been taught, from mathematics to natural and programming languages. You can forget the theory, but you should never forget the examples.

Before you start complaining about what you don’t like in CSS, HTML or JavaScript, ask yourself: How would I do it better? Sometimes, the things that bother us are just unavoidably subpar solutions to very hard problems. It sounds obvious, but many people I’ve spoken with get a completely new perspective when they ask themselves this question. Also, there are many other factors affecting design choices, beyond syntactical elegance and ease of understanding. For example, making implementations easier, maintaining backwards compatibility or matching what browsers already do. Sometimes that “obvious better solution” is just not possible in practice.

Contrary to popular belief, the defining characteristic of a good professional, in any discipline, is not the ability to blurt out good ideas off the top of their head. It’s perseverance and not being easily satisfied. Where the others would stop, they keep going. For example, when writing CSS, they won’t stop after they’ve achieved a certain style. They will also try to make it more flexible, more maintainable, simpler. Next week, try this: When you’re about to give up and proclaim that something is “done”, try to spend five more minutes on the task, thinking how you can improve it further, how to make it more elegant. I think it will help you be much more satisfied and proud of your work.

I never make long-term plans. Life is an unpredictable adventure. Concrete plans restrict this amazing journey. Stressing over a series of mental checkboxes you need to check until a certain date shifts your focus away from making awesomeness. I have long-term dreams instead, and they are all the compass I need. They give me the drive to constantly strive to improve, while still allowing room for surprises. I learned to trust chaos, and so far, I was never disappointed.

The best argument against conventional wisdom is the fate of everyone following it. If you aspire beyond mediocrity, conventional wisdom is recipe for failure. Think out of the box. What can you do to achieve your goals, that others are not already doing? The least popular paths are the most successful. The trick isn't doing better than the others, it's minimizing the number of "others". Find unexplored territory and make it yours. It's much easier than trying to claim your stake on someone else's land.

You can get quite far by putting cool stuff out there and expecting everything to come to you. Yes, you will eventually get job offers, conference invitations and various distinctions. However, sometimes, just asking will get you what you want much faster.

I used to avoid asking like the plague, and thought that if my work is good enough, what I want will naturally come to me. Which makes sense, to a certain extent: When someone keeps asking for stuff all the time, you can't help but think that they merely see you as means to an end.

However, when you really want something, it never hurts to approach it yourself. Lately, I've been experiencing how much easier this makes things, and I'd strongly recommend you try it too. Turns out that quite often you don't have what you want not because you aren't good enough, but because the parties involved have no idea you're interested.

You may catch more flies with honey than with vinegar, but you catch even more with a little audacity. Being polite is a good rule of thumb, but like everything, it also needs moderation. Don't say "share my content pleeeeeeaaaase". It makes people think your content isn't worthy of sharing if you have to grovel. In a long email, don't write a paragraph apologizing for its length (true story!). Being overly polite when meeting someone, categorizes yourself as inferior in the other person's subconscious. Treat yourself with the respect and admiration you expect from other people. If you don't think highly of yourself, nobody will. When meeting someone you admire, treat them as an equal and they're more likely to do the same.

However, be careful not to cross the fine distinction between treating yourself with respect and being a cocky jackass. Treat others as equals, not as inferiors, otherwise your attitude will get you nowhere — and will piss everyone off along the way.

Often people ask me how I come up with the new ideas I publish. I think my main “differentiator” is that I try not to be restricted by my knowledge about what’s possible and what is not. I first think about what I want to make (for example “I want to do a rating widget with pure CSS”) and then I investigate how it could be done. And I don’t give up easily. Sometimes it even takes months having the question in the back of my head before I come up with a solution.

People push the boundaries of what's achievable with web technologies every day. Do you want to be one of them, or do you want to be stuck repeating what's been done over and over again until you get sick of it? Don't be afraid to try new things. If a voice inside you screams “That isn’t possible!”, ignore it. In most cases, this voice is wrong.