Thursday, September 14, 2017

Ode to Sendgrid

I recently have been playing around with Sendgrid and it is pretty amazing. I have had some experience with sending email programmatically with AWS' SES product and it's nice, especially with its SNS integration, but Sendgrid's killer feature is its speed. I had about 6,000 emails to send, each one personalized with an individual URL and the person's first name. With AWS and a multi-threaded PHP program, I can send about 15 emails per second, which would have taken almost 7 minutes to process. With Sendgrid, I create a template in their system with template tags and then I create a massive data structure with up to 1,000 entries and then post it to the Sendgrid API. Rinse/repeat. I was able to send my 6,000 emails in 6 seconds! Sendgrid took care of the personalization on their end and I was seeing emails being delivered very soon after. Wow. Here's my script code:

I've only scratched the surface - there's lots more Sendgrid offers. One of the nice things is that you can get an activity feed and some nice stats after you send an email to see how people respond:

Activity Log, showing opens, clicks, delivered, etc.

Stat report, showing email performance.

If you're a Google Cloud customer, they offer a free trial with up to 12,000 transactional emails per month. Definitely worth a checking out!

Monday, June 5, 2017

Global Climate

Climate change has been an ongoing issue for about 20 years (maybe more). I was influenced early on by Michael Crichton's book, State of Fear, which posits that there's no real scientific evidence of global warming. Plus, it was just another thing for humanity to focus on, that we need something to stay fearful of. It's an interesting theory, especially if you consider that the current growing fear of terrorism has probably reduced the fear of global warming, mitigating any resistance to progress. A few years ago, Casey shared this punnet-like square video of all the various perspectives of are we going to do anything about it and if global warming is caused by humans or not. So regardless of what you believe and if anything can be done, the risk of doing nothing seems a lot worse than the risk of doing something and it ending up not being a thing.

So with that out of the way, the current news of Trump and the Paris Climate Agreement has me more aware of local efforts. If the US government isn't going to lead the way, then we need to do what we can on a local level. As a North Carolina citizen, we have an opportunity to keep our state moving forward towards more renewable energy sources. There's a bill that was just filed with the NC House that rolls back some of the goals (the minimum stays at 6% vs. growing to 12.5% by 2021). I'm not a lawyer, but it also looks like nuclear energy will be considered renewable, which probably means that Duke Energy could just buy energy from its own nuclear plants vs. other renewable energy sources.

So, if you're a NC resident and you want to do something, you can find your representative and express your opinion. You can also look at what your town is up to.

Thursday, January 12, 2017

Drupal 8 project killed

I realize I haven't updated my blog in awhile, because I've been in the thick of developing and rolling out our new site (check it out!). This was taking our existing Drupal 7 site for FSR Magazine and migrating it to this new site, which is responsive and better catered to deal with all food service news. Unfortunately, we ended up killing the Drupal 8 upgrade because it was just too complex, given our custom module codebase. D8 has a mindset change, where everything is an Entity and it takes a lot of OOP and YAML files to get things done.

I figure it would cost us hundreds of hours to upgrade to D8 and it was tempting to upgrade to D8 for the configuration management, Big Pipe, and better caching features. But that's time and money we didn't want to spend on the upgrade.

I've talked with some folks at my local Drupal User Group (shoutout TriDUG!) and several others are in the same boat, where existing sites aren't upgrading, but rather, they're doing new sites in D8.

At some point, we'll need to do something, but we're able to do what we need with D7. If pressed, it may be easier to port to Backdrop vs. upgrade to D8.