Practices Icon

Practices

Development and business practices, methodologies, workflows, etc.
75 Stories
All Topics

Yegor Bugayenko yegor256.com

Code must be clean. And clear.

Yegor applies a kitchen metaphor to code: The kitchen is clean when there is no dirt in the oven. But if its electric panel speaks French, I can’t use the kitchen. Even if it’s perfectly clean. It’s not clear how to use it—that’s why it’s useless. Sounds good to me, but how do you know if your code is actually clean and clear? He provides a heuristic: If a stranger can modify your code and fix a bug in less than an hour, it is maintainable. The entire post is well worth a read.

read more...

JavaScript github.com

You probably don't need Moment.js

When you pull in a library dependency, it is rare that you need all of the functionality it offers. This isn't usually a problem for backends, because that code never leaves the server. However, In frontend-land your users pay the price for all that unused functionality every time they hit your website with a cold cache. Moment.js is an excellent date/time library. It is packed with functionality, and you probably don't need everything it has to offer. Instead, check out date-fns, which offers small, highly targeted functions you can probably get by with. There's even an ESLint plugin that will help you identify places in your codebase where you don't really need Moment.js!

read more...

Lorenzo Pasqualis coderhood.com

15 ways to achieve flow

What is flow? ...a state of mental flow. Programmers live for it and work at their peak potential when they are in it. Also known as “the zone,” Flow is the mental state of operation in which a programmer is immersed in a feeling of energized focus, complete involvement, and enjoyment in the process of coding. Here's a challenge — read this and apply just one idea to your work this week and report back in Slack how your work was impacted, positive or negative.

read more...

Practices programmingisterrible.com

Repeat yourself, do more than one thing, and rewrite everything

This contrarian post comes by way of the aptly named programmingisterrible.com. It's a bit ranty, but I rather enjoy the author's tone: If you ask a programmer for advice—a terrible idea—they might tell you something like the following: Don’t repeat yourself. Programs should do one thing and one thing well. Never rewrite your code from scratch, ever! He'll take you step-by-step through why he thinks these generally accepted principles are often mistakes.

read more...

Eric Clemmons Medium

Work on features, not repositories

In response to a recent Twitter poll from Kent C. Dodds, Eric Clemmons shared concerns about how organizational boundaries are impacting where development happens. Kent tweeted... Hey folks who have a decoupled client-server application (no server rendering, server is just an API server). Where is your client code and server code located? (#) Together in one repo? In separate repos? Eric writes in his response on Medium: Software is like Jello: poke it in one place, and another place jiggles. In my experience, a repository should house all of the code necessary to make developing & shipping features relatively frictionless. This isn't an exact 1:1, but this was a big part of the reason why Segment transitioned back to a monorepo.

read more...

Yegor Bugayenko yegor256.com

Builders and manipulators

Yego Bugayenko: Here is a simple principle for naming methods in OOP, which I'm trying to follow in my code: it's a verb if it manipulates, it's a noun if it builds. That's it. Nothing in between. Methods like saveFile() or getTitle() don't fit and must be renamed and refactored. Moreover, methods that "manipulate" must always return void, for example print() or save(). Let me explain. Naming objects well has been a career-long struggle for me. I just might give this a try...

read more...

Martin Fowler martinfowler.com

The state of agile software in 2018

Martin Fowler reflects on the journey of agile software development... Our challenge at the moment isn't making agile a thing that people want to do, it's dealing with what I call faux-agile: agile that's just the name, but none of the practices and values in place. Ron Jeffries often refers to it as "Dark Agile", or specifically "Dark Scrum". This is actually even worse than just pretending to do agile, it's actively using the name "agile" against the basic principles of what we were trying to do, when we talked about doing this kind of work in the late 90s at Snowbird. The three main challenges we should focus on are: fighting the Agile Industrial Complex and its habit of imposing process upon teams, raising the importance of technical excellence, and organizing our teams around products (rather than projects).

read more...

Hongli Lai gdprbusters.com

Top GDPR questions for developers and startups

Prominent startup/developer forum Hacker News has shown us how shaken these two groups were. Most GDPR articles received hundreds of upvotes and comments. The reactions had a feeling of mass hysteria. This motivated me to embark on a mission to bring knowledge and peace of mind to the software developer and startup world. ... I initiated a number of AMAs -- Ask Me Anything discussions -- on a variety of forums. Here are the top questions I received... Hongli went on to answer questions like "Where do I begin with making sense of GDPR and what to tackle first?", "What are the most valuable online resources for getting actionable advice?", "Given that you have no business presence or interest in the EU, what is the worst thing that can happen if you're not compliant?" ...

read more...

Alex Ershov DEV.to

Node.js error handling patterns demystified (with examples)

Error handling in an asynchronous language works in a unique way and presents many challenges, some unexpected. There are seven main error handling patterns in Node.js. Let's briefly check them all. I'm not sure if this post serves to demystify all of these techniques, but it's definitely a nice, quick overview of the different patterns.

read more...

Mihai A amihaiemil.com

Logic should hide in plain sight

If we get rid of the concept of "model objects", then there should be very little (almost zero) space for procedural code/algorithms in our codebase, since each object is a component that has its well-defined place in the bigger picture. The following question arises: where does the "business logic" go? The answer is: business logic should be visible in how objects are wrapping/composing each other, rather than being visible in a 200 LoC method of some "service" class.

read more...

Increment Icon Increment

A primer on documentation content strategy

Do you have documentation? Do you have a documentation content strategy? No?!! If you want to create guides for your software, having a solid content strategy can help you write useful content. This article will walk you through how to develop that strategy, whether you’re an engineer or a technical writer, new to writing documentation or just looking to get more strategic about it.

read more...

Brian Krebs krebsonsecurity.com

Reddit breach highlights limits of SMS-based authentication

The cause is a 2FA fail with either SIM security or a mobile number port-out scam as the point of failure. Brian Krebs writes for KrebsOnSecurity: Of particular note is that although the Reddit employee accounts tied to the breach were protected by SMS-based two-factor authentication, the intruder(s) managed to intercept that second factor. In one common scenario, known as a SIM-swap, the attacker masquerading as the target tricks the target’s mobile provider into tying the customer’s service to a new SIM card that the bad guys control. Another typical scheme involves mobile number port-out scams, wherein the attacker impersonates a customer and requests that the customer’s mobile number be transferred to another mobile network provider. Were you exposed? ...between June 14 and 18 an attacker compromised several employee accounts at its cloud and source code hosting providers. Reddit said the exposed data included internal source code as well as email addresses and obfuscated passwords for all Reddit users who registered accounts on the site prior to May 2007. The incident also exposed the email addresses of some users who had signed up to receive daily email digests of specific discussion threads.

read more...

Lara Hogan larahogan.me

Lara Hogan's guide to writing a "Week in Review" doc

The important thing to remember about leading is you have to have clear lines of communication with those you lead. I love the ideas Lara shared in this guide to writing a "week in review" team update. This doc helped me set records straight, disseminate info to lots of people at once, and open up conversation internally, while reflecting on the themes that had come up in weekly one-on-ones, backchannels, team meetings, etc. What I chose to write about each time widely varied. Though the teams who reported to me were the primary audience for this doc, I kept it internally-public, meaning that anyone at the company could read and comment in it. I found that some other managers just weren’t talking about hard things that were happening...

read more...

Tigran Hakobyan freeCodeCamp

Reflections on being a remote developer

Tigran Hakobyan, remote software engineer at Buffer, writes on the freeCodeCamp blog: Working remotely is very different from working in the office. I don’t think you fully grasp the difference until you actually start being remote. For someone like me who never worked in a remote environment, the beginning wasn’t smooth and it came with challenges. I can clearly remember my very first day at Buffer... Tigran also shares a pretty comprehensive breakdown of a typical workday.

read more...

Drew Devault drewdevault.com

Git is already federated & decentralized

In the wake of Microsoft's acquisition of GitHub, the murmurs of replacing GitHub with something decentralized have been getting louder. In this article, Drew Devault points out that email-based git workflows are A Thing and one that works quite well. In particular, this blog post is a direct response to forge-net (formerly known as GitPub). They want to federate and decentralize git using ActivityPub, the same technology leveraged by Mastodon and PeerTube. But get this: git is already federated and decentralized! Drew has skin in the game via his sr.ht platform, and intends to make git send-email support a first-class citizen on it. Lots of interesting ideas at play here. After all these years is email still the web's killer app?

read more...

Dion Almaer Medium

On a mission to improve the web ecosystem for developers

Dion Almaer (Google) writes on the Ben and Dion Medium publication: A few teams within Google have joined forces inside Chrome to focus on improving the Web ecosystem, focused on those who build experiences, and create on the Web. We want to make high quality experiences easy to build as that will enable more meaningful engagement on the Web for users and developers alike. This is an awesome breakdown of all the components required to deliver meaningful engagements and a roadmap to the future of the web platform.

read more...

Chris Coyier CSS-Tricks

View source?

I have to agree with this hard-line stance from Chris Coyier on the subject of view source: I literally don't care at all about View Source and wouldn't miss it if it was removed from browsers. I live in DevTools, and I'll bet you do too. I want my website to arrive at light speed on a tiny spec of magical network packet dust and blossom into a complete website. Or do whatever computer science deems is the absolute fastest way to send website data between computers. I'm much more worried about the state of web performance than I am about web education. But even if I was very worried about web education, I don't think it's the network's job to deliver teachability. What about you? Is view source more important than web performance? Is DevTools a worthy replacement for view source? Chris also cites comments on the subject from Tom Dale, Jonathan Snook, and Chris Heilmann.

read more...

Azeria azeria-labs.com

The importance of deep work

This is an interesting 30-hour method for learning a new skill from Azeria Labs (aka Azeria). If you're a fan of flow and you'd like to learn how to apply it to learning a new skill, check this out. We also know and have experienced the feeling of flow. The moment when you’re fully focused on a task. You lose all sense of time, and everything seems to flow effortlessly; you forget everything around you and have a feeling of control over the task. This rewarding feeling of flow is best described by Psychologist Mihaly Csikszentmihalyi: “The best moments usually occur when a person’s body or mind is stretched to its limits in a voluntary effort to accomplish something difficult and worthwhile.”

read more...

Ives van Hoorne Medium

VSCode themes in CodeSandbox?

Ives van Hoorne writes on Medium: Personalizing color schemes is one of the most important things to have in an code editor. CodeSandbox didn’t have any way to personalize colors in the editor since release, but I’m happy to announce that we do now. The best part is that we were able to reuse a big chunk of logic from VSCode directly and also support any VSCode theme natively in CodeSandbox!

read more...

Segment Icon Segment

Segment says goodbye microservices

This is Segment's story from monorepo to microservies back to monorepo — "from 100s of problem children to 1 superstar child." Software Engineer Alexandra Noonan writes on the Segment Engineering blog: As time went on, we added over 50 new destinations, and that meant 50 new repos. To ease the burden of developing and maintaining these codebases, we created shared libraries to make common transforms and functionality ... Over time, the great benefit we once had of reduced customization between each destination codebase started to reverse. Eventually, all of them were using different versions of these shared libraries. The woes of operational overhead with each expansion into more microservices. The number of destinations continued to grow rapidly, with the team adding three destinations per month on average, which meant more repos, more queues, and more services. With our microservice architecture, our operational overhead increased linearly with each added destination. Therefore, we decided to take a step back and rethink the entire pipeline. One of the original motivations for separating each destination codebase into its own repo was to isolate test failures. However, it turned out this was a false advantage. With destinations separated into their own repos, there was little motivation to clean up failing tests. I'd love to dig into this story more on The Changelog with the team behind this transition back to a monolith and discuss the deeper details of their lessons learned.

read more...

Gabriel Peal Medium

React Native at Airbnb

This epic four part series from the Airbnb engineering blog showcases how React Native was used at Airbnb to enable their teams to move quickly and maintain a great developer experience. However, in the end, they decided to sunset React Native and focus on native — but their journey to that conclusion is well worth a read. Part 4: Sunsetting React Native — Although many teams relied on React Native and had planned on using it for the foreseeable future, we were ultimately unable to meet our original goals. In addition, there were a number of technical and organizational challenges that we were unable to overcome that would have made continuing to invest in React Native a challenge. As a result, moving forward, we are sunsetting React Native at Airbnb and reinvesting all of our efforts back into native. It's not all bad though. 63% of their engineers would have chosen React Native again given the chance and 74% would consider React Native for a new project. Gabriel went on to say: React Native is progressing faster than ever. There have been over 2,500 commits in the last year and Facebook just announced that they are addressing some of the technical challenges we faced head-on. Even if we will no longer be investing in React Native, we’re excited to continue following its developments. For a different perspective read Should we use React Native? — a follow-up post to this four part series.

read more...
0:00 / 0:00