7,912 karma · joined Sep 11, 2009 (17y ago) · 3,625 submissions
https://twitter.com/dustingetz
3002.
Smarts vs experience(dustingetz.com ↗)
1 points · by dustingetz · 14y ago · discuss
comment 14y ago · link · parent
def head(seq): return seq[0]
def rest(seq): return seq[1:]
def transpose(mtx):
a = map(head, mtx)
b = map(rest, mtx)
return [a] + ([transpose(b)] if b[0] else [])
def zip(xs, ys):
return transpose((xs, ys))
def zip2(*seqs):
return transpose(seqs)
this works but is sort of icky in python, any ideas? this is also where functional python starts to fall apart - no tail call recursion, and default data structures aren't persistent. based on a haskell solution which is nicer. http://stackoverflow.com/questions/2578930/understanding-thi...comment 14y ago · link · parent
def zip(*seqs):
return map(lambda *items: items, *seqs)
assert [(1, 'a'), (2, 'b'), (3, 'c')] == zip([1,2,3],['a','b','c'])
def count(start=0):
while True:
yield start
start += 1
from itertools import izip, islice # lazy versions
with open('/etc/passwd', 'r') as f:
zipped = izip(count(), f.readlines())
for numbered in zipped: print numbered
izip and islice are trivial to implement: https://github.com/dustingetz/sandbox/blob/master/etc/lazy.p...comment 14y ago · link · parent
article stops at iteration (foreach) but misses an even higher level abstraction: filter, map, reduce. each of these can be implemented on top of foreach, and i haven't yet seen a loop that can't be decomposed into a combination of map, filter, reduce. also note that filter/map/reduce are expressions, not statements, so they are more "mathy" and thus easier to reason about.
its interesting that these are not necessarily idiomatic python despite being a slightly higher level abstraction. note they are idiomatic in all "real" functional languages, which python is decidedly not. also list comprehensions are faster than map/filter in python. (this is probably python's fault and is really dumb because you could just implement map/filter as a list comprehension. some people have criticized Guido for some of his design choices[1].)
[1] http://www.quora.com/What-are-the-main-weaknesses-of-Python-...
also on topic: http://docs.python.org/library/itertools.html
comment 14y ago · link · parent
> Until compliance departments figure out how to conduct business without micro-managing every aspect about everything, the problem remains.
companies exist to return profits to shareholders, not in the business of fixing the litigious tendencies of Americans (let alone i-bankers!). if a compliance policy is the most efficient way to manage exposure to legal risk, it's a correct move.
edit: i work in pharma
comment 14y ago · link · parent
java was designed to influence code towards solving all problems with classes. the "bad code" you speak of is idiomatic java code.
Jane Street wrote about how they migrated core systems to java, abandoned it because "But somehow when coding in Java we built up a nest of classes that left people scratching their heads when they wanted to understand just what piece of code was actually being invoked when a given method was called"[1]. then, the same team moved to a functional language to great success.
Writing "good code" in java takes discipline and expertise to overcome Java's gravity towards classes. Without discipline and expertise, teams end up at the natural equlibrium you read about on thedailywtf.com. java did an awesome job of replacing C++ for the last 15 years, but there's something inherent about the design of java that doesn't scale well with the bigger, higher complexity problems we face today.
[1] http://queue.acm.org/detail.cfm?id=2038036 ~10 paragraphs in
comment 14y ago · link · parent
1. there's a huge difference between "oh, i can pick up rails in a week" and "7 years of rails experience". being super smart is insufficient for certain employers. you want the guy making foundation technical choices to have already learned from his mistakes
2. if you're in your twenties, and you're the best coder/entrepreneur/whatever you know, your hubris is blinding you to your potential, should you work with people more experienced than you. this is not to say you can't win the startup lottery when you're young, but your long term expectation is higher if you learn from others before you do.
3012.
"they are paying you to accept a much lower intellectual growth rate"(github.com ↗)
2 points · by dustingetz · 14y ago · discuss
3014.
Smartdrugs in silicon valley: lessons from sports(martinsnyder.net ↗)
3 points · by dustingetz · 14y ago · 1 comment
comment 14y ago · link · parent
posts on coffeescript (and all posts about software) need to be taken in context. This post's context, it seems, is the type of problem where your pain points are, it seems, "javascript: the bad parts". Coffeescript is pretty great at cleaning up the bad parts and if that's your pain point on a daily basis then coffeescript is probably great for your team.
there are other classes of problems where your pain points are different - e.g. layers upon layers of inheritance hierarchies, complexity on top of complexity, bringing feature development pace to a crawl. Teams where all of the grizzled engineers know javascript cold, know the idioms and thus are rarely bit by "javascript: the bad parts". Switching from javascript to coffeescript provides at most a small, incremental improvement to this class of problems. These are the teams that are laughing at the OP. These teams are also a hell of a lot more interested in ClojureScript, because it brings with it a whole new toolbox of idioms to solve problems of complexity.
i think you one could take all the coffeescript blog posts, and sort them into buckets of "loves coffeescript" and "just doesn't care", and these buckets align perfectly with the two categories of problem i described.
Saying "at Posterous, they use it but don’t have any real JavaScript engineers" is ad hominem and uncalled for, but if you squint past his tone, he's saying: there are different kinds of software, and some problems are harder than others, and it ain't one tool fits all.
comment 14y ago · link · parent
i'd be interested in considering opportunities in chile. if you gave me the time and financial comfort to enjoy chile a bit, I'd totally do six months if i found a team i vibed with.
just tossing a dart here. my availability starts around summertime.
[1] dustin's awesome monad tutorial for humans: https://github.com/dustingetz/dustingetz.github.com/blob/mas... [2] resume http://careers.stackoverflow.com/dustingetz
comment 14y ago · link · parent
i also know a few other people running software shops, who don't participate in the local meetup community. none of the best local developers even know who these other employers are. i'm sort of sick of hearing them complain about how hard it is to find talent.
the flip side of this, is that if I as an engineer want to have a steady stream of future opportunities with the best employers, I need to make myself known to them, by, you guessed it! making myself visible in the meetup community, and internet community at large.
ez game.
comment 14y ago · link · parent
"Let’s face it, doing about 30% better isn’t going to get you anywhere significant. And I’m not even going to start talking about why working 30% longer of course won’t bring anything significant in your company up by 30%, especially not the “doing better” – much has been written about this already."
dead wrong. there are reasons not to work long hours, but this article articulates none of them, hand-waving about exponential growth instead. There's a time to grow yourself, and there's also a time to ship your product.
"From a business point of view, long hours by programmers are a key to profitability. Suppose that a programmer needs to spend 25 hours per week keeping current with new technology, getting coordinated with other programmers, contributing to documentation and thought leadership pieces, and comprehending the structures of the systems being extended. Under this assumption, a programmer who works 55 hours per week will produce twice as much code as one who works 40 hours per week. In The Mythical Man-Month, the only great book ever written on software engineering, Fred Brooks concludes that no software product should be designed by more than two people. He argues that a program designed by more than two people might be more complete but it will never be easy to understand because it will not be as consistent as something designed by fewer people. This means that if you want to follow the best practices of the industry in terms of design and architecture, the only way to improve speed to market is to have the same people working longer hours. Finally there is the common sense notion that the smaller the team the less management overhead. A product is going to get out the door much faster if it is built by 4 people working 70-hour weeks (180 productive programmer-hours per week, after subtracting for 25 hours of coordination and structure comprehension time) than if by 12 people working 40-hour weeks (the same net of 180 hours per week). The 12-person team will inevitably require additional managers and all-day meetings to stay coordinated."[1]
[1] http://news.ycombinator.com/item?id=3547965 (secondary source)
comment 14y ago · link · parent
same for engineers. roll through the YC startup list, probably half of them are a business model and a rails app.
but you know what? it doesn't matter if they want to say they want the best engineers in their job post. They will attract the type of people they need. We've all heard "A hires A and B hires C", and, well, a twenty something hacker probably isn't trying to attract someone better than him, because, then, why isn't the new hire the CTO?
Engineers and designers exist on a spectrum of value. The businesses that need the best, run by the best, know how to attract the best. The ones that are solving less hard technical problems (but maybe really interesting business problems), they say they only hire the best, but they don't actually need the very best, and this isn't a bad thing. This is all self-evident, and yet people somehow continue to match themselves with the right opportunities, so who the hell cares.
Let's all just stop writing about it, yeah?
comment 14y ago · link · parent
two factors, I think:
1. invest significant effort in networking in your local tech community. why should I want to work with you? how do I know you understand technology? speak at conferences and meetups, show up at hack nights, interact with the local talent so they can get to know you, and when they decide to switch jobs, they will approach you.
2. pick an interesting business with interesting tech. All engineers good and bad exist on a spectrum of value. The harder your technical problems, the more you need the very best engineers. If your problem is mostly not technical, you don't need as many rockstars, and they don't have to be quite as strong.
there was a recent YC job post for a "recruiting engineer" which made me groan inside. Your best engineers are the only ones who can attract other best-of-class engineers. typical recruiters, of course, are out of the question.