Quotes of the week
- pa_log_warn("D-Bus name org.pulseaudio.Server already taken. Weird shit!"); + pa_log_warn("D-Bus name org.pulseaudio.Server already taken. My word, " "this is an extraordinary occurence I dare say!");
Posted Jul 14, 2011 9:37 UTC (Thu)
by richard_weinberger (subscriber, #38938)
[Link]
Posted Jul 14, 2011 11:59 UTC (Thu)
by randomguy3 (subscriber, #71063)
[Link] (1 responses)
$wizard->summon("Gandalf");
is the equivalent of
$wizard, summon Gandalf!
and so it's a perfectly natural order.
$mage = Wizard->summon("Gandalf");
reads as
Set $mage to the result of telling Wizard to summon Gandalf.
Again, a perfectly natural order.
Posted Jul 15, 2011 5:27 UTC (Fri)
by jzbiciak (guest, #5246)
[Link]
In this case, "summon" is not a mutator. It doesn't appear to change the Wizard object's state (unless Gandalf was cranky that day and took it out on Wizard on the way in).
Tom's pattern really applies to mutator-type methods--that is, methods that act on their host object itself. For example, consider "$image->resize($new_x, $new_y)". You're image resizing to the dimensions ($new_x, $new_y)? Maybe if you're Yoda. "Resize image to ($new_x, $new_y)" feels like more natural English. Here, the verb "resize" acts directly on the object $image.
Which order feels more natural really depends on whether the verb (ie. method) operates primarily on the object itself or primarily on some other object. So really, we need both orderings.
Posted Jul 15, 2011 16:13 UTC (Fri)
by rfunk (subscriber, #4054)
[Link]
Reading that Christiansen post reminds me of why I grew to hate a language I once loved. Designing a programming language based on the ideas of your natural language gives you all the ambiguity and imprecision of natural language.
And I don't know why he mentions both
Posted Jul 21, 2011 18:24 UTC (Thu)
by Zizzle (guest, #67739)
[Link] (3 responses)
If only I could get it to build on my machine.
Posted Feb 16, 2012 10:08 UTC (Thu)
by dag- (guest, #30207)
[Link] (2 responses)
> Every project I've seen that undertook "code cleanup" was very soon canceled. The insight is this: if a project has nothing better to do, no more pressing customer demands, no greater innovation to bring to market than changing code comments, then it is near death already.
If we apply this quote to the LibreOffice project (which is what it was referring to, I presume) it is a misplaced comment. The statement that a project that does code cleanups has nothing better to do, is a false or misleading statement. The fact that Rob only saw such projects fail, may be related to the context of Rob's work, who knows ?
Fact is that if you look at the monthly releases of LibreOffice since the project started, you see a vast progress at a fast pace. And even with code cleanups being part of these releases, a large chunk is bugfixes, improvements and feature enhancements. Anyone following this progress feels a new breeze in what used to be OpenOffice.
But there are (of course) valid reasons to do a code cleanup, especially when you inherit a large piece of code that's been at least 15 years old and has changed owner a few times during its course. For one, less code is easier to read and maintain, hides less bugs and generally runs faster. But it is also important to restructure your code base so other people understand how stuff relates. One could say that the code base reflects how open and transparent a project is and if there is a wish/need for a code cleanup it positively reflects on the project and how it is run.
So despite the insinuations of that quote, in no way does it reflect what is happening in reality. And that in itself should make it suspicious and begs the question: what's behind the statement ?
Posted Feb 16, 2012 17:52 UTC (Thu)
by dmarti (subscriber, #11625)
[Link] (1 responses)
Posted Feb 16, 2012 19:07 UTC (Thu)
by dag- (guest, #30207)
[Link]
Look at the progress LibreOffice has been making, did the current cleanup make the product worse ? Did it affect functionality ? Did it slow down new features and progress ? Apparently not. If you get scared of the idea of a "cleanup" maybe LibreOffice can prove how it needs to be done and get you over that phobia ?
No FUD needed if reality is catching up...
Quotes of the week
Quotes of the week
Quotes of the week
Verbs and tenses
(Similar to why people hate reading legal documents, which are an attempt to give natural language the precision and lack of ambiguity of programming languages.)
sort { a <=> b } @nums
and
{ a <=> b }->sort(@nums)
but not the most logical
@nums->sort { a <=> b }
other than the possibility that the latter is invalid in Perl.
Quotes of the week
Quotes of the week
Come on, be fair. The idea of "cleanup" scared me too, when I was using Subversion. Almost as bad as "refactoring."
Quotes of the week
Quotes of the week