Profile cover photo
Profile photo
Chris Bateman
82 followers
82 followers
About
Chris's posts

Post has attachment

Post has attachment
Wanted to explain a bit about how "==" is more complicated than just: "it compares values but not types."

Post has attachment
Shoutout to all the systems programmers who make the kind of work I do possible.

"...when HCI people debug their code, it’s like an art show or a meeting of the United Nations. There are tea breaks and witticisms exchanged in French; wearing a nonfunctional scarf is optional, but encouraged. When HCI code doesn’t work, the problem can be resolved using grand theories that relate form and perception to your deeply personal feelings about ovals. There will be rich debates about the socioeconomic implications of Helvetica Light, and at some point, you will have to decide whether serifs are daring statements of modernity, or tools of hegemonic oppression that implicitly support feudalism and illiteracy. Is pinching-anddragging less elegant than circling-and-lightly-caressing? These urgent mysteries will not solve themselves. And yet, after a long day of debugging HCI code, there is always hope, and there is no true anger; even if you fear that your dropdown list should be a radio button, the drop-down list will suffice until tomorrow, when the sun will rise, glorious and vibrant, and inspire you to combine scroll bars and left-clicking in poignant ways that you will commemorate in a sonnet when you return from your local farmer’s market.
This is not the world of the systems hacker... When you debug systems code, there are no highlevel debates about font choices and the best kind of turquoise, because this is the Old Testament, an angry and monochromatic world, and it doesn’t matter whether your Arial is Bold or Condensed when people are covered in boils and pestilence and Egyptian pharaoh oppression. HCI people discover bugs by receiving a concerned email from their therapist. Systems people discover bugs by waking up and discovering that their first-born children are missing and ETIMEDOUT has been written in blood on the wall.

...You might ask, “Why would someone write code in a grotesque language that exposes raw memory addresses? Why not use a modern language with garbage collection and functional programming and free massages after lunch?” Here’s the answer: Pointers are real. They’re what the hardware understands. Somebody has to deal with them. You can’t just place a LISP book on top of an x86 chip and hope that the hardware learns about lambda calculus by osmosis. Denying the existence of pointers is like living in ancient Greece and denying the existence of Krackens and then being confused about why none of your ships ever make it to Morocco."

tl;dr - You should be buying LED light bulbs

Long ago I filled my house with as many CFL light bulbs as I could. Problem is, we have a number of dimmers in the house - and dimmable CFLs are expensive and hard to come by. So we've been maintaining quite a number of incandescent bulbs

I recently noticed that the price of LED light bulbs has come down quite a lot. They used to be around $50/bulb, but now you can get an 800 lumen (equivalent to a 60W incandescent) bulb for around $10. And importantly for us - it's really easy to find dimmable LEDs.

But even still - when you can outfit a ceiling fan with 4 incandescent bulbs for $2.50, it seems really tough to justify spending $40 on 4 LED bulbs.

Fortunately, we can use math to justify it.

Our living room light runs at least 8 hours a day, 365 days a year, and uses 4 60W incandescent bulbs. Electricity costs about 10.9 cents per killowatt hour - so I can expect to spend $76.46 per year to run that light.

The LED bulbs use 11 watts - so it will cost me $14.02 to run them for a year. That means the LEDs will pay for themselves in less than 9 months. Oh, and while incandescents last about 1,000 hours, the LEDs should last about 25,000 hours.

And of course, if a bulb is only used a 2-3 hours a day, it'll take closer to two years to break even - but hey, you won't have to replace it for a couple decades, so it's still totally worth it.

http://www.wolframalpha.com/input/?i=%284+x+60+x+8+x+365%29+watt+hours

Post has attachment
Well, I made a codepen account. Anybody else I know have one?

Post has attachment

Post has attachment

Post has attachment
Tune in to Fox News during a storm, and you'll probably hear a statement like this.

Post has attachment
I’m really excited to help launch the San Antonio JavaScript user group: Hill Country JS. If you live in the San Antonio area and have any interest in JavaScript or front-end development, this will be a fantastic opportunity to network with like-minded folks and learn from industry experts.

We're very excited to have Alex Sexton presenting at our first meeting. Alex is a member of the Modernizr core team as well as jQuery's Board of Advisors. Come check it out!

https://twitter.com/hillcountryjs

Post has attachment
This was my excuse to play with the Web Audio API and AngularJS. Even though this is a pretty simple app, I'm new to Angular, so if you have any suggestions I'd appreciate it.
It only supports Chrome and Firefox 24+ for now (and iOS, but it's a little finicky).
Wait while more posts are being loaded