Interview: A leading Django development consultancy gains speed and efficiency with PyCharm

Posted on by

Imagine working for a development consultancy: dozens of different projects, constant communication with customers, each of which has their own preferences on technology stacks, coding standards, and unique sets of requirements – not to mention expectations on project performance, robustness, and completion schedules. Keeping a balance between maintaining the existing code base and promoting best development practices can be daunting, but that’s what the people at Caktus Group have mastered through the years.

We spoke to two professional Python developers with diverse backgrounds and experiences to learn what Django development looks like in a modern Django development company. We wanted to know how they switch between different projects, and how they quickly get a grasp on current technologies. Please meet Charlotte and Dan from Caktus Group, a leading Django development consultancy building custom web and SMS apps!

– Hi, Dan and Charlotte! Could you tell us a little bit about yourself and how you got into Django development?

Charlotte: I started programming in high school and although I decided to study genetics in college, but I kept programming as a hobby over the years, through all of life’s twists and turns. I’ve always had a passion for coding and just recently began programming professionally.

Dan: I graduated as a Master of Computer Science from UNC Chapel Hill and have been a professional developer for about 25 years. I’ve been a committer on the Apache HTTP Server project since 2009. During the last 6 years, I’ve been working with Python doing Django backend work. Prior to that, most of my work was in C or Java. I used Emacs when developing C, and sometimes Eclipse for Java development.

– What size is your team at Caktus?

Charlotte: Caktus is just over 30 people in total, with most employees (including the company founders) being developers. The current trend is that there are more and more companies and startups preferring Python with Django to other web development technologies. The community around Django continues to grow, and so do we!

– What are the most prominent projects under your belt?

Dan: Actually we’ve participated in many different projects. We developed the world’s first SMS voter registration system for Libya, which enabled 1.5 million registrations. Another huge project was a digital archiving system for the world’s largest on-demand video provider, which uploads 6.5 terabytes of data daily. We were also honored to build the award-winning PyCon websites in 2014 and 2015. Other interesting projects we completed can be found on our website.

– What is the current project you’re working on?

Charlotte: Currently we’re building a multi-tenant forum for an entertainment (games) company, integrating APIs into complex conferencing technology for a major membership association, and providing team augmentation for a large energy supplier, as well as a few other apps and responsive website projects for clients in travel, e-commerce, and higher education.

– What technologies do you use for your Python development?

Dan, Charlotte: We’re primarily a Django shop, so we rely heavily on Django itself. We also use Postgres almost exclusively for our databases.

Our customers have various needs and wants, so depending on a particular project, we use different stacks of technologies. The tools worth mentioning, which we use quite often, are: Redis, RabbitMQ, ElasticSearch, Memcached, Gunicorn, Nginx, and UWSGI. There are many other technologies in use. We often deploy to Amazon Web Services to take advantage of load balancing, autoscaling, managed services, etc.

Our deployment tools vary. We’ve used Salt Stack, Ansible, Elastic Beanstalk, Dokku, Heroku, and some home-grown solutions too.

– What do you think are the main challenges that you have to deal with while working at a development consultancy?

Charlotte: Because our projects are contract-based, we often have stack requirements which come from a client, either because they have a preference or because we are modifying code which already exists on a particular set of technologies. Switching between different requirements is challenging, but this gives us exposure to a lot of different ways of doing things.

Dan: In my previous job, I often worked on the same product for years. Here, we start multiple new projects every year (and finish others, of course), which means both learning a new code base or starting from scratch again, and learning a new client’s priorities and requirements. It’s challenging, but I love it because it keeps things fresh.

Another difference is that we are in constant communication with clients during each project. But it’s not enough to just schedule time to talk. Every client is different, so we have to learn each client’s preferred communication style, and then use that to both learn their expectations and communicate ours. This can be challenging sometimes, but it also enables us to deliver the best apps possible to our clients.

Finally, after completing new feature work, we often provide support for the web app we’ve built. So, in addition to having several projects we’re actively working on, we have even more that we need to be ready to fix if any problems come up. This is all part of what we provide as a full-service agency, however.

– What’s is so special about Python and Django? Why are they the language and framework of your choice?

Dan: Python’s focus is on readability, it lends itself to straightforward development, and its popularity ensures we’ll continue to have access to a large pool of skilled staff as we look toward future growth. When I first tried Django several years ago, I was immediately impressed with how quickly I could start creating useful applications. Django was built to be fast, scalable, and secure. Those are the factors which are integral to how we develop at Caktus.

Charlotte: Python has a lot of included and third-party libraries, and it’s structured in such a way as to encourage breadth of development. There are many tools available, and it’s not hard to build custom tools for it as needed. Django itself has batteries included and a wealth of reusable apps as well. Being a robust and stable framework, Django strives to solve common problems in web development in the best way possible. Last but not least, Django has fantastic documentation.

You can read more about why we use Python and Django in a blog post published by our CEO, Tobias McNulty. In this blog post, he shares his vision on Django advantages and why companies and startups should start using Django, as well as his perspective on the future of the framework.

– Which Python versions are in use for your projects?

Charlotte: All new projects are written in Python 3, and we advocate strongly for older projects to be moved away from Python 2 as soon as possible. Python 2 will stop being supported in 2020, at which point it will be susceptible to the gradual discovery of security flaws that happens to all products; they will no longer be fixed and therefore will remain as vulnerabilities in any code written in Python 2.

Python 3 is not so different from Python 2 and isn’t particularly difficult to migrate over. There are numerous resources out there to assist with the transition, as well as libraries like six, which allow running Python 2 and Python 3 code side-by-side so that the transition doesn’t have to happen all at once. Most clients that I’ve spoken to about migrating think that it is important and want to do it. I think that as we get closer to 2020, we’ll see a bit more urgency about transitioning.

– You both use PyCharm as a primary IDE for Python and Django development. Can you recall how you first learned about PyCharm?

Dan: It’s been a long time, now. It’s hard to recall how I first came across PyCharm. Back in 2011 I was using Eclipse for my Java development, then I switched over to Python and Django. Back then, I visited the DjangoCon conference, where I received a free trial license for PyCharm. I started using it and haven’t really looked at Eclipse since. It’s been my default Python IDE for about 6 years now.

Charlotte: I first learned about PyCharm from someone at a local Python user group. I started using it when I started building Django projects, because it made it much easier to keep track of the interactions between models and views and so on. I’ve since gotten to the point where it’s my go-to editor for anything Python because of its power and flexibility.

– How did you choose PyCharm from other alternatives? How did the initial adoption go in your team?

Dan: I don’t recall it being too hard for me to switch. I had been using PyDev and Eclipse, and the significantly improved performance with PyCharm was a real incentive to switching. There were some things that took me awhile to get used to, for example not being in control of when/which individual files are saved, but overall I was more productive fairly quickly.

Charlotte: I was already a PyCharm user before I joined Caktus, so to me PyCharm was an obvious choice when I started developing professionally. When I joined Caktus Group, I just informed the sysadmin that I would be using it, and requested a professional license. I had no trouble getting that.

When I first picked up PyCharm, I needed, at a minimum, an editor which would keep up with multiple files and help track imports and calls across those files, and I decided to try PyCharm because it had such vocal support from people I knew. I had used Notepad++ before, which handled some of the things I needed, but I had gotten a new computer and decided to try out PyCharm first. I never looked back.

– What PyCharm features do you and other people on your team use often?

Dan: The features I use frequently and enjoy the most are: Go To Declaration, Code completion and automatically adding imports (Optimize Imports), Find in Path, code formatting with auto-indenting, and refactorings. Those are probably the most common things I use in PyCharm. I also appreciate the real-time syntax and style checking, not just in Python but also in HTML and JavaScript. I still use the command line for running tests, debugging, and version control; I’m used to it and haven’t spent much time trying to figure out how to do those things in PyCharm. (Except that I always switch to PyCharm when I need to resolve merge or rebase conflicts.)

Charlotte: Autocompletion is certainly my number 1 most-used feature, to such an extent that, when I’ve forgotten to add a parameter to a function or initialize a variable, I often first notice because it’s not available to autocomplete. The ability to jump to a declaration saves me enormous amounts of time. When working with long files, I very much appreciate the ability to collapse everything in a file with one key command, and then expand out only the parts I need. I appreciate the way Python handles refactoring, for instance when I’m partway through coding something and realize I’m using a variable differently from how I’d planned to when I first named it.

– What important advantages does PyCharm offer you vs. using text editors, if any?

Dan: Pretty much all the features that are based on understanding the whole project’s codebase – code completion, navigation, search, refactorings, etc.

Charlotte: The main advantage over a text editor is the degree to which PyCharm is able to understand the totality of my codebase, and highlight possible issues or autocomplete likely targets on the basis of that. Other than that, at Caktus Group we do follow PEP8 as a team, and this is made easier by PyCharm’s hinting. I rarely miss a PEP8 violation, since PyCharm will highlight them as I go.

– Do you think PyCharm increases your productivity overall?

Dan: I can’t imagine developing in Python without PyCharm or something like it, and I haven’t felt any need to look for anything else.

Charlotte: PyCharm does wonders for my productivity. There have been instances where I was pair programming with someone who doesn’t use it, and I got frustrated trying to do something manually, so I ended up pulling their branch to my own computer so I could use PyCharm’s tools to help diagnose the issue.

Thank you for the interview, Charlotte and Dan!

If you want to learn more about Dan’s experience using PyCharm, read his complete PyCharm review on the Caktus blog.

For updates, follow Caktus, Charlotte and Dan on Twitter.

About Caktus Group

Caktus is a leading web development firm in the US, building custom web and mobile tools with Django for businesses and social good since 2007. Major projects include the development of Libya’s SMS voter registration system, the first of its kind in the world, and supporting education reform with the University of Chicago’s CCSR survey. Past and current clients include the University of North Carolina, UNICEF, the Specialty Food Association, Mozilla, iN DEMAND, and Discovery Communications.

Since their own success relies on the success of many various open source projects, Caktus Group developers contribute to open source development. Check out their GitHub to learn more about what they’re working on.