Today I Learned

TIL, 2018-08-02

Don’t Let the Spotlight Effect Your Startup Goals

Reference

  • The best kind of feedback comes from the users.
  • People tend to believe that more people take not of their actions and appearance than is actually the case. People tend to believe that the social spotlight shines more brightly on them than it really does.
  • Consider the opposite outcome: if the attention thing is true positively, then it is also true negatively: if your startup had a large amount of negative press, then it wouldn’t really affect you that much.
  • A lot of people will read the headline, fewer will read the article, and fewer will use the product.
  • Check feedback from people outside your company and your industry
  • Shut out and ignore the noise to make it easier to ignore the negative effects of the spotlight.

SLAP Your Methods and Don’t Make Me Think!

Reference

  • Same level of abstraction principle.
 public MarkdownPost(Resource resource) {
        try {
            this.parsedResource = parse(resource);
            this.metadata = extractMetadata(parsedResource);
            this.url = "/" + resource.getFilename().replace(EXTENSION, "");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
  • The constructor has different levels of abstraction. Just create another abstraction that generates the url.
public MarkdownPost(Resource resource) {
        try {
            this.parsedResource = parse(resource);
            this.metadata = extractMetadata(parsedResource);
            this.url = urlFor(resource);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    private String urlFor(Resource resource) {
        return "/" + resource.getFilename().replace(EXTENSION, "");
    }
  • Comments:
    • Also use a factory, don’t raise error in the constructor

Musings

  • Optimize for readability
  • Heroku commands?
  • Leader and followers
  • Multiple create at the same time:
    • You can reduce latency by putting them in a transaction.
    • Performance wise, it’s pure SQL, but it’s also hard to read.
  • RSpec for Atom

This project is maintained by daryllxd