580 karma · joined October 1, 2011
http://xion.io http://twitter.com/Xion__
* Don't make your label use the same style as user-entered text.
I remember encountering a website that failed to do this, while satisfying all the other points. It was super confusing to learn that the texts were just labels and not pre-filled values, since they had the exact same color as the text I entered (unlike HTML5 placeholders that are dimmed).Isn't testing a vital part of this development, and by extension a crucial part of what you call scientific progress? The fact that we need more and more sophisticated testing techniques is because we understand more about the intricacies of human body and the ways it can interfere with treatment process. Placebo is an obvious example of such interference.
To me, calling a scrupulous testing process a factor that's retarding scientific progress is like saying QA is retarding software progress.
It is also unnecessary. Python has normal classes, so you can contain your state within objects rather than stackframes.
Such approach is simply not scalable. I don't know what secret_token.rb is (I do Python) but if it's anything like an HMAC key for encrypting your session cookies, your app will break once deployed to more than one frontend because the cookies will suddenly become tied to specific dyno.
I really like the inline, multi-language scripting though.
And if that happens, then whoever has the biggest influence over the leading browsing engine will dictate the shape of the Web. Last time this was a single corporation; at least this time it might be two. I don't necessarily think this is very much better.
It's no wonder that no one who made those stingy tweets did respond to author's replies and questions. They didn't want to start a discussion in the first place.
Fortunately, the pendulum can also swing the other way here, as they are people who readily jump to defend against harassment.
Oh, this `j` key has an inset to distinguish it from the rest. Surely this means I need to press this one!
(You can easily figure out the three other keys from there).
I fail to see how this is different than e.g. not supporting Flash on iOS devices due to poor performance and battery drain - a then-controversial move which is now seen as reasonable even outside the circles of Apple fans.
And funnily enough, the movie isn't really about time travel.
Everything in Java is Big Deal, even something like a simple loop going through a collection and applying a one-liner to every element. In Java, you have to divide things aggressively for code to remain readable and maintainable. Otherwise it's way to easy to lose the big picture.
When methods are few lines tops, their names are descriptive, and you have explicit types of arguments and return values, it's no wonder you hardly ever need to comment anything.
Other languages can be very different in this regard. Take Python, ironically the language author's using in his examples.
Python is terse and expressive; does not specify types in code; has everything as first-order values; prefers short names due_to_naming_convention; and makes extracting code into functions a significantly bigger deal (everything is public, needs to have docstring, etc.). Those traits often need to be offset by a little more prose than you would put into code in other languages.
So while Clean Code certainly sounds convincing (I know I treated it almost like a revelation), it needs a little more perspective. Commenting practices are just one more tool that you need to match to the job - and language - at hand.
Furthermore, the fact that non-programmer expects to be able to poll the state of everything around (like the numbers which were already printed) would indicate that in their mind, there is no separation between the program/algorithm and the environment it is executed in. (Ironically, this is completely accurate viewpoint if we're thinking at the level of actual machines, be it real ones or abstract models like Turing machines.)
I can't help to notice that apparently in the last 15 years or so, a significant government interest was only focused on high-tech companies. Looks like more "traditional" branches of economy and companies working therein are generally behaving fine...
Companies like Lehman Brothers, for example.
In other words, he claims there is no issue by presenting a possible solution to it.
It might be somewhat feasible if they wanted him to be security engineer, not a devop. Still, he expected they have set up what essentially is an elaborate prank just to send a cold-call email to just one of probably numerous potential candidates.
How likely this is? What would be the risk-to-reward ratio for doing that, considering that many of unsolicited recruiting mails are not even read? Isn't it more feasible for it to be a genuine mistake on their part? Google's not infallible, omnipotent being after all.
I'm 25 and I find this cute. That's assuming, of course, that the funny list of 'requirements' is mostly to spark discussion rather than actually weeding out people by following them to the letter.
"Sorry, you only meet 26 of the points, and that's counting your dubious credentials for the Peter Drucket one." -- Hopefully not. "Hey, that project X from your Github is pretty neat. Did you consider using technology Y for Z in it?" -- Maybe.
>>> timeit.timeit("'%s' % i", setup="i = 42", number=1000000)
0.31799793243408203
>>> timeit.timeit("str(i)", setup="i = 42", number=1000000)
0.4146881103515625
This is another argument for profiling everything.One of the more surprising results (esp. for non-pythonists) is the fact that string formatting:
s = "%s" % some_integer
is faster than "casting" to string: s = str(some_intenger)
That's solely because looking up the 'str' symbol requires finding an element in global symbols' hashtable. This turns out to be more expensive than parsing the format string and building the result of % operator.