Skip to content

2 min readLoading views

Animation tips and Boris Cherny On How His Career Grew

Two copy buttons, one with easing and one without, show why natural motion matters.

Animation Tips

One of key takeaways from my animation studies is the importance of natural motion. By fine-tuning easing and duration, we create a sense of physics that feels natural to the user. Every property we animate shapes the overall user experience.

For example, compare these two copy button implementations - click each button to see the difference:

View only
import { useState } from 'react';const Copy = () => (  <svg    xmlns="http://www.w3.org/2000/svg"    viewBox="0 0 24 24"    fill="none"    style={{ width: '100%', height: '100%' }}  >    <path      d="M9 9V5.25C9 4.00736 10.0074 3 11.25 3H18.75C19.9926 3 21 4.00736 21 5.25V12.75C21 13.9926 19.9926 15 18.75 15H15M12.75 9H5.25C4.00736 9 3 10.0074 3 11.25V18.75C3 19.9926 4.00736 21 5.25 21H12.75C13.9926 21 15 19.9926 15 18.75V11.25C15 10.0074 13.9926 9 12.75 9Z"      stroke="currentColor"      strokeWidth="2"      strokeLinecap="round"      strokeLinejoin="round"    />  </svg>);const Checked = () => (  <svg    xmlns="http://www.w3.org/2000/svg"    viewBox="0 0 24 24"    fill="none"    style={{ width: '100%', height: '100%' }}  >    <path      fillRule="evenodd"      clipRule="evenodd"      d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z"      fill="currentColor"    />  </svg>);const styles = {  container: {    display: 'flex',    alignItems: 'center',    justifyContent: 'center',    gap: 40,    height: 200,    padding: 24,    background: '#fafafa',  },  demo: {    display: 'flex',    flexDirection: 'column',    alignItems: 'center',    gap: 16,  },  iconWrapper: {    position: 'relative',    width: 24,    height: 24,    cursor: 'pointer',    color: '#4b5563',  },  iconFade: {    position: 'absolute',    inset: 0,    transition: 'all 300ms cubic-bezier(0.215, 0.61, 0.355, 1)',  },};// Without Animation - just swap icons instantlyfunction CopyButtonNoAnimation({ copied, onCopy }) {  return (    <div style={styles.iconWrapper} onClick={onCopy}>      {copied ? <Checked /> : <Copy />}    </div>  );}// With Animation - smooth fade and scale transitionsfunction CopyButtonWithAnimation({ copied, onCopy }) {  return (    <div style={styles.iconWrapper} onClick={onCopy}>      <div        style={{          ...styles.iconFade,          opacity: copied ? 0 : 1,          transform: copied ? 'scale(0.8)' : 'scale(1)',        }}      >        <Copy />      </div>      <div        style={{          ...styles.iconFade,          opacity: copied ? 1 : 0,          transform: copied ? 'scale(1)' : 'scale(0.8)',        }}      >        <Checked />      </div>    </div>  );}export default function App() {  const [copiedLeft, setCopiedLeft] = useState(false);  const [copiedRight, setCopiedRight] = useState(false);  const handleCopyLeft = () => {    setCopiedLeft(true);    setTimeout(() => setCopiedLeft(false), 1500);  };  const handleCopyRight = () => {    setCopiedRight(true);    setTimeout(() => setCopiedRight(false), 1500);  };  return (    <div style={styles.container}>      <div style={styles.demo}>        <CopyButtonNoAnimation copied={copiedLeft} onCopy={handleCopyLeft} />      </div>      <div style={styles.demo}>        <CopyButtonWithAnimation copied={copiedRight} onCopy={handleCopyRight} />      </div>    </div>  );}
Output
Press Run to see the output here.The first run downloads the React engine, about 200 kB.

The animated version creates a smoother, more polished user experience by:

  • Using opacity transitions for fade in/out effects
  • Adding scale transforms for a subtle zoom effect
  • Applying a custom cubic-bezier easing function for natural motion

Boris Cherny On How His Career Grew

Boris Cherny is a creator of Claude Code, he recently joined a interview, it's really awesome interview, I recommend it to anyone who works on product development every day. here are my takeaways

  • The most influential engineering book he read is 《Functional Programming in Scala》. Although not everyone will have the chance to use Scala at work, he mentioned that it offers a new way to think about problems in code. He prioritizes type signatures over implementation. If the types (the "blueprint") are defined correctly, the logic (the "bricks") will naturally be clean and robust.

  • Software engineers can gain significant leverage by automating any task they find repetitive. Boris suggests identifying these opportunities by logging recurring feedback during code reviews; once a specific issue appears multiple times, he writes a lint rule for it.

  • He analyzes patterns in system failures via post-mortems and develops automated unit tests to prevent them. and he emphasizes, engineers must remain "anchored to reality" by continuing to code, applying the "Rule of Three": if you encounter a friction point three times, it is time to automate it.

  • Every time Boris switched teams, he acted as if he were starting from scratch. He spent his first weeks coding heavily and mapping out the organization. In a meritocracy, you must re-earn your authority with every new move, regardless of your past success.

  • Situational Awareness: Don’t just give orders. Understand the other person's incentives. If you can frame your goal as a solution to their problem, you win their support automatically.

Loading likes