Skip to content

Instantly share code, notes, and snippets.

@pamelafox
Last active January 28, 2018 05:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pamelafox/ee3ddc410b9f116660c09a7aff48c803 to your computer and use it in GitHub Desktop.
Save pamelafox/ee3ddc410b9f116660c09a7aff48c803 to your computer and use it in GitHub Desktop.
Interview answers

A Khan Academy student asked me these questions as part of a school project.

  • What is the hardest part about making a website with javascript?

Hmm. It gets tricky once your website starts having a LOT of JavaScript - you have to truly make sure to keep it clean and well organized. Otherwise you end up with what we call "spaghetti code" - a jumble of code that might work but is so hard for you or anyone else to make sense of. It's even more important to organize your code if you're working with other people, so you make sure that you all organize your code the same way and that every bit of code goes in the place it belongs.

Another aspect that can be hard is performance, especially for websites that use a lot of JavaScript. Sometimes the browser slows down when it's trying to execute all the JavaScript, particularly if the code is requesting "repaints" of the browser window - if it's moving or changing visible things on the page. There are now a lot of tools that you can use to analyze the performance of your JavaScript, so if you notice it slowing down, you can open up the tools and pinpoint the problem. Then you either decide to use less JS (maybe using CSS3 instead, like for animations) or use a better performing JS technique.

  • What is the easiest part in making a website?

The motivation! It's so darn fun to make a website and share it with the world.

On the technical side, HTML tags are the easiest aspect (as compared to CSS and JavaScript). I find that writing HTML tags can be very relaxing, as they just flow from my fingers without much thought at all. Perhaps writing HTML will be the way that people relax in the future... :)

  • If you want to make a website what software do you use?

I answer that question here: https://www.khanacademy.org/computing/computer-programming/html-css#web-development-tools Personally, I use Sublime Text or simply the command-line vim editor.

  • How might websites help people in the future?

If only I knew! My hope is that websites help people connect more with other people in more positive, meaningful ways. Right now, websites help us connect mostly at a shallow level (like when we "Like" each other's posts on Facebook) and often times, our more negative sides come out on the internet because we're not face-to-face (so many internet arguments!). Ideally websites would find ways to encourage positive interactions, ones that are truly beneficial for our long-term psychological mindset. For example, when I was at Khan Academy, we talked about writing algorithms to detect negativity in comments and then encourage a more positive re-wording or offering a live chat option to them.

Besides that, I expect we'll see more use of 3D and Virtual Reality technology in future websites. We had both 3D and VR when I was a kid, but it's only finally at a point where it works really well and it's appealing to the public at large.

@pamelafox
Copy link
Author

I recommend researching "sentiment analysis algorithms". Yesterday I was looking at Python NLTK, which includes sentiment analysis, but there are many others out there. The algorithm likely looks at n-grams- single words and their likelihood of being negative, bigrams (2 words in a row) and their likelihood of being negative, and trigrams (3 words), and then uses that compute the likelihood of negativity. That's a guess though, it's a fun research topic. Enjoy tackling it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment