Creating My First Google Chrome Extension - Part 2

PART 1 | PART 2 | PART 3 I started writing my first browser extension a couple weeks ago, and though my spare time has been pretty limited I've made some (never as much I'd like) progress. I left off last time with (finally!) figuring out how to authenticate to the Pinboard API. As with so many things, once I knew the answer I couldn't believe I didn't figure it out sooner. There are a number of reasons it might fail, but in my case I needed to add the API URL to the list of permissions in the manifest.json file. »

Creating My First Google Chrome Extension - Part 1

PART 1 | PART 2 | PART 3 Contents 1 Something’s been nagging me… 1.1 Should I put all my eggs in one basket? 1.2 Can I get quality help when I really need it? 1.3 If you’re not paying, yadda yadda yadda… 2 Do one thing, and do it well 3 Creating your first Chrome extension 3.1 Imitation is the sincerest form of flattery 3.2 Testing it out 4 Creating MY first Chrome extension 4.1 Generating a bookmark 4.1.1 Generating a bookmark inside of a folder 4.1.2 Generating many »

How to compare two objects (testing for equality) in C#

Hacktoberfest and the promise of free t-shirts had me looking for a project to help with this month. That’s how I stumbled across GeneGenie.Gedcom, a genealogical library written in C# (read more about it here), and found myself reviewing everything I know about class equality. I focused on implementing some logic to make sure changes were correctly detected, and in order to do that I had to define “equality” for each class that represented some facet of genealogical research. Why was that? Let’s take two instances of a class – one with data that’s fresh from the »

What is Hacktoberfest and How Can You Participate?

There are 10 days left in October. 10 days to earn a t-shirt in the third annual Hacktoberfest, when DigitalOcean and GitHub offer swag to the masses to encourage contributions in open source software. Last year, DigitalOcean said participation jumped from under 1000 to 5700+ in nearly a hundred countries. I wonder what the results will be this year? And more importantly, will you be a part of it? 31 days, 4 pull requests, 1000s of stories: looking back at this year's #Hacktoberfest https://t.co/dVjI9FO00C pic.twitter.com/d36onbMHs0— DigitalOcean (@digitalocean) December 2, 2015 Participating »

Connecting an Analog Joystick to the Raspberry Pi (and using it with an RGB LED to simulate a color wheel)

One of the coolest things about the Raspberry Pi is its GPIO pins. They’re just sitting there, waiting to be connected to all kinds of useful peripherals so your Pi can interact with the world around it. Power an LED to signal the user. Place a button in the path of a circuit and detect when a user presses it. Attach sensors to read temperature and humidity, and plug other cards like the Sense HAT over top of the pins. A few months ago, I got a set of 37 sensor modules on Amazon. I knew they wouldn’t »

Reviewing the Basics Helps Us See the Light

I enjoy finding the occasional online mooc to participate in, as time permits, even if it’s something I’m already familiar with. Hearing or reading about an old concept in a slightly different way can bring new insights, make us rethink something we’ve been taking for granted, or just help us make a new connection. “Don’t assume that just because you can get something to work once, there’s nothing more to understand.” - Bob Frankston— Programming Wisdom (@CodeWisdom) September 1, 2016 For the last few weeks, it’s been an intro to computer science on »

Find Your Reason to Code

I signed up for a moderate-paced mooc through edX a few weeks ago, and while it’s not too late to join, you’d have to hustle to catch up at this point. It’s an intro to computer science, but its heavy focus on Python is what interested me. Finding a Reason to Code There are too many languages out there to bother trying to learn them all. Some are ancient but have a niche use. Others are well-established but not as exciting. Still others are “cutting edge” but will just fade into obscurity in a year. Instead, it »

Naming Things Well is Much Harder Than Just Adding One More Comment

When I was taking programming classes in college, comments were all the rage. Most of the solutions I handed in had one function (or very few), with comments above the class, above each function, within each function. Everywhere. Instructors wanted lots of comments. In retrospect, I’m not sure why. Maybe so that if the code was off, they could still give partial credit, like asking students in a math class to “show their work”? Since then, there’s been a corner of the developer world that prefers well-named functions to comments. In fact, they’d argue that well-named functions »

Creating a Flickering Candle Using an RGB LED on the Raspberry Pi

After getting PWM (pulse-width modulation) to work with an RGB LED last week, I was trying to think of what else I could do with an LED that demonstrated changes in color as well as intensity. I’m not sure why – maybe it was because we lost power in our neighborhood recently – but I thought a flickering candle could be an interesting little challenge… Contents 1 Materials 2 Concepts 2.1 Pulse-Width Modulation 2.2 The RGB Color Wheel 2.3 Algorithms 3 Circuit Design 4 Da Codez 5 See it in Motion 6 Now What? Materials In order to »

How to Use an RGB multicolor LED with Pulse Width Modulation (PWM) on the Raspberry Pi

If you buy a kit with random LEDs, wires, switches, etc, like this one I purchased from CanaKit, you’re likely to end up with one or two of those funky little LEDs that appears to be white, and has 4 wires instead of 2. I had set mine aside and made a mental note to figure it out later… well, I’m bored with regular LEDs so that time has come! It’s a special kind of LED that consists of 3 separate LEDs… red, green and blue. By adjusting each color independently, you can create any color (similar »