Ylan Segal

On the Pomodoro Technique

The Pomodoro technique is a popular time management method. I tried using for a few weeks at work. I am not planning on sticking with it, but I did learn some valuable lessons from the exercise.

The technique itself is simple. It prescribes using a timer to enforce work and rest intervals. Typically, for every 25 minute interval of work there is a corresponding 5 minutes of break time. After a few cycles, there is usually a longer break.

One of the benefits of time boxing work is that it promotes resting often. Sitting at a desk for long periods of time can be detrimental to your health. It is known to correlate with back and joint pain, and eye strain. Anecdotally, many software engineers tell me of hours-long stretches at the keyboard. I don’t struggle with that. My natural thirst and bladder cycles naturally prompt me to leave my desk often.

In fact, the I found the constant interruption to be annoying. I have a very good capacity to concentrate on work, usually with the aid of noise-cancellation headphones. The time-base interruptions constantly broke my “flow”.

On the positive side, I found that the planning aspect of each iteration to be a really good way of breaking down work. It encourages to split the next piece of work into small chunks, that are inherently more approachable. It makes it easier to approach uninteresting tasks – which I procrastinate on often. Committing “only” to a small interval of work makes them more palatable.

I won’t continue using Pomodoro. However, I am now more aware of my procrastination. I continue to plan my work in small steps. When I start working on a task, I let the natural stopping points guide me on when to take breaks.

The REPL: Issue 34 - May 2017

Base CS: Exploring the basics of computer science, every Monday, for a year.

Vaidehi Joshi, embarked on an the admirable journey of writing a weekly post about computer science topics. She is calling the series BaseCS. I’ve found the content to be well written, concise and full of clear explanations and beautiful illustrations. As advertised, some of this content is basic computer science. I’ve enjoyed all the articles published so far.

Five Factor Testing

Sarah Mei lays out five practical reasons to write tests:

  1. Verify the code is working correctly
  2. Prevent future regressions
  3. Document the code’s behavior
  4. Provide design guidance
  5. Support refactoring

Sara correctly points out that our individual approach to testing is a result of the importance that we give to each of these factors. Excellent post.

Writing English as a Second Language

As a Software Engineer I spend a good amount of my time writing emails, commenting on pull requests, Jira tickets, Slack, etc. In this transcript of a talk given to international journalism students, William Zinsser talks about what is good writing and in particular what is good writing in English. As I learned, it’s not necessarily the same as good writing in other languages. Since English is not my first language, I fall often into some of the traps outlined in the talk. Now I know how to fix them!

The REPL: Issue 33 - April 2017

A Visual Introduction to Machine Learning

This stunning presentation will give you a quick introduction to machine learning and how it applies statistical learning techniques to identify patterns in data. In turn, those patterns are then used to make highly accurate predictions. The visualization are beautiful and explain intuitively the concepts described. I commend the R2D3 team behind this work and look forward to the second installment.

On-call at Any Size

This article is part of the first issue of Increment, a new digital magazine about how teams build and operate software at scale. The post is a report on what they found after interviewing teams of many sizes. There are some commonalities and best-practices that emerged from their interviews, some of which only apply at certain scales.

One of the things I love about being in software is the current environment of openness that a lot of companies operate in. They publish how they work, what they have tried. Everyone benefits.

Moneyball Teams

Brian Graham takes on hiring at software teams and makes an analogy to Moneyball (book and movie). His concept is that hiring only “the best” is hardly an effective strategy. The focus should be on building a team that can deliver on needs. Each developer brings different capabilities and are rarely interchangeable with each other. By looking at the needs of your team, your are in a better position to make good hiring choices.

Book Review: Programming Phoenix

Programming Phoenix: Productive -> Reliable -> Fast by Chris McCord, Bruce Tate, José Valim is an introduction to Phoenix, a web application framework written in Elixir. The authors bring a lot to the table: Chris is the main author and manitainer of Phoenix. José is the author of Elixir, prolific contributor to Phoenix and once a Rails core member. Bruce is author on several books about Java and Rails.

The book walks through building a complete web-application with Phoenix from scratch, covering it’s particular take on MVC, testing, database access and web-sockets. The book itself is written in clear language and can be easily followed by beginners and advanced programmers alike. Along the way, it explains not only how to use the framework, but why it was designed to work that way in the first place – usually to address a shortcoming that the author’s perceived in other web frameworks. The explanations in the book are thorough, without being repetitive. Meticulous, without being pedantic or condescending. It’s a great example of what technical writing should be.

In a lot of ways Phoenix feels very similar to Rails. The places where it differs matter. In general, it prefers being more explicit and less magic-like. The different parts of the framework, like the router, controllers, models and views are less coupled to each other than Rails, but still fit together nicely. In practice, this means that following the “Elixir Way” is as easy as following the “Rails Way”, but it makes it much easier to test functionality and hook into the framework when needed.

One of the places where Phoenix really shines is Channels. Channels allow a near real-time connection between the server and it’s client, outside of the regular request/response cycle. Channels typically will use web-sockets, but can fall back to long-polling. The abstractions exposed make it easy to reason about how data flows from and to clients. They are also very efficient and use few server resources, due to Elixir underpinnings in the Erlang VM.

Elixir in general, and Phoenix in particular, have great tooling. mix is usually the entry-point from the command line to dependency management, running tests, starting processes, etc. For Rubyists, it’s like gem, bundle, rake and rails rolled into one well-rounded tool.

Although Elixir and Phoenix are relatively new, they have reached a high level of maturity by building on tried and tested technology. This book will get you up to speed on writting Phoenix applications fast.

The REPL: Issue 32 - March 2017

Use the Unofficial Bash Strict Mode (Unless You Looove Debugging)

Bash is ubiquitous. Even Windows runs it now. Often, it’s the minimum common denominator you can expect a computer to have, without needing to install extra dependencies, which is why I often find myself writing bash scripts. In this article, Aaron Maxwell explains how to set a few options that will make it easier to avoid bash’s many pitfalls.

Validation, Database Constraint, or Both?

Derek Prior brings a well-articulated argument of when to use Rails validations and when to rely on database constraints. His advice is solid, for Rails, which doesn’t handle constraint violation in the database well. After reading this article, I found out that Ecto – an Elixir database wrapper – does handle database constraints and makes them errors to the rest of the application. I wish Rails had that!

So you want to be a wizard

Julia Evans made available a transcription of a keynote talk she gave recently. I really liked how show approached learning and breaking down big problems into manageable pieces. At some level, what she proposes is basic curiosity, without getting hung-up on your current level of understanding. Do you need to debug tcp networking in Linux, but don’t know about it? Read some books on it. Is that not enough? Open up the source code and read that. Inspiring, yet refreshing. We can all learn anything, as long as we do it methodically and with dedication.