Code

Your code is not a reflection of you. It isn’t a reflection of your beliefs, your upbringing, or your ability to be a good person.

Your code is, however, a reflection of your thinking process at the time that you wrote it.

Given our innate ability to change our minds, consider other viewpoints, and play with new ideas, why do we hold our code so dear?

Your code can change. Your code will change. Your code must change, if it’s ever going to get better.

Stop marrying your code.

The sooner you accept this, the happier you will be and the better programmer you will become.

======

This was originally posted on The Pastry Box Project at https://the-pastry-box-project.net/raquel-velez/2014-october-4

Alchemy

I love working in tech. As a software developer, I have the ultimate power: I can build anything. The only things holding me back are my imagination, my time, and my desire.

I’m a modern-day alchemist, making gold out of thin air.

And it’s with my magic that I genuinely want to make the world a better place.

Later this month, I will hit my three-year anniversary of becoming a web developer.

I look back on those first days, when I didn’t know anything or anyone, and all I had was hope. Hope that I could not only be good at this whole Internet Thing, but also that I could help other people be good at it, too. (If the last three years are any indication, I’m actually doing alright; I even gave a talk about my journey, called Evolution of a Developer!)

But over this past year, there have been more than a few moments in this industry when I’ve wondered if this is the right field for me.

The companies, communities, and professionals heralded in our industry are, by and large, the exact opposite of the types of figures that I was hoping to see. Instead of using computer magic to change the world, they’re helping the rich get richer while ignoring the disadvantaged who could benefit from their skills the most.

I see the people who are actively making a difference get denied funding because of their looks, their accents, or their lack of pedigree.

After seeing the same stories repeat themselves over and over again, it’s easy to lose hope sometimes.

But then I open up my computer.

And while I’m no investor or epic entrepreneur of the ages, I still have the power to create. If anything, my power is stronger than ever, because I’ve been levelling up this whole time.

Now is not the time to give up. If no one wants to share the gold, well then we’ll just have to make our own.

======

This was originally posted on The Pastry Box Project at https://the-pastry-box-project.net/raquel-velez/2014-december-4

Followers

At the time of this writing, I’m on the brink of passing 5,000 followers on Twitter.

I honestly couldn’t care about how many followers I have, with two exceptions: each new follower means a larger network with which I can share my crazy thoughts and expertise, and also every new follower brings me closer to my impending personal story of online harrassment.

You see, so far, I haven’t had any trolls. No one has called me names, threatened my personal well-being, or tried to hack into my personal information. (And no, for the record, this is not an invitation.) The two times people have said inappropriate things to me, I simply blocked them and never heard from them again.

But soon it won’t be that easy.

Someone - who may or may not be following me already - will comment on my age, my gender, or my heritage. They’ll talk about how stupid/unqualified/annoying I am, and how I have no business being in this field. I will try to ignore them, as there’s no truth in those sorts of comments, but they’ll keep poking, saying awful things, and I’ll crack. Maybe I’ll respond, maybe I won’t, but it won’t matter, because the abuse will keep coming.

And the way the system works, I won’t have anywhere to turn for help. The police won’t have much to go on, the Twitter abuse protocol is notoriously terrible, and an alarming percentage of people will simply turn their backs because it’s a lot easier to ignore a problem if you pretend it’s not there. I’ve seen it countless times already; it’s simply a matter of time before it’ll be my turn.

It’s actually pretty impressive how I’ve managed to get this far without suffering. Admittedly, I play it safe online. My forays into social justice have been mostly limited to retweeting things that matter to me (though by the nature of retweets, they show who originally said it, instead of me). My personal tweets tend to be silly epithets or poignant quips about software engineering. I don’t go out of my way to attack anyone (even if I grossly disagree with them), and I don’t engage in heated debates.

But we’re living in a really interesting time right now. As a Latina, I’m constantly seeing two major parts of my identity being debated everywhere. Women and people of color are hot topics, not only in technology, but also in general American society. It’s not something I can keep quiet about forever; in fact, I’m hardly quiet about these topics in person. But online, I don’t say much about them.

I have to decide what’s more important: sharing my opinion and putting my family at risk, or staying quiet and keeping safe; making a point or letting my silence speak for me.

Every time I speak at a conference, write a blog post, or compose a tweet, I ask myself: “Is this it? Is this the [talk/post/tweet] that will send someone over the edge?”

I don’t know, and I’m terrified.

How do we fix it? How do we, as a community, make sure it doesn’t happen?

The first step is to stop it from happening, right now. Every day, women and people of color are abused online. And it’s not just women and people of color, either: members of every marginalized group (read: non-het-white-cis men) are being called names, personally threatened, and hacked. Horrific pictures are photoshopped, sensitive details are displayed in public, and lives are destroyed. I don’t care what they said - they did not ask for it, and no one deserves that kind of treatment.

Speaking your mind isn’t a crime, and trolls aren’t police, judges, or juries.

Unfortunately, I don’t know how to fix this. I don’t know how to stop people from saying awful things on the Internet beyond declaring that I won’t say awful things on the Internet. But something must be done.

I’m tired of watching my friends get hurt, and oh my goodness do I hope I’m not next. The standard you walk past is the standard you accept; I’m standing right here, and I really hope you’ll stand with me.

======

This was originally posted on The Pastry Box Project at https://the-pastry-box-project.net/raquel-velez/2014-september-4

Needles

I lived in Charlotte, North Carolina for two years.

Like many cities with a high number of corporate headquarters, Charlotte has seen a massive number of newcomers flocking towards jobs and opportunities. Add to that some fairly decent weather, affordably-priced housing, and a feel-good-family-friendly nature, and it’s pretty obvious why folks from all over the country (and the world) have decided to make Charlotte their home.

For the first year that I lived there, there was this notion of the elusive “Native Charlottean” - people who were born, raised, and still living in Charlotte. Indeed, with the booming influx of non-Charlotteans moving into the city, finding one who didn’t come from somewhere else was like finding a needle in a haystack. My friends and I used to joke that if and when we found one, it’d be like winning the lottery.

At the beginning of my second year in Charlotte, I joined the Charlotte Shapers, a group of younger adults (20-30 years old) invested in improving the city. Within our eight-person team, we had not one, not two, but three native Charlotteans. As we worked together, I met their friends (many of whom were also native Charlotteans - imagine that!). And I discovered that there were actually hundreds of these hypothetical needles: you just needed to know a few and the rest would follow.

It’s with this experience that I can’t help but laugh at hiring managers in the Bay Area who claim that women and underrepresented minorities are so hard to find.

“No one is applying,” they say. “The pipeline is empty. Those unicorns* don’t exist.”

My friends, the pipeline isn’t the problem. If it were, then the gender breakdowns at major tech companies would be closer to proportionally matching the number of women graduating with CS degrees.

This problem is a recognizing that there’s more to the haystack than a proverbial needle problem.

So here’s your homework: find one. Find one needle/unicorn/Brigadoon/whatever you’re calling them these days, get to know them (yes, it helps to be genuine and interested in more than just networking for networking’s sake), and discover the hidden (but definitely existent!) network of untapped talent.

Don’t know anyone?

Hi! My name is Raquel. I’m a software engineer. Oh, yes, I also happen to be a woman of Hispanic origin. Want me to introduce you to my friends? Just ask.


* the needles of the animal kingdom, obviously

======

This was originally posted on The Pastry Box Project at https://the-pastry-box-project.net/raquel-velez/2014-august-4

Literature by American Latinos

Recently on Twitter, I asked for recommendations of authors of Latino/Hispanic descent. In particular, I wanted authors on the same level as Toni Morrison and Frederick Douglass: ones who could give me perspective on life in the US while brown.

Here’s what the Twitterverse came up with:

Honorable Mention: Authors from outside the US

Given the uniqueness of the American Latino experience, I was specifically looking for authors who could speak to that. Nevertheless, these authors were also mentioned, and I’ve definitely added them to my reading list as well!

So Many Programming Languages!

“How do you remember and keep track of all the different programming languages you know? Do you ever confuse them and mix up the syntax?”

- Maddy, a high school student in a programming summer camp

Hi Maddy!

Your question is an excellent one. It’s true, keeping track of so many programming languages can be a lot to deal with. Here’s how I do it: I think of each language as a different recipe. Let’s say I’m making cookies: the first time I make chocolate chip cookies, I’ll have to look up the recipe, get all the ingredients, read through the recipe multiple times, and do each step one at a time, very carefully, to make sure I don’t make any major mistakes. Once the cookies are out of the oven, I might notice that I’ve made some errors, but that’s okay, because I’ll fix it in the next batch. The next time I make chocolate chip cookies (and the third and fourth, because let’s be honest, chocolate chip cookies are DELICIOUS), I won’t need to follow the directions as closely, and the cookies will come out great. By the time I get to making the cookies a dozenth time, I’ll probably have memorized the recipe and know all the ingredients and proportions and steps without looking at all.

Now let’s switch to making oatmeal raisin cookies. I’m familiar with the cookie-making process (because I’ve made so many batches of chocolate chip cookies), so I know the general order of steps. But the ingredients are different, and the steps are slightly different, too, so I’ll pay really close attention to the recipe as I make my first batch. (Though let’s be real: there’s about a 100% chance that I’ll accidentally think I’m making chocolate chip cookies instead of oatmeal raisin, and will make some errors. But that’s okay!) As I make more batches, again I’ll gain confidence in my oatmeal raisin recipe, and I might even find that it doesn’t take me a dozen batches to memorize the recipe; maybe I’ll only need 5 or 6 batches.

Let’s say the oatmeal raisin cookies are SUPER popular, and I’m making them for a quite a while, batch after batch, after batch. And then, one day, someone says, “Hey! Remember those chocolate chip cookies? Would you make some? Pleeeeeaaaasse?!” (Of course, I agree, because I’m an awesome cookie maker and that’s how I roll.) Chances are, I probably remember most of the steps for making chocolate chip cookies. In fact, depending on how long it’s been since I’ve last made chocolate chip cookies, I’ll likely make a few errors, such as using raisins instead of chocolate chips or something. But if all else fails, I’ll simply look up the recipe again, just to make sure I’ve got all the right ingredients/proportions/steps. But it won’t be hard, because I did it a bunch before and just need a refresher.

Basically, this is my (hopefully scrumptious) way of saying that programming languages are syntax (aka ingredients/proportions) that you pick up and use when you need them. It’s been a super long time since I’ve written any C++, but with a tiny refresher, I could pretty easily start coding with it again. (And yes, I confuse syntax constantly. Fortunately, that’s what errors are for - useful markers for “hey, um… are you sure that’s what you wanted to do??” :-)) The most important thing about programming is not necessarily the language - it’s the process/logic that goes into each program (aka the steps in the recipe). Knowing how to create functions, knowing in which order they should be called, and knowing how to get from start to finish are all critical to your success as a software developer. Plus (and here’s the best part about it all): they’re still all cookies! That is to say: no matter what ingredients (syntax) you’re using, they all compile down to the same instructions on your machine. Programming languages are simply a means by which you tell your computer how to do its job.

If all that seems super hard right now, don’t worry! You get better at it with time - practice, practice, practice :-D

Hope all is well,
Raquel

P.S. If you have more questions, please don’t hesitate to ask!!

Patriotism

I worry about the people who never leave their home countries: they tend to assume that the rest of the world is exactly like their own or - worse - that it’s exactly as someone else has described it to them. They think they understand the world and all of its intricacies, complacent with the way things are.


How many countries have you visited? How many countries have you lived in?

It’s one thing to visit a country; it’s another thing entirely to live there.

When you visit, you see a country the way you want (or your tour guide wants you) to see it: you visit the tourism-focused sights, laugh a bit at the strange customs, and struggle with the foreign language.

But when you live there, you see a country the way its people see it: you learn about off-the-beaten-path restaurants, struggle with bureaucracy, and discover the complexities of the culture.

By fully immersing yourself in another country, you learn, first-hand, about why people love (and hate) their homelands. And then, upon your return, you see your homeland from the perspective of another.

And you start to realize that it’s not the way you remember it, and that it doesn’t have to be that way. That, in fact, you can (and should) improve it.


Travel.

Look at the world through someone else’s eyes.

And then make the world better, because then you’ll know how.

======

This was originally posted on The Pastry Box Project at https://the-pastry-box-project.net/raquel-velez/2014-July-4

Opinions

I… I have opinions.

@rockbot

There are a lot of opinions out there.

Often, we take the opinions of others as truth instead of doing our homework. Maybe we’re scared that our opinions aren’t worthy, because we’re not “famous.” Maybe we’re nervous that having an opinion requires extra work and effort, which takes up time we don’t have. Or maybe we just don’t know how.

Fortunately, I have created this rather simple guide:


How to Have an Opinion

Step1: Use stuff. Decide if you like it (or not).

Step 2: Ask yourself: why? Why do you (not) like it?

Step 3: Find something similar (but different). Repeat steps 1 and 2 for this stuff as well.

Step 4: Compare the stuff in steps 1 and 3. How do they differ? Why is one better than the other? What are the pros/cons of each?

Step 5: Discuss these findings with others. What have they learned? How does their experience compare to yours?


Here’s where most of us come up short:

  • We don’t ask ourselves “why” enough. The best developers I know ask “why” (at least) twice as often as they ask “how.” Dig deep — what is it about this framework that’s bugging you? Is it just syntax? Is it the inherent way data is being saved which runs counter to the rest of your application?

  • We also don’t seek out differing opinions enough. Debate team members and politicians do this really well — to win a debate, they consider all opposing positions when forming your arguments. We should strive to do that when we make our opinions as well.

    As a roboticist, I get a lot of flak for using JavaScript instead of C++. But I’ve used both. And I don’t actually believe that one should die in a fire; I think they’re both perfectly valid and wonderful, depending on the application.

  • Finally, we don’t discuss enough. I mean real, proper discussion. Conference downtime is great for this — grab some (new) friends and talk about the stuff you’re using. You may discover that opposing view points aren’t necessarily wrong; they may just be indicative of different use-cases.

The internet is, in fact, big enough for all of us. We can all have an opinion, and there’s no reason why everyone should have the same one.

======

This was originally posted on The Pastry Box Project at https://the-pastry-box-project.net/raquel-velez/2014-May-4.

Understanding Async

Many people (especially newcomers to Node.js) have a lot of trouble understanding asynchronous programming. Since I like analogies, I’ve come up with the following one to help folks understand the difference between synchronous and asynchronous situations.

Your goal is to buy an outfit: a shirt, a pair of pants*, and a pair of shoes.

Synchronous Programming

You go to the shopping mall. Your first stop is to The Shirt Store. Having found the shirt you like, you go to the cashier, pay for your shirt, and walk out with your shirt. Next, you go to The Pants Store. Again, you pick out a pair of jeans, head to the cashier, pay, and walk out. Finally, you enter The Shoe Store. You grab your pair of shoes, pay for them at the cashier, and walk out. Now that you’ve got your shirt, pants, and shoes, you can go home and party on.

Asynchronous Programming

You are at home and are shopping online. You go to TheShirtStore.com, pick your shirt, and pay for it. Then you head to ThePantsStore.com, select your pants, and pay. Finally, you direct your browser to TheShoeStore.com and buy a pair of shoes. Over the course of the next week, your purchases show up via delivery. Your shoes come in first, then your shirt, and then your pants. Now that you’ve got your shirt, pants, and shoes, you can party on! (You don’t need to go home, because you’re probably home already.)

The Inherent Difference

With synchronous programming, each operation is what we call “blocking.” This means that each operation must finish in its entirety before the next operation can start. In the shopping analogy, you can’t buy another piece of clothing until you have acquired the piece of clothing that you have just purchased.

With asynchronous programming, there’s no blocking. The operations start in sequence, but then might finish at different times. In the shopping analogy, you can buy all of your clothes without having any of them in your possession yet. You’re not blocked from making your next purchase, though the (potential) downside is that you can’t necessarily guarantee the order in which your purchases will arrive at your doorstep.

Let’s look at it with code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Synchronous
var shirt, pants, shoes;
var getItemSync = function (storeName, itemName) {
var store = goToStore(storeName);
var item = store.getItem(itemName);
console.log('I got my ' + itemName);
return item;
};
shirt = getItemSync('The Shirt Store', 'shirt');
pants = getItemSync('The Pants Store', 'pants');
shoes = getItemSync('The Shoe Store', 'shoes');

Your output:

1
2
3
I got my shirt!
I got my pants!
I got my shoes!

As compared to…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Asynchronous
var shirt, pants, shoes;
var getItem = function (storeName, itemName) {
var store = goToStore(storeName);
var item = store.getItem(itemName);
console.log('I got my ' + itemName);
return item;
};
shirt = getItem('The Shirt Store', 'shirt');
pants = getItem('The Pants Store', 'pants');
shoes = getItem('The Shoe Store', 'shoes');

Your output:

1
2
3
I got my shoes!
I got my shirt!
I got my pants!

Synchronizing the asynchronous

Now let’s talk about callbacks. A callback basically says, “Hey, I’m done!” (ahem: it calls… back.)

When working in an asynchronous environment, you use callbacks to tell a process to only execute the next process once the one that’s currently being completed has finished. It looks like this:

1
2
3
4
5
6
7
8
9
// Using callbacks
var getItem = function (storeName, itemName, cb) {
var store = goToStore(storeName);
var item = store.getItem(itemName);
console.log('I got my ' + itemName);
return cb(null, item); // we're assuming no errors here - this is bad, but it's just an example, so... meh.
}

The key piece of information here is that in JavaScript, we can pass functions in as parameters. In Node.js, callbacks are generally in the form of cb(error, result) - it’s just a convention, but it’s a useful one.

This then means that we can write our aysnchronous code like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Sync-ified-ish Async
var shirt, pants, shoes;
getItem('The Shirt Store', 'shirt', function (err, theShirt) {
if (err) return err; // do proper error handling please
shirt = theShirt;
getItem('The Pants Store', 'pants', function (err, thePants) {
if (err) return err; // this is just an example
pants = thePants;
getItem('The Shoe Store', 'shoes', function (err, theShoes) {
if (err) return err; // not necessarily the best way to treat errors
shoes = theShoes;
});
});
});

Your output:

1
2
3
I got my shirt!
I got my pants!
I got my shoes!

And… that’s it. Tada!

;-)


* or trousers, for our pants-mean-underwear readers ;-)