Search

Life and Code

by Aditi Barbhai

How to clone an object in JavaScript?

Recently, a friend was asked this question in an interview:

How would you clone an object in pure JavaScript?

Most people’s knee-jerk¬†reply to this would be something along the lines of using jQuery.__extend(), but since this question asks specifically to use pure JavaScript, we’re going to have to get creative.

Let’s start by looking at some solutions that seem correct, but aren’t. For the purpose of this post, we’ll use the following example: Continue reading “How to clone an object in JavaScript?”

Advertisements

My first HTML5 game!

I’ve finally done it – I’ve created my first HTML5 game! =D

I’m doing a Web Development course this semester, and our first assignment is to build a space invaders HTML5 game. I had never built a game in HTML5 before, so I thought I’d dig up some tutorials to get my feet wet… and here’s what’s come out of it! Continue reading “My first HTML5 game!”

(tutorial) How to center a div on a page

One of the things that I find myself going back to lately is centring a div or any DOM object on a page, and having it appear centred no matter what size of screen the user views it on. In short, how to make it responsive.

And it might come as a surprise to many people, but the solution for this is actually quite simple. Use this simple CSS trick and your div will be centred on the page, whether you’re viewing it on a laptop or mobile device. Continue reading “(tutorial) How to center a div on a page”

Introducing “Reddit Cats”

Anyone who knows me knows that I love cats. So, when I was thinking about what to do over the winter break to learn how to use an API, Reddit + cats seemed to be a winning combination. So, here’s….. Reddit Cats!

Reddit Cats is an aggregator that collates photos posted to the front page of /r/cats subreddit and presents them on a single page, for your viewing convenience (and creating a massive overload of cuteness). Continue reading “Introducing “Reddit Cats””

Attending ONCWIC

It’s been a while since I updated this blog, and as I have just had a GREAT weekend meeting and listening to some of the most exceptional women in computing, I thought it might be time for a blog update.

This weekend, I attended ONCWIC, the Ontario Celebration of Women in Computing, modeled after the famous Grace Hopper Celebration that takes place in the States every year. ONCWIC is a regional conference that brings together Ontarian women in computing, providing inspiring talks, workshops, and a space for them to meet, learn and have fun! This year’s conference was held at the Waterloo University. It was my first time attending (and first time in the city of Waterloo!). Continue reading “Attending ONCWIC”

Learning how to use breadboards

So I just started a new (and my final!) school year and one of the courses I’m taking is Computer Organization. The course itself focuses on digital logic and design, microprogramming and (of course) computer system organization. The content – especially digital logic – reminds me very much of the circuits we had to draw in Grade 12 Physics. Continue reading “Learning how to use breadboards”

So you want to be a developer?

I came across this series on YouTube today. It takes an animated (pun intended) approach to helping students figure out if a career in development is for them.

This is my no means an exhaustive explanation of what being a developer really is like, but it’s a good place to start.

You can check out the rest of their videos here.

(app review) Blekko

blekko-home
Blekko home page

Never heard of it? I hadn’t either. I came across the company while reading this article on MobileSyrup. Founded in November 2010, the company aims to be a Google alternative and uses “slashtags” to curate their searches.

Their website states:¬† At Blekko, our mission is to create a differentiated search experience by delivering high quality, curated results and organizing content into categories.”

Anyway, so the article peaked my curiosity and since I’m always up to try something new (and because their website looked very clean and minimal), I decided to review it!

Here are my findings: Continue reading “(app review) Blekko”

(tips) How to extend the battery life of any android device

So I recently got a new nexus 7 (review/pics coming up soon!), and while surfing the net to find some relevant tips, I found this one. Continue reading “(tips) How to extend the battery life of any android device”

Blog at WordPress.com.

Up ↑