Read on Medium:
Wine and learning is live
This year I passed WSET exam level 2. I had to learn about different wine grapes and wine regions. We tasted lot of wine and had a great time. At the end was an exam that I passed with Merit.
I used memory palace techniques to learn for the exam and I plan to write an article about it.
And to practice and deepen my knowledge I started a wine blog about wine, that should show you how can you find the best wine for you.
If you like wine or you like learning new things my new web Wine and learning is here for you.
How to raise 422 error in Rails
I was updating error pages to follow latest GDS standard (https://design-system.service.gov.uk/patterns/). I needed to test the 422 page.
After few failed attempts I found this solution to work, just put this code in your index method on your home page:
I hope it helped.
How to evolve as a developer without moving to management
An article that I wrote for Welcome to the Jungle magazine.
How to let go of your ego and welcome humility as a friend
How to convince your boss and your fellow devs that you are right (and they are wrong)
As a developer, I’ve picked up some non-negotiable habits and good practices over the years. But sometimes, I’ve had to work with people who were not on the same wavelength as I was. Most of the time it’s the management.
The main reason is usually that we are looking differently at problems and their solutions. We know from experience that cutting corners will get back to us in the form of technical debt or just plain frustration.
I’m writing this post to show you how you can change you manager’s opinion — or even that of your peer.
Communicating the right way
Your message might be very important, but if you fail to deliver it, then it’s your fault. Here is one way to deliver your message effectively:
As you know, people are not the same. Someone may be easy to reason with, and someone else may be stubborn. According to Gretchen Rubin, we can categorize people into four main Tendencies.
Gretchen wrote a book called The Four Tendencies. She noticed this division among people, and how we can use them and take advantage of them in our lives. Those Tendencies are Upholder, Obliger, Questioner, and Rebel.
Here is a quick joke that helps describe them:
How do you get an Upholder to change a lightbulb?
Answer: He already changed it.
How do you get a Questioner to change a lightbulb?
Answer: Why do we need that lightbulb anyway?
How do you get an Obliger to change a lightbulb?
Answer: Ask him to change it.
How do you get a Rebel to change a lightbulb?
Answer: Do it yourself.
A case study
Let’s assume that you have a product owner (PO) on a new project. The PO is only focusing on the things that you deliver. They don’t want you to spend time on anything else, like writing tests.
Here are four different ways to convince your PO that writing tests is important. But don’t forget that this is just an example — you should be able to use these frameworks in any context.
Here we go.
1. PO as a Questioner
According to Gretchen,
Questioners love research, finding efficiencies and eliminating irrational process. They reject lazy explanations like this:
’This is the way we have always done it.’
Because Questioners have great faith in their own analysis and judgement, they can become convinced of the rightness of their views and refuse to be persuaded otherwise.
When dealing with a Questioner, bring reasoning to the table. Have a valid point supported by evidence.
Here’s an example conversation with a PO named Alex:
Me: Hi Alex, can we talk about best practices for a moment?
Alex: Sure, what’s on your mind?
Me: I think that we are pushing too hard on delivering the features and not thinking about our technical debt. We don’t have much time for testing.
Alex: Well, I’m not convinced that spending lots of time on testing will help us to deliver better and faster. We are fixing bugs as they come along and it seems to work.
Me: I took a look at how much time we spend by fixing bugs, and the number grows over time. I have worked on lots of similar projects. It’s faster to ignore testing, in the beginning, but you will get to a point where it’s no longer efficient. I think that we are now at that point.
Alex: Hmm but I don’t want to hire another person to do the testing, we don’t have a budget for it.
Me: I have a solution: let’s add testing to the scope of each ticket. It will make developers happy, and you will be able to compare velocity. If you would like to know more, I have some examples of books and articles about the importance of tests.
Alex: Ok, remind me of that at our next sprint planning, and I will make sure that everyone is on the same page.
2. PO as an Upholder
Upholders can make great colleagues. They are self-starters, and they are very interested in performance. But Upholders sometimes get impatient when others struggle to meet expectations.
I don’t think that you would have to convince an Upholder about the importance of writing tests. They would react like this:
Me: Hi Alex, I think that we are at the point where we need to spend more time on writing tests. Our technical debt is growing.
Alex: I’m ok with that. Feel free to write more tests and do some refactoring. But please make sure that we still deliver features that we promised.
3. PO as an Obliger
Obligers respond to the expectations that work situations almost inevitably supply — with deadlines, evaluations and deliverables.
So to convince them, we can use another motivator that they follow.
Me: Hi Alex, I think that we are at the point where we need to spend more time on writing tests. Our technical debt is growing.
Alex: We have a deadline to deal with — is it going to affect it?
Me: We might be delayed in the next sprint. But by writing more tests, we will be able to cut the development time. So, we should be faster in next stage and meet the following deadline with ease. Writing tests is also a best practice of development. I can show you a bunch of studies that support it if you are interested.
4. PO as a Rebel
I feel a little Machiavellian about this one. Here is an example from the book:
A rebel child might respond better if you ask: ‘Do you feel like playing the piano now?’ While an Upholder child would be happy to be reminded, ‘Time to practice the piano.’
So if I wanted to convince a Rebel product owner about tests, I’m not sure what I would do. I would probably spend time on tests and refactoring code without asking.
Gretchen does note that “They put a high value on freedom, choice, identity and self-expression.” So, by reacting on my own and taking care of things, I’d fit in that specification. I’d be the rebel!
In the end, you need to know who your audience is. You should find out what the priorities of your project are. Then make your argument more compelling by mentioning these priorities.
I created a playlist for my brain, and it changed my life
I’m a developer. I listen to music every day. I listen to random playlists or recommendations from Spotify.
I’m also a runner, but I do not listen to music while I’m running. It gets repetitive. And I don’t like to fiddle with my phone to find better music while I’m running.
One day I run out of podcasts to listen to whilst I was running. I was already on my way home. It was a long run, about 30k, so I was quite tired and my energy level was pretty low.
I run without anything for a while and then I decided to put some Led Zeppelin on. When the first notes of “Whole Lotta Love” kicked in my energy level picked up. I speeded up and felt pretty good almost immediately. A few songs later I arrived home. I still felt tired, but my mood was better.
That whole episode made me think. Let’s create a playlist for the upcoming ultra (100k). Every time I felt low I would play something from the playlist. Long story short it worked.
Every time I felt the low energy I played a few songs. I still remember my last 1k or so. We were finishing at the race track in Brighton. There was a long stretch of grass track that leads to the finish line. I picked up my phone and find the Maniac song from Flashdance, don’t judge me :).
I was sprinting to finish. No kidding. It was the best finish of any race so far. Maybe because of the relief that the long day was over. But most likely because I had a great tune to listen to whilst I was finishing.
Back in normal life when I commute to the office, I listen to audiobooks and podcasts in the morning. But before I step out from the Tube I play myself a few songs from my “Morning cheer up” playlist. The music wakes me up and changes my mood. It’s a great start to the day. I fell like this:
Demolition | ‘Swinging Through’ | Official HD Clip 2016
Demolition in UK cinemas now Subscribe to Fox Searchlight: http://smarturl.it/FoxSearchlightUK For more information please visit, https://www.facebook.com/FoxSearchlightUK Davis (Jake Gyllenhaal), a successful investment banker, struggles after losing his wife in a tragic car crash. Despite pressure from his father in law Phil (Chris Cooper) to pull it together, Davis continues to unravel.
I didn’t stop at the cheer up playlists though. I noticed that when I need to focus and I have to concentrate fast I play the Beaucoup Fish album by Underworld. My brain is so used to this association between this music and focus that I focus much faster and I get into the zone.
There is a pretty good book called Deep Work by Cal Newport. It explains why the deep work is good and how to achieve it.
I’m still experimenting with this. But so far I have my morning cheer up, running, deep focus, thinking about the staff and relax playlists.
But why does it work this way? There are two parts to this answer.
You might have heard about Pavlov’s dog or Classical conditioning.
Pavlov finds out that you can create an association between a stimulus (sound, light) and action. He turned the light on and then gave food to a dog. Few repetitions later, the dog started to salivate when the light went on.
So, if you play yourself the same album every-time while you are in deep focus, you will concentrate easier.
It works on almost any activity that you want to do. Do you want to relax faster and easier? Choose music that fits your mood. Do it few times. After a while, you will relax by listening to that music.
In the book This is your brain on music, Daniel Levitin is talking about the pitch.
“Pitch is one of the primary means by which musical emotions is conveyed. Mood, excitement, calm, romance and danger are signalled by a number of factors, but pitch is among the most decisive. A single high note can convey excitement, a single low note sadness.”
So, if I play music that should cheer me up, it has lots of high notes.
7. Jackson 5 – I Want You Back
Guardians of the Galaxy – Awesome Mix Vol. 1 track 7 The 1:1 aspect ratio is deliberate and gives the same size when watching on your phone regardless if you hare holding it horizontal or vertical. Do you like the square video or do you prefer standard widescreen 16:9?
Or, If I want music that will make me more relaxed I could listen to this.
Beethoven – Moonlight Sonata (FULL)
Beethoven – Moonlight Sonata (FULL) – Piano Sonata No. 14 http://www.facebook.com/9Beethoven https://twitter.com/YtAndrearomano6 The Piano Sonata No. 14 in C♯ minor “Quasi una fantasia”, op. 27, No. 2, by Ludwig van Beethoven The sonata has three movements: 1 mvt: Adagio sostenuto. 2 mvt: Allegretto (click to go at 6:00 min).
The concept is little more complex than single notes. When notes are strung together we get melodies.
“Melodies are defined by the pattern or relation of successive pitches across time.”
Music written in the West has certain conventions. “Certain sequences of pitches evoke calm, others, excitement.”
The brain learns reaction to this. It’s like speech when rising intonation indicates a question.
“Pitch is so important that the brain represents it directly. If I put electrodes in your auditory cortex and play a pure tone in your ears at 440Hz, there are neurones in your auditory cortex that will fire at precisely that frequency. What goes into the ear comes out of the brain!”
That means that you are directly affecting your brain with music.
How you are going to use this information is up to you. I would suggest experimenting. Create different playlist to fit your needs during the day.
You can start with the morning cheer up playlist :)
Have you ever said yes to something, only to dread the obligation when it comes due? I have, many-many times. I recently read a blog post by Seth Godin on saying “no.” Here are his thoughts (republished with permission):
Seth Godin: On saying “no”
– If you’re not proud of it, don’t serve it.
– If you can’t do a good job, don’t take it on.
– If it’s going to distract you from the work that truly matters, pass.
– If you don’t know why they want you to do this, ask.
– If you need to hide it from your mom, reconsider.
– If it benefits you but not the people you care about, decline.
– If you’re going along with the crowd, that’s not enough.
– If it creates a habit that costs you in the long run, don’t start.
– If it doesn’t move you forward, hesitate then walk away.
Thanks, Seth. I’ll respectfully add a couple of my own to your list:
– If you’re going to say no, do it now. “Maybe” is not fair to the asker.
– If you’re saying yes out of fear of offending the asker, say no, you’ll grow stronger.
– If you’re unsure, sleep on it, then say no in the morning.
Copy and pasted from:
The Journal, a monthly newsletter from Kevin Rose.
CSS for grownups by Andy Hume
Quite nice best CSS practises.
How To Keep Your Best Programmers | DaedTech
I just read pretty good article about reasons why are good programmers leaving and why others staying.