Don't Do It “Because Google Does It”

Josh Hadik on February 08, 2019

This is a comment I wrote a little while back, you can see the full context here, but the premise of the conversation was about how companies lik... [Read Full]
markdown guide
 

Tangential point: some of Google's practices have proved to be Bad Ideas™ in the long run anyway. Most of the practices of big companies did not usually contribute to their success; rather, they adopted those practices after their success, and sometimes because of their success.

Meanwhile, given some of the disastrous outcomes of various projects from Big Software, I tend to actually look more skeptically at any practice that Google, Facebook, Microsoft, Apple, Oracle, or the like follow.

So, don't solve problems you don't have, but if you do have or forsee them, don't assume that the solutions that mega-corporations use are necessarily smart to begin with.


I do have to add one other angle to the "don't be a perfectionist" topic. While one should definitely avoid "Imaginary Scaling Issues" (see image below), you should still structure your code to facilitate refactoring later!

Most of this is just loose coupling and DRY. For example, I may write a language parser that is dead simple, uses regex, and bumps along with dismal performance, but I design its API so I can easily swap it out for a better solution later if needed. I don't hardcode it.

I've lost track of how many times I blessed my past self for that practice.


Promised apropos image:

ORLY: Solving Imaginary Scaling Issues

 

Yes, yes, and yes.

I've become rather scared to rely any of the google services and apis, because before you know it, they'll just deprecate things.

I'm use to building systems that should run for years and years without ever being touched, but since using google services, I have to revisit everything quite often.

I also see other comments about Go. I was the first one to get excited when Go was launched to the public. Yes, Go is fast, concurrency and channels are super good. But the rest of the ecosystem including the documentation is pretty bad.

Compared to Python, developing in Go feels like you're walking through glue, you'll get stronger, but it'll take longer.

 

Yes! Documentation is another huge problem with using the "latest and greatest." It might be the best language or tool out there but if you can't learn how to use it or figure out how to solve the basic errors it becomes almost unusable.

 

I agree 100%

I think that good documentation includes examples too. (for everything)
It just makes it so much easier if you can reference the docs, see straight away a piece of code that does what you need, and carry on with the job.

Go documentation is an exercise in figuring out what they meant and how to use the code. But there is hope.

As technologies mature, the documentation does seem get better.

 

So true, one of the project we had recently, a web app with lots of data processing.we wanted to do it with python and postgress. Client kept fixated on using go.when asked, he said "Google has created it and they are using it.so we should do it too."

 

Oh noooooo. How did that end?

I heard the same exact argument about Java years ago ("we must use Java because real enterprises use it, nobody uses Python"). Funny because at the time Google was one of the biggest fans of Python 😂

 

hehe,

We ended up doing in GO (what client asks they will get. after all they are paying 😂 ) but without python magic , project deadline was increased by several months.

What can you do when they are not listening to reason. right ?

I'm sorry to hear that.

Next time you need a real counter argument pro-Python for a client that is interested in knowing which big companies use wich technology, let me know and I'll send some of these arguments your way :D

Guido Van Rossum, Python's creator, used to work for Google (now he's at Dropbox, which uses Python a lot), like others of the core team. Google at some point even tried to rewrite Python to make it faster with a JIT (see Unladen Swallow). Instagram for the first few years was a Django app and AFAIK they still use it. This is from 2017:

We had been able to get to a few hundred million users with our Python/Django stack, so we decided we would continue. Also significant in the decision was that our engineers really love Python. It’s actually a reason people want to come work for us.

thenewstack.io/instagram-makes-smo...

I don't think it should be the argument on which to build a decision as the OP say (or at least it shouldn't count as much), but if you have a client that values that primarily, it's nice to know you can at least suggest that Python is a real enterprise language ™ :P

 

I agree with this, I ten to think in orders of magnitude in terms of scaling.

The issue I try to think of is would this scale to one order of magnitude more users than today.

So if I write something for personal use it has to be OK for 10 people. Consequences might be, i use text files not databases, i use command line parameters rather than environmental vars.

I was working on a 20k users system and people kept thinking at the million users level, so everything was over engineered, growth rates of 1000% just don't occur in normal everyday life, yes aspire, but keep it realistic.

 
 

Haha, you know, I've been using golang for a few years. It's concurrency and channels are amazing, but the documentation and many other things are actually sub-par.
Compared to Python, which I'm learning now, Python is much much nicer to work with. Syntax is cleaner, docs are better, ecosystem is better. So now, I'll only use golang if I need to build a super fast api server for thousands/sec.
Go performance is better yes, but if you don't need ultimate performance, save yourself the trouble.

And I was the first one who got excited years ago when google announced Go

Keep that in mind

 

I find Go's documentation, at least in the standard library, to be on-par with Python's. Python has other scalability issues IMO that don't pertain to how many reqs/second it can handle: how damn abusable the language features are. Python is great to get something going fast. But I don't want to support and application/system that was written by 15 developers because none of the code base will be coherent if there wasn't very strict coding standards at the company. We're running into this issue now at my work, there's at least 3 entirely different implementations of basic REST clients across ~12 services. Now, that's definitely not all Python's fault, but the language has basically no restrictions or well defined practices (outside of "pythonic" and pep8/whatever it's called now) so it definitely accentuates the issue.

Yes, the "one way to do things" in Go is nice and it does make the approach to new programs easier. I also find writing very complex programs easier in Go.

I haven't had to support Python code bases before, so thanks for the heads up.

In Go I'd want to go without a framework vs Python I'd probably go with a framework.

Absolutely! Python is a nightmare without frameworks to provide structure (and even then it's not always enough)!

 
 

Some people may find it weird that I always end my Kubernetes talk with this

you are not google

But its completely intentional to help steer new users into using the simpler solution that works well.

All solutions and tools - even the one I am building (uilicious.com a web testing tool).

Are just tools - they all have engineering trade-offs against other tools.

The problem I feel is most people tend to focus on the benefit, and not the negative feature tradeoff, nor the hidden cost (such as learning time, or lack of documentation)

And as you put it, if it does not solve a problem - I can have the world most efficient web app, that runs on 1 mb of ram, supporting a million connections - and have zero users.


And ughh on a small scale - I lost count on how many times I have to keep advising new developers to just stick to their current IDE - and not reinstall and change to a new IDE for every workshop/lecture - because that was what the presentor use.

Wasting the first 15 precious minutes of the workshop learning.

 
 

CTO: "We're switching over to Kubernetes".

Me: "Oh really, I've never needed to do that, how many users do you have?"

CTO: "None, we haven't launched yet"

 
 

one thing I have to add that even though I agree with most of your examples and comments, I would say cdn is a good practice as long as you are using something that's already built.

Building your own cdn is not a good idea but even in small projects the speed is a strong factor for new product based companies and CDN and caching can dramatically increase the page speed etc. which in turn result in better user growth.

Even a simple website should have CDN as page speed is a factor in SEO. And if it is a saas then your frontend files if delivered faster can have a better user experience.

Yes, it doesn't make sense when you are the only user but even if you go for 100 users I highly recommend caching and CDN and ssl( just for visual purposes)

 

100% accurate, hard to keep sight of when you are a perfectionist for sure!

 

So true! I learned this lesson the hard way. I'm a bit of a perfectionist myself and realized after years of starting and abandoning dozens of personal projects that "perfection" means roughly the same thing as "nonexistent."

 

u mean learning the docker+kubernetes with springboot stack wont make me a 10x dev??? ( .__.) (good article)

 

Totally agreed, I am seeing too many companies like this nowadays.

 

It sucks too cause I feel like there's not a lot of in between. Companies are either in the dark ages and might as well still be writing binary, or they want a dockerized Kubernetes mega-cluster with a React Native/Webpack/PostCSS/ES11 frontend and a sentient Go app on the server. We just need to find a healthy balance between the two.

code of conduct - report abuse