<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andrzej Krzywda on Medium]]></title>
        <description><![CDATA[Stories by Andrzej Krzywda on Medium]]></description>
        <link>https://medium.com/@andrzejkrzywda?source=rss-8b68c5f5d76c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SCPE1N_Ermhk_D2j.png</url>
            <title>Stories by Andrzej Krzywda on Medium</title>
            <link>https://medium.com/@andrzejkrzywda?source=rss-8b68c5f5d76c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 19:37:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andrzejkrzywda/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I was a CRUDoholic]]></title>
            <link>https://medium.com/@andrzejkrzywda/i-was-a-crudoholic-fddd8af25d7b?source=rss-8b68c5f5d76c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fddd8af25d7b</guid>
            <category><![CDATA[event-sourcing]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[cqrs]]></category>
            <category><![CDATA[ddd]]></category>
            <dc:creator><![CDATA[Andrzej Krzywda]]></dc:creator>
            <pubDate>Tue, 16 Jun 2020 09:15:19 GMT</pubDate>
            <atom:updated>2020-06-16T09:15:19.177Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine one of your non-IT friends. Yeah, the “normal”.</p><p>Think about what they do for a living.</p><p>Try to construct a few sentences describing their daily work.</p><p>This is my take:</p><p>Rafal runs a big chess school. He hires chess instructors and assigns them to specific regions where they educate the kids on the beauty of the game of chess. They invent new plays and they use them to simulate chess pieces. Thanks to this, the kids love the game and they practice strategic thinking while playing.</p><p>OK.</p><p>Now, the next part, let’s translate it into a language, which is basically English, but with just 4 verbs: <strong>create</strong>, <strong>read</strong>, <strong>update</strong>, <strong>destroy</strong>.</p><p>Rafal <strong>created</strong> a big chess school. He <strong>updates</strong> the team with instructors and <strong>creates</strong>new instructor/reader assignments where they <strong>update</strong> kids education on the beauty of the game of chess. They <strong>create</strong> new plays and they <strong>create</strong> a simulation of those plays to <strong>create</strong> chess pieces simulations. Thanks to this, the kids <strong>update</strong> their love to the game and they <strong>update</strong> their strategic thinking while <strong>creating</strong> new chess games.</p><p>It sounds awfully weird, right? Now, imagine your friend reads this second job description. Imagine how they would look like. You know what I’m getting at, right?</p><p><strong>CRUD</strong></p><p>The translated text is how CRUD programmers sound to the “normal” people.</p><p>Who are CRUD programmers? Unfortunately, Rails, kind of makes us all CRUD programmers. The controller actions are usually CRUDish. The ActiveRecord classes are basically wrappers around CRUD actions. The migrations use CRUD language. Heck, even the views are CRUD’ish. Our UI looks CRUD’ish.</p><p>Rails doesn’t force us to do it, but it feels right to do CRUD with Rails.</p><p><strong>My relationship with Rails is complicated.</strong></p><p>When I first met Rails, I was a Java developer. I haven’t known Ruby yet. I loved Java (yes, kill me). I wrote Plain Old Java Objects. I studied “Refactoring” by Martin Fowler. I was fighting the language to make it look more elegant, less verbose, more like … Ruby. And then I found Rails. And then I found Ruby. And I’ve fallen in love.</p><p>I loved the syntax, I loved the perfect OOP model (messages!). Because I found Ruby through Rails, I adopted the Rails Way of thinking. Somehow I accepted this as part of Ruby. Slowly, all my OOP rules that I sticked to in Java, became obsolete.</p><p>Who cares about too many responsibilities in that object, when it’s still just 80 lines of code, less than this smallest Java class I ever created?</p><p>Who cares about breaking the Law of Demeter, when Ruby has those nice delegates “macros” and it’s so short and easy to do so?</p><p>Then it hit me — the Rails projects I worked on became bigger and bigger. The testing became painful (hard to unit test the monolith, so let’s go for browser tests). The build was slow and unreliable. My communication with the clients became robot-like, where the robot is limited to just four verbs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*BlC_lTbtkYiQkU9u" /></figure><p><strong>Yep, I became the CRUD-oholic.</strong></p><p>Even though, I knew it was wrong, it was so hard to get out of the CRUD addiction. But I knew that I had to.</p><p>Slowly, I was coming back to the world of design patterns. It wasn’t easy, though. It’s not easy to talk about OOP, where you don’t even have control over how the objects are instantiated. Good luck having constructors for ActiveRecord classes or the controllers. Good luck having objects always in the valid state — where Rails encourages you to have objects in the wrong state — because you can always call .valid? right?</p><p>Hexagonal architecture was one area where I found inspiration — this inspired me to simplify at least one part of the app — the application layer.</p><p>Then I found out about <strong>Domain-Driven Design</strong>, but it didn’t fully click on its own. Then I learnt about <strong>CQRS</strong> — Command Query Responsibility Segregation (awful name, right?) but it didn’t make sense to me. Then I learnt about <strong>Event Sourcing</strong> and it felt just wrong.</p><p>It took one person, whom I grateful all the time, a few beers and one evening of drawing diagrams. After one programming meetup, Mirek Praglowski (now part of Arkency!) explained those 3 things together to me.</p><p>And then it clicked.</p><p><strong>CQRS + DDD + Event Sourcing</strong></p><p>Each of us has a different style of learning. Each of us needs different “click” moments. To me, it was seeing how those 3 techniques can work together. This solved so many of my problems.</p><p>Fast-forward about 8years. All Arkency projects now use RailsEventStore, the tool we created to support CQRS/DDD/ES in Rails projects. We became the experts of applying those techniques in the Rails world. We have organized Rails/DDD workshops in Poland, Ukraine, Germany, UK.</p><p>I’m so grateful that we found this way. I’m grateful for the people I met who were patient to explain this to me. I’m grateful to the Arkenciers — we went through the hard learning phases as one team, helping each other all the time. I’m grateful to our clients who trusted us and let us choose the techniques we recommended. I’m grateful to all the people who attended our workshops, trainings, conferences — this motivated us to create RailsEventStore.</p><p><strong>Thank you!</strong></p><p>30.06.2020 (Tuesday) at 7pm CEST I will be running a free training called <a href="https://railsarchitects.com/webinar/"><strong>“Typical problems in big rails apps and how to solve them.”</strong></a> during which I will explain how CQRS/DDD/ES help us shape the architecture of our apps.</p><p>During the webinar, I will also open the sales window (only 7 days) for the 4th edition of our <a href="http://railsarchitects.com/">Rails Architect Masterclass</a>. During those 7 days you will be able to join the existing group of over 120 senior Rails developers and take a course which lasts for 13 weeks! Full of practical tips, discussions, techniques, videos, sample apps, homeworks, live calls.</p><p>Hopefully, we can all create a better programming world where there are more than 4 verbs available.</p><p><a href="https://railsarchitects.com/webinar/">https://railsarchitects.com/webinar/</a></p><p>See you! Andrzej</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fddd8af25d7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The journey to Domain-Driven Rails and TDD]]></title>
            <link>https://medium.com/planet-arkency/the-journey-to-rails-and-tdd-da639d921e17?source=rss-8b68c5f5d76c------2</link>
            <guid isPermaLink="false">https://medium.com/p/da639d921e17</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <dc:creator><![CDATA[Andrzej Krzywda]]></dc:creator>
            <pubDate>Sun, 15 May 2016 17:14:09 GMT</pubDate>
            <atom:updated>2017-09-19T13:33:04.310Z</atom:updated>
            <content:encoded><![CDATA[<p>I have always struggled at deciding whether it’s better to write a short/elegant code or it’s OK to have a bit more verbose code, but a code which is more intentional.</p><p>Often, when you read about such dilemmas, you will see two ad-absurdum arguments. The developers who prefer shorter code, will show some kind of GenericFactoryBeanFactoryServiceImpl.java to prove that the so-called “architecture” astronauts are just plain stupid.</p><p>On the other hand, we have developers who like to have some classes/objects and they go ad-absurdum from another direction, showing some Perl-like one-liners, which clearly “prove” that it’s just wrong to have too short code.</p><p>The problem with such arguments it’s just that they focus on two extremes, while there’s a huge grey area and it’s not a binary choice.</p><p>If you follow TDD with just the Red/Green cycle (just focus on make the tests green), you will end up closer to the one-liners. If you focus on the Refactor phase for too long, you may end up with some complicated and unclear abstractions.</p><p><strong>My love to TDD was powered up by the Red/Green/Refactor rule.</strong></p><p>What should happen in the Refactor phase? Should the “just enough” code be extended? Is there any rule I can follow here? How far should I go with abstractions?</p><p>For years I’ve relied on intuition here. It was OK to keep my TDD flow going, but I’ve always had the feeling that something is missing here.</p><p>At some point, I’ve learnt more and more about DDD. In its core DDD has not much to do with TDD. It’s just a set of guidelines how to make your code more domain-oriented. However, I liked it so much that the DDD patterns (both strategic and tactical) became favourite techniques in my toolbox.</p><p><strong>DDD was the missing piece in my TDD flow.</strong></p><p>DDD answered me the question — how far should I go with abstractions.</p><p>The thing is it’s not just about abstractions. It’s about our understanding of the domain. How do we think about the domain of the problem? How do we make a model out of it? How do we represent the model in our code?</p><p>DDD helped me find the balance between the always-tempting primitive obsession (trying to map all domain problems to integers, strings, hashes and lists, in Rails you can see it as solving everything with tables/associations/callbacks) and the world of abstractions which no one can understand.</p><p>I’m not going to defend artificial abstractions here. However, I’m going to favour abstractions which represent the actual domain world. If I’m working on some Genetics software, I want to have a DNA or a Strand class instead of a String.</p><p><strong>I want my code to tell the story about the domain. I want the code to be as explicit about the domain as possible. I expect other developers to be able to learn about the domain from my code.</strong></p><p>I’ve been practicing both TDD and DDD for enough time, that one day something “clicked”. I couldn’t do one without the other. DDD became the toolbox for the Refactor phase in the TDD cycle. Now it was more clear what I’m meant to do. I’m meant to reflect my domain knowledge in the code. The tests are passing, the requirements are implemented, but now I can shape the design in a way which reflects my domain knowledge. I’ve started to follow Domain-Driven Development.</p><p><strong>Even though, it was easy for me to apply TDD+DDD in my side projects, it wasn’t so easy to do so in the Rails apps</strong>, which happen to be our main kind of projects at Arkency. To be more generic, this combo was hard to apply within any framework-infected code. Rails just happened to be an example of it.</p><p>This triggered my research how to solve the problem of Rails apps and writing clean code. It took me several years but I found a bunch of techniques (mostly from DDD tactical patterns) which help decouple our actual application from the Rails application. My research was heavily influenced by DDD and by Clean Architecture (by Uncle Bob).</p><p>In short, if we apply <strong>service objects</strong>, <strong>queries</strong>, <strong>repositories</strong>, <strong>form objects</strong>(known in other worlds as <strong>commands</strong>) and <strong>adapters</strong> we can split a typical Rails app into two parts — the Rails part and the actual app.</p><p>The Rails part would have the controllers call the services objects or queries.The models (ActiveRecord) would just become an implementation detail of the repositories. The params were wrapped with form objects. Everything that was below the service objects (or we can call them application service layer), but above the repositories would become the domain layer.</p><p>That was a huge milestone for me. I’ve had a repeatable and reliable way of extracting the domain part of my Rails app. In a way <strong>I could treat the domain as a library that is used by the Rails app</strong>. It can be in the form of a gem, but doesn’t have to be a gem, that’s just a detail.</p><p>It wasn’t just a dream of some kind of an architecture astronaut. In practice, being able to reliably make the split enabled me to do the TDD flow while working in my Rails apps, especially in the domain part. I could feel like doing those “non-practical”/unrealistist coding kata, while actually implementing important features.</p><p>Together with the Arkency team, we’ve been sharing our lessons from that process in the form of blog posts. At some point, it became clear that a blog is not enough and <strong>we’ve put the reliable process into a book called: </strong><a href="http://rails-refactoring.com/">Fearless refactoring: Rails Controllers</a>.</p><p>I know that I’m not very neutral when it comes to recommending that book. However, over the last years it was a joy to watch the readers succeeding in applying the techniques from the book.</p><p>That book wasn’t the end of my struggle. What we showed in the book was a process of decoupling the domain from Rails. What we haven’t shown was the other two important parts. One of the parts is related to actually splitting the Rails app into 2 parts: the frontend and the backend (in most Rails app they become the same thing). The other part is about splitting the domain itself.</p><p><strong>The first part is how to extract the frontend part of the Rails application</strong>. I’m lucky to be surrounded by a team of fantastic developers at Arkency who did the job of solving this frontend problem and (more importantly!) describing it. For years, we’ve struggled with it, but had one intuition — <a href="https://medium.com/@Killavus/frontend-is-a-separate-application-8988a3ce70ad#.p2g72muyo">the frontend is a separate application</a>. The revolution started to happen when 2 things appeared — React.js and the rise of the modern JavaScript setup (including webpack and Redux). We’ve explained our transition in two books: <a href="http://blog.arkency.com/rails-react/">Rails meets React.js</a>(targeted to Rails devs) and <a href="http://reactkungfu.com/react-by-example/">React.js by Example</a> (targeted to anyone who is just starting with React.js and the modern JS setup — there’s 14 working repositories included!).</p><p>Just to summarise the story so far — we’ve managed to find a reliable process of decoupling the Rails app from the domain and we found a consistent process of extracting the frontend parts of our Rails apps into the JS world.</p><p>The journey has been incredible so far and I’m proud of what we’ve achieved. We’re not only able to enjoy (and be proud!) of our code while working on new Rails apps. We have also been able to transition from our <strong>older Rails apps</strong>into this proud-giving state of code.</p><p>Are we at the end of the journey?</p><p>Far from it :)</p><p>I’m quite happy that whenever we achieve one milestone we already see other places which are worth our focus. <strong>The most recent (for about 2 years now) area of our focus was the problem of splitting the domain part.</strong></p><p>For years, I was dreaming about this one model, one design that rules all of my application. A model which would be free of the infrastructure parts like http, database or other API — a pure domain. Learning about DDD taught me a lesson here — <strong>I wasn’t looking for one model</strong>. What I was looking for was a design which consists of several of such pure models. The answer I was looking for was called <strong>Bounded Contexts.</strong></p><p>If you looked at the Arkency internal communications you would see the term Bounded Context (or BC as we often call it) growing popularity. In all of our projects we started to learn what are the bounded contexts — what is the ideal split of the domain. Sometimes that goal stays only conceptual for a long time, but at least we know what’s the target.</p><p><strong>Our goal is to reflect the bounded contexts in our codebases.</strong></p><p>A bounded context can be defined as this area of your business where you use the same business language or as they call it in DDD, where you use the ubiquitous language. Bounded contexts are often represented as departments in bigger enterprise companies. <strong>If you work on an e-commerce app, very likely you’ll have Inventory, Pricing, Promotions, Shipping, Invoicing, Payments, Reporting as the bounded contexts</strong>. Even though, they’re parts of the same system, you’re actually using different meanings for the same term.</p><p>In this e-commerce app, the concept of Product is different in all of those parts. In the <strong>Inventory</strong> world, a Product is something that exists in the store, there’s probably some amount/quantity value related to it. The availability is becoming an important concept here.</p><p>In the <strong>Pricing</strong> world, we’re mostly interested in the price of the product. Here, a product is something that has a connected price to it (or multiple prices). If you were involved in preparing prices for any products, you know how big this area is and how many dynamic variables need to be taken into account. All of that makes the Pricing bounded context.</p><p>In the <strong>Shipping</strong> world, a product is something that is part of the shipping process — taking the product from point A (usually the store) and deliver it to the point B (usually the Client address).</p><p>As you see, whenever we see a different meaning for a similar concept or whenever we see some groups of related terms, there’s probably a bounded context to be extracted.</p><p><strong>In the codebase, the lack of bounded contexts is mostly visible and painful in the tests.</strong> If you ever had to prepare a User and their Password (clearly from the Authentication world), just to be able to test a Product object or the Shipping process, you know how frustrating it is. An example — in order to have a proper Shipping object, you need to have an Order, so first you need to have a Cart, so first you need to have a Product added by an admin, who needs to have the login/password. You also need to have the Customer object with a valid address object. <strong>That’s just a huge set of dependencies.</strong></p><p>Knowing how to split your domain into bounded contexts is just one step in the process. Another important part is to allow those bounded contexts to communicate. This is where <strong>domain events</strong> come in. However, they’re not the only way. We can simply have an<strong> Application Service layer</strong> which coordinates the bounded contexts.</p><p>So, to summarise this message:</p><ol><li>TDD is a great technique, but may leave you uncertain what exactly to do with the Refactor phase</li><li>DDD is a good fit here, as it tells us to refactor to the point where our domain understanding is represented in the codebase</li><li>Rails apps are hard to TDD, so we need to split them</li><li>Separate the Rails app from the domains part by applying techniques from Rails Refactoring: service objects, form objects, repositories, adapters</li><li>Separate the frontend from the Rails app, by extracting a React.js based JavaScript application</li><li>What is left from the Rails app is the domain, but we need to split it into bounded context to easily be able to do TDD</li><li>Enjoy TDD with Rails! :)</li></ol><p>Psssst, I have decided to prepare a video class on the topic of TDD and Ruby/Rails. The class covers topics like the ones mentioned here — using DDD and also mutation testing to build highly modular, TDD’able Rails applications. If you’re interested in getting a <strong>70% discount</strong> and have an EARLY ACCESS to the class, use this link (before Thursday, 19.05.2016 11pm CET): <a href="https://vimeo.com/r/1I82/STcxRjFuel">https://vimeo.com/r/1I82/STcxRjFuel</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da639d921e17" width="1" height="1" alt=""><hr><p><a href="https://medium.com/planet-arkency/the-journey-to-rails-and-tdd-da639d921e17">The journey to Domain-Driven Rails and TDD</a> was originally published in <a href="https://medium.com/planet-arkency">Planet Arkency</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snapchat for programmers]]></title>
            <link>https://medium.com/planet-arkency/snapchat-for-programmers-84f5aee42e1c?source=rss-8b68c5f5d76c------2</link>
            <guid isPermaLink="false">https://medium.com/p/84f5aee42e1c</guid>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[snapchat]]></category>
            <dc:creator><![CDATA[Andrzej Krzywda]]></dc:creator>
            <pubDate>Wed, 30 Mar 2016 12:02:43 GMT</pubDate>
            <atom:updated>2016-04-28T11:21:37.498Z</atom:updated>
            <content:encoded><![CDATA[<p>Can Snapchat be of any use for programmers?</p><p>[UPDATE: yes, it can. Lots of developers already using it. Go check out the DevSnap project — a directory of developers on Snapchat <a href="https://devsnap.herokuapp.com/">https://devsnap.herokuapp.com</a> ]</p><p>I’ve tried to use Snapchat for 4 times now.</p><p>The first time, I installed it after hearing that it’s a big thing among mobile users. I couldn’t even leave the first screen so I shrugged and quickly left it. Not for me.</p><p>The second time happened after a few months. I follow Gary Vaynerchuk on multiple channels and he said that Snapchat is his bet for the social medium of the future. I trust his instincts. This time, I spent more time, maybe like 30 minutes. I was able to leave the first screen and navigate a bit. I couldn’t understand how it can be useful. This time I read more about it and I understood that <strong>things disappear after 24 hours</strong>. <strong>WTF, Gary? I left.</strong></p><p>The third time was again because of Gary. This time, Gary was actually active on Snapchat, so at least I’ve had someone to follow and watch. A typical lurking phase. This time, I stayed with Snapchat for longer, being just a passive consumer of the Gary lessons. Thanks to that, I learnt how to use Snapchat and how Gary uses it — <strong>as a life sharing tool</strong>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FjeoKtdCcZvo%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjeoKtdCcZvo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FjeoKtdCcZvo%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e70e4c1dd5d5869c23ac68e6df05267/href">https://medium.com/media/2e70e4c1dd5d5869c23ac68e6df05267/href</a></iframe><p>I became more and more interested in the phenomenon of Snapchat. As a passive consumer, I didn’t really see that much value — it was OK, but not much more than that. Definitely not the kind of a hype that it currently has. I started following more people but they were either some boring celebrities or people talking about topics that are not so much in my interests.</p><p>Then I realised that the big problem was the lack of my topics — things around programming/IT. <strong>I couldn’t find any programmer on snapchat. </strong>Snapchat is considered to be a tool mostly for teens and celebrities. When I asked some programmers if they considered Snapchat they usually just <strong>laughed</strong>.</p><p>I remember that some of the programmers were also sceptical about Twitter years ago. Not all of us, but many were not sure how 140 char limit can make sense. Today, Twitter is totally OK for many of us. Some of us can’t live without Twitter!</p><p>So maybe, just maybe — <strong>we don’t see the full potential of Snapchat for programmers</strong> — I thought — and maybe, just maybe there is some potential. The starting problem is the typical chicken&amp;egg problem. Programmers won’t join Snapchat because there are no other programmers to follow and to start the lurking phase. There are no programmers posting anything technical to Snapchat because no one would find it useful.</p><p><strong>That’s why I decided to make an experiment. I will be that programming-oriented snapchatter who might be worth following at the beginning.</strong></p><p>I started posting snaps without knowing how to do it well. Then I made the experiment more public by <a href="https://www.reddit.com/r/ruby/comments/49teyb/a_ruby_programmerspeakerconforganizer_on_snapchat/">posting about it on /r/ruby</a> and by “promoting it” at our local Ruby conference — <a href="http://www.wrocloverb.com/">wroc_love.rb</a>. This way people could see some of the things organizers/speakers/attendees deal with during the conference. Surprisingly, this actually worked. People started to follow me and I quickly reached a level of ~60–70 views of my videos. Some other active developers joined as well and the conference had this hidden, ongoing topic of Snapchat. It was funny to see people sharing their snapcodes at the venue.</p><p>It’s hard to say how many people actually stayed with Snapchat. There were definitely some who quit very quickly. Snapchat can be very weird at the beginning and people are put off by the UX. Still, I keep the previous ratio of ~60–70 views per my video.</p><p>I don’t event want to declare that I will stay with Snapchat for much longer. I started to love it but this may change if there’s not many programmers around. What I can declare is that I will stay here for at least some weeks/months to give you the excuse to join and lurk. As long as you watch, I’ll be posting some dev-oriented content. If people are not watching then I’ll stop.</p><p>(This blogpost is not really a tutorial on how to use Snapchat UI. There’s some werid pleasure in discovering the Snapchat features along the way, which I don’t want you to skip :) Have fun!)</p><p>That’s actually one very cool thing about Snapchat. Posting to my story (you’ll learn quickly about it) is not as invasive as in other social media. If I post to <a href="http://twitter.com/andrzejkrzywda">my Twitter</a> and you’re one of my 3500 followers, then it will appear in your feed. If you post to FB, then some algorithm takes place, but chances are that my post will be also visible to you. This is natural to us, but Snapchat took a different way.</p><p><strong>Snapchat doesn’t really have the concept of a feed</strong> as we know it from other social media tools. The closest thing is the concept of stories. However, they’re not like one, big feed. Instead, they are simply a list of people you follow. If someone from the list posted anything recently, they will be at the top. This is a small thing at first, but it makes a big difference. You need to specifically tap on my name to see my updates. There’s nothing invasive here. For me, as the creator here it’s a cool thing. If I have a view from someone (I can see who watched the pic/video) then it means they actually were interested to see my content.</p><p>The fact that people need to specifically choose to see my updates creates another effect — a stronger attention than in other social media tools. This is also increased by the fact that all the things you post to your story disappear after 24 hours. At first, this puts people off. In the world, where disk space is almost free — why would you make things disappear? There’s some crazy thinking here, but this trick works very well in practice. First, if you know that things disappear, you put more attention to what people post. Second, you come back to the tool more often.</p><p>BTW, why are we thinking that it’s crazy that things disappear after 24h and we don’t think it’s crazy that whatever we post in other social tools stays forever in the internet?</p><p>From the creator point of view, knowing that things disappear creates less pressure on me. I don’t care if I have nice clothes or if my hair are OK. I just record and post and that’s it. They call it an ephemeral social media platform. It’s weird, but it has some nice effects.</p><p>As my friend Robert puts it — on Facebook people create their “perfect” image on their profiles. Before you post a photo, you check if it’s cool enough. The same with Instagram. Here, on Snapchat, it’s harder to be perfect. <strong>You are the more true you here</strong>. You just post. You don’t need to be perfect.</p><p>I’m quite active with blogging, but I’ve always had a hard time to produce a video. It wasn’t about being shy (well, partially), but more the “ceremony” needed to actually post something to YouTube. So many clicks and typing, just to post a 1-minute video. On Snapchat, it’s just one button to hold for 10 seconds, then one tap post to my story and that’s it — it’s live. Posting videos was never as easy for me.</p><p>There is the 10-seconds limit for a video. At first, it was a huge limitation to me. Then I learned two things:</p><ol><li>10 seconds limit forces you to make a point in a short way — good for the watchers</li><li>You can create a <strong>snapstorm</strong> — a series of snaps which watched together (as they usually do) make a lot of sense as a full story. There’s probably some limit to the number of snaps in such a snapstorm, but we’re talking about N 10-seconds videos which are easilly skippable (just tap).</li></ol><p>Snapchat can be used as a life sharing tool. I’m not using it that way. I post mostly dev oriented stuff, but I don’t post my family, my food. I may occasionally post photos from conference parties. I also post sometimes about chess which is my other passion. I try to find things that are similar in chess and programming and share the thoughts on Snapchat.</p><p>I’m a big fan of remote work, so I try to show a life of a remote company CEO — I live in the forest, so there’s some nature surrounding me that I like to post. In fact, most of my snapstorms is the talking-head format while I’m walking in my forest.</p><p>I’m no longer a full-time programmer, but I still spend a lot of time coding or reading other people code. Whenever I can I post pictures of that code to Snapchat (when it doesn’t violate the rights of our clients, of course). When I write some code of our internal projects, I like to show it to Snapchat.</p><p>I show some other parts of my “programming company CEO” life — writing blogposts. The post you’re reading was shown to snapchat several times before it was published. I document our progress with the new course we’re teaching — the Junior Rails Developer class (book/video/Slack based).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpqbOtwE-L78%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpqbOtwE-L78&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpqbOtwE-L78%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/de553b72f9be91151009282df3e1f55d/href">https://medium.com/media/de553b72f9be91151009282df3e1f55d/href</a></iframe><p>Snapchat creates this “behind the scenes” effect of many activities.</p><p>What do other fellow programmers post? Apart from posting code, they post how they brew coffee (many coffee geeks in my circles), how they run, how they go through the city.</p><p>I’ll now post some snapcodes and logins of people whom you may consider to follow. As everything with Snapchat, adding friends is difficult at first. In fact, there’s some effort required to find and add a friend. Here’s a good and short tutorial about adding friends:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-r0ItQPDupY%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-r0ItQPDupY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-r0ItQPDupY%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/18793275a8b806c8c3fec7d7cc61c8ed/href">https://medium.com/media/18793275a8b806c8c3fec7d7cc61c8ed/href</a></iframe><p>Let’s start with my snapcode. You can also add me by login: andrzejkrzywda or by tapping this link: <a href="http://snapchat.com/add/andrzejkrzywda">andrzejkrzywda</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cYK866CP_fzsJ-APGlc9cg.png" /></figure><h3>Developers on Snapchat</h3><p>Here is a list of other developers, whom I can recommend to follow at the beginning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FwRDFvP1j2bE4YQ5N1or6A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vogn6QySzqR0gCqKKGmTGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cVgz9BWAsEHWcIRbLvcTIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zgPwtnWFpbdxce9MaW9RNA.jpeg" /></figure><p>Now that you practiced scanning the snapcodes, let’s try another way — a link from mobile. If you have this post open on mobile, then tapping on the links below should add more developers to your friends:</p><p><a href="https://www.snapchat.com/add/rusilko">rusilko</a></p><p><a href="https://www.snapchat.com/add/mpraglowski">mpraglowski</a></p><p><a href="https://www.snapchat.com/add/peterccc">peterccc</a></p><p><a href="https://snapchat.com/add/siaw23">siaw23</a></p><p>If you happen to understand the Polish language, here are some more Polish-oriented, dev-oriented, snapchat users:</p><p><a href="https://www.snapchat.com/add/maniserowicz">maniserowicz</a></p><p><a href="https://www.snapchat.com/add/squixy.sln">squixy.sln</a></p><p><a href="https://www.snapchat.com/add/kolarzowski">kolarzowski</a></p><p>Apart from the developers, it might be worth following some other people to get inspired how they use Snapchat:</p><p><a href="https://www.snapchat.com/add/garyvee">garyvee</a> (it’s the Gary whom I mentioned several times already, a very inspiring marketing/sales person)</p><p><a href="https://www.snapchat.com/add/justinkan">justinkan</a> (the initial founder of JustinTV / Twitch, lots of startups related advices)</p><p><a href="https://www.snapchat.com/add/msuster">msuster</a> (a VC, lots of funding/investment advices)</p><p><a href="https://www.snapchat.com/add/hilzfuld">hilzfuld</a> (inspiring startup advices)</p><p><a href="https://www.snapchat.com/add/djkhaled305">djkhaled305</a> (this is the king of snapchat, a dj and a producer — if you want to really understand how celebrities use Snapchat, that’s the place to go)</p><p>(If you would like to be added to this list, feel free to comment with your snapcode or login)</p><h3>How can you help with the Snapchat experiment?</h3><ol><li>Install Snapchat</li><li>Share your login here in the comments [UPDATE: add yourself to <a href="https://devsnap.herokuapp.com/">https://devsnap.herokuapp.com</a> ]</li><li>Follow me and other developers listed there (I will follow you back)</li><li>Find interesting ways to share programming oriented knowledge on Snapchat. Maybe it’s explaining some concepts on the video? (people seem to like it the most) Maybe post pictures of some code snippets?</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84f5aee42e1c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/planet-arkency/snapchat-for-programmers-84f5aee42e1c">Snapchat for programmers</a> was originally published in <a href="https://medium.com/planet-arkency">Planet Arkency</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I lost trust to programmers when I was 13]]></title>
            <link>https://medium.com/planet-arkency/how-i-lost-trust-to-programmers-when-i-was-13-91624fd3fa7b?source=rss-8b68c5f5d76c------2</link>
            <guid isPermaLink="false">https://medium.com/p/91624fd3fa7b</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Andrzej Krzywda]]></dc:creator>
            <pubDate>Thu, 21 Jan 2016 10:21:43 GMT</pubDate>
            <atom:updated>2016-01-21T10:21:43.146Z</atom:updated>
            <content:encoded><![CDATA[<p>My first programming jobs started when I was 19. However, this wasn’t my first contact with the IT market. It’s only now that I realise that <strong>I was a a CTO when I was 13 years old</strong>!</p><p>When I was 13, my parents already ran a small business. The business started with a grocery store but later evolved into a grocery stores supplier. About 20 people working in 3 different locations. At the beginning my role wasn’t very big — help with handling the customers, unpacking products from the deliveries, cleaning the warehouse. Nothing special.</p><p>In 1993 there was a big change in the Polish industry/economy. The VAT tax was introduced. Until that time the paper work around running such businesses was not complicated. This fact, though, changed a lot. What was possible before with just accountants dealing with the papers was now so complicated that it required computers and a software.</p><p>Guess who was the best computer specialist in our company at that time? You’re right — it was the 13 year old Andrzej. Me.</p><p>Suddenly my role in the company changed significantly. I became the CTO (I didn’t know back then — If I knew maybe I would asked for some benefits). My programming experience was close to 0 — retyping the BASIC code listings from a programming magazine to my Atari 800 XL doesn’t really count as programming, right?</p><p>First, we had to make a tender — from whom can we buy the required software?</p><p>Different sales people were invited to us or we visited them. <strong>Their sales process involved convincing a 13-yr old that their software is best.</strong> My domain knowledge was close to 0 (it’s even now that I have a hard time understanding the sense of the VAT tax, but that’s another topic…), my programming knowledge was non-existing. They had a hard time, I had a hard time.</p><p>Finally, thanks to recommendations, we have chosen a software built by a small company. Their only programmer was Mr. Krzysztof. He managed to build the software which was fully compatible with the law (the main requirement) and also was easy to understand so that a 13yr old can use it.</p><p>We agreed to work together and the software was put in use in our company. Mr. Krzysztof implemented some changes suggested by me and it was all ready to use. The whole process was actually very smooth. Back then I felt that’s the way it should be. <strong>I didn’t see anything unusual in the fact that the software “just worked”.</strong></p><p>My role as the CTO was reduced to just managing some small improvements, always implemented by the programmer. I also learnt all the important procedures, like backups, choosing the right hardware, fixing the printer.</p><p>BTW, it’s worth noting that the backups were made on the 5 1/4 floppy disks looking like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/0*TSWgoJ_Fl3rpyZnB.jpg" /></figure><p>Choosing the hardware was also fun. Being 13 I was smart enough to care what games are available. The first machine was a 286 PC, able to run the legendary SimCity 1.0.</p><p>During the day (it was still the summer school break), I was working at the office. During the night I was playing SimCity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*tt45VYeuB7R2sbYF.png" /></figure><p>During the day, I was using the software to sell our products to the customers. I knew exactly how to improve the UI and Mr. Krzysztof was happy to implement it. He was often coming to our company with a big luggage containing a computer — he had a laptop back in 1993!</p><p>Some of the changes he actually implemented while talking to me. He opened this thing with a blue background (I think it was Borland Pascal), implemented the change, compiled, copied the files to a floppy disk, inserted the disk to our computer, copied the files locally and restarted the software. Continuous delivery, right?</p><p>It was obvious to me that things just work. They should work. The programmer is very intelligent, computers don’t make mistakes — why should anything break?</p><p>And then it happened.</p><p>I was talking with our customer, handling their order. They specifically chose the kind of cookies they want to buy for their store. I added it in the software, took the money, printed the invoice. I gave it to the storeroom employees, as always. There was no next customer, so I launched SimCity.</p><p>Suddenly, the customer is back. She claims that I made a mistake. They wanted cookies, but they got the mineral water. I looked at the invoice. Yes, it’s the mineral water. How did it happen? I’m sure I selected the cookies. Back to the software, display the order. It’s cookies here.</p><p>WTF?</p><p>Printing it again, it’s the water now.</p><p>WTF?</p><p>The foundations of my worldview were shaken at this moment.</p><p>“Mr. Krzysztof, can you confirm that this is a mistake in the software?” <br>“Yes, I’m sorry about that. It’s now fixed.”</p><p>I didn’t care that much about the fix. I didn’t care about the apologies.<br>It was like losing a friend.</p><p>I didn’t want to accept the fact that programmers can make mistakes.</p><p><strong>I lost my trust to programmers that day.</strong></p><p>If this happened once, it can happen again. What confidence can I have in the software?</p><p><strong>How can I believe that the software won’t make me an idiot in the front our customers again?</strong></p><p>“Dad, I think we need to consider changing the software we use. We can’t trust the current one.”</p><p>I was exaggerating. Now I know it.</p><p>The thing is, Mr. Krzysztof was a genius programmer. He made only this one mistake. After that I don’t remember anything serious. Over the next years, he evolved the software to support client-server architecture (thanks to this we had a computer at home now and I could spend nights playing SimCity at home and not in the office). He managed to extend the software to support different locations. <br>I know companies which still use that exact software until this day — 23 years later!</p><p>It just works.</p><p>Is there any lesson here?<br>I wouldn’t draw any conclusion from a 13-yeard old me.</p><p><strong>But, as programmers, it’s worth remembering that it’s easy to lose the trust of our customers, our users. A trust that is once lost is hard to rebuild.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91624fd3fa7b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/planet-arkency/how-i-lost-trust-to-programmers-when-i-was-13-91624fd3fa7b">How I lost trust to programmers when I was 13</a> was originally published in <a href="https://medium.com/planet-arkency">Planet Arkency</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Which version of this Ruby code would you prefer to see in your codebase?]]></title>
            <link>https://medium.com/planet-arkency/which-version-of-this-ruby-code-would-you-prefer-to-see-in-your-codebase-45d0558031e2?source=rss-8b68c5f5d76c------2</link>
            <guid isPermaLink="false">https://medium.com/p/45d0558031e2</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Andrzej Krzywda]]></dc:creator>
            <pubDate>Fri, 27 Nov 2015 23:06:36 GMT</pubDate>
            <atom:updated>2015-11-27T23:06:36.414Z</atom:updated>
            <content:encoded><![CDATA[<p>Which version of this Ruby code would you prefer to see in your codebase?</p><pre>  def properties_names_hash<br>    out = {}<br>    properties.each do |property|<br>      out[property.name] = property.original_name<br>    end<br>    out<br>  end</pre><p>or</p><pre>def properties_names_hash<br>  properties.each_with_object({}) do |property, memo|<br>    memo[property.name] = property.original_name<br>  end<br>end</pre><p>Coming from Java to Ruby, it was always more natural to me to think about the code in terms of the first snippet. Over time, I switched to the other way of thinking.</p><p>I can obviously understand both, but I think the second one a bit more easy to read. Also, the first one is using a local variable which sometimes is a code smell. If there’s a way of not using a local variable (especially one that is a mutable local variable), then I prefer such way.</p><p>What are your thoughts on that?</p><p>Only this weekend we have the biggest promotion for our Ruby/Rails/React.js books — 40% off with the code BLACKFRIDAY2015</p><p>Grab the books here: <a href="http://blog.arkency.com/products/">http://blog.arkency.com/products/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45d0558031e2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/planet-arkency/which-version-of-this-ruby-code-would-you-prefer-to-see-in-your-codebase-45d0558031e2">Which version of this Ruby code would you prefer to see in your codebase?</a> was originally published in <a href="https://medium.com/planet-arkency">Planet Arkency</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Remote work]]></title>
            <link>https://medium.com/planet-arkency/remote-work-d4124c835e30?source=rss-8b68c5f5d76c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4124c835e30</guid>
            <dc:creator><![CDATA[Andrzej Krzywda]]></dc:creator>
            <pubDate>Mon, 30 Dec 2013 16:50:49 GMT</pubDate>
            <atom:updated>2013-12-31T12:41:04.222Z</atom:updated>
            <content:encoded><![CDATA[<h4>More time for me, more time for my family</h4><p>It’s now more than 6 years, since I started working from home.</p><p>Meanwhile, I started a company, moved several times, got married, have kids, started teaching at the university. Everything has changed, but this aspect of my life hasn’t changed — I keep working from home.</p><p>Remote work is a blessing for my life.</p><p><strong>I can choose when I work</strong> (async work), so I try to schedule it the way that fits best to our family life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*YV5i9r2yAqwaFhOJdmy5Qw.jpeg" /><figcaption><a href="http://www.flickr.com/photos/kkirugi/">http://www.flickr.com/photos/kkirugi/</a></figcaption></figure><p><strong>I can choose where I work</strong>. In our case, we’re living in a small village, near a forest and looking at a small deer through my window is nothing unusual. When it’s too quiet, I go to one of the bigger cities around me (15m or 1h car drive) and work from there.</p><p><strong>I can choose how I work</strong>. It’s my decision if I want to get interrupted by my teammates (via IM) or if I want to have silence and focus on my current task.</p><p>It wasn’t an easy process. I made many mistakes along the way.</p><p>It’s hard to find the life-work balance. Not having to commute everyday is fine, but commuting and office work means more social life, more interaction with people. It also means that without really thinking about it, you’re moving a lot. It’s good for your body, good for your shape.</p><p>There’s many little things that are taken care for you, when you work in the office every day. You need to care about them on your own, when working from home.</p><p>It took me years to develop some healthy habits around such lifestyle.</p><p><strong>It was so worth it!</strong></p><p>What about you? Is there anything that worries your about working from home?</p><p><em>(If you’re a developer interested in remote working, I often tweet about such topics at </em><a href="https://twitter.com/andrzejkrzywda"><em>https://twitter.com/andrzejkrzywda</em></a><em>)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4124c835e30" width="1" height="1" alt=""><hr><p><a href="https://medium.com/planet-arkency/remote-work-d4124c835e30">Remote work</a> was originally published in <a href="https://medium.com/planet-arkency">Planet Arkency</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>