Yegor Bugayenko's Blog, page 12

February 4, 2019

Zache: A Simple Ruby In-Memory Cache

A month ago I stumbled upon a problem: I wasn���t able to find a Ruby gem which would do in-memory caching with the capability to expire on timeout. After some quick research I decided to implement my own and called it Zache (as in ���zero cache,��� since there is no back end). Here is how it works:

First, you create the cache:

require 'zache' zache = Zache.new

Then you fetch the value by the key, also providing the block which will be executed if the key is absent or expired:

x = za...
 •  0 comments  •  flag
Share on Twitter
Published on February 04, 2019 16:00

February 2, 2019

How to Deploy Maven Artifacts to CloudRepo via Rultor

[image error]

In my previous article, I described how to set up a private Maven repository in Amazon S3 and deploy there via Rultor. This is a great solution if you���re familiar with managing Amazon Web Services (AWS), S3, and AWS Identity and Access Management (IAM). However, if you���re not comfortable administering an AWS account and all the related permissions, you may want to store your Apache Maven Artifacts in some cloud based repository manager instead. Here is how you make Rultor deploy your Mav...

 •  0 comments  •  flag
Share on Twitter
Published on February 02, 2019 16:00

January 28, 2019

My Recipe Against Dependency Hell

Do you specify exact versions of your dependencies? I mean, when your software package depends on another one, do you write down, in your pom.xml, Gruntfile, Gemfile, or what have you, its version as 1.13.5 or just 1.+? I always thought that it was better to use exact version numbers, to avoid the so called dependency hell, and I was not alone. However, very soon I realized that dynamic versions, like 1.+, give more flexibility. Just a few weeks ago I realized that neither approach is right a...

 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2019 16:00

January 21, 2019

10x Paychecks for 10x Programmers

You most definitely have heard about 10x programmers. The gist of this folklore is that some of us coders are very effective (10 or even 100 times more so than others), while the rest are just ���normal.��� It is definitely not a myth though.

[image error]Fargo (TV Series, Season 3) by Noah Hawley

Robert Glass in his Frequently Forgotten Fundamental Facts About Software Engineering (2001) essay said that ���good programmers are up to 30 times better than mediocre programmers, according to ���individual d...

 •  0 comments  •  flag
Share on Twitter
Published on January 21, 2019 16:00

January 14, 2019

What if the Architect is Wrong?

You most probably know what I think about the architect role on a software project���it���s that of a dictator who makes all technical decisions and who bears the entire responsibility for the final result. I wrote about it and even gave a task Who is a Software Architect? at BuildStuff in 2016. However, the obvious question you may ask is: What happens if the architect is wrong? Does it mean the entire project is at risk of failure? And isn���t it better to make the whole team responsible fo...

 •  0 comments  •  flag
Share on Twitter
Published on January 14, 2019 16:00

December 31, 2018

Hazardous Enthusiasm

On a daily basis I deal with many programmers who contribute to my open source projects, either as volunteers or for money via Zerocracy (and my software projects are all open source). Over the years I have realized that there is a pattern in their behavior, which I need to be scared aware of. I call it ���hazardous enthusiasm.��� Here are the symptoms.

[image error]The Thin Red Line (1998) by Terrence Malick

A new developer joins the project. He is full of energy, talks a lot, spends a lot of time on th...

 •  0 comments  •  flag
Share on Twitter
Published on December 31, 2018 16:00

December 24, 2018

Speaker Cheat Sheet

I speak at software conferences regularly. Over the last three years I spoke in 30 cities and 10 countries. I recorded almost all of them, you can see them here and on my YouTube channel. My principal rule is that I never give the same speech more than once. Every time it���s a new deck of slides and a new flow of thoughts. Of course, they all dance around the ideas I preach about, like Elegant Objects or rebellion against office slavery. I guess it���s time to share some of my secrets, mostl...

 •  0 comments  •  flag
Share on Twitter
Published on December 24, 2018 16:00

December 17, 2018

Why I Don���t Want to Live in Silicon Valley

Silicon Valley is a great place to be ��� or maybe not. I���ve spent five years there, from 2011 till 2016. I did enjoy some parts of it, but others were not enjoyable at all. Here is a quick summary of what���s wrong with this territory. I can���t speak about the rest of the United States since, even though I���ve seen some other places, I���ve never lived there for more than a month. Long story short, the territory between San Francisco and San Jose, also known as Silicon Valley, is not the...

2 likes ·   •  0 comments  •  flag
Share on Twitter
Published on December 17, 2018 16:00

December 10, 2018

Unit Testing Anti-Patterns, Full List

I wrote some time ago about anti-patterns in OOP. Now it���s time to write about unit testing anti-patterns���because they also exist, and there are many. I will try to include every example I know in this list. If you know any others, please add them via a pull request or post a comment below. For each anti-pattern I will try to mention where it was found, if it���s not mine. Keep in mind that if I found it somewhere, that doesn���t necessarily mean it was invented there. If you spot an erro...

 •  0 comments  •  flag
Share on Twitter
Published on December 10, 2018 16:00

November 26, 2018

You Can Do Better

OK, it���s time to publish this piece. I���ve been dancing around it for quite a while, telling you how to make more per hour, how to manage those stupid managers that don���t let you grow, how to boost your career and how to deal with office slavery. Now here is a simple, plain list of recommendations for you: what you should do if you want to be a more successful programmer. Not a better algorithm designer, even though that���s important. Not a funnier clown team player, even though that���...

1 like ·   •  0 comments  •  flag
Share on Twitter
Published on November 26, 2018 16:00