I hereby claim:
- I am johnpena on github.
- I am johncorrelated (https://keybase.io/johncorrelated) on keybase.
- I have a public key ASAiD-xfw_8hvVbGeFdjM6PP1zJ1LEi0J21ev2vjG12ZdQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| def yes_or_no(question): | |
| reply = str(raw_input(question+' (y/n): ')).lower().strip() | |
| if reply[0] == 'y': | |
| return True | |
| if reply[0] == 'n': | |
| return False | |
| else: | |
| return yes_or_no("Please enter y or n: ") |
I've spent the past eight years (starting back in June 2004) writing elaborate rants about a bunch of vaguely related software engineering issues.
I was doing all that ranting because I've been genuinely perplexed by a set of "bizarre" world-views held dear by -- as far as I can tell -- about half of all programmers I encounter, whether online or in person.
Last week, after nearly a decade of hurling myself against this problem, I've finally figured it out. I know exactly what's been bothering me.
In today's essay I'm going to present you with a new conceptual framework for thinking about software engineering. This set of ideas I present will be completely obvious to you. You will probably slap yourself for not having thought of it yourself. Or you might slap the person next to you. In fact you probably have thought of it yourself, because it is so blindingly obvious.
Steve Yegge -- Aug 15, 2012 - Public
The inputs are in! Everyone's had a chance to mull over my liberal/conservative distinction in the big world of programming styles and approaches to software engineering. Lots of great feedback.
Thank you to everyone who took the time to think about this conceptual model and share your thoughts.
Here are a few things that jumped out at me, reading the feedback.
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| concurrency := 10 | |
| bouncer := make(chan bool, concurrency) |
| import sys | |
| import requests | |
| import json | |
| import random | |
| from http.server import HTTPServer, BaseHTTPRequestHandler | |
| class MessageHandler(BaseHTTPRequestHandler): | |
| def __init__(self): | |
| BaseHTTPRequestHandler.__init__() | |
| self.current_timestamp = random.randint(1000, 5000) |
| # Stick this in ~/.gitconfig | |
| [alias] | |
| # Shortcuts: | |
| st = status -sb | |
| br = branch | |
| co = checkout | |
| sha = rev-parse HEAD | |
| # List all tracked files: |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
| class great_stuff(object): | |
| def __init__(self, a, b, c): | |
| """ | |
| __init__ is *not* passed the function to be decorated if arguments | |
| are passed to the decorator. | |
| """ | |
| self.a = a | |
| self.b = b | |
| self.c = c |
| """https://blog.svpino.com/2015/05/08/solution-to-problem-5-and-some-other-thoughts-about-this-type-of-questions""" | |
| from itertools import permutations, product | |
| def problem1(): | |
| def forloop(numbers): | |
| s = 0 | |
| for number in numbers: | |
| s += number | |
| return s |