How to prevent yourself from getting a cold

  1. Scrub Hands frequently - Scrubbing is what makes it effective

  2. Apple a day - Looks like it does not actually keep the doctor away but your more likely to have less prescription medications so that must mean something

  3. Exercise 3-4x a week

  4. Sleep - Just find the right amount for you.

  5. Human Interactions - Keeps your immune system up.

  6. Wearing a mask when out in public - Precovid study done in japan:

January 5, 2022

What you do chronically is what kills you aka in support of cheat days

Caveats to the above statement:

  1. This is all anecdotal
  2. Yes, putting yourself in scenarios where you jump off the empire state building without a parachute or drive with your eyes closed, even once, is probably enough to kill you
  3. It’s kind of obvious

With that aside, the purpose of this post is make people feel better about themselves.

Let’s assume you live 82 years (average LE of a male living in Hong Kong. Courtesy of

From the time you are 18 you decide to live a healthy lifestyle. That means:

  1. You only have a cheat day’ once a week. That means out of the 24,455 days you are alive, only 3484 of them will you have had an unhealthy meal. Let’s throw in 5 extra days a year for holidays as well so that comes out to 3819 cheat days in your lifetime. That is only 15% of your entire life that you have ate something unhealthy and 85% that you have been living healthy. Seems like a good balance between the two and there are probably even some studies out there showing that having a cheat day is healthy (look up Tim Ferris cheat day)
  2. You go out partying until 1 in the morning every Friday night. Again 15% of your entire life you’ll have less than the recommend amount of sleep and 85% you will.
  3. You’re only a social smoker. If we assume you only smoke 5 times a year for the holidays and you only have 2 cigarettes and that you continue this until the day you die, that equates to 670 cigarettes or about 33 packs over 67 years. If you use standard medical terminology of pack years that means you have a 0.49 pack year . I tried to come up with a way to have a non-negligible amount of smoking and still couldn’t find a safe’ way. If you smoked once a year you technically would classify as a non-smoker but any more than that, over the course of a lifetime, puts you at increased risk for other diseases and cancers. You can extend this to other drugs. See here for a good post on alcohol:
  4. You only use social media for average of 20 minutes a day. Comes out to 487,760 minutes over a lifetime. You have 35,215,200 minutes in your lifetime. That comes out to 1.3% of your life on social media. Not terrible. Considering you spend about 30 minutes in the bathroom a day on average (probably all 20 minutes of your social media exposure is in the bathroom) it’s not that much.

Maybe you’ll look at this and be like WTF those are so much. I’m only gonna have a cheat day once every 2 weeks now. That’s fine too. You just need to find the balance you are happy with and stick with it.

December 26, 2021

Random Factoids learned from The Perfect Store: Inside Ebay

  1. Paypal grew fast expensively. Using thousands of VC dollars they gave 10$ to anyone who signed up using a referral. Peter Thiel would tell all the employees to send invites to anyone in their email contact book and those users would receive a hyperlink to sign up to get their free money.

  2. In the early 2000s Paypal began receiving a lot of emails from eBay sellers asking if they could include a paypal link in their auction listings. Paypal’s founders hadn’t thought of this when they started their service but eBay turned out to be PayPal’s killer application. At that time eBays method of transactions was the slowest link in the chain.

  3. eBay had been trying to make its own online payment system but ran into a series of road blocks and management had decided that it was not a business they wanted to enter on their own. Online payements were outside of ebays core competency of running Internet aucions and the risk fo fraud involved in wiring money over the interment made it a dangerous fiedld for ametuers.

  4. Ebay got rid of the middle men. Antique dealers classically relied on pickers’, buyers who would go out to estate sales, flea markets and auctions -> hunting down antiques -> resell to dealers. Dealers would have spent a lifetime cultivating personal network of pickers. With the arrival of ebay, pickers did not dealers to sell to the pbulic and did not need a retail store.

  5. Feedback or your rating’ can determine your selling power. Positive ratings had a slight statistically insignificant impact on the price but negative feedback was substantial. A 1 % decrease in a sellers negative feedback rating lowered the price by 0.11%.

  6. eBay did a great job of communicating with its biggest users (though this was a lesson it learned over time). They invited the guy who ran auction-watch over to their offices to explain some of the thought process behind their decisions and had the CEO of eBay meet with him personally.

    1. To get feedback one of the empolyees got a list of ebays top sellers and began calling them personally
    2. It fostered its community with the usage of message boards
  7. When administration made some changes to the site, people were outraged that they hadn’t talked to the community first. When McDonalds unveils a new sandwich people just decide to buy it or not. They do not say why didn’t you talk to me first?’”

  8. eBays first VC investment was approx. 4 million dollars that it literally just kept in the bank and didn’t use. Instead of the money what it really wanted was advisory services which it got through a world of advice, behind the scenes management, recruitment etc

  9. When they designed the new site one of the programmers changed the background from grey to white, one hexadecimal value at a time, so it would become fully white on Christmas day

  10. Ebays feedback system was a good example of imposing switching costs’ on users giving ebay first-move advantage. In general consumers will stay with a given provider when the cost of switching is more than the gains they are likely to achieve from the switch. People rarely switch primary care providers b/c of the time, effort to find a new one (moving medical records, updating the doc on past medical history, building rapport again, etc). But pople switch clothes, phone providers, food brands, etc all the time. Because the inconvenience involved with those things is minimal. With eBay, registered users had a significant investment in remaining on the site due to the reputations they had taken months to build

  11. Beanie babies success was due to scarcity

  12. A great story beats everything. When eBay was promoting itself, it was facing a lot of ambivalence from the media about a tech company wanting to create the perfect online market in the middle of the internet boom. The companies PR person was hanging out with the CEOs fiancé and she said how it was difficult to collect and trade Pez dispensers. Their PR person came up with the idea to tell reporters that Omidyar created eBay so his fiancé could find and trade Pez Dispensers.

  13. During disputes and fraud, eBay would argue that it was not responsible. If a deal goes bad with someone you found from the washington post classifieds you don’t go complain to the washington post”. Later on, eBay would establish the principle that it is only a venue” and therefore not legally responsible for items sold on the site. They had some ground for that argument. The Telecommunications Act of 1996 gave ISPs a safe haven, recognizing as a matter of law that they were like telephone lines, conduits for information.

  14. In 1996 eBay licensed something called smart-market technology to a company called electronic travel auction. This allowed ETA to sell plane tickets and other travel products in an auction format. Omidyar and Skoll believed in the future that eBay would make most of its money licensing smart-market technology. They had persistent pessimism about the prospect of future revenues being linked to auctions and felt that at any moment AOL or another internet giant will launch their own consumer to consumer marketplace

  15. eBay hired a lawyer called Handler. He was disamyed to find that eBay had not patented any of their tech or innovations like the feedback forum, bidding algorihtims, etc. If they had, they probably would have been granted them, but by the time he had arrived it was too late b/c patent law requires application to be filed within one year of disclosure. The libertariion omidyar just was not the sort of person who was interested in patenting things down like that

  16. The concept of first mover advantage was something that was insanely overhyped during the internet bubble. Wall street analysts would draw up models that show first movers to a product would gain a significant advantage over market share. Adherents of this doctrine would point to Amazon, eBay, etc. But for all the examples of first mover advantage you’d find plenty of examples of losers as well. AOL ahead of Compuserve and Prodigy. Internet Explorer had surpassed netscape which had unseated mosaic.

  17. Most sellers thought that having hidden reserve bids were better versus a minimum bid b/c if you have a minimum bid you spook off interest and creating excitement about why something was bid so low. Statistical research showed that the minimum bid with no reserve was better b/c a lot of buyers were put off not knowing what the reserve is and they wouldn’t even bid

November 21, 2021

How to Hire a Programmer Online

These instructions only help for small 1-2 person single projects. If you are looking to develop a real lasting relationship for a long term project this advice is not as applicable.

  1. Determine what you want built
  • Do you want a wireframe of an app built, an MVP, a full fledged ready to go to production app? You need to decide this before hiring someone. No matter what it is, I recommend you have exactly each part of your app defined with how you want it to look like and what features you want to have.
  1. Have some sort of sketch/design
  • Use Sketch or Figma but you don’t have to. Go ahead and draw it out on paper. My first, and one of my most, successful projects was built this way.
  • What you should sketch/draw out depends on what stage of product you want built. For instance if you are building out a full production app I would have everything drawn out, with colors and layout, and all the functionality that you need for each page of the website/app. I also like to include annotations and notes for every page that will help out the developer/designer. If you are building an MVP, overall layout is less important than specifications and functionality.
  1. Know the limits of the project so you know the limits of who you are hiring
  • No matter what you are building you should know what the person you are hiring is good at. If you are hiring a developer to build an website then they will probably focus on most of the backend. If you are building an MVP then they can probably handle some of the layout stuff with a front end framework like bootstrap. It probably won’t look great but that is not the point of an MVP. If you are building a full fledged app more often than not you’ll have to hire 2 people or usually a team to handle it. One other option is to hire a designer to build everything out which can then be handed off to the developer.
  1. Know your own limits
  • If you know how to code then it will be easier to evalute if a person is a good coder. Ask them for code on other projects they have worked on or their github profile. If you know how to design evaluate them based on prevous designs they have done. Etc. It is a lot easier if you know the basics of whatever skill you are hiring for.
  1. Figure out where you are going to hire
  • Sites I have mostly used are:, but these are more old-school’. There are a lot of newer sites and job boards.
  1. Determine your budget
  • Take a look at similar projects and programming languages to determine a price. For example, a python or general javascript programmer is much cheaper than a react native or kotlin programmer.
  • You may need to adjust your budget if you find you aren’t receiving good applicants.
  1. Determine a time frame of your project
  • Now that you have determined your budget you need to determine a time frame. Got one set? Good! Take 10% off your budget and say in the project description that you will give them the 10% as a bonus only if they finish it within the time frame.
  1. Create a project posting
  • Things you will want to include:
    • Project Description
    • Budget
    • Time Frame
    • Programming language/skills required
    • Whether or not they will be working with someone else
    • Include the phrase: Send me the word Elephant in your initial reply so that I know you have read the project description”
  1. Interview your applicants
  • This is biased but I have definitly had a better experience with Asian and Eastern European programmers than ones from other countries. European and Americans are generally the most expensive to hire.
  • Always ask to see their previous work and/or code if applicable
  1. Set milestones
  • Once you have picked someone always, always set milestones for the project with an appropriate amount of the budget to release with each milestone. So for example I will do:
    • Initial Features/Pages - 30% (Make sure you define exactly what is included in this)
    • Next set of Features - 30%
    • Bug Fixes - 30%
    • Final Product - 10%

And thats my guide. I’ve used it for almost 100 projects on and at least 10 more on Let me know if this is helpful.

November 18, 2021

Why to avoid buying adsense or affiliate websites

If you are just getting started buying websites online, you’ll be easily mislead at the possibility of finding easy passive income. Sites like or empireflippers have hundreds of listings promising this. Most of them are for content” only sites that generate revenue via ads or affiliate links (usually Amazon affiliate links). Otherwise, these sites offer no service that customers pay for. The risks associated with said sites are:

  1. Being able to continue generating content
  2. Not losing your traffic
  3. Stability with your income

The first one is a risk that can be mitigated easily. Either generate the content yourself or hire someone to do it. Whether that will be profitable for you or not is an entirely different discussion.

The second one is a much more difficult risk to manage. Most of the traffic for these sites comes from Google. That is a huge risk that you essentially have no control over. Some will say that there are things you can do to prevent losing your google ranking and yes, I agree with that. But its not a perfect solution, that always works and in my opinion your incoming traffic should be diverisifed. I Look for at least 20-40% direct traffic and 5-20% social traffic.

The third risk is probably the most under-recognized’ by newbies, and the one most relevant to this story. Several years ago, I had plans to purchase a site. It was a high traffic (>50k a month) content site that would create top 10 lists for books. Income was about 1-2k a month, off Google ads and Amazon affiliate links. Got a great deal for around ~28k. Transferred over the site with no issues. Set it up on my own WordPress hosting, replaced all the Google ads and Amazon affiliate links with my own and we were off. Income started to come in similar to what was reported. Things were good for about a week or two until I got an email from Amazon. Your Amazon affiliate account has been denied”. Well that is weird I thought to myself. I tried again with a different account and eventually tried multiple different times to no success. The main reason Amazon gave for my account not being approved was: lack of original content”.

My interpretation of what happened was that because the seller had a more reputable/older’ Amazon affiliate account they didn’t scrutinize his account as closely. This is a phemonen that I have noticed happening even with Google Adsense recently as well.

Ultimately, the seller was very reasonable (don’t ever buy from an unreasonable seller) and agreed to refund the money minus a month of lost profit. I’ve always regretted that deal not working out because I had a very nice algorithm written that could have automated a lot of the writing process.

Since this incident I now ask all sellers to replace their ads/links/etc with my own for about 2 weeks, prior to purchasing, just to make sure there weren’t be any hiccups after transferring the site. Many say no and I’m totally ok with that. Just means they either have something to hide or aren’t’ willing to put in a little bit of effort to sell their site.

October 14, 2021

How to upgrade Python Social Auth

I had an old Django project running python social auth that needed to be upgraded to Django 2, python 3 and the latest version of python social auth at the time of this writing.

These are the steps I took (adapted from here:

  1. Dump the contents of social_auth_usersocialauth into a csv file

    psql -U postgres -W postgres

    \COPY social_auth_usersocialauth TO /Users/username/Documents/persons_db_.csv’ DELIMITER ,’ CSV HEADER;

  2. Delete all the old social auth tables

DROP TABLE social_auth_usersocialauth; DROP TABLE social_auth_nonce; DROP TABLE social_auth_code; DROP TABLE social_auth_association;

  1. Delete all the old migrations DELETE FROM django_migrations WHERE app=‘default’; This deleted 3 rows for me

  2. Install the new Django social or whatever it is called. Migrate as anew. python migrate

  3. Now some of the columns are in a different order and you’ll notice there are 2 new columns (created, modified). I’ll alter the table so that importing the csv file isnt an issue

ALTER TABLE social_auth_usersocialauth ALTER COLUMN created SET DEFAULT 2022-03-02 19:58:19.398458+00’;

ALTER TABLE social_auth_usersocialauth ALTER COLUMN modified SET DEFAULT 2022-03-02 19:58:19.398458+00’;

\COPY social_auth_usersocialauth(id, user_id, provider, uid, extra_data) FROM /persons_db_.csv’ DELIMITER ,’ CSV HEADER;

ALTER TABLE social_auth_usersocialauth ALTER COLUMN created DROP DEFAULT;

ALTER TABLE social_auth_usersocialauth ALTER COLUMN modified DROP DEFAULT;

All done :)


After doing this I realized that I also need to change my pkey. This is the way you can reset” a primary key when it is out of sync

SELECT setval(‘public.“social_auth_usersocialauth_id_seq”’, (SELECT MAX(id) FROM public.social_auth_usersocialauth) );

September 26, 2021
Subscribe to my newsletter to get notified of new posts