Hackathon 2012Casual dress code

Gratitude is Good

Nathan Cunningham

Gratitude is not only the greatest of virtues, but the parent of all the others.

— Marcus Tullius Cicero (106 BC-43 BC)

Science is increasingly reinforcing what the ancients have told us: Gratitude is a good thing. From Berkley's Greater Good Science Center:

For too long, we’ve taken gratitude for granted. Yes, “thank you” is an essential, everyday part of family dinners, trips to the store, business deals, and political negotiations. That might be why so many people have dismissed gratitude as simple, obvious, and unworthy of serious attention. But that’s starting to change. Recently scientists have begun to chart a course of research aimed at understanding gratitude and the circumstances in which it flourishes or diminishes.

Their findings (read the whole article and lots of other good related content here) support the idea that other good things come from gratitude.

So in the spirit of this, THANK YOU to all the readers of and contributors to this blog and THANK YOU to the leadership of YP for the opportunity to contribute to YP's conversation in this way.

Ways you can show Gratitude: Support the SMB Community

Remember its Small Business Saturday this week - between Black Friday and Cyber Monday - so you can do your bit to support the incredible economic engine that is American small business with your shopping dollars on Saturday. See here for more on that and YP's involvement.

Ways to Give Thanks: An example

In Cicero's words its a virtue, and can lead to other good things, to thank those who help make you successful. Here is a great example written to Peter Drucker by someone who Drucker had directly influenced - full context here.

Alt text

Ironically, all of us have been indirectly influenced by Drucker. He's had a huge impact on business and commerce and life as we know it. We owe him (posthumously) our gratitude as well.

So I ask the same question posed in the article above:

Is there someone with whom you might share a similar sentiment today?

Happy Thanksgiving!

Procrastination from the Inside Out, Part 3: Don't Think Too Hard

Chris Fincher

This post is the final post in a series investigating the ways that procrastination influences and is influenced by the way the brain works. Here is part 1 and here is part 2.

By now, most of the working world has come around to the idea that breaks improve productivity because tired workers don't do good work, and they don't do it very quickly. But there's another reason you should make sure that you take breaks in your work: it makes you more creative. Have you ever gotten a great idea for something when you were taking a shower? There's a reason that tends to happen.

The brain thinks in two modes, called the focused mode and the diffuse mode. The focused mode is exactly what it sounds like. You're concentrating intensely on something and putting all of your energy into solving the problem at hand. The diffuse mode is when you're not doing that, and your mind can wander freely from idea to idea. The focused mode is great for analyzing new facts and patterns, as well as applying the ones you already know. It helps you figure out the fine details of a problem and how to make things work together seamlessly. The diffuse mode, on the other hand, is good for making new connections and approaching problems in new ways. Essentially, your brain is rubbing together the ideas it already has and seeing what makes sparks start flying.

These two modes work best if you can alternate between them. Focused thinking lets you pick up new ideas, diffuse thinking lets you bounce the new ideas off of each other to create more new ideas from them, and then another session of focused thinking lets you explore those newer ideas in detail and flesh them out. Lather, rinse, repeat. It's simple! Unfortunately, that doesn't necessarily mean that it's easy.

A huge amount of literature on how to be productive relies on scheduling, and while schedules can indeed be very helpful, diffuse thinking takes more effort to integrate with a schedule than focused thinking does. Scheduling is easiest when one knows exactly how long a task will take to finish, and while making time estimates is always hard, making time estimates for a diffuse thinking breakthrough is especially hard, since returns can be unpredictable. On top of that, it can feel lazy or self-indulgent to set aside time for diffuse thinking. It doesn't feel like what we've come to expect work to be. This makes some people try to count the time they spend working on one task as diffuse thinking time on another task, and while this sometimes works if the task you're working on is somewhat brainless (e.g. taking a shower, washing dishes, folding clothes), you have to be careful when you're trying this kind of substitution that you're actually clearing your mind and not making it stay in the focused mode for your new task.

Since it's so hard to schedule creativity, it's a good idea to give yourself generous amounts of time in which to create, and that's where procrastination enters the picture. When you procrastinate, you force yourself to do your creative work in one long sitting, which stifles your diffuse thinking and hence your creativity. So when you know you'll have to get creative for something you're working on, fight the urge, and start early! The sooner you focus, the more time you give yourself to have that breakthrough while you're shampooing.

A Brief Summary

So what have we learned in our past three weeks together? (After all, repetition is a virtue!) In order to create, you have to think diffusely, and that takes time. In order to learn and remember, you have to repeat over several days and take the time to do, rather than simply read. That takes time, too. Since procrastination deprives you of time, it's not compatible with maximal learning or creativity. What's worse, there are biological factors making all of us want to do it. The good news is that the urge to procrastinate falls off quickly, so a little bit of grit might be all you need to get past it.

I hope this brief look into the biology of procrastination was interesting and useful to you. I personally find it a lot easier to follow advice when I know why it's supposed to work, so even if you didn't hear any recommendations from this you hadn't heard before, I hope you've gained some background that makes the strategies you already know a bit more convincing. Keep fighting the good fight!

About This Series

I wrote this series to relate some of the things I learned in Learning How to Learn, a course on Coursera taught by Barbara Oakley and Terrence Sejnowski. Any assertions I've made about how the brain works (as well as the term "metabolic vampires") is taken from there. I am usually very skeptical of anything that essentially claims to make you smarter, but I hoped a course with the backing of a UCSD neuroscientist would stay clear of anything pseudoscientific. The material might not be quite what I'd call university-caliber, nor the production values Hollywood-caliber, but it was very approachable and gave me some interesting new approaches for self-improvement. If you're interested in taking it yourself, another session of the class is starting in January. If you just plan on following along and don't think you'll do the assignments (which, admittedly, is what I did), you can join up and read through the material at your own pace. If you'd like a more interactive experience, however, make sure you join an active session. The session I participated in had over 170,000 students, so I suspect they'll be offering this course for the foreseeable future.

Procrastination from the Inside Out, Part 2: The Nonpersistence of Memory

Chris Fincher

This post is part 2 of a series of posts investigating the ways that procrastination influences and is influenced by the way the brain works. You can read part 1 here.

There's a trick you might have seen before that authors and speakers like to use to convince people that they don't really know how their brain works. It's pretty simple: just ask them what they had for dinner three days ago. Unless that dinner was some kind of special occasion, the victim is usually unable to remember. The perpetrator will usually rub in the fact that it was only three days ago, and, if (s)he is a speaker, will turn to the audience with a smug expression that says, "Look at this genius who can't even remember three days ago!"

Should you find yourself being asked this question, here's what I want you to do: contort your face in such a way as to suggest that you cannot imagine the sort of absurdity that would prompt such a question, and ask why in the world you would remember that. If they point out that it was only three days ago, point out that it happened once and it wasn't very important, and those aren't things people remember.

Actually, that might make you look like an uncooperative jerk in front of a lot of people. Use your judgment on whether you want to say that.

Still, that's the way that things work. Things that happen once, unless they evoke some kind of emotional response, tend to fade away. To borrow a phrase, the "metabolic vampires" of the brain sweep them away with all of the minutiae of the day. Did I see a Honda Accord on Sunday? I don't know. Hasn't come up. What did I have for lunch? I don't know. Hasn't come up. How do you use guard clauses in Haskell? Oh, that's easy. You just, uh... Well, you put "if" somewhere. And, uh... I... I don't know. Oops.

This is a problem I'm a little too familiar with. It's the problem with cramming. If I study something long enough in one sitting, I can get to where I feel like I've mastered the material and everything makes sense, and then, when I wake up the next morning, it's all gone. It's especially evident if you study lanugages, programming or otherwise. Immediately after reading a chapter in Learn You a Haskell for Great Good!, I can solve all of the problems in my head, and it seems like the easiest thing in the world. Then, a week later, I might decide to sit down and try to do something as simple as print out the numbers one through ten, and when I sit down at the keyboard, I manage to type about four characters before I realize I don't remember the syntax for something that seemed so intuitive only a week ago. Perhaps you know the feeling. I realize now that it was the metabolic vampires at work.

Since it's somewhat impractical to make all of things we want to learn emotionally significant ("Promise me that if you ever break up with me, you'll read the first 100 digits of pi when you do it. Then I'll never forget them!"), we have two options for keeping the metabolic vampires at bay.

  • Repetition. Revisiting a topic multiple times will multiply the chances that you hold on to that information. Doing something 500 times in one sitting doesn't count as repetition. Instead, split your time between days and spread whatever you're studying across a week.

  • Going hands-on. Actually do the thing that you're trying to learn. If you're learning a language, make some sentences. Say them out loud if you can. If you're learning a programming language, fire up an editor and play with the language. Use the things you're reading about.

You've heard this advice before. Practice makes perfect. But for a long time, I let the quick confidence I got from rushed studying deceive me into thinking I could condense learning into big, isolated blocks. I would read about languages and skip doing exercises on constructs I thought were simple because I felt like I already understood them. Then, when I did come across an exercise I deemed worthy of my time, I would get stuck on the basics. Reading about how the brain cleans up one-time occurrences helped me realize why that kept happening. I'm not going to say I've managed to stop 100%... but, hey, things have improved.

So what does this have to do with procrastination? Well, you can't repeat something over several days if you only work on it the day before you need it. Procrastination begets cramming, spending hours of studying just in advance of when you need new knowledge. While it's possible you can cram enough knowledge into your short-term memory to get through a test or a deadline, don't expect it to stick around afterwards. As night falls, the metabolic vampires will come... and if they come before then, you're in real trouble. Procrastination also deprives you of time to practice what you're learning, which means you might not actually be learning how to do something. To put it simply, procrastination just isn't compatible with learning new things.

In my next post, I'll be finishing out the procrastination series with a look at how procrastination affects the creative process.

Procrastination from the Inside Out, Part 1: Everyone's Got the Itch

Chris Fincher

A lazy cat. Procrastination incarnate.

Procrastination is bad.

"What a bombshell," you're probably thinking, "what a fresh perspective! Why didn't anyone tell me before? This will revolutionize my life!"

Yes, I know I'm probably not the first person to tell you that procrastination is bad. I don't think you can get a high school diploma today without being told at least four hundred times that procrastination is bad. I can only remember reading that procrastination is good once, and that was in The Four-Hour Workweek, which is... non-traditional, to say the least. Anyway, I'm not planning to dispute that procrastination is bad, but I do want to change the way you think about it with a little neuroscience.

What We Already Know

Analyzing how the brain works is tough, so most writing on procrastination avoids talking about the brain itself. Instead, it focuses on how your environment affects what you do and how that, in turn, affects your work. This philosophy of treating the brain as a sort of "black box" is called behaviorism. You might have heard of it if you've taken a psychology class. It's taught us a lot of useful things about procrastination, for instance:

  • People make mistakes. When you procrastinate, you don't leave yourself time to find mistakes and fix them.
  • Procrastination leads to stress. Stress can be bad for your work, your relationships, and even your health.
  • When you procrastinate, you don't leave any extra time to work, so if you underestimate how long your task will take, you miss your deadline. Unfortunately, people aren't very good at estimating time.

These are all great reasons to fight procrastination, but most of us know them and we still do it anyway. With this series, I'd like to explore the things we can learn about procrastination by analyzing it from the inside out, that is, putting aside behaviorism and seeing how procrastination relates to the brain on a physical level. Let's start by looking at how the brain causes procrastination, and how we can use the way the brain works to avoid it.

The Problem

Speaking from experience, I know that it's easy to feel cursed when you seem to struggle with procrastination more than your peers. Well, the good(?) news is that they're probably dealing with it, too. We are all wired to procrastinate. When the brain thinks about doing something unpleasant or tedious, it's actually a little traumatic. The same part of your brain that reacts when you see a baseball sailing toward your head is reacting to what you're thinking of doing, and it's objecting strenuously. So when you open Facebook, Reddit, YouTube, or whatever it is you do to avoid working, even if the content is stale and you're not entertained, you still start to feel better simply because you made the bogeyman of work go away. You can't reason your way out of it. Even when you know that the only logical thing to do is start working, there's always part of you that is only living in the moment and does not approve. So unless you've found a way to avoid ever thinking that something you have to do is unpleasant, your brain will want to procrastinate as a matter of survival.

The Solution

The bright side to this instinctive procrastination is that it fades away about as quickly as it appears. If you can push through that initial panic and make yourself start working, then work stops being a baseball sailing towards your head. It's not a danger anymore. It's just the way things are. The part of your brain in charge of keeping you out of peril doesn't notice it anymore, and the more analytical part of your brain, which can consider the ramifications of procrastinating versus working, takes over. While this doesn't mean that the task at hand will be easier, it does mean that the things you know about procrastination and the work you need to do will be clearer when you decide whether to keep working.

In other words, it's easier to keep working than to start working. It's a bit like Newton's First Law of Motion. Objects at rest tend to stay at rest, and objects in motion tend to stay in motion! When it seems just unbearable to get started on something, and you want to watch some videos instead ("just for a few minutes"), try to remember two things: what you're feeling is normal, and if you can make yourself start and get even a little momentum, then the urge to slack will fall away very quickly.

The Lesson

You'll never win the war on procrastination. Sorry to break it to you. I won't, either. It's just not how we're wired. There's always going to be another battle with it around the corner. Thankfully, each of those battles is more winnable than it seems at first glance, so fight on! You might surprise yourself with what you can accomplish with only a little more grit.

In the next part, I'll look at what happens in the brain when you learn and how procrastination impacts it.

Photo credit: Flickr/gRuGo CC BY 2.0

YP Wi-Fi Bus in the News

Eric Thomasian

YP on the cover of the LA Times!

This was a strong PR week for YP thanks to the Wi-Fi bus. Not only were we in an article on the LA Times website, but we were also featured on the front cover of the newspaper. As a print company transforming into a digital company, we thought showing up in both places was especially appropriate. As I wrote this post, I received an email notifying me that we were also picked up by Los Angeles Magazine for their own article.

The LA Times article highlights YP and other Los Angeles tech firms who are leading the adoption of Silicon Valley best practices in LA. With tech recruiting being as fierce as ever in Los Angeles, companies are making great strides in innovating employee benefits to compete in the market. YP in particular looks to reinvigorate the tech scene in the tri-city area (Pasadena, Glendale, Burbank) by reducing any transportation frictions for talent on the Westside.

Greg Bettinelli, a partner at UpFront Ventures said it best:

"As the L.A. tech scene continues to rise, there's obviously best practices from the Valley that will be transported down here. I don't think it's unique to the tech industry, but it's a broader realization of the tighter labor market for highly skilled workers and the need to create better team cohesiveness."

Nathan’s First Week at YP

Nathan

My first week working as a contractor for the Data Quality team at YP exceeded, in a positive way, any expectations I had coming in. Although I don’t have an extensive amount of experience working in different companies (having graduated from college only two years ago), YP has demonstrated that I’m not merely a number in a nationally recognized company, but that I’m part of the YP family.

Let me explain what I mean by being part of the YP family. It’s our families that love and care for us in the best way possible. They want what’s best for us and they’ll go out of their way to provide any means necessary to help. That’s what I’ve experienced at YP beginning on day one.

From the team manager and all the wonderful YP family I’ve met thus far, everyone seems to encourage growth and knowledge within the company for both the benefit of the company and my own professional advancement. It’s manifested first in the simple things like providing a fun and enjoyable work environment (free food and snacks, a ping pong table, a football table, arcades, and more free food) and to the bigger, more important matters like pushing us to learn by making mistakes because that is the only way we’ll grow.

So, I’m deeply grateful to the entire YP family for giving me an amazing opportunity to be among such hardworking individuals that seek the best interest of others and the company as a whole. If my first week’s experience was this memorable I can’t wait for what’s in store for the future.

Happy Diwali

Shri Jambhekar

Diwali Celebration at YP

Drawing
In honor of our rich cultural diversity, and our 'Educate and Celebrate' initiative, Glendale YP team celebrated Diwali after an all hands yesterday.

The culture club committee and facilities decorated the happy hour areas with traditional Diwali decor and provided sweets - creating a beautiful celebration of this most auspicious of Hindu festivals which is celebrated over 5 days.

In addition, the team on 13th floor shared delicious Indian food today.

Diwali also known as Deepavali and the "festival of lights", is an ancient Hindu festival celebrated in autumn every year. The festival spiritually signifies the victory of light over darkness, knowledge over ignorance, good over evil, and hope over despair.

Happy Diwali to you and your families.

दीवाली की शुभकामनाएं

Generating SVG on the Fly

Joe

When developing a webapp, a great way to enhance the visual design of your site is to use beautiful, intuitive icons. Sometimes people understand images a great deal more than words. Icons take up much less space as well, giving your site a cleaner look.

With the advent of retina-resolution screens, older lower-resolution icons just don't cut it. One solution is to simply start serving higher-resolution icons. This approach causes unnecessary network load for screens that don't need the extra pixels. You can use retina.js to load higher resolution icons only when they're needed, but this requires creating multiple image files.

SVG icons provide the flexibility to display correctly on all screen densities, although you sacrifice file size, as SVG files are generally larger than PNG. The big benefit SVG provides is easy modification. Modify one field in the XML and you've changed the bakground color, for example. So when you want to dynamically generate icons, using SVG makes sense.

In my intern project I had to do just this; I needed to generate map markers with letters inside to represent waypoints. There are a few ways to generate SVG on the fly. One is by using a library like svg.js, which allows you to programmatically create SVG with a very easy-to-understand API. The other is the method I used:

Manually create an SVG image using an editor such as Inkscape. This will give you an SVG file that looks something like this:

<svg
   xmlns="http://www.w3.org/2000/svg"
   width="307.99988"
   height="455.08182">
  <g
     transform="translate(-169.2067,-124.16583)">
    <g
       transform="translate(64,-51)">
      <path
         transform="matrix(-0.86545762,0.50098217,-0.50098217,-0.86545762,689.00106,496.77337)"
         d="m 437,360.36218 c 0,82.29043 -66.70957,149 -149,149 -82.29043,0 -149,-66.70957 -149,-149 0,-53.23257 28.39924,-102.4215 74.5,-129.03778"
         style="fill:#ffdd00;stroke:#000000;stroke-width:10" />
      <path
         d="M 388.62072,403.36218 324.00914,514.28781 259.39756,625.21343 194.65584,514.36218 129.91412,403.51093"
         style="fill:#ffdd00;stroke:#000000;stroke-width:10;" />
      <text
         y="384.4017"
         x="197.7131"
         style="font-size:180px;fill:#000000;font-family:Verdana;">A</text>
    </g>
  </g>
</svg>

Now you can edit this any way you want! For example, using a framework like Ractive.js or Angular.js, you can replace the "A" in the text node with "{{text}}" and use your framework's method of populating templates.

Another method is to use Jade templates to serve your SVG icons from a node.js endpoint. To create a Jade template from your SVG XML, modify the root node to use Jade's "Block in a Tag" feature. Your root node should look similar to:

svg(
   xmlns="http://www.w3.org/2000/svg"
   width="307.99988"
   height="455.08182").

The rest of your XML file can be copied in. Then replace whatever you'd like to change on the fly with Jade's method of inserting content:

<text
     y="384.4017"
     x="197.7131"
     style="font-size:180px;fill:#000000;font-family:Verdana;">#{text}</text>

To serve this SVG over a node.js endpoint, create a route (here using express) that sets the Content-Type to "image/svg+xml" and passes a text parameter to your Jade template:

app.get('/marker', function (req, res) {
    res.contentType('image/svg+xml');

    res.render('path/to/templateFile', {
        text: req.query.text
    });
});

And here is the result:

“Hot!”

YP Intern Hackathon 2014 Followup

Alan

I am sorry to report that we failed in our mission to eat all the food in the breakroom, though not for lack of trying. Part of the problem was that delicious food kept being brought in for us even before we could finish the last meal. While we ate everything from sandwiches to pizza to a spread that couldn't decide if it wanted to be Mediterranean or Indian, the greens went largely untouched. Who knew interns don't eat salad?

Despite our best efforts to focus on eating and playing ping-pong, however, my team (myself, Joe, Jaspreet, Kate, and Kwun; code-named GUARDIANS), managed to produce FoodDeck, an idea I had just the morning before the hackathon best summarized in the cliché formula as "like Tinder but for food."

We didn't actually get much done while at YP until at the last moment Kate saved the day by fixing an issue in less than an hour that had blocked seniors Joe and me for nearly two days. After a weekend's worth of hard work, the final app we created actually had a pretty sexy UI (if I may say so myself), and reverse-engineered the YP Android app's API call to pull data directly from YP's servers — all from a team that only had one actual Android developer intern to start.

image

Our "competing" team (David, Jordi, and Shrinidi; code-named AVENGERS), worked on Sage, which uses predictive regression modeling (insert other fancy words here) to correlate advertisting expenditures with potential click-through results. It sounded like it would be very useful for YP sales representatives, who can better communicate to clients what YP is able to do for them.

I am happy to say that my team's FoodDeck was pronounced the "winner" of the hackathon, though Sage seemed like it would benefit YP more (or at least much more quickly). Of course, we did have Kwun, our project manager intern who put together an awesome deck and pitch. I do have high hopes that both applications can be put into actual production, especially given our new Consumer Platforms SVP Paul Ryan's emphasis on having more than just a single core app.

Following our presentations and a giant lunch of wings, most of us headed out into the middle of nowhere to settle our differences with paintballs. I came home sore and even bloodied, though what hurt (both physically and mentally) the most was being friendly-fired by a teammate at point-blank range. Maybe removing Kate's cat pictures from the app wasn't such a good idea... :3

image From left to right: Jordi, Jaspreet, Kate, myself, Joe, David, Aaplavi, Shrinidi