Apr 162014
 

Dear Weather,

As a duly-designated representative of the City, County and State of New York, I order you to cease any and all supernatural activity and return forthwith to your place of origin, or to the next convenient parallel dimension.

Jan 312014
 
Image representing Craigslist as depicted in C...

Image via CrunchBase

If you’re anything like me, you LOVE the prospect of finding a “new” used bike from Craigslist, but there are some pretty strong pain points there that keep you from doing it regularly:

  • so many links to click
  • so many bikes that are not my preferred <size|color|brand|etc.>

Enter this little script that goes through, “clicks” all the links for you, and searches for exactly the search terms you’re looking for! Happy Craigslisting!

[gist]https://gist.github.com/loisaidasam/8734712[/gist]

Enhanced by Zemanta

Nov 062013
 

name ten things you wanna do before you die and then go do them. name ten places you really wanna be before you die and then go to them name ten books you wanna read before you die and then go read them name ten songs you wanna hear again before you die, get all of your friends together and scream them

because right now all you have is time time time yeah, but someday that time will run out. that’s the only thing you can be absolutely certain about.

think of all the things that are wrong with your life and then fix them think of all the things that you love about your life, be thankful you are blessed with them think of all the things that hold you back and realize that you don’t need them think of all the mistakes you have made in your life, make sure that you never repeat them

because right now all you have is time time time yeah, but someday that time will run out. that’s the only thing you can be absolutely certain about.

name ten thousand reasons why you never wanna die, go and tell someone who might’ve forgotten try to list the endless reasons why it’s good to be alive, and then just smile for awhile about them

soon the sun will rise and another day will come soon enough the sun will set, another day will be gone

and right now all you have is time time time yeah, but someday that time will run out. that’s the only thing you can be absolutely certain about

 

-Paul Baribeau

Jul 242013
 
NYC Resistor

NYC Resistor (Photo credit: Wikipedia)

A follow up – this topic isn’t dead after all! Au contraire mon ami, I actually got the thing working!

After my first attempt and failure, I reached out to the fine people of NYC Resistor‘s Microcontrollers listserve asking for help. They were super helpful and offered a variety of suggestions on what the problem could be. You can read the entire thread here: https://groups.google.com/forum/#!topic/nycresistormicrocontrollers/x3Dl-ssQMzU

What it boiled down to was that the loop inside of the pulseIR() function stipulates in the comments that “38 kHz is about 13 microseconds high and 13 microseconds low”, and after experimenting with some timings I realized that the calls to digitalWrite() were taking longer than the proposed “3 microseconds”. I lowered the value of hangoutTime from 10 down to 7 and voila, it works! It was as simple as that one change! I modified the gist accordingly, and now I’m in business!

Thanks again NYCR!

Enhanced by Zemanta

Jul 232013
 
elevator

elevator (Photo credit: Jose R. Borras)

So I was leaving work today when something interesting happened… I got in the elevator, and there was a girl in there. She anxiously checked her phone while we waited for the elevator to descend. Another guy got in before we got there, and the three of us waited for that door to open at the ground floor. When it did, the guy walked to the right, to the north exit of the building. I then did the gentlemanly thing to do and let the girl exit the elevator ahead of me. She walked to the left, to the south exit of the building, where I was also going. We went through both sets of doors, and she turned to the right to walk west down the street, the same direction I was planning on going. Maybe I’m paranoid, but after about a half of a block I noticed that she stopped, paused, looked around, and allowed me to pass, and in my paranoid mind this is because she got the feeling that I was following her.

Now this isn’t the first time that this has happened (not the same girl other times), and I’m sure it won’t be the last, so I started thinking about this mathematically. My statistics are a bit rusty (maybe someone can remind me what operation would solve this), so I relied on scripting out a brute force solution:

[gist]https://gist.github.com/loisaidasam/6058978[/gist]

Assuming there are four exits to the building, what is the probability that at least one other person in the elevator with this girl will choose the same exit as her?

Running this a few times, I got these results:

[gist]https://gist.github.com/loisaidasam/6058990[/gist]

Would you look at that! It seems that with only 3 more people in the elevator, it is actually more likely than not that one of them will go out the same exit as her!

Conclusions:

These ladies leaving their work places should stop being paranoid that someone is following them!

(a more likely conclusion: this whole scenario occurred entirely in my head and I am the one who should stop being so paranoid!)

Enhanced by Zemanta

Jul 122013
 

Howdy guys and girls! It’s summertime and it’s hot in New York City. You always hear about those blog posts about people setting up an Arduino to control their air conditioners remotely, and I figured I was due for my own, so here it is. Unfortunately, I was unsuccessful. Hopefully someone can read through what I did and I can follow up with a successful completed post. Either way, here we go…

Synopsis:

After some research, I realized that I don’t want to deal with any electronic internals of the air conditioning unit (as I am no electronic engineer, just a computer scientist dressed up as one), so I will be communicating with it by simulating the requests of the remote control with my Arduino via infrared.

Parts:

Setup:

Arduino Setup

As you can (hopefully) see, I have my Arduino and a breadboard with the IR Receiver plugged into digital pin 2, ground, and 5V. I also have the IR Emitter plugged directly into digital pin 12 and ground. (Side note: do I need any resistors anywhere here? I know about Ohm’s Law, but I’m not sure exactly how to apply it here)

Part 1. Detecting the IR Signal:

I attempted to follow Adafruit’s tutorial on reading an IR Sensor, modifying the Serial monitor output so that I could reuse it for Part 2. Here is the sketch I am using:

[gist]https://gist.github.com/loisaidasam/5984107[/gist]

Now when I upload that sketch to my Arduino, point my A/C remote control at my IR Receiver, and press the power button, I get the following results:

[gist]https://gist.github.com/loisaidasam/5984206[/gist]

Part 2. Blasting the IR Signal:

Next, I attempted to follow Adafruit’s next tutorial on Making an Intervalometer to blast the pattern that I’d received in the last sketch using my IR Emitter. Here is the sketch, you’ll see that my code varies a bit for simplicity:

[gist]https://gist.github.com/loisaidasam/5984238[/gist]

As you can see, it attempts to send the IR signal that we got from Part 1, sleeps for 10 seconds, and then tries again, forever.

Now this is the sad part – I point this sucker at my air conditioner hoping for some grand moment of joy, and nothing happens!

:(

Does anyone have any ideas on what I could be doing wrong?

Enhanced by Zemanta

May 082013
 
Mudd Truck Spot - West Village

Rainy 7th Ave and West 4th, West Village (Photo credit: heathbrandon)

Hello from sleepless 05:30.

It rained all night here in the sleepy West Village, and despite falling asleep around 22:30 last night, I’ve been wide awake for the last two and a half hours or so. The sound of the raindrops on our windows, skylights, and air conditioners is peaceful, and yet my mind will not shift into sleep mode. Unable to lie in bed any longer, I figured I’d update y’all on life, so here goes…

After about six months of working on the New York side of Zemanta, I decided  to switch jobs in order to work among a team of engineers again. I’m now a backend engineer at GetGlue, and so far so good. The team is smart, the industry space is competitive, the product is cool, the culture is fun, and the perks are great!

What else lately? I got down to Houston to see my pop, I’ve seen a few friends that I haven’t seen in a long time (and there are some others that I have yet to see, don’t worry I haven’t forgotten about you!), I’ve been riding my bike a bit (we got up to Bear Mountain last weekend), Brooke has been running (and is doing the Brooklyn Half Marathon in a couple of weeks), some good friends have gotten engaged,  I cut my own hair, got a new phone, and some new shoes, a bunch of people have stayed at our apartment, and we’re finally fully moved in (I think?).

I’m also totally caught back up in all the insanity that is New York. It’s beautiful, it’s my favorite city in the world, and the place I always planned on ending up, and yet it’s nuts. The constant struggle to see the people you care about and maintain contact seems so much more exaggerated here compared to anywhere else. I think we’ve slowed down a bit since the initial shock of moving back, but it really does never end. I haven’t been seeing as much music as I used to, which kind of bums me out, but I’ll work on remedying that. I think the gist of it is that I’ve kind of boycotted places like Terminal 5, or any ticket that costs more than $15, really. I should really try to make more exceptions though.

Christopher Park in the West Village.

Christopher Park in the West Village. (Photo credit: Wikipedia)

The seasons are changing (or so my allergies tell me), and the summer is fast approaching, but between Memorial Day, bachelor parties, and weddings, it feels like the calendar is already pretty full. Hopefully we can take some time to just relax and enjoy the summertime before it starts cooling down again (has it even heated up yet?). I guess to that point, hopefully we’ve learned something from our European friends about taking some time to slow down and relax.

Well it’s 06:15 now, and still raining, but starting to get brighter out, so maybe I’ll give sleep another shot. I hope you’re all well out there in internetland.

Until next time

 

Enhanced by Zemanta

Apr 242013
 

Tons of new things going on in my life, but more on that another day. For today, I’ve got a Sublime Text 2 tip for ya (I use Sublime now?! What?!).

Add this baby to your settings file:

{
    "rulers": [80]
}
and a nice little vertical line will appear after 80 chars, which should help with your PEP-0008 formatting! Great!

via https://coderwall.com/p/g6eh-w

 

More life updates soon (maybe?)

Enhanced by Zemanta