[placeholder]

The Nuts and Bolts with Naz Hassan

Naz Hassan, Staff Software Engineer, Presence

naz.jpg

How did you get into programming?

I grew up in New York City, and went to public school. One of my middle school classes asked us to enter a contest called ThinkQuest NYC where we had to build a website under a particular set of criteria. If you won the contest, you got a laptop. It was fantastic! Anyway, I entered for the first time in middle school, but did NOT win. (But what is winning really?)

At that point, I was just learning about JavaScript (I used a lot of script.aculo.us and found this amazing article by Michael Heilemann from 2005 introducing Scriptaculous Effects!), HTML, and CSS; but I also knew how to put websites on the internet and servers. I was obsessed, and spent pretty much my entire summer reading books, and trying things out on any computer I could get my hands on.

A few years later in high school, my friend and I entered ThinkQuest NYC again. This time, we won the laptops, and it felt amazing! The best part was that we built a website to teach HTML, CSS, and JS, so users could make their own websites called HTML Gears.

What’s the thing you like the most about what you do?

Working with a fantastic team to get things done so that we can enable people to use our product, and put their ideas on the Internet.

How do you measure success?

To me, it’s all about the customers we attract. What ideas are built on Squarespace? How relevant are they? Are they meaningful to the world? I’ve always seen Squarespace as a successful business because of our cultural relevance.

Personally, success is a mix of feelings. I want to be challenged and feel like, “I don’t know how to do this. OMG.” On the other hand, I also want to feel like, “I got this – I know what I’m doing.” I think the balance of both is what keeps you sane. Too much of either is discouraging.

What’s your superpower?

We had a fantastic question we used to ask new hires: would you take invisibility or flying? I’m going to take flying because, of course... FLYING.

Current jam?

This is going to sound strange. I’ve been listening to instrumentals of pop songs like Britney Spears. I don’t know why, but this is what’s happening. What does that even mean?!

What is your favorite Hack Week project (yours or another’s)?

I take Hack Week to heart, and try to build things that reduce regret. I never want to think: “Oh I wish I had tried that, but never really had time.” My favorite was Squarespace OS. I created an operating system using hardware put together by Kano computing and a stripped down Chromium build, and then began implementing everything – from the cursor up to a browser – that is really just an <iframe />. The reason it’s been my favorite project is: (a) how different it is from what I do on a day-to-day basis, and (b) it was part of a huge field of problems to be solved that I hadn’t tackled before.

What’s your signature ensemble?

I really enjoy having the comfort and certainty of a uniform, so I consistently wear the same pieces every day: black jeans, a washed blue J.Crew Oxford, and white shoes. In order to maintain order, I have a system and multiple sets so I’m never wearing the same exact items I wore yesterday. There’s also wash cycles and purchasing patterns to take into consideration (What happens if an item gets discontinued?!). I do try to buy new clothes every once in a while. Sometimes I get pleasant results, but basic concepts win out most of the time.

What’s the weirdest thing you’ve done with JavaScript?

Yes. My favorite is using the with statement. Here is a fun example.

There’s a fantastic few pages in the thick JavaScript: The Definitive Guide textbook that talks about scopes and the with statement. The with statement is so cool, but people don’t like it because it’s confusing. The media (MDN) also warns users of Ambiguity Contra, which provides strange results. We used the with statement for a period of time in Squarespace 7. It has been removed, and people tell you not to use it, but you can’t believe everything you hear. It could be fake news.

What the with statement does is provide a way to declare your own entire scope. Effectively, you can make keys in an object be variables inside the block. If you’ve ever used extract in PHP, with statement does that with an object. This has been one way I have found to overwrite window. You can say, with ({ window: null }) { ... } and now you have the ability to declare your own window! You can’t redeclare window =, window.window =, window.top.window =. Nothing works! But with this you can overwrite window. Pretty cool! Various limitations apply.

In the JS Fiddle link I illustrate the with statement running a templating system that is implemented with just a few lines, and allows for a variety of templates and contexts to be passed in. I think the implementation is interesting!

What could you talk about for hours?

Anything. I am a chatter. I will chat. What do you got? Let me tell you about the word genius. What do you think it means? Person? Being? The word comes from Ancient Rome where genius was considered a spirit that enabled the human beings to produce great work. When great work was made, then the compliments went to the spirit instead of the human. The human was simply a tool in the spirit’s process of producing the art, and the human was graced with the presence of the spirit. Then, the Renaissance happened, and we became obsessed with ourselves, so the word genius began to describe an actual human being instead of the spirit, and here we are today.

What are your non-tech passions?

I like art, but what I like more than art is the process of making art. When we look at a finished piece in a nice gallery with nice lighting – we miss the entire process. Maybe there’s a card on the wall with an explanation about the piece, but we’ll never really feel the process.

In this way, I enjoy painting and sculpting and making the art – because it is the life you live that produces that work, and the path you took to get to that result is beautiful. Sculpting for me is about getting lost in carving and shaping and sanding for months, and slowly seeing the object break free. In the process of getting lost in the moment you are free to think and just be mindless, and there is a feeling of nirvana there.

The same goes for painting. Mixing colors is an art form in and of itself, so I try to stick to what comes in the set. With art I realize, and connect with the world in a different way, and I channel that energy back into my work. It’s all a loop. Working on my art lets me do my daily work, which supports me in working on my art. Something like that.

How do you really feel about JavaScript?

I would like JavaScript to be the future because it is managed by a group, and not owned by anyone. Even if V8 engine has taken over, the real future is that JavaScript won’t have a single owner and is governed by a group of various stakeholders from the various companies to keep the ownership and property decentralized. This would make it so the web isn’t owned by one company, but distributed. The major players are competing with each other trying to serve their own users (Apple: iOS users on Safari, Google: Android users on Chrome, Microsoft: Windows users on Edge), and of course they will try to create ecosystems they are in full control over (App Store, Play Store), but the web they cannot capture and they must agree with each other and all the other players because the internet exists outside of their control, as it should. Maybe it’s kind of like the UN. Or a deterrent that nobody can really win. What is winning really?

However, it’s also good to hear multiple opinions because we JavaScript people are many out there in the world with various thoughts and opinions – and it’s good to have diversity of view. I don’t think we should hate on JavaScript, but there are haters out there. So, we just gotta brush them off, and move on. Things are going to be great! It was fantastic meeting this incredible person cswebartisan.com who forwarded me The Birth & Death of JavaScript with a message from the future of 2035 where JavaScript has ended (or rather, immortalized).

If you didn’t do this, what would you do for a living?

I’m going to take this moment to talk about child labor, and the reality of the world we exist in.

The findings of a BRAC study reveal that small income, poor savings, marginal land, less access to NGO services, and sickness of the main income earner in a family were the main causes that compelled parents to allow their children to become CDW (child domestic workers). The findings also strongly observed that poverty is the root cause to engage children in domestic work. The findings also reveal that neighbors, relatives, employers, and middlemen as the intermediary were effective and influential for CDW as well. However, parents and CDW herself/himself in urban areas were the most instrumental factors to get into domestic work.

This is just one analysis, by one group, in one country. As I reflect on the statement in this report that “One of our CDWs mentioned that her parents borrowed Tk. 8,000 in advance from her employer. Her mother assured her that she would bring her home after the money would be repaid,” I feel guilty. Let me do this conversion for you: Tk. 8,000 is USD 94. This is a human being; a child’s life! If I wasn’t writing software, I would like to solve this problem. Hopefully one day I’ll be able to dedicate time to building something that addresses this issue. Right now, building software for and working with the people, systems, and organizations is an opportunity to do something spectacular with a group of people I admire. Hopefully, I’m on a path in my life where I get to solve more crazy abstract problems effectively, and get better each time. This is all learning process, and practice for the next step.

Check out a video that shows what it’s like to be a software engineer at Squarespace as well as our engineering openings.

Six Attributes of Beautiful Systems

Building On Solid Ground: Getting Postgres Foundations Right With pgbedrock