Yearly Archives: 2020

PHP in 2020 it’s not your mama’s PHP

I decided to write this post, because before joining Facebook I thought that PHP is just old, limited language from 2 decades ago when server was responsible for simple form parsing, and generating HTML.

I actually learned web development using PHP in mid-2000s, when I was in middle school. I created my personal blog, and website about very popular back then game Deluxe Ski Jump. I actually still have the source code and recently put it on Azure at dsjonine.azurewebsites.net – it is in polish, and there is no database:P Didn’t bother to update character encoding from ISO-8859-2 to UTF. Why I used ISO-8859-2? Because my cousin told me to do so! It was real copy/paste programmer back then! Good times 😀

Mark Zuckerberg wrote first version of Facebook around that time using PHP too. LAMP stack was the way to go for web development in 2000s.

A few days after joining facebook I realized that PHP now is full blown OO language. It has classes, interfaces, abstract classes, dependency injection, etc. It is much closer to C# or Java than to PHP that I used to write 15 years ago. At facebook we use Hack (typed PHP). It’s awesome. You have the best of two Worlds: type safety and no compilation! Just save, and refresh to see your changes. Yay! As pure PHP performance is not the best, HHVM performance is an improvement.

In PHP, you can access pretty much every module in the codebase without explicitly referencing it. That’s an extra productivity boost. Or hack:) Intellisense in editors like Nuclide (Atom) or VSCode is pretty good as well. When you add Facebook engineering systems, where everything is so neatly setup to prioritize productivity, you are in heaven 🙂 I know most of PHP devs do not have that luxury, but just sayin’ 😉

If you want to learn more about modern PHP, check out these resources:

As of February 2020, PHP is 5th most popular language on StackOverflow (source)! Just recently taken over by python.

In any means I am not recommending you to learn PHP if you don’t have to. Choose Rust or Go instead! Just wanted to let you know, that PHP changed A LOT! PHP in 2020 is not PHP from Web 1.0 times.


Hello, Startup – 360 overview of running tech business

Hello, Startup

Some time ago, Remo Jansen recommended me to check out awesome book Hello, Startup by Yevgeniy Brikman. I finally got into it, and I need to admit that it is a gem describing startup and tech World end-to-end.

Here are my key take aways:

  • Building successful company requires give or take 10 years (this is short overview why from other source).
  • These 10 years are not 955 work weeks, it’s 996 on the good days.
  • Tip: Have a notebook to write down any idea that comes to your mind. Even the most stupid one! You will be surprised when a few years later someone turn it into the product. Someone, but not you.
  • New business recipe: copy, transform, combine.
  • Initial startup idea requires many iterations. Always! Yevgeniy gives a lot of simple examples including creating resume (from very raw to very nice looking).
  • Doing things that don’t scale is ok at the beginning to validate the idea, you can automate later. Launching business that automates something? Hire vendors that would do it manually, and once it take off hire developers who will automate it. As automation and scaling is usually much more expensive.
  • Metrics to track:
    • acquisition – its sources, conversions and cost
    • activation – how many new users engage with the product, and why
    • retention – how many users stays after week, month, year…
    • referral – channels and conversions
    • revenue – month over month, year over year, CLV (Customer Lifetime Value)
    • magic number – e.g. once facebook user connects with 7 friends within 10 days they usually become highly engaged, for twitter it takes following 30 people, and for Slack – exchanging 2000 messages (how to find insights like that by Andrew Chen)
  • Data-Driven Development: idea -> develop MVP -> A/B Test -> Release (requires well defined metrics and measurement tools)
  • Distribution channels for startups:
    • word of mouth
      • build better product
      • great customer service
      • build viral loops into your product
    • marketing
    • sales
      • automated – website checkout
      • inside – sales representatives at the store, or by phone
      • outside – “traveling salesmen”
    • branding (Apple = “Think different”, Red Bull = extreme sports, Nike = great athletes)
  • Use OSS and buy SaaS solutions for everything, but your competitive advantage (“secret sauce”).
  • Align tech stack with current market trends (in 2020 it’s much easier to hire React developer than Backbone developer).
  • Against Joel Spolsky opinion that rewrite is worst thing you can do, these days startups often change technologies (Twitter migration from RoR to Scala, Coursera moved from PHP to Scala or AirBnB is moving from React Native to pure native). Thus do not worry too much about stack choice – treat it as it will eventually be rewritten. Microservice architecture over monolith helps with that!
  • Keep code clean! Good naming, conventions, DRY, SRP, tests. It can bite even within first year. Especially because at  Startup you will be constantly evolving existing code!
  • Company culture (mission and values) helps to avoid processes. People can trust each other to do the right thing.
  • First 5-10 hires can kill or make your company successful. Look for: “smart and get things done“, culture fit, communication skills and “would you be ok reporting to them?”.

This book is GOLD! I strongly recommend everyone to read it. Besides awesome 360 overview of startup World, there is a lot of great insights into everyday developer’s life. It’s worth to remember that pretty much every tech company is a startup…just in different phase.

If you are still in doubt, this book has 4.9/5 rating on Amazon and 4.45/5 on goodreads!

There is one quote from the book that I would like to finish this summary with:

I started asking, “What are the important problems of your field?” And after a week or so, “What important problems are you working on?” And after some more time I came in one day and said, “If what you are doing is not important, and if you don’t think it is going to lead to something important, why are you at Bell Labs working on it?”

Richard Hamming, You and Your Research