LIFELINE OF COINCIDENCE


blog by Anton Katunin
 

Macbook Pro 2018 degraded performance under load

The shady Apple practices

Recently I've started using external 4K monitor with my Macbook Pro. I was shocked to discover that the laptop is running 30% slower. That's right it's slower by third.

I've got one of the most powerful Macbooks you could buy at 2018 with i9 processor (2.9GHz with 6 Cores), 32GB RAM and Radeon Pro 560X. However that does not matter because the power is throttled. You might remember the throttling story when the laptop was released. It is almost the same now after the fix.

For example, my test suite takes 1m40s to run without external monitor. However with the external monitor it takes 2m10s. That's a big jump.

CPU load vs frequency

While the CPU load (utilization) is always near 100%, the CPU frequency is much lower with the external display.

With the external monitor the laptop runs below advertised base clock speed. I'm getting zero benefits of having more powerful CPU. In fact it is running slower than the cheapest Macbook Pro model.

It's not about the temperature. As you can see on the graph the temperature is the same or higher without external display.

Monitor is not the one to blame

The issue is not directly due to the monitor but due to GPU usage (aka graphics card). The more load GPU has, the more CPU is throttled.

Test it yourself.

My results:

  • 400 fish, 40 fps, 1366x1024 web page resolution, Chrome
  • x4 yes > /dev/null
  • CPU Utilization 50%
  • CPU temperature 73C
  • CPU frequency 1.7GHz
  • No external monitor, default resolution for the display

So in this test CPU frequency is 40% lower (1.7GHz) than the advertised base speed (2.9GHz).

Conclusion

Don't buy Macbook Pro with higher performance CPU, you won't notice a difference. If you are planning to use external monitor, beware of massive performance drop.


The dip - A little book that teaches you when to quit (and when to stick)

by Seth Godin

That's a last book for the year. It's very short and has a very clear message. The title says it all. I love it a lot. However I'm biased as my opinion is inline with the book.

I've discovered that the book splits people into two opposite sides. The question is simple, so I've found everybody have an answer for it. Do you think you should be the best in what you do? I would recommend this book, does not matter what your answer is. It's worth 1-2 hours reading.


The power of habit

by Charles Duhigg

I'm a big believer in habits and picked this book specifically for this reason. The book has three parts: individuals, organizations and society.

The individuals part is the best. It explains the habits in a structured form. There are a lot of insights and knowledge that you can apply yourself.

In the second part that the book starts to go down hill and it goes fast. There a lot of interesting stories, but no analysis. It is the same problem as Charles' another book Smarter Faster Better, which I've read few months earlier. Entertaining to read - useless in building understanding. Most stories have too many unnecessary details. Chapters are hard to relate among themselves and the book lacks purpose. It's very disappointing, but fun at the same time.

"Habit" is a big word for this book, which it does not deserve. More accurate name would be "Stories about influencing people".

I would recommend to read the first part about individuals. You can skip or skim the rest.


How to setup a beach tent

UV index is very harsh in Australia. While 11 index is considered Extreme, it's often you'll see 13 in Melbourne. Thus I bought a beach tent.

I checked all of the available resources on how to set it up and still miserably failed to do it myself. It's almost always windy on the beach. During the setup the tent cover becomes a huge wind sail and it's a challenge to secure it with ropes before it flies away.

As a result I came up with new way to set it up.


The bed of procrustes

by Nassim Nicholas Taleb

That's my beach book and it's a great fit. Short aphorisms are quick to read and give you a lot of opportunity to think about them. I didn't understand the half of the aphorisms, which gives a reason to read the book again.


Domain-driver design distilled

by Vaughn Vernon

I've found this book very insightful. It talks about modeling the application based on domain or real business terms and operations. My development experience slowly led me to the same conclusion. DDD is very valuable technique and it should be more talked in the software industry.

I can't remember seeing the DDD concept in the book yet. While the book's content is great, the delivery is horrible. I found it to have a bad flow, being too long and slow at times and often confusing. The more appropriate title would be "DDD Half-Distilled". I feel the content could be cut in half without significant drop in value.


The Expert

Short Comedy Sketch


Handbook for new employees

by Valve

I've picked this book for the second book club meeting. It is short and publicly available. The book provides interesting insight into the company, which is successfully operating with flat structure for 20 years. It's so different so it's hard to believe it.

The most surprising part for me was about hiring as it is considered the most important task in the company. I agree with such approach, but unfortunately it's not so common.

Few other things I've liked: T-shape people, peer reviews, cabals, stack ranking and compensation.

The book gives a good overview of the culture. I really want to know more details how everything is setup. That's where the real insight.


Reading RubyWeekly. Next level achieved!

(With a bonus)

RubyWeekly is a weekly email with curated list of links about Ruby. It might take me few hours to read through it if the content is interesting. It’s hard to find 2 hours of focus time. It would be nice if I could track each link in the newsletter separately.

This blog post describes my evolving solution and how you can optimise your workflow and read RubyWeekly with one click.


Scrum: The Art of Doing Twice the Work in Half the Time

by Jeff Sutherland

Great books and great methodology. It would be even better if the author didn’t oversell it. The way he presents it, is like he treated all diseases on the planet. After a while of such praising of his work you start to question his credibility.

The author made a good point. You can't significantly change the performance of a person in a short time. However you can significantly affect the team. Everything should be seen as a system. People are just the participants in the game.

There are no bad people, but bad systems

The book made me think of Nazism. Its success can be explained by the system that was in place. Most german people didn't want to kill anyone on the individual level. However they played their cog role in the complex Nazism machine.

Anyway, back to the book. Scrum is focused on providing the basic rules for the process in the team. It prioritises efficiency, uncertainty and change. I can't think how those rules could be distilled even more. That make me think the scrum would be around for a long time.

I would recommend this book to everybody. But don’t be put off by the writer. The product does not change because of the bad salesperson. 


Smarter Faster Better

by Charles Duhigg

This was an audiobook, and I did an experiment with it. I’ve listened to this book three times in a row. The goal was to see how the second and the third rounds would be different.

After the first round, I liked the book. Each point is backed by real life example. That makes the listening a joy.

The second round wasn’t much different. I’ve picked up some missed details. However overall understanding of the book is only improved by 10%.

For the last round I created a mind map while listening to it. To my surprise that made a huge difference. The mind map forced me to become an active listener. The overall understanding doubled. That shocked me because that was the third time I’ve listened to it.

My favourite part is about goal setting. There are ‘smart goals’ and ‘stretch goals’. Smart goals are achievable and measurable. These are your everyday goals. They prioritise efficiency of what you are already doing. In contrast stretch goals are about the direction.

To better understand them, think of the running analogy. Smart - is how fast you are running. Stretch - is where you are running to.

While the book has a great content, it feels disjointed. It would be nice to combine all knowledge into a recipe to follow. I guess it’s up to the reader to do so.


Payoff: The Hidden Logic That Shapes Our Motivations

by Dan Ariely

Yet another interesting book from Dan Ariely about behavioural psychology. The book talks what motivates us at work. It feels that book heavily overlaps with author's other books. It's good to remind about those things anyway.


Dead Souls

by Nikolai Gogol

I decided to read some Russian classics. The book is about people and society. The book dates to the 19th century. However, it is still relevant today. The social aspect of the society did not evolve as quickly as the technology. 


Rails in real-time

at Melbourne Ruby meetup

Download Slides PDF or read more


Do you have enough tools to collaborate?

or why Basecamp and Github so popular

Selecting good communication and collaboration tools for work, is just like having a solid foundation for the house: if it’s flawed then you can’t avoid the cracks in the walls.

  • Why there are 100 channels in Slack?
  • Why we’ve started using tool X but it does not work for us?
  • Why do I receive 50 internal emails every day?

Often it’s our ignorance of communication theory that caused all of that.

The article will give you a model which will help you understand why new tools don’t fit into your company and why existing tools are abused in their usage. I will describe the five main categories of collaboration and communication tools and explain their purpose and needs along with the tool examples.

Let’s start with something popular.


Modern Educayshun


First Mini Gymkhana


Crucial Conversations: Tools for Talking When Stakes Are High

by Al Switzler, Joseph Grenny, and Ron McMillan

Crucial Conversations is a very practical book. You can apply knowledge in everyday life straight after reading it. As you probably know our life is not always vanilla. Quite often we need to deal with people who completely disagree with our opinion. Whether it be your boss, partner, neighbour or co-worker. This book teaches you how to have those conversations without alienating the relationship. The book is very insightful and I feel I need to read it again to better understand it.

I definitely recommend the book for everybody and I wish everybody to have a read of it.


Lincoln

by Al Switzler, Joseph Grenny, and Ron McMillan

It’s loooooong, very long, 30+ hours long. I can’t count the number of times I thought to stop listening to it but somehow I managed to finish it.

Such level of details is acceptable at court when creating a criminal record. Let me ask you, would you be interesting in reading the criminal records? Nobody cares who said what, to who and at what minute. The readers want a story, a good story with overview of what’s happening. Unfortunately this book pollutes a good story with unnecessary details.

One advice to you is to listen to this audiobook on x1.5 speed, I started with x1.25, and it wasn’t fast enough. You get bored faster than your patience for the author’s mumbles.


Sapiens: A Brief History of Humankind

by Yuval Noah Harari

First of all, great book and now the details. I thought it was a book about biology and how humans evolved from monkeys. It definitely has a lot of it, but that’s only a small portion of the book.

While I was reading it I realised the book 100% proves its title. Think about some time in year 3000 or perhaps when aliens colonise the earth. They would want to study the creatures which were living on the planet. I think this book speaks about us more than anything. The author manages to distance himself and you truly think it’s just another history book.

It is a pretty long book, at times it could be boring because of the details, but only sometimes. This is one of the best book I’ve read and I definitely would read it again.


Cron on Heroku in 5 minutes

I wrote a small Rails app, which sends emails on a particular schedule. For example to send an email every week on monday and thursday at 7:00am Melbourne time.

However Heroku doesn’t have cron or good free alternative. I wrote a cron replacement in 5 minutes. This post shows how I did it. There are three parts:


Snowboarding in Russia

And Arhyz in the full post


My 2017 year

2017 has finished, it’s time to summarise the last 12 month in my life.


RSS readers and missed opportunity

The story starts with the RubyWeekly newsletter. Once signed up, every week you’ll receive a collection of curated links. It’s a great resource to learn Ruby. It could take a few hours to read through the interesting articles.

I found it hard to set aside 2-4 hours every week to read them in one go. So I wrote a script parses each week’s issue into an RSS feed. The feed had one item per link, which gave more granular control.


99 bottles of OOP

by Sandi Metz & Katrina Owen

This book is very hyped this year. To summarise it's a detailed refactoring tutorial. It could also be called "Refactoring 1-on-1 for dummies".

I like that it goes through long and tedious process of proper TDD. I don't like for the exactly same reason and had to skim through it. People who are not familiar with TDD should find it very useful.

The book was a good detailed reminder of the refactoring process for me. However I wouldn't recommend it to myself.


A pitfall of the &. operator in Ruby

Update 1: The article was translated to Japanese

Update 2: This post is featured in RubyWeekly #374

The &. operator, added to Ruby 2.3, is handy and I’ve cleaned a lot of code with it. You can use it in conjunction with default operators as described in Ruby's New &.!= Operator.

Recently I introduced a bug when using &.. First we had:

if start_date && start_date < start_of_month && end_date.nil?
  # …
end


Meta presentation

at Melbourne Ruby meetup

Unfortunately this presentation had a lot of transition and my recording failed, so please have a look at the transitions in video slides below.


Growing Rails Applications in Practice

by Henning Koch and Thomas Eisenbarth

A quick read which I would recommend to every mid rails developer and higher. It's common for developers to outgrow their tools. Rather than learn new skills, people start to blame the tools. Your heard those people: "Rails does not scale", "ActiveRecord is antipattern" etc. The books show few patterns which allow to build big Rails application with only small changes to standard 'Rails way'.

The book recommends active_type gem. I would recommend other gem active_interaction instead. active_interaction gem is more superior in my opinion and I've successfully used it in multiple projects over the last 2 years.

As for the CSS structuring, BEM is definitely a good choice to get control over your styles. Only issue with it, if not enforced it loosed its value, so every developer should be very diciplined to follow BEM.

There is only 1 option which is better than BEM, it's css modules. I only used it with ember.js, not Rails though. It automates steps that you have to do with BEM. However css modules require deep integration into the tools you use, which makes it harder to bring into the project.


Sprint

by Jake Knapp

The book talks about the process of running a 5 day long test to validate your idea/product. You might have an idea to start new business or how to engage your existing customers, whatever it is you should do as quickly as possible and as effectively as possible.

The book provides a very detailed step by step guide how to run the full spring as well as explains why things are done the certain way.

While books tries to prove itself with examples from big or popular companies, it feel a bit cheap because success of the company doesn't depend on the success of the product. It's way more complex than that.

I'll be very interested to try it on practice. In theory it should work very well.


The Art of Readable Code

by Dustin Boswell & Trevor Foucher

This quick and easy to read book I would recommend to every developer. It talks about all the little things which are often neglected and what developers deal with every day. Naming methods and variables, extracting business logic, code comments, aesthetics and code readability.

This knowledge is language agnostic and the best mastered over reading lots of code, or reading this book :)


The Inner Game of Tennis

by Timothy Gallwey

That was a lucky pick to read after "The Brain's Way of Healing". That book talks about unconscious part of the brain. It does make a lot of sense and I've drew a lot of parallels with the "The Flow" book. To put it simply, we are animals and millions years of evolution didn't disappear when we've got consciousness.

When we are leaning something we actually teaching our unconscious part of the brain, while consciousness is there to guide that learning process.

Conscious and unconscious, this is just a theory to explain our body, and probably not very accurate. But it is enough to start benefit from it. That book shows how little we know about ourselves.


The Brain's Way of Healing

by Norman Doidge

This an amazing book. Just like the previous book "The Brain that Changes Itself" this one also blew my mind. It's very long book and I think I've lost my interest twice and had to start again from the start few months after. But once i've got beyond the first 30% about Parkinson Disease, I was hooked.

The book talks about how brain stimulation through our sensor could affect it. That includes voice, light and touch. That's probably my favourite part.

Anyway, I've read it over a month ago now and my excitement already dimmed out. That's a great book and I would recommend it to everyone.


Perfect Strangers (2016)


Remote

by Jason Fried and David Heinemeier Hansson

Just like the book I've read a week before - "Rework", this book also jumped the queue.

So are you working remote or still going to the office five days a week?

If you are working at the office, you might need to read this book, to know why it make sense to switch to remote or ocasional remote work. The book addresses some questions and concerns about remote work. There are definitely more pros than cons to working remotely, however it's important to know and understand the difficulties that arise and which are previously were unknown to office workers.

If you are already working remotely, you'll probably find this book as a reflection of your own experience. I've been working remotely for over 5 years and gone through the exactly same struggles described in the book. I guess the only difference the book looks at it with a bit more scientific perspective.

I feel the book could be even shorter, few ideas has been repeated multiple times through the book. If you want to know everything about remote work this book is definitely would be the first goto option.


Rework

by founders of 37signals

I had to use my credits on Audible.com and didn't know what to buy. This book was on my to read list, but somewhere at the bottom of it. And thanks to very small collection of audiobooks this book jumped the queue.

The first thing that surprised and warned me at the same time how small the book is. It is relatively short and is less than 3 hours long. In comparison the other book I'm reading, "The brain's way of healing", is almost 15 hours long. But there is a good reason why it is like that. Authors intentionally cut on the content as it's the same principle they use at work, which was described in the book.

To sum up the book, it could also be called "Rethink". Rethink things that you are doing at work. Just because something was done in a particular way for a long time does not mean it is a good idea to keep doing it.

The book summarises years of work at 37signal, company which indeed swims agains the flow and decided not to follow many established work practices.

Can't say I've learnt much, as I've heard many of those things before, but nevertheless I've enjoyed this book.


The first 3D scan of me

I've popped up to visit my friend Marcus during holidays, he runs PunkOffice, and he offered to do a 3D scan of me. I couldn't say no to that.

In a split of a second 80 DSLR cameras took a photo of me, each from a different angle. After a bit of computer processing and magic from Marcus a final model was produced. Click the image to see the full version.


Lean Startup

by Eric Ries

It's an interesting book which summed up a lot of my experience working in startups. It's important to mention that the book focuses on testing new ideas rather than improving existing business.

Alright, so you have a new business idea and nobody has done it before, what's next? In short accept that you are wrong and your ideas are crap and proceed from there. Such mindset forces you to focus on feedback. Even if you found great market fit with 80% accuracy you still need feedback to make the adjustments.

The whole process should be focused on getting the market feedback and learning from it. The challenge is to get it as fast as possible and as cheap as possible. The sooner you fail the faster you will learn and the faster you will move on to a better one.

As a professional software developer I've found such approach very hard, because as a professional I'm responsible of quality, which I had to ignore if it conflicts with the delivery speed.

Also I've found my peers who don't understand that principle of growing new ideas, set the wrong priorities on tasks. They focus on the tasks which have medium to low business value, which is still not acceptable as that distracts you from the low hanging fruits.

I've also liked the "vanity metrics". Metrics which has no real meaning but makes you feel good by creating an illusion. So many businesses keep doing it. So true.

Lean Startup book was written from the author’s experience and I can personally backup most of the things mentioned in the book with my personal experience. That's why I've found it very useful as I see it as an experience exchange.

I'd say Lean Startup is "must read" only if you are starting new business, otherwise you are better off reading books on improving efficiency or quality of your existing business.

Links:


Either or Not

Quote by Søren Kierkegaard

Marry, and you will regret it; don’t marry, you will also regret it; marry or don’t marry, you will regret it either way. Laugh at the world’s foolishness, you will regret it; weep over it, you will regret that too; laugh at the world’s foolishness or weep over it, you will regret both. Believe a woman, you will regret it; believe her not, you will also regret it… Hang yourself, you will regret it; do not hang yourself, and you will regret that too; hang yourself or don’t hang yourself, you’ll regret it either way; whether you hang yourself or do not hang yourself, you will regret both. This, gentlemen, is the essence of all philosophy.

--- Søren Kierkegaard

Ref: What are the Alternatives to Marriage?


Highlights from Railcamp 20

in Springbrook

Yet another Railscamp. That's what I've felt like before it's started. But on Sunday afternoon, I was already missing it as it was almost over. Great time as always, but should say activity options were more limitted than usual as it was small camp with 60 people and in comparison the previous one had 120.

From the highlights: I was elected as a Ruby Australia committee general member. That was my third attempt and should say I'm very happy I was elected this particular time as committee consist of people who I believe can make a difference and who share a lot of similar frustrations with me.

Another highlight I've helped with small movie which was shot over the weekend. It showed once again that I'm a horrible actor, although I think this time was slightly better than a year ago.


Wabi-sabi

In Russian culture (and I've heard in Chinese as well) people prefer brand new feel to things. During my traveling in Europe and Japan I've discovered that I like old furniture and buildings there. Each one of them what I call "has character".

About a year ago, I've discovered the term wabi-sabi, which did sound familiar from my past observations.

from Wikipedia: Wabi-sabi represents Japanese aesthetics and a Japanese world view centered on the acceptance of transience and imperfection. The aesthetic is sometimes described as one of beauty that is "imperfect, impermanent, and incomplete"

Characteristics of the wabi-sabi aesthetic include asymmetry, roughness, simplicity, economy, austerity, modesty, intimacy, and appreciation of the ingenuous integrity of natural objects and processes.

I think it's a great world view to adopt. Not just from economic perspective, but also I see it's more inline with nature, as there are no any two organisms which are identical. Even twins are different in so many ways. Every living creature is special and unique. And I think we should appreciate that more.

A video about wabi-sabi through which I've discovered it from.