AAMALIAA

Games! Girls! Onions! »

deadreckon:

You’ve met a lot of great people, and you have a lot of friends that you like to work with. Sometimes you don’t feel lonely or like a novelty, like when you’re sitting around the lunch table, cracking jokes with your coworkers. You feel happy and included. But when one of your coworkers makes a joke that is crude, even though it doesn’t offend you at all and you haven’t even had time to laugh, he turns to you and apologizes, because you are the only woman at the table and your delicate sensibilities must have been affronted. You feel lonely again. You feel like you’re not supposed to be at the table.

canihaziphone.js

A javascript script that checks for iPhone5s availability at Apple Stores near you.

Inspired by my obsession with Node.js and this article that I stumbled upon last night, I decided to make my own implementation using a simple javascript file. It takes in a zip code and an iphone5s model as its two (optional) parameters—if you don’t enter parameters it will default to my favs.

node canihaziphone.js 90210 ME343LL/A

Once executed, it’ll return something like this (if you’re one of many ridiculous people waiting for the 64GB gold Verizon iPhone to show up in NYC like me).

% node canihaziphone.js                                                                                                                                      
Checking for ME349LL/A near 10018...
=====================================
unavailable @ Grand Central
unavailable @ West 14th Street
unavailable @ Fifth Avenue
unavailable @ Upper West Side
unavailable @ SoHo
unavailable @ Garden State Plaza
unavailable @ Staten Island
unavailable @ Ridge Hill
unavailable @ Willowbrook
unavailable @ Manhasset
unavailable @ Short Hills
unavailable @ Roosevelt Field
unavailable @ Tice's Corner
unavailable @ The Westchester
unavailable @ Menlo Park
unavailable @ Palisades
unavailable @ Greenwich Avenue
unavailable @ Walt Whitman
unavailable @ Rockaway
unavailable @ Stamford

The code is available here: http://gist.github.com/aamaliaa/6794853

As long as you have Node.js installed globally on our machine you should be good to go. Have fun!

editing node modules installed via npm

For those common situations where you might want to edit some code in one of your node modules in a Node.js project (and don’t necessarily have the time to wait for your pull request to be merged into the original repo), you can actually point npm directly to your own github repo:
npm install https://github.com/[username]/[repository]/tarball/master --save
So your package.json code would look something like this:
{
  "name": "test",
  "description": "wooo a test",
  "version": "0.0.1",
  "dependencies": {
    "express": "3.x",
    "mongodb": "~1.3.17",
    "[repository]": "https://github.com/[username]/[repository]/tarball/master"
  }
}
Always be learning!

Project 1: Arduino-Powered Bathroom Vacancy Light, PART III

Last fall I got a simple prototype of my bathroom vacancy light project working using an Arduino, a server, some PHP code, the Pusher library, and a Python script on a Raspberry Pi that enabled a simple LED. Since then, however, I’ve fallen in love with JavaScript, namely Node.js, and would like to continue exploring it through this project (it’s not dead yet!!).

Ultimately, given my fascination with the Internet of Things, what I would like to build is an API service layer that will allow any device (within my apartment’s local network, for now) to access information made available by sensors (i.e. magnetic sensor on bathroom door, a thermometer, humidity sensors, etc). Eventually, this service could support a home automation system of some sort.

Part of last week was been spent at the DevCon5 conference at NYU and I was especially inspired to revisit this project (and another, which I’ll write about soon) after the Node.js and MongoDB talks. I tend to sketch and brainstorm ideas for projects late at night so the below picture is what I came up with during my bout of insomnia the other night…


Essentially, I will be starting over from scratch. In order to get this to work I will need the following:

IN THE BATHROOM
  • magnetic reed switch
  • Raspberry Pi - this could also probably be achieved with an Arduino, but after struggling and failing to get wifi to work and stay connected via Wifly for > 3 hrs, I’d rather not worry about it at all and just stick with what works—also I promised my roommates I’d also turn it into an audio Airplay device for singing in the shower.
    • Node.js - I’ll need to find a library that will listen to the GPIO pins for the signal sent by the connected reed switch. Node will then handle what information gets sent via the WebSocket and API.
    • Socket.io - for devices that need live real-time updates (people gotta pee!)
    • REST API - built with Express
    • Airplay - I currently have this working in my room on another Raspberry Pi as a prototype with Shairport
  • speakers
  • Raspberry Pi case - especially to protect against extreme humidity as we have no bathroom fan
IN MY ROOM

Another Raspberry Pi or Arduino (maybe even some combination of both together) that will read in the websocket stream and turn on and off the vacancy light depending on what is sent. This side of the equation still requires a bit of research on my part. Here are some links to projects that I’m still exploring:

ELSEWHERE

As multiple devices would be able to hook into the websocket or access the API, it would be cool to build a UI (probably also hosted from a Raspberry Pi) that would be accessible in our local network for myself and my roommates. More on that part later, though…

How can I avoid turning into a pointy-haired boss?

The pointy-haired boss is a manager who doesn’t program. So the surest way to avoid becoming him is to stay a programmer. What tempts programmers to become managers are companies with old-fashioned corporate structure, where the only way to advance in salary and prestige is to go into management. So if you want to avoid becoming a PHB, avoid such companies, and work for (or start) startups. I never had to manage anyone in our startup, even though I was the president. The other hackers were my peers, and would have given me the raspberry if I’d tried to “manage” them. We operated by consensus. And the rest of the company reported to our experienced COO, who was also more of a peer. Why be a manager when you could be a founder or early employee at a startup?

Paul Graham, RAQs

The desire for fulfilling work — a job that provides a deep sense of purpose, and reflects our values, passions and personality — is a modern invention. … For centuries, most inhabitants of the Western world were too busy struggling to meet their subsistence needs to worry about whether they had an exciting career that used their talents and nurtured their wellbeing. But today, the spread of material prosperity has freed our minds to expect much more from the adventure of life.

We have entered a new age of fulfillment, in which the great dream is to trade up from money to meaning.

How to Find Fulfilling Work | Brain Pickings