Skip to content

Latest commit

 

History

History
519 lines (327 loc) · 10.4 KB

File metadata and controls

519 lines (327 loc) · 10.4 KB
title theme highlightTheme revealOptions
How to lose users and alienate developers
black
tomorrow-night-bright
transition controls progress autoPlayMedia
fade
false
false
true

How to lose users & alienate developers

PragueJS, April 2022


Superface


Developers
=
Users


Developer Experience
=
User Experience


Documentation
APIs
Packages


vidbg: https://giphy.com/gifs/g-help-11Wkoq2MaUbLXi


How to win users & make developers happy


vidbg: https://media.giphy.com/media/tmQrpA8zpG4a16SSxm/giphy.gif


How to lose users & alienate developers

Jan Vlnas, Devil's Advocate 😈

How to lose users & alienate developers

Jan Vlnas, Devil's Advocate 😈

Why?


  • Open-source = portfolio 👍
  • People may use it 🤷
  • Users demand fixes 😫
  • Users demand features 😡

Goal


vidbg: https://media.giphy.com/media/11bsDL7acBaiKk/giphy.gif


vidbg: https://media.giphy.com/media/clnjwheMYqCpDBsDiW/giphy.gif


vidbg: https://giphy.com/gifs/angry-spongebob-squarepants-strong-D7z8JfNANqahW


  • Docs
  • Interfaces
  • Packages

Docs



vidbg: https://media.giphy.com/media/3DzwbT4oF52JG/giphy.gif


Do this ✅

  • fancy words
  • jargon
  • emphasize simplicity

“revolutionary”

“sophisticated”

“unparalleled”


“DLTs promise to revolutionize business ecosystems by permitting secure transactions without intermediaries.”


[redacted] is a universal API client which provides an unparalleled developer experience for every HTTP API.”
OneSDK is a universal API client which provides an unparalleled developer experience for every HTTP API.”

vidbg: https://media.giphy.com/media/3oEjHD20zWeDvGWoF2/giphy.gif


“Just simply install FooBar”


“Just one simple SDK for all the APIs you want to integrate with.”


vidbg: https://media.giphy.com/media/z7c0AbqdRR2XS1FwTj/giphy.gif


Examples without reference


Reference without examples



Interfaces


Do this ✅

  • avoid consistency
  • expose complexity

{
  "page_count": 1,
  "page_size": 25,
  "total_items": 3,
  "bookings": [
    {
      "arrivalDate": "2022-11-01",
      "departureDate": "2022-12-03",
      "reference-id": null,
      "created-at": "2020-01-03 13:51",
      "guest-name": "Harry Potter",
      "check-in": "16:00",
      "check-out": "10:00",
      "price-paid": "Yes",
      "prepayment-paid": "No"
    }
  ]
}

✅ camelCase

✅ snake_case

✅ kebab-case


If the domain is hard, users should feel the pain.


vidbg: https://media.giphy.com/media/saAZVlxwMPOW4/giphy.gif


/v2/organizationAcls?q=roleAssignee&state=APPROVED&role=ADMINISTRATOR&count=100projection=(paging,elements(*(organization~(id,localizedName,vanityName, logoV2(cropped~:playableStreams)))))
api.linkedin.com /v2/organizationAcls?q=roleAssignee&state=APPROVED&role=ADMINISTRATOR&count=100&projection=(paging,elements(*(organization~(id,localizedName,vanityName, logoV2(cropped~:playableStreams)))))

{
  "specificContent": {
    "com.linkedin.ugc.ShareContent": {
      "shareMediaCategory": "LIVE_VIDEO",
      "shareCommentary": {
        "attributes": [],
        "text": ""
      },
      "media": [
        {
          "media~": {
            "paging": {
              "count": 10,
              "start": 0,
              "links": []
            },
            "elements": [
              {
                "artifact": "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C4D24AQGPmrEiJ7bLXw,urn:li:digitalmediaMediaArtifactClass:feedshare-live-vod-ambry-analysis)",
                "authorizationMethod": "PUBLIC",
                "data": {
                  "com.linkedin.digitalmedia.mediaartifact.Video": {
                    "videoStreams": []
                  }
                }
              }
            ]
          }
        }
      ]
    }
  }
}

vidbg: https://media.giphy.com/media/0760zVJuQ85FJktjhg/giphy.gif


Packages


Do this ✅

  • embrace dependencies
  • make a statement
  • get rich and (in)famous

DRY




Disk Drive Storage Price Decreasing with Time (October, 2021)


< $ 0.01

per megabyte


Unused RAM is wasted RAM.




vidbg: https://media.giphy.com/media/V4NSR1NG2p0KeJJyr5/giphy.gif


Make a

statement


function foo(str, len, ch) {
  str = String(str);
  var i = -1;
  if (!ch && ch !== 0) ch = " ";
  len = len - str.length;
  while (++i < len) {
    str = ch + str;
  }
  return str;
}

module.exports = leftpad;
function leftpad(str, len, ch) {
  str = String(str);
  var i = -1;
  if (!ch && ch !== 0) ch = " ";
  len = len - str.length;
  while (++i < len) {
    str = ch + str;
  }
  return str;
}

Summary; NPM is no longer a place that I’ll share my open source work at, so, I’ve just unpublished all my modules.

— Azer Koçulu: I’ve Just Liberated My Modules


left-pad


uWebSockets.js


uWS’s author, in some kind of childish act of vengeance, tried to break dependent libraries and services by publishing an empty version of the module… the team behind NPM manually removed it and locked the package

— Manuel Astudillo, Beware of uWebsockets.js!


Protestware


the malicious code, committed […] by the dev, would read the system's external IP address and only delete data by overwriting files for users based in Russia and Belarus.

­— BIG sabotage: Famous npm package deletes files to protest Ukraine war


  • colors & faker
  • node-ipc
  • event-source-polyfill

vidbg: https://media.giphy.com/media/l2Sq9qGTQnL5NyI6Y/giphy.gif


event-stream

  • popular, but abandoned package ✅
  • new volunteer maintainer ✅
  • new, innocent subdependency ✅
  • injection into published, minifed code ✅

A post-mortem of the malicious event-stream backdoor


Inspiration


Stealing

Surprise open-source sponsorship


How do you alienate developers?


/s


@janvlnas

jan.vlnas.cz

superface.ai


Resources


Docs


API


Packages