Software engineer currently working with Python, Android, Ansible, MongoDB, Neo4J, and Redis. Likely born at a young age. Passionate about open source tech, creating and breaking things, and getting everyone teaching and learning from each other. Really loves apples, running, and sunshine. Might write about other things here sometimes.
Testing pip requirements vs virtualenv
One of the first things most Python developers do when they have various projects going on is creating a virtualenv to isolate the development environment from the rest of the machine so that it can emulate production. This is great, except when working in a team where some people are remote or are just on the far side of the office as this can result in various developers adding, removing, or changing requirements possibly without communicating that change. Sometimes a feature requires a new dependency, or the team has decided to deprecate an old dependency. To make sure the current virtualenv installation has all the appropriate dependencies with the correct versions, I wrote a test:
Building signed iOS 8.1 apps with Jenkins
Use JNLP web start, not headless mode and not SSH with xctool. xcodebuild doesn't automatically kill or reset the iOS Simulator, which is necessary to make sure there are no leftover assets from previous builds.
Mailchimp Subscription Automation
When you're a small startup, you have zero email domain reputation. Therefore it makes sense to use email providers like Mailchimp to send out product communications to let users know about updates, new features, etcetera.
The very first thing to do is automating email subscriptions so that you're not uploading CSV dumps of your users' email addresses
Login to Mailchimp
Click here to goto the Mailchimp website and login.
Get API key
Once we're logged in we see the Mailchimp dashboard. We want to get into account settings so click on the account name on the left hand menu.
Click on Account
Click on Extras
Click on API keys
At this point if you haven't already created an API key, do so now. Select the full text of the API key and save it somewhere for later.
In Mailchimp you must specifically subscribe an email address to a list. Each list keeps track of the people who unsubscribe. Goto the Lists menu and create one. You'll be prompted for a name which users will see on confirmation emails as well as your company information and a short explanation to the user telling them why they're subscribed.
Get List ID
You should be able to find the ID of the list you just created by going to Settings and clicking on List name &s; defaults. This will take you to a page where List ID is a heading on the right side of the page.
Get Mailchimp client (Python)
$ pip install mailchimp
Subscribe a user through client
Check confirmation email
The email address you used to test the subscription API should have received a confirmation email. Only after clicking Yes, subscribe me to this list. will a record appear in the Mailchimp list you created.
The user should see a webpage with the title of your list after clicking subscribe. If you setup a link to your website the user should be able to reach it from this page.
At this point you have everything you need to automatically subscribe users to your Mailchimp lists. The best time to subscribe someone is as soon as they've signedup or registered for your product. In my experience the response time for any single Mailchimp subscribe API call can widely vary between 1-4 seconds, and therefore in applications I've added it to we make it an offline task that gets started once registration is complete.