Posts

Showing posts from February, 2021

Management: The non-obvious II

Image
This is the second post on the series of management the non-obvious. I highly recommend you check out the first post . For the first post, I shared +20 books which was the base of the ideas of the first slidecast. This is the second slidecast. In this second slidecast, we will continue covering some non-traditional ideas and I will recommend +20 books again. Books are portals to other dimensions. We have several cognitive biases in our brains that work against us. We also live in a world that the bad things are repeat over and over and the good things are faiding. So it's really important to spot and think about it. Often we think we have all the answers and just need to execute something, is that so? They allow us to see things we were not seeing before. So I hope you guys like it. Let's get started.

Architects as Gatekeepers

Image
I had experiences where every single service had to be a ticket with an architect document in order to be able to start using every new technology or service. So every engineer hates to work like that. I personally dont think thats the why to roll because thats means that process wins.  Netflix is famous to have a culture where they threaten people like grown-ups. So if you have grown-ups why do you need to review every single thing people do all the time? For sure reviews are a good thing but architects as Gate Keepers are not a good thing. In general Gate Keepers(DevOps Engineers) as well is as bad as Arch as Gate Keepers. I have mixed feelings but personally, I dont think there is value in having Gate Keepers which is a very poor solution and IMHO a poor usage of people's times. So Why gate Keepers exist? 

Terraform S3 Bucket Object

Image
Terraform is awesome.  Terraform allow us to do declarative Infrastructure as Code and it's really the way to roll in AWS nowadays. You really dont want to do things manually or using the mouse because they dont scale and are error-prone. Automation often takes more time to do it and get it right but in the long run, it really pays off because it scales very well. So today I want to share a specific feature in Terraform called S3 Object Bucket. This resource allows us to upload local files to S3. So let's get started! 

Networking Troubleshooting/Debugging with Wireshark & tcpdump

Image
This is the 3rd and final post on the Apache Mina series.  I highly recommend you check out posts I and II.  tcpdump is very important networking debugging tool. tcpdump allows us to capture traffic because on a specific port. Wireshark is a visual(there is a terminal version as well) network capture and analyzer tool. We will use tcpdump to capture traffic between our mina TCP server app and a telenet client session. We will use the tcpdump capture to feed Wireshark and we will use Wireshark to understand what's going on between the client and the server on the network stack. Wireshark has a killer feature to follow TCP flow: meaning you can see all exchanges from client and server. So I made a video showing in detail this whole thing. So Let's get started.

Synthetic Data Generation and Java Faker

Image
Testing is often hard. Mostly because we need data to perform some forms of testing. For Unit Tests often you can fake your own data pretty easily. However, as we move to Integration Tests, E2E Tests, Big Data Data Science Discovery, Product(PO) Acceptance Testing, PO Discovery we might have a scaling issue. For sure you could build a tactical solution where you hardcoded all domains/data-sets of your company but this approach is highly coupled with systems database and is hard to maintain. So there are the tools and startups on the land of Synthetical Data Generation where they use metadata to understand databases and generate data because of constraints like size, type of data, verifications(CPF for Brazil, SSN for the US). This approach is hard but I believe is the future. Today I want to show something in that direction, but much more simple and maybe a starting point? Which is Java-Faker  which is similar to Faker.js . 

Apache Mina TCP Server using SSL

Image
This is the second post on the Apache Mina series. In the first post , I show how to build a simple TCP Application using Mina, Xstream and we did create a Client which we test with Junit and also Telnet. Now we will do something a bit different, we will add SSL support. So there is another video where I explain in detail how we can generate the keys, also test the application using the OpenSSL client in Linux. So Let's get started!

Building a TCP Server with Apache Mina

Image
Apache Mina is a rock-solid framework to build high performant network applications. Mina provides sockets using NIO Framework with non-blocking IO fashion. Using mina you can build a TCP Server/Client, FTP Server, SShd lib, or an XMPP server. Today I want to explore a TCP Server/Client simple application protocol using Apache Mina. So I made a simple POC so how the application working and also used Junit to test the app. There is a video explaining in detail how it works. So Let's get started.

LRU Cache in Java

Image
Caches are often used as a cheap way to reduce latency and improve the performance of applications. Often we leverage libraries like Guava because they are rock solid and have lots of functionality but at the same time, all libs using Guava could easily bring a big jar hell and distributed monolith if you dont be cautious about your shared libraries. So if you are building a service might be completely fine to use more libs but as you build shared libs that could be really bad. So It's always precise and lean about your dependencies. So today I want to show that algorithms do not byte(much) and it's not rocket science to create a simple LRU Cache in Java using ZERO libraries. So I recorded a video going through the code and explaining what I did and how the algorithm works. For sure you could be thinking I prefer to use what's already there, sure thats fine. At the same time blotted applications and shared libs are really a nightmare at scale so somethings are better to cop

Testing in Production

Image
Are you crazy? No, I'm serious. Testing in production is hard dont get me wrong. There are several requirements like Observability, automation, and guardrails. However even being hard, a test in production is needed. Pre-production testing has limits. basically, we cannot predict all possible failure scenarios beforehand therefore we need a new approach a new mentality. It's much better to recover from failure rather them try to prevent failure. Anti-fragility is the key of everything, meaning: isolate failure and recover rather than trying to prevent failure. Testing in production at the end of the day will be hard and will require greater maturity and tooling. Testing in prod is one of the main elements of CI/CD because just deploy without tests makes no sense. Also about reducing the blast radius to the users combining techniques such as the canary, dark canary, feature toggles, synthetical monitoring, Chaos Engineering , and many others we will cover in a Slidecast I made.

FF4J

Image
FFJ4 is a feature flags/toggles solution built in Java with full support and integration with Spring boot. FF4J is rich in features having: Feature Toggles, Role-Based Toggling, Strategy Based Toggling(White/Black Lists, Time Based, Expressions, even has integration with Drools), AOP-Driven Toggling, Features monitoring, Audit Trail, REST API, +20 Databases support, Properties via Spring, Archaius, commons-config or even consul and more.  FF4J has an interesting UI where we can see the toggles and switch them on or off. So today I made a simple video going through the code and also running the UI. So Let's get started!

Change Autopilot Direction with Atomic Habits

Image
We often dont realize how much we run into the autopilot mode. However, is the autopilot going in the direction that we want? Are we learning what we want to be learning? Are we investing where we want to be investing? Often the answer to this question is no. So how can we change direction? Would be awesome if we had an interface like google maps or Waze where we could just type another direction that we want to go and we would be driving there? Where the direction is a goal that we want to archive rather than a place. Plans often are problematic since the world is dynamic and plans are static. So what can we do? It's possible to slowly shift to the desired direction and here is what we can do. Let's get started! 

Nine Lies about Work

Image
This is a pretty interesting book. I really love this kind of book where the author challenges the common sense and traditionally established truths that are not so true actually. Work is something we all do and I often think differently about it. Nine Lies about work sound arrogant but actually is not. The book is full of examples and scientific studies and argues very well on the spot. We are living a global pandemic(COVI-19) and that changed all our lives, that shows how fragile we can be. I personally was always into Lean/Agile and never was a fan of traditional management culture. So buckle up this book might shake up you a lot since will challenge traditional things like People to need Feedback. I often like feedback and worked a long time(~11 years) living strong and daily feedback however even that being a strong truth for me, the author managed to show me a different point of view(wit studies of course) and I still like feedback and strong feedback cultures but I see there are

Attention Economy

Image
Social media is about attention. Real-time chat apps like Messenger, Whatsapp, slack are about attention. 101 meetings are about attention. We live in an attention economy. Everybody whats a time-share of you. A long time ago I disable ALL notifications from Slack, Skype, Whatsapp, Facebook(is closed most of the time of my day) and that is one of the best things you can do too. Not only for your mental health but also to put you in control of your time and therefore your happiness. Interruption is the ultimate killer of deep and meaningful work. However, we also need attention and we might need positive attention much more than feedback(Nine Lies about work).  Humans' attention is a very scarce commodity. I'm not judging anyone: Some people cannot read articles bigger than 5min or videos bigger than 10min. Not for accident Twitter originally had a limit of 140 chars(I miss that :-) ). Attention economy is about information management which threatens human attention as a resourc

Factorio: A game about automation

Image
This is a very interesting game. Factorio is a game about automation. If you work as an engineering or DevOps/SRE or like Lean and Queue theory this is a game for you. Factorio is highly, highly, highly addictive. It's very much like real life with the need for Refactoring, Technical Debt, Architecture, the pressure to deliver, constant tech updates and you have to catchup, debugging why you product halt, and much more. You can either play alone or with friends. It's 100% fun, especially if you are in the tech industry like I'm. The game reminds me a lot of StarCraft 2 but much more focused on automation at scaling them battles and micro. So I made a quick video showing some of the ideas about the game and I hope you guys like it and have fun. Let's get started! 

NetflixOSS Domain Graph Service: GraphQL and Spring Boot

Image
NetflixOSS Released a pretty interesting new solution. A framework for GrpahQL fully integrated with Spring Boot. DGS is super easy to use. You basically have zero effort to use it with Spring boot applications. DSG works with Maven or Gradle, Java, or Kotlin. Some time ago I made some posts about GraphQL and BFF you might want to check it out here and here . You compare with this other approach(also with a video) available here . Without further due, let's get started.  The Video The Code https://github.com/diegopacheco/java-pocs/tree/master/pocs/dsg-fun Cheers, Diego Pacheco

Management: The non-obvious

Image
Traditional management often sucks. Main because the focus is on control, time management, and micro-management. Plus, traditional management does not learn and just repeats the same process repeatedly and expects different results. I prefer modern incarnations like Coaches or even Engineering Managers.  I'm aware that Agile Coaching is a bad word in brazil because of Scams, but it does not mean it is a bad thing - It really depends on the people. People are more attached to managers than you can think. People do not know quite companies, they quite they managers. That's why management is a super important element of companies culture. Companies are complex. Complexity is everywhere; at the same often people just game the system rather than have complex and systemical thinking. So if you want to change the culture, you need to change management., Today, I would like to cover some non-obvious aspects that can deliver a better culture and, therefore, better solutions and better m

Why Digital Transformations Fail?

Image
Around 2015 there was a huge fuss about Digital Transformation. 70% of all Digital transformations fail(According to Tony Saldanha ).  For sure, you are thinking, this is because of the lack of proper Talent Pool, or wrong technology choices. Fore sure that things matter a lot, but surprisingly the number #1 problem is lack of discipline. Lack of discipline in Defining and executing the right steps. IMHO lack if discipline is also the issue of why hard things dont get done or executed. To define and execute the right steps, you need to have VISION and know what you are doing and what problems you are fixing. If you dont understand the problems you are fixing, how do you know you are fixing the right ones? How do you know you are doing the right things? Well, often, companies don't know, or they think they know.  99.999999% of aircraft takeoffs and landings  are successful  compared with only 30% success in digital transformation initiatives.