If we're connected on Facebook, you've probably already seen bits and pieces of this story. Is it weird to be talking about my health problems on what is ostensibly a tech blog? Maybe. But there are enough people who have been curious that I thought I'd better explain what's going on. I also don't want it to be a big surprise when I step back a little from organizing and teaching this summer. And when I don't end up submitting all the talk proposals I've been so excited about, it's not out of fear - I just need to scale back my travel plans for the foreseeable future.
Back in November, not long after I moved to Austin, I started experiencing some symptoms - muscle fatigue, dizziness, irregular heartbeat and shortness of breath. They were mild at first, but by January had intensified to the point that I was experiencing them daily, and by February it was almost around the clock. It feels like a blood sugar crash, or caffeine shakes, except that it can go on for hours and hours.
This isn't a case of burning out: I've just started a new job that I'm really excited about. And I'm on fire with ideas - workshops I want to teach, programs I want to start, presentations I want to give, all kinds of things I want to contribute back to the Python community.
It's not about forgetting to take care of myself either - I'm doing all the right things, they just don't seem to be helping. I've been eating a healthy diet. No caffeine, no junk food, almost no sugar, lots of fresh fruits and vegetables. I stopped working out for a little while, but I'm back in the gym at least three days a week now (I work out around lunchtime, the only time I have the energy).
I don't want to go to into too many details, but I've seen several different doctors over the last few months and had done just about every test known to man (have I mentioned how squeamish I am about having blood drawn?). It's not thyroid, hypoglycemia, celiac, B-12 deficiency, or anything like that. The only thing we've found conclusively is that I'm suffering from a heart condition that runs in my family. It's not dangerous, but it can be very painful.
I am taking medication for that, but that's barely put a dent in the symptoms. By the end of most days my energy is completely sapped, and I'm too exhausted to work on anything else. As far as anyone can tell, the stuff that's going on with my heart is annoying, uncomfortable, and tiring much of the time, but it's not at all life-threatening. Still, it's frightening to feel so weak and fatigued every night and have no idea why. I don't know how to make myself feel better, and there doesn't seem to be an end in sight.
My doctors are stumped. The cardiologist doesn't want to increase or change my medication, and the GP has recommended that I seek second opinions, so that means finding a new endocrinologist and a new cardiologist, at the very least. I'm even considering going to a naturopath - I want to talk to someone who can look at the whole picture and come up with some new ideas, maybe see something that the medical doctors haven't.
So I've given it a lot of thought. I don't really want to step back from anything, but I'm going to have to cut back on some community activities until this gets solved. I don't expect much to change with Austin PyLadies - all our members are so motivated and involved that the group is practically running itself these days. I had planned on being very involved with SciPy when it comes to Austin in June, but I may have to withdraw from that. I have started putting together another beginner Python workshop for some time in July - that will probably go ahead, although I may be looking for some help. And PyTexas in August is probably off the calendar unless my doctors have come up with something helpful by then.
And DjangoCon? Well, we'll see about DjangoCon. I haven't missed one yet.
Tweet2013 has brought some big changes - more teaching, my first forays into public speaking, a lot of energy devoted to community organizing, and a newly minted membership in the PSF.
As of today, I'm taking the next great step - this time in my career - by joining the team at Cox Media Group. I'll be part of a crew managing the digital presence of dozens of media properties across the country. I'm pretty excited about joining such an accomplished team - there's a lot of learning and growth in my future, as well as a lot of opportunities to bring some innovation to the media space. I can't wait to get started.
This week, I'm in Atlanta getting up to speed and meeting everyone. However I'll still be based in Austin, so nothing changes in terms of my involvment with SciPy and PyTexas. There's even another beginner workshop in the planning stages (no dates yet, but that will probably take place in July).
TweetI'm putting together some new teaching materials, and I need your help.
Every day I meet people in the programming community - not just women - who have never been to an open source conference, never experienced all the great learning and networking opportunities that conferences have to offer.
If you have been to one - OSCON, PyCon, JSConf, to name a few - you know that, while sexist/racist incidents do occur, they are not the norm. Unfortunately, every time such an incident does make the news, it makes it a little harder for would-be attendees to justify testing the waters. After all, conferences are expensive, and the travel takes a lot of time and energy.
It's my belief that the best way to reassure novices is to explain what tools they have at their disposal, and to give them clear steps to take if they do face an uncomfortable situation at a conference.
So I'm endeavoring to assemble some teaching materials - something small, just a few slides and some handouts. What I'm picturing is a class that takes the form of brief presentation - a small slide deck to hit the high points - followed by group discussion, or maybe a panel for a meetup night. I'd like to focus on anecdotes about both good and bad experiences that people have had with reporting conflict, and include some discussion around talking about bad conference experiences on the internet.
The goal is not to declare a right or wrong way to handle conflicts, but rather to 1) outline what resources conference attendees have available to them, and 2) start a discussion around strategies and expectations and help each other find reasonable solutions to situations they might face.
To that end, I need your input. I'm looking for a general idea of the kinds of incidents that people experience, so that we know best what to address in a workshop:
This survey is a mechanism for collecting very general information. None of the information gathered in this form will be published - every answer will be treated as strictly confidential (but respondents are given an opportunity to provide an email address if they would like to be contacted further).
Spread the word, send this link around - you have my thanks in advance for anything you have to add to this discussion.
TweetIt's been a long, busy spring filled with teaching and speaking experiences, and I capped it all off last Friday with a visit to a local elementary school.
The school visit was arranged as part of a volunteer program through Central Texas Discover Engineering, an organization that works to encourage K-12 students throughout central Texas to pursue careers in math, science and engineering. Every academic year, they arrange for volunteers from those professions to go into local schools and not only present in a "career day" format, but also lead the students in hands-on, collaborative engineering activities.
I was matched with a 5th grade science class at a school in south Austin, Kiker Elementary, so on Friday, April 19th, I took a couple of local PyLadies members down with me to talk to the kids about the different things we do as programmers.
With three of us presenting, I feel like we had a wide range of different types of career experiences to introduce the kids to. We kicked off with each of us spending a few minutes talking about what we do professionally - the idea was to demonstrate to the kids the kinds of things that can be done with programming. I was the only web developer in the group - one of my compatriots, Simi Shonowo, got a lot of wide eyes when she talked about handling large databases filled with student grades at the University of Texas. But our third presenter, Ashley Da Silva, really stole the show. Ashley is a grad student in theoretical physics, and the kids enjoyed a lively discussion about cool lab equipment and modeling atoms before circling back around to how she uses Python to compile and display her research data.
I was pleasantly surprised at how in tune and interested the kids were. It turns out that the economy in that part of south Austin is almost entirely dominated by big technology companies, so the students are children of technology workers - programmers, app developers, graphic designers. One even described his father as an "administrator who works in the room with all the servers". Needless to say, these kids were quite bright, and all very tech savvy.
Talking about our careers and taking questions took up about thirty minutes of presentation time. The volunteer program also encourages visitors to spend time on hands-on activities. I was afraid we would suffer in comparison to some of the other science presenters. Computer science doesn't seem to lend itself as easily to fun hands-on exercises as some of the other disciplines - no baking soda volcanoes or soap powered boats for us.
We did do the peanut butter and jelly sandwich demo - that one seems to go over well with kids and adult students alike. In case you haven't heard me describe it before, it's an exercise designed to give the students an understanding of how computers think, and how programs work to give specific instructions to computers.
In a nutshell, you go through the steps of making a peanut butter and jelly sandwich with one team member giving instructions and another performing the actions. This is a great one for kids' classes because you can involve the students by asking them to call out instructions. You start out with all the ingredients for making a sandwich - a bag of bread, a sealed jar of peanut butter and one of jam, a plastic knife, and maybe a paper plate (and definitely wet wipes in case everything goes horribly wrong). The demo takes two people - one to interact with the students and guide the exercise, and one to play the part of the "computer" and perform all the steps of making the sandwich as literally as possible. The guide starts by asking the students to shout out the initial steps for making a peanut butter and jelly sandwich. For example, the first suggested step might be "spread peanut butter on the bread", and the person playing the "computer" might pick up the peanut butter jar and run it across the top of the bag of bread. So the steps have to start getting more and more specific, and this goes on with us soliciting directions from the classroom until we have one completed sandwich. (Actually counting the number of steps you took to get there is optional.)
With 15 minutes left to go, we had time for one more demo, a playing card "magic trick" that the kids enjoyed tremendously. I'm not going to try and explain it here - I recommend taking a look at the post where I found it originally, on @katieirenec's blog:
Computer Science Outreach Magic
We got through three or four cycles before the kids started catching on - some of the students came very close to figuring out how it worked. Ultimately we had to explain the trick, but once we did that they totally understood it. I'm definitely going to use this fun demo the next time I teach an adult class - I think it's definitely challenging enough.
The one thing I want to add next time is a succinct explanation of how it relates to computer science. I didn't feel comfortable trying to explain parity bits to students who hadn't had any introduction to binary, and that just wasn't something we could do with the time we had left. I was satisfied that the trick at least taught them something about problem solving skills. But for next time, I'd like to come up with a twenty-word explanation that can be given as the clock is running out.
Unfortunately the next time may not be for several months. After we left the classroom, the three of us stood on the sidewalk outside the school laughing about how much fun we'd had and wondering when we could do it again. But this school year is almost over, so it will have to wait - unless I can get us in on some of the summer STEM programs (such as the Girlstart Summer Camps).
A final note: Thanks to everyone who helped me find CS demos that we could do with the kids that did not require computers. One of our other criteria was that it require few or no props, so the playing card trick was ideal. If you're looking for computer science activities for primary school classrooms, I recommend taking a look at:
Computer Science Unplugged: Activities
I also got some great ideas from last fall's Career Day post from Katie Cunningham.
TweetThere are going to be times in the life of your application when you'll need to perform tasks - making requests to APIs, sending emails, or storing large amounts of data, for example. To do that, you'll most likely want to implement some sort of job queue - that is, a system that lines these tasks up and executes them.
Celery is a task queue commonly used with Django - it's open source, easy to integrate with many other languages and frameworks, and it can execute tasks either asynchronously (in the background) or synchronously (wait until ready).
This article is going to talk about a very basic Celery implementation for Django - you'll need to have Django installed already, and we'll discuss installing and configuring celery, django-celery (Celery integration for Django), and RabbitMQ (the recommended message broker for celery).
If you're using an older version of Celery, it may be a little challenging finding the right docs - for 2.3.3, start with this link:
And you may want to bookmark this for future reference - the Celery account on GitHub contains repositories for the official celeryproject, as well as django-celery and kombu.
Before you get started, you'll need to make sure that you have a few requirements installed.
$ pip install celery
$ pip install django-celery
These lines need to be added to your settings file:
import djcelery
djcelery.setup_loader()
Along with an addition to your INSTALLED_APPS:
'djcelery',
Once django-celery is installed and your settings.py is updated, you'll also need to create the celery database tables - instructions for that differ depending on whether or not you're using South for migrations. All of this information can be found here:
Because we're using django-celery, we won't need the celeryconfig.py described here:
Those settings should, instead, go into the settings.py. Here's an example of what you'd need initially:
# The backend used to store task results - because we're going to be
# using RabbitMQ as a broker, this sends results back as AMQP messages
CELERY_RESULT_BACKEND = "amqp"
CELERY_IMPORTS = ("tasks", )
CELERY_ALWAYS_EAGER = True
RabbitMQ is the default broker and probably the simplest to use, since it does not require any additional dependencies or initial configuration. Installing RabbitMQ is simple, but methods vary across operating systems, so you'll want to check this page for guidance:
Once RabbitMQ is installed, it needs a little setup as well. Add these to your settings.py:
BROKER_HOST = "localhost"
BROKER_PORT = 5672
BROKER_PASSWORD = "mypassword"
BROKER_USER = "myuser"
BROKER_VHOST = "myvhost"
BROKER_URL = "amqp://myuser:mypassword@localhost:5672//"
And run these simple setup commands:
$ sudo rabbitmqctl add_user myuser mypassword
$ sudo rabbitmqctl add_vhost myvhost
$ sudo rabbitmqctl set_permissions -p myvhost myuser ".*" ".*" ".*"
Let's assume you have a task that needs to be run periodically - a good example might be a scraper that needs to be run nightly to update some data for your web site.
Here's a quick example of how something like that might be set up (keep in mind that this example is totally arbitrary - there are many other types of tasks you could use, and many other ways that you could implement a scraper):
## /project_name/app_name/utils/scraper.py
import urllib2
import json
def scrape_officials():
"""Scrape for a list of current officeholders using an officials API"""
data = json.loads(urllib2.urlopen(OFFICIALS_API_URL).read())['objects']
storage.store_officials(data)
return data
You've got your callable command, now you need to create a Celery task out of it. Per the docs: "Tasks are the building blocks of Celery applications. A task is a class that can be created out of any callable."
Create a tasks.py file inside your application. Our simple example only calls for two imports: the celery task decorator, and our scraper module:
## /project_name/app_name/tasks.py
from celery.decorators import task
from utils import scrapers
@task
def scrape_officials(*args):
scrapers.scrape_officials(*args)
In this tasks.py, we've created a new function that calls the scraper and simply wrapped it in that tasks decorator. (Things can get a lot more complicated than this, of course - for some of the other options you have available, check out the documentation on creating your tasks: http://docs.celeryproject.org/en/v2.3.3/userguide/tasks.html)
And that's the easy part done. Next up, you'll want to schedule this task to run at a periodic interval.
To do that, you'll use celery.beat, celery's scheduler. It kicks off tasks at intervals which you define, so that those tasks can then be executed by worker nodes available in the cluster.
In your settings.py, you'll want to import this module:
from celery.schedules import crontab
# The default Django db scheduler
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
CELERYBEAT_SCHEDULE = {
"scrape-officials": {
"task": "bills.tasks.scrape_officials",
# Every Sunday at 4:30AM
"schedule": crontab(hour=4, minute=30, day_of_week=0),
"args": (),
},
}
If you've ever scheduled a cron job, you can schedule a celery task. And if you haven't, here's a detailed description of the configuration syntax:
Another example of a CELERYBEAT_SCHEDULE entry, this one with arguments and a different timetable:
"scrape-bills-senate": {
"task": "bills.tasks.scrape_bills",
# Daily at midnight
"schedule": crontab(minute=0, hour=0),
"args": ('83R', 'senate'),
},
Go ahead and start the celery worker with this command:
$ python manage.py celeryd -l INFO
If you see entries like these in the log:
[2013-04-16 22:10:36,702: ERROR/MainProcess] Consumer: Connection Error: [Errno 61] Connection refused. Trying again in 2 seconds...
[2013-04-16 22:54:36,823: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 2 seconds...
Rabbitmq might not be running - to start it, navigate to:
/your/path/to/rabbitmq/3.0.2
(replace the version in the path with whatever version number you have installed)
And run:
$ sbin/rabbitmq-server -detached
In another terminal, open an interpreter and test out some simple task commands:
$ python manage.py shell
>>> from bills.tasks import scrape_officials
>>> result = scrape_officials.delay()
>>> # If the task took arguments, they would be passed here
>>> # e.g., result = scrape_bill.delay('83R', 'HB25')
>>> result.ready() # returns True if the task has finished processing
>>> result.result # task is not ready, so no return value yet
>>> result.get() # waits until the task is done and returns a value
>>> result.result # direct access to result, doesn't re-raise errors
>>> result.successful() # returns True if the task didn't end in failure
Now to test celery with the scheduler this time:
$ python manage.py celeryd -B -l DEBUG
Adding the '-B' modifier runs the celerybeat periodic task scheduler along with celery. ('-l DEBUG' just changes the verbosity of the logging output.)
You'll see a similar launch screen, plus the list of scheduled tasks:
[2013-03-07 13:42:30,518: DEBUG/Beat] Current schedule:
<ModelEntry: scrape-officials bills.tasks.scrape_officials(*[], **{}) {<crontab: 30 4 0 (m/h/d)>}
<ModelEntry: celery.backend_cleanup celery.backend_cleanup(*[], **{}) {<crontab: 0 4 * (m/h/d)>}
When a task executes successfully, you'll see a log entry like this:
[2013-03-07 13:45:00,577: DEBUG/Beat] bills.tasks.scrape_officials sent. id->8feaf52e-3de7-421d-9fe1-6d509f228444
Keep in mind that if the schedule for any task changes, you must restart celeryd.
An example log result:
[2013-03-07 14:34:57,972: DEBUG/Beat] Celerybeat: Waking up in 2.03 seconds.
[2013-03-07 14:35:00,004: DEBUG/Beat] Scheduler: Sending due task tt_bills.tasks.scrape_bill
[2013-03-07 14:35:00,022: INFO/Beat] Starting new HTTP connection (1): www.capitol.state.tx.us
[2013-03-07 14:35:00,605: DEBUG/Beat] "GET /BillLookup/History.aspx?LegSess=83R&Bill=HB25 HTTP/1.1" 200 15658
[2013-03-07 14:35:00,725: INFO/Beat] Starting new HTTP connection (1): www.capitol.state.tx.us
[2013-03-07 14:35:01,263: DEBUG/Beat] "GET /BillLookup/Text.aspx?LegSess=83R&Bill=HB25 HTTP/1.1" 200 17667
[2013-03-07 14:35:01,415: WARNING/Beat] storing bill HB25
[2013-03-07 14:35:01,416: INFO/Beat] RETRIEVED DATA: {'session': '83R', 'versions': [u'Introduced'], ...}
[2013-03-07 14:35:01,495: DEBUG/Beat] Celerybeat: Synchronizing schedule...
[2013-03-07 14:35:01,496: DEBUG/Beat] Writing dirty entries...
[2013-03-07 14:35:01,504: DEBUG/Beat] bills.tasks.scrape_bill sent. id->ebf66d70-589d-41b7-b5e8-0e56ca9c0ceb
[2013-03-07 14:35:01,505: DEBUG/Beat] Celerybeat: Waking up in 5.00 seconds.
If you're using a Procfile in your project, you can include a line configured thusly:
celery: python manage.py celeryd --events --loglevel=INFO -c 5 --settings=settings -B
Just be sure to add '-B' so that celerybeat starts with celery, and the scheduler will handle things from there.
First steps with Django (Celery documentation)
Up and Running with Celery and Django
Django, Celerybeat and Celery with MongoDB as the Broker
Using celerybeat and Django
Using Celery to Handle Asynchronous Processes
Basic django, celery and rabbitmq example
| Location | Austin, Texas |
| barbara.shaurette@gmail.com | |
| Website | http://www.mechanicalgirl.com/ |
| http://www.linkedin.com/in/barbarashaurette/ | |
| Other | https://people.djangoproject.com/bshaurette/ |
A position that incorporates application design and development, database design and development, and scripting in a Python-focused environment. I'm looking for the opportunity to do work that involves data analysis and reporting - I have some experience already, and that's the direction I'd like to continue in. I'm also interested in putting my project management skills to work in an engineering leadership role.
10/2012 - 04/2013
Texas Tribune
Software Engineer: Python/Django and PostgreSQL/MySQL work on data applications that illustrate the workings of such institutions as the Texas state legislature and prison system for TexasTribune.org.
11/2008 - 09/2012
Live Nation Merchandise
Senior Software Engineer: PHP, Python, Django and MySQL work on high-profile, high-traffic sites for artists such as U2, KISS, and Madonna (including CMS, media processing, reporting tools); API development; database design and management; dev/ops (release management, internal environment administration)
11/2007 - 11/2008
Tippit, Inc.
Senior Software Engineer: Development work on ETL, internal CRM and business intelligence tools, and restructuring of the data warehouse - this work involved Python, Django, PHP, mySQL and other related technologies
07/2007 - 11/2007
Live Nation Merchandise
Senior Software Engineer: Rewrite of the ecommerce site (in XCode/WebObjects), and development/maintenance of artist web sites - this work involved PHP, MySQL, and a significant amount of shell scripting
03/2007 - 06/2007
Live Nation Entertainment
Senior Applications Developer: Development and support on the event search site, Zend Framework upgrade for internationalization and cacheing - this work involved PHP and MySQL, XML/XSLT, and some C++
03/2004 - 03/2007
Adteractive, Inc.
Senior Applications Developer: Platform engineering/data warehousing, ETL, development on our PHP framework, APIs for Java validation service, coordinating the release of new PHP applications
Team Lead/Application Development: Managed developer teams through build/launch/maintenance cycles
Application Developer: Writing data models to evaluate and transfer transaction data - most of this work was in Perl and MySQL
07/2003 - 03/2004
Self-employed
General web development work, contract web design/development for local clients, primarily using HTML, JavaScript and CSS
07/1999 - 07/2003
Vivendi/Universal Inc.
Game Producer/Developer: Writing original game engines for online casual and casino games, primarily in Flash/ActionScript, with some Java work. Developed and supported a network of gaming web sites.
Web Developer: Development and support of Berkeley Systems and Sierra Online gaming sites. Most of this was front-end work - HTML/CSS and JavaScript (with some ColdFusion).
References and Recommendations
References are available upon request. A number of professional recommendations can also be found on my LinkedIn profile: http://www.linkedin.com/in/barbarashaurette
Last updated: September 18, 2012
If we're connected on Facebook, you've probably already seen bits and pieces of this story. Is it weird to be talking about my health problems on what is ostensibly a tech blog? Maybe. But there are enough people who have been curious that I thought I'd better explain what's going ...
Read More2013 has brought some big changes - more teaching, my first forays into public speaking, a lot of energy devoted to community organizing, and a newly minted membership in the PSF.
As of today, I'm taking the next great step - this time in my career - by joining ...
Read MoreI'm putting together some new teaching materials, and I need your help.
Every day I meet people in the programming community - not just women - who have never been to an open source conference, never experienced all the great learning and networking opportunities that conferences have to offer.
If ...
Read MoreIt's been a long, busy spring filled with teaching and speaking experiences, and I capped it all off last Friday with a visit to a local elementary school.
The school visit was arranged as part of a volunteer program through Central Texas Discover Engineering, an organization that works to ...
Read MoreThere are going to be times in the life of your application when you'll need to perform tasks - making requests to APIs, sending emails, or storing large amounts of data, for example. To do that, you'll most likely want to implement some sort of job queue - that is, ...
Read More