Posts Tagged ‘beauty’
Scratchin & Squeakin…
A friend introduced me to scratch today..wrote a trivial program with it…A plane falling down on an unassuming unaware kitty, with sound effects of course…My kid loves it and I had fun writing it…if I can use the term ‘write’…its more like playing with lego. Very nice medium for teaching programming to kids!
Of course, its all based on squeak; another horse from the time-ravaged smalltalk stables – a language which offers among other jaw-dropping features – which methods (yes, method not classes) to package in a deployment unit, which version of classes (and methods) to deploy, add behavior to any class (yes, any..nothing is sacred); and this one is fun – bend the smalltalk grammer itself to your iron will.
Ah, one wonders what variation of man’s unfathomable greed led to the sad demise of such a wonderful thing – and of course led to the ugliness I have to deal with day in and day out.
Java.
Programming could have been so much more fun!
Pearls from the deep end =~ s/[a,s]//g
Reprinted from a veritable Perl/Tcl vs Scheme flame war of yore; of course without permission ….
In article , Tom Gordon wrote:
: p.s. About Scheme being “ugly”. Experience shows that there is no
: point in arguing this issue. Many, including myself, find Scheme
: elegant and beautiful — especially compared to baroque languages
: like TCL and Perl.
While I do consider the adjective “baroque” to be a compliment, I must
point out that Perl is actually more of a romantic piece, with allusions
to various classical motifs. My favorite composer is Mahler, which should surprise no one. – Larry Wall
Antikythera
Finally..see the working version here.
Corroded remains of the device were found a century ago by spongedivers, who happened upon the shipwreck of a roman merchant vessel while sheltering from a storm near the island of Antikythera.
Broken Windows Theory
Scientific American’s latest 60 seconds science podcast concerns the broken windows theory which states that “in a neighborhood where buildings have broken windows, people are more likely to engage in bad behavior.”
Maybe because they figure no one will care. Or there’s little chance they’ll get caught.
Applies to software too, in my opinion – ugly code begets more ugliness.
Neat vs Filth
Dang..every time I look at the guice code, keep finding neat little nuggets lying around – the operative word being “neat”. For instance, look at ToStringBuilder. What?? A Builder for toStrings? Who would have thought of that? Well, Crazy Bob Lee did!
Here’s the usage from a consumer class.
public String toString() {
return new ToStringBuilder(Binding.class)
.add(“key”, key)
.add(“provider”, internalFactory)
.add(“scope”, scope)
.add(“source”, source)
.toString();
}
Isn’t that neat? People at the Big G are thoughtful enough to make writing toString() structured and a breeze at the same time.
Where does this ‘neatness’ come from? Why is it that any code that you see at work (read our day jobs – not all of us work at google) tends to be so horrific & predictable that a page down while inspecting code doesn’t miss much worth the traversed screen space? Why is it that so-called innovative and path-breaking software (mind you; such stuff is even patented) is built on humongous mountains of code filth?
Nope – I don’t have answers to these questions. Do you?
PS : Mind you, I do have a *solution* to the problem; but not an *answer* to the question
– Maybe I’ll write an article with answers when I am feeling more upbeat about the work that I get to do. Who knows?