Páginas

segunda-feira, 14 de março de 2016

PyCon SK 2016

This is a brief report of my weekend in Bratislava, at PyCon SK, the first [inter]national Python conference in Slovakia!


On Saturday I gave a talk about OpenShift -- Docker and S2I builds, and deployment automation with our PaaS.




Thanks to my new Turkish friend Büşra for tweeting my photo!

Personally I always feel like there's something to improve, but the feedback I got was positive ;)
People were interested, asked several questions after the talk and I kept meeting people interested in OpenShift and Red Hat in the corridors throughout the day and on Sunday as well.

Thanks everybody for the conversations, it was a perfect weekend!

There was a live stream on YouTube, I imagine the recording should be out sometime soon.


Shadowman made an appearance in my arm during the conference:


And, actually, it's still with me today, Monday ;)


Also on Saturday I gave a lighting talk with Tatiana to promote the Coding Dojo we did on Sunday.
Tatiana was fantastic at improvising with me in the stage! We had a spontaneous conversation talking about Coding Dojos that drove the attention of many people.

Thanks to that we learned that Nick is organizing the London Dojo, and perhaps will partner with Tatiana in the near future to keep moving their dojo forward, bringing in some Brazilian taste to the mix!


Sunday was awesome, or, to put it in the words of the feedback I got: it was INCREDIBLE FUN.

That day was left open by the organizers for spontaneous activities... and guess what gathered the most people together? The Coding Dojo!


It was definitely a chance to inspire and be inspired! Gather together about 50 people in a Sunday morning? Not trivial.
We ran three sessions with a retrospective in the morning and in the afternoon.



Even after what I call "self selection", we got down to about ~20 people who actively participated and engaged in coding, expressing their ideas, overcoming their fears and difficulties.

That's the power of building communities. I'm looking forward to hearing that the Slovaks in Bratislava will start their own meetings :)
I met a fantastic group from the Python community of Viena, and I'd definitely love to join them in the near future.


That's about it, a lot of informal conversations about Red Hat, how we develop OpenShift, open source, coding dojos, Brno, Turkey, Brazil, Functional Programming, etc etc.

What a great conference!

sexta-feira, 17 de abril de 2015

Let's open source



This has been a fantastic week for me. Last Wednesday I joined the OpenShift Developer Experience team in Red Hat.
New life in Brno, Czech Republic, comes packed with a myriad of new opportunities to learn and share. I'm amazed by the people I've met so far. In a two-week time span it's been BrnoJS, Docker Brno, Foreigners.cz Brno, and other opportunities, and more coming day after day.

One great thing about working with opensource is that I'll be able to share everything with the community. OpenShift is a big piece of software, and my first task to get started is to prepare a demo of how an end user can deploy and scale a project with OpenShift. In particular, it will be a Python application, powered by Django and Postgres.

And by the end of May I'll be talking about deployments with OpenShift in PyWAW Summit in Warsaw! I'm looking forward to meeting friends again in Poland and talking about the things that I'm working on these days :-)

sábado, 14 de fevereiro de 2015

typokiller: my new tool to exterminate typos in software documentation

Last year, during the Django Sprint we had in Kraków, I was working on finding and fixing typos in the Django Documentation.

It was fun to automate spellchecking the docs, but it was also very laborious to use my rudimentary tools.

This week, in a span of 2 nights and 1 morning, I worked on a minimally usable version of typokiller. The first outcome of this work was this Pull Request made just a few hours ago.

Even though typokiller is still an alpha-quality baby project, I am pretty happy that it has an interactive terminal-based UI, thanks to the awesome termbox library:

With typokiller running, a bit of patience and about 1 hour of careful inspection I was able to find 45 typos in OpenShift Origin's documentation. As you can see in the screenshot I had to go through 1583 potential typos. Thank God I implemented replace all, edit all and ignore all commands :-)

The idea behind typokiller is to have several small programs each responsible for one of these steps:

  1. Collect documentation excerpts
  2. Check spelling
  3. Interactively fix typos
Right now typokiller only supports inspecting the documentation of Go code, but I might include support for more languages in the future (or you can create and issue to tell me which language you need, or you can code it and make a pull request).

You start with a Git repository with some project containing potential typos in its documentation. You might want to create a new branch. Then you can run:


$ ./killtypos $(find /path/to/project -type d -not \( -name Godeps -prune -o -name .git -prune  \))

This will find all directories inside the project path, ignoring the subdirectories Godeps and .git, and pass that through the 3 stages of typokiller, leaving you in an interactive mode. After inspecting the potential typos, type "a" to apply the changes to the files. Review the files with Git, commit, push and make a PR.

The design was made such that I can pipe the output of one command into another, and also easily integrate with other unix tools like head, grep, etc.

That's all for now, let me know if you enjoy typokiller.

domingo, 8 de fevereiro de 2015

Falcon, Django, PyPy & Docker

Late last year I learned about the Falcon Framework, one more to the list of many Python frameworks out there. Falcon focus on performance, having quite impressive benchmarks.



So I was wondering how can you have super fast API endpoints in your Python web service while still serving some legacy code in Django, or just any other WSGI-compliant framework.

The outcome of my experiment lives in this GitHub repo: rhcarvalho/django-plus-falcon-pypy.

sábado, 7 de fevereiro de 2015

StarterKit - automated development environment

I've been working at Base for 439 days. That's one year, two months, and two weeks of very intensive work.

I joined in 2013 to give life to a newly formed team of Python developers, effectively introducing a new piece to our existing infrastructure, previously Ruby-based. By the way, we're hiring.

Since then we've completed a few projects and keep working on end user productivity in our product. That's pretty exciting as we're at the core of our mission of helping sales teams become 10x more productive.

High productivity is not restricted to sales people. We, as software developers, rely on productivity-boosting tools as well. How can we ship quality code fast? Sure there're a bunch of things to it, but today I'll focus on having a good development environment. We call ours "StarterKit".

Getting Base up and running requires starting tens of services written in multiple languages, frameworks, with all kinds of dependencies, so it asks for a good deal of orchestration to get it all right. 

Our most recent and best attempt to automate it all started with Mirek and Gabriel, who sat together to build StarterKit, further improved by them and several other Base developers. StarterKit is very specific to Base and our internal needs, but the tools we use to build it are open source and you can leverage them to build something that fits your needs.

StarterKit is a Vagrant virtual machine combined with Ansible playbooks to setup a working environment to run Base services in isolation of your development environment that you might be running on your host (editor, vim config, etc).

That means you get a ready-to-use Linux virtual machine, with nginx, Docker and Docker images for MySQL, Elasticsearch, RabbitMQ, etc. You'll have everything pre-configured and with the latest versions of daily used tools.

Each web service that empowers Base runs in a Docker container inside the aforementioned virtual machine. Docker is such a cool tool that deserves a separate post.

In essence, StarterKit aims at making the process of setting up a new web development machine as painless and simple as possible. So what tools do you use to automate your development environment?