[ˈfɔːwədˌθɪŋkɪŋ]

Author: pmoelgaard

Retrieving the currently authenticated user in a Loopback Application can be done in many ways, and one of them is the one I want to share in this post.

I wanted to be able to utilise the Angular SDK as well as the Explorer, so adding a routing manually in a boot script was not really an option, however simple that might be, so I decided to opt for implementing it as a custom Model.

The first thing to do is to create a whoami.json and whoami.js file in the commons directory.

While getting one’s hands dirty with Sequelize, it can be useful to have access to the documentation, so even it’s relatively simple I decided to wrap the documentation for Sequelize in a docSet for Dash…

In addition to the recent Moment and Async docSet for Dash, I have created a third docSet distribution, this time for the cool library Bookshelf which is pretty cool Node.js ORM for PostgreSQL, MySQL and SQLite3 in the style of Backbone.js.

Created by Tim Griesser, its just one project in the line of many which is solving every day issues with elegance and efficiency… Currently its the same approach as with Moment and Async, where its merely an embedded version of the online documentation…

I have decided to add all the documentation I’m using to my setup for offline access, for this I’m using Dash (Dash is an API Documentation Browser and Code Snippet Manager).

Dash is the same docSet standard used by Zeal (“…a simple offline API documentation browser inspired by Dash (OS X app), available for Linux and Windows”, http://zealdocs.org/).

For my first docSet I chose to make the documentation for Moment.js available (a javascript date library for parsing, validating, manipulating, and formatting dates).

Since the most laborious part of generating a docSet is adding all entries to the searchIndex database (an embedded SQLLite database), I opted for simply embedding the online documentation in an archive and expose it as the docSet in a single resource.

Next step would be to create a script that would allow me to extract the different documentation points from the online documentation and add it to the searchIndex, however for now it fullfills my need to have an easy and structured way to access the documentation when offline.

1. Make something people want.
2. A great team and a great market are both critically important—you have to have both. The debate about which is more important is silly.
3. Write code, talk to users, and build the company (hire the best people you can find, get the culture right, fundraise, close sales, etc.) Most other things that founders do are a waste of time.
4. Set a clear, easy-to-understand vision for your company, and make it be a mission people believe in.
5. Stay focused and don’t try to do too many things at once. Care about execution quality.
6. You have to have an almost crazy level of dedication to your company to succeed.
7. In general, don’t start a startup you’re not willing to work on for ten years.
8. Be relentlessly resourceful.
9. In the current pivot-happy world, good ideas are underweight. It’s worth the time to think through a good one.
10. Growth solves (nearly) all problems.
11. While growth is critical and you should focus on it, occasionally consider where you’re going—you need both growth and to be growing towards something valuable.
12. Obsess about the quality of the product.
13. Overcommunicate with your team. For some reason most founders are really bad at this one. Transparency is your friend.
14. Move fast. Speed is one of your main advantages over large companies.
15. Hire slow; fire fast. Hiring is the most important thing you do; spend at least a third of your time on it.
16. Occasionally think about why the 20th person will join your company.
17. Hire smart and effective people that are committed to what you’re doing. The last five words there are important.
18. Hire friends and friends of friends. Go after these people like crazy to get them to join. Some other candidate sources are ok, but I always got bad results from technical recruiters.
19. Generally, value aptitude over experience.
20. Hire people that you could describe as animals.
21. Eliminate distractions.
22. Don’t die.
23. Be frugal.
24. You’ll often hear conflicting advice about everything but “build a great product”. This means you can go either way on much of the rest of it and it doesn’t really matter. Just make a decision and get back to work. Product/market fit is what matters. You can—and will—make a lot of mistakes.
25. You make what you measure.
26. Startups are very hard no matter what you do; you may as well go after a big opportunity.
27. Momentum is critical. Don’t lose it.
28. Keep salaries low and equity high.
29. Keep the organization as flat as you can.
30. When working on a deal—raising money, trying to get a partnership, etc.—it’s important to create a competitive situation.
31. Schleps are good.
32. Don’t forget to make money.
33. Journalists like hearing directly from founders. If you hire PR people, resist their desire to control all the contact.
34. It’s standard for founders to keep board control in the first round.
35. Listen to everyone. Then make your own decision.
36. Remember that you are more likely to die because you execute badly than get crushed by a competitor.
37. Get lucky.
38. Have a direct relationship with your customers.
39. Be formidable—do not be easy to push around.
40. Don’t let your company be run by a sales guy. But do learn how to sell your product.
41. Have a culture that rewards output.
42. Don’t hire professional managers too early.
43. Simple is good. Be suspicious of complexity.
44. Get on planes in marginal situations. In-person is still better than tele-anything.
45. Most things are not as risky as they seem.
46. Be suspect of anyone who says the word process too often.
47. Raise a bit more money than you think you need.
48. Ignore the fact that “the press loves [you]”.
49. Have great customer service.
50. You can create value with breakthrough innovation, incremental refinement, or complex coordination. Great companies often do two of these. The very best companies do all three.
51. The role of the board is advice and consent. If the CEO does not lay out a clear strategy and tries to get the board to set one, it will usually end in disaster.
52. Board observers are usually a headache.
53. If you pivot, do it fully and with conviction. The worst thing is to try to do a bit of the old and the new—it’s hard to kill your babies.
54. It’s better to make a decision and be wrong than to equivocate.
55. Set goals for the company and motivate people to get there.
56. Always praise good work.
57. Celebrate your wins as a company. Get t-shirts for big milestones.
58. Have a good operational cadence where projects are short and you’re releasing something new on a regular basis.
59. You can win with the best product, the best price, or the best experience.
60. Meetups and conferences are generally a waste of time.
61. If the founders of your company seem to care more about being founders than they care about your specific company, go join another company.
62. It’s easier to sell painkillers than vitamins.
63. Be suspicious of any work that is not building product or getting customers. It’s easy to get sucked into an infrastructure rewrite death spiral.
64. It’s better to have a few users love your product than for a lot of users to sort of like it.
65. Learn how to stay extermally optimistic when your world is melting down.
66. Startups should require as few miracles as possible, but at least one.
67. You have to have great execution—far more people have good ideas than are willing to roll up their sleeves and get shit done.
68. Don’t have a diverse culture in the early days.
69. Keep a to-do list every day. At the top of it, put the one or two big things you want to work on.
70. Being the CEO is miserable more often than it’s good. But when it’s good, it’s really good.
71. On the really bad days, remember that tomorrow will be better—it’s hard to see it being much worse!
72. Sleep and exercise.
73. Success in a startup is usually pass/fail. Worry more about making sure you pass than an extra point of dilution.
74. Good investors are worth a reasonable premium.
75. Give your investors something to do.
76. Go for a few highly involved investors over a lot of lightly engaged ones.
77. Raise money on promise. Raise money on clean terms.
78. Do reference checks on your potential investors. Ask other founders how they are when everything goes wrong.
79. Investors love companies other investors love.
80. A lot of the best ideas seem silly or bad initially—you want an idea at the intersection of “seems like bad idea” and “is good idea”. (It’s important to note you need to be contrarian and right, not simply contrarian.)
81. Surf someone else’s wave.
82. Sometimes you can succeed through sheer force of will.
83. All startups are fucked in at least one major way. Keep going.
84. Keep an eye on cash in the bank and don’t run out of it.
85. Pay a lot of attention to the relationship between cofounders, especially if both/all of you want to be CEO.
86. Stay small and nimble.
87. Have a staff meeting at least once a week.
88. Find a mentor that will teach you how to manage.
89. Keep burn low until you’re sure everything is working.
90. Be suspect about buying users.
91. Lead by example.
92. Have the right kind of office. The proper office for a very small company is an apartment or house.
93. Share results (financial and key metrics) with the company every month.
94. Have a table in your offer letters that shows how much the stock you’re granting a new hire could be worth in various scenarios.
95. The best startups are defined by exceptions; all of these rules are probably breakable, but probably not all at the same time.