Speaking of hybridizing programming languages, check out Jython, an implementation of Python in Java that allows for faster prototyping and easier Java RAD, access to Python libraries from Java, use of Python as a testing harness, etc. It even allows you to subclass Java classes in Python.
I'm somewhat new to Python. Back in the medieval days I used DOS batch files to do routine Windows shell scripting, then switched to VBscript, then finally to Perl. Python is sort of a less cumbersome Perl. It's a bit cleaner to read and a bit more structured, which makes it more suitable for larger projects and certain prototyping methodologies; it supports some nifty features that Perl lacks (like default argument values and built-in exception handling); and tends to insist on a certain way to do things, making it arguably more maintainable than Perl. It also supports objects implicitly, along with multiple inheritance.
I prefer Perl's syntax in most respects though: it follows the C legacy of blocking code with clear delimiters (semicolons at the end of statements, blocks enclosed by braces), and I've mostly worked in C and Java; but on the other hand, that makes it more likely to confuse those languages (which I do persistently because I'm stupid). Python is similar to VB in that it depends on newlines to indicate statements (in Perl you can write an entire program on a single line if you're inclined to do so), which produces code that looks incorrect to my C-conditioned brain (although you *may* use semicolons in Python if you wish -- which I do -- with the added bonus that if you forget one, the interpreter doesn't care). Python uses indentation to delimit scope (eg everything within a conditional statement would be indented underneath it), which looks okay but somehow seems less fault tolerant than using blocking tokens (what happens when you move Python scripts from Unix to Windows for instance...?). Also, I sometimes indent code for reasons other than indicating blocked scope.
For a full discussion of Perl vs. Python see this article by Eric S. Raymond (author of the infamous manifesto "The Cathedral and the Bazaar").Sometimes I feel sad so I listen to Superman theme song and then feel like Superman. Its good for you (for real!!!)
[He's right though, Superman rules -ed]this.administration = bring.it.on(forEveryAmerican); //we look forward to that debate
}
The Hubble's captured an amazing image of M104 (aka the Sombrero Galaxy, aka the Galaxy of Terror). Get the full image here (217 megs!) or smaller ones here. This thing really blows my mind -- if an evil race of imperialistic space monsters exists anywhere in the universe, it has to be in M104.
The Hubble, in case you didn't know, kicks ass. If forced to choose between saving it and servicing that hunk of junk space station there should be no question. But at the moment it seems like NASA favors the space station (which is just about hitting par on the 18th hole of Sucks Country Club, the resort favored by most government agencies).The bad part about insomnia is that you can't sleep. But it's okay, don't cry for me! I have the typing jones, and some grievances I need to spew anyway. I'll just follow this handy list of categories I've made up here and see if I can grieve on each of them by the time I start yearning for a bed again (ie I'll try to put myself to sleep):
§ Books: Pattern Recognition: I finally got around to reading this (the new trade edition has just come out), after much ballyhoo by reviewers more diverse than any SF author typically attracts. I'll admit I haven't found much to love in Gibson since Neuromancer, as if after that landmark of a novel he hadn't much else to say or try: it was always the same themes recycled, the same characters, the same places; I had sort of drifted off. And in Pattern Recognition the usual Gibson expectations are fulfilled: there's a cryptic conspiracy involving shadowy and powerful people, the internet plays a key role, Protag travels to Tokyo, there's a lynchpin metaphor strand (almost literally this time), etc (even the Protag is for some reason named Cayce: why the reference to Neuromancer...?); but there's also some new stuff here: extrapolations from more mainstream trends, interesting new stylistic experiments, and tighter structural-thematic craftwork: when the central metaphor is revealed towards the end everything clicks really well, almost with a bang kind of a payoff (I even said aloud to my humble empty room: "now that's pretty cool..."), and while a post-structuralist (or even a realist) would sniff at all the uber-cohesion going on, I still love the grand harmony of pure artifice, the Classical Symphony over "One Minute of Silence", and was made happy by it.
§ Current Events: NBC News reported the other day that 50 "combat-ready" US Marines were being sent to Haiti. Oh really? Marines? Combat-ready? So those guys hang around the embassy like a pack of dobermans protecting the doghouse while armies of pit bulls rip up the neighborhood. But what more could be done: the last thing GWB needs right now is a Battle of Mogadishu. Maybe he's realized it's time to finally let the political situation in Haiti work itself out rather than attempt yet again to guide it into another temporary stability under the same or another puppet dictator. Hopefully we've learned that lesson by now.
§ Music: One of the best and most interesting songs of the old Canadian Industrial era is Front Line Assembly's "Gun" -- which ostensibly parades as an anti-American anathematization of gun violence, but which can easily play as an ode of respect to fearsome neighbors -- it depends on a lot on your world-view. Like that arching line between nations, there's a kind of musical border that the song crosses both thematically: its ambiguity, the uncertainty of its perspective; and literally: just a bit after the five minute mark where the song's steadily evolving structure finally crescendos into a torrent for the final 30 seconds or so (almost Wagnerian in fact). A similar border is crossed several times beforehand, and quick samples are used to great transitional effect, especially the "Frontline!" and "American!" samples, which act like sudden and jarring gunshots from out of the music, and they change the music (the way a real gunshot would immediately change *its* environment...). "Gun" forms the complement on Tactical Neural Implant to "The Blade", which is infinitely more personal, like the flipside of "Gun" -- er... like a knife... uh yeah.
The other day I set out to search for lyrics to this amazing song (which have always been elusive at best), and discovered a disturbing phenomenon: there are now possibly hundreds of lyrics websites -- sites dedicated to serving up song lyrics as content (plastered with advertisements of course) -- which is okay, people like song lyircs -- but what disturbed me (although I shouldn't have been surprised) was that these lyrics were all from the same source. "Gun" for instance, on every one of these sites, had all the same grammatical errors, the same punctuation, all the same obviously incorrect lyrics. What happens is that some company sells them in bulk to dot-com-parasites as content, as an advertising platform. The hypothetical consumer feels at first like they have abundant choice only to discover that, given the great number of these sites with identical content, they really have no choice at all. Often there are fan sites made by individuals out of love and devotion for a thing (see mindphaser for FLA for instance), but these sites are getting drowned out by the noise of the stepford sites with identical (and typically poor) content. The next Google needs to know about this and apply the necessary filtration. Whatever the next Google will be....
Annoyed by the terrible version of "Gun" lyrics all over the internet, I decided to write my own. It's most likely not exactly accurate, but it's a hell of a lot better than what you'd find at lyricsstyle.com or lyrics007.com or sing365.com or lyricsondemand.com or lyricsdir.com or musicsonglyrics.com or stlyrics.com or metrolyrics.com or lyricsfreak.com or lyricsdepot.com or lyricsdomain.com or lyricstime.com or elyrics.com or readlyrics.com or seeklyrics.com or lyricsattack.com or lyricsexp.com or quicklyrics.com or lyricscrawler.com or purelyrics.com or allthelyrics.com or anysonglyrics.com or song-lyrics-library.com or asklyrics.com or -- bah! My head hurts now.
§ Politics. The Republicans have finally managed to marginalize the small rational percentage of their electorate by slamming down them ole Joe McCarthy baffles, apparently in an effort to finally appeal to what the party views as its base. First the freak-out over a woman's breast (which they don't want us to see), then the freak-out over people getting married (who they don't want to be married), now the censorship of broadcast media (that they don't want us to hear). The idea of Republicanism that I'd tried to maintain (in my fastidious forebrain) was characterized by reduced regulation, reduced government, reduced Constitutional abridgement (hallelujah). This had always put me at odds with my more liberal leaning acquaintances (some of them quite nearly perpendicular), who tended toward possession by the notion that Republicanism meant Oppressive Values! and Enforced Social Behavior!. That implies favoring more laws, I shouted back at them, beermug fist banging the table loudly, and Republicanism is principally opposed to new legislation and over-regulation! Principally opposed to bigger government!
But now I have been silenced. With neither bang nor whimper. I'll just go over here and shut up now.
Appealing to its base may seem not a terrible idea for El Republicanos after the series of profligate spending bills they've ushered through Congress. The amount of money GWB & co. have used to paint their grand ole sky has enraged many staunch conservatives. But what made them think for a moment that those people would ever vote for Democrats? Why appeal to the right of the right when it's the middle of the right and the various cross-hatchings of left and right that finds itself divided? There are more than me around who like conservative fiscal and constitutional positions (I expect to pay for my guns!), but who also favor liberal social themes. If either party could think about it for a moment they might realize it's a more rational and consistent platform than either of theirs: don't tell me how to live, don't take my stuff (and surely don't claim you can spend my money better than I can), keep your armies shooting in the right direction, and keep your greedy hands off my beloved James Madison. It's a simple formula, but nobody in Washington seems to know about it.
§ Tech: Programming guru Bruce Eckel now has a second edition of his classic (and free)
Thinking in C++ available for download. While I originally learned the fundamentals of object oriented programming elsewhere, it was this book more than anything else that really made me understand it (I own a physical, non-free version I bought before it was offered for download, and I recommend getting it that way -- it needs more attention than your computer monitor can attract). Also check out his ever useful Thinking in Java, now on its third edition. Neither book is really for beginners (although he has beginner sections), but more for those wishing to cross into sophisticated and responsible software development. I wish any number of past coworkers had read them.
Also, Eclipse has a new 3.0 milestone build (M7). I keep using the current betas of Eclipse but I think that since version 2 it's has become a bit bloated. It does all kinds of things now that I have no need for (like drawing a box around quoted text strings while I type them). There may be too many developers contributing now, too many out-of-work programmers trying to get the right to put "Eclipse" on their resumes. I kind of dread the transition to the new interface: too many swoopy lines tend to overcomplicate things imo. Otoh I find I do use some of the additions: the JUnit integration is convenient, the keyboard remapping is warmly welcomed (who's brilliant idea was it to tie F3 to Open Declaration anyway?), fastview is cool, as are dockable editor windows, and I really like the ability to add task-related keywords (like TODO and XXX) which are then highlighted in one of the vertical bars and listed in the tasks window. Btw, I highly recommend using the -data command line arg for pointing it to a workspace outside of the eclipse tree: it makes for much easier version updates.
I was recently forced to install Visual Studio 6, and found the difference between that previously much loved IDE and Eclipse to be striking. (Actually it was VS5 I had my great love affair with, but version 6 is not so different.) VS seems clunky now, non-intuitive (just *try* to add numerous import paths and libraries without frowning at least twelve times), and the editor sort of barren. Eclipse now features all the innovations that VS once had over its competitors (eg jumping to declarations and viewing call hierarchies), but then I haven't tried using Eclipse with C code (and seriously hope not to).
My need was to compile some Win32 cpp code into a dll with a JNI wrapper, and at first I didn't have the heart to install Visual Studio (much as an anthropologist might not want dinosaurs roaming around their laboratory). LCC, which I use now and then for compling c programs, doesn't know c++. Why doesn't Windows come with a simple compiler the way unix does, I raged. Then I remembered that Borland had begun offering its version 5 compiler command line tools for free -- and I probably even had a copy around somewhere (I did, on my file server). But then I learned that MS had quietly made its current compiler freely available as part of the .Net Framework SDK. That one's rather larger to download than the Borland one (106M vs 8M) though, and you also need the core Platform SDK if you want to work with the Win32 API (which is like 300M or something), a-and you have to get the .Net Redistributable Package if you don't have it (whatever that is).... (nothing is ever small with MS).... But you also get the C# compiler in case you want to, I don't know, donate it to a future museum or something. And after looking at both of them I have to recommend the MS compiler since Borland makes a voluminous pain in the arse out of building Win32 applications (especially when it comes to linking in resources). So better yet you can just dust off that old Visual Studio disk you stole from work and viola: the makefiles start magically working again.
§ Tech/Current Events/Politics crossover! Racist Outsourcing Screed: Over the past couple of weeks The Economist has launched a campaign promoting and defending the outsourcing of services to foreign countries (i.e. "offshoring"), including those requiring advanced skills like computer programming. Their position is that the principle of free trade is not and never was limited by economic philosophers like Adam Smith to manufacturing, and that services should be no more protected against foreign competition. This is the same position taken by Gregory Mankiw, chairman of the White's House's Council of Economic Advisors: that if a product or service can be had more cheaply in another country then it is better for America to export it. "Resources are advantageously redeployed," writes the Economist, "with added investment and growth in the exporting country, and lower prices in the importing country."
This is the macroeconomic view, defensible in principle, but as is often the case, ignorant of the details. See Robert Cringely's column from Jan. 22 for some of them, or this Washington Post editorial for more. There are issues involved with the outsourcing of technical services that economists, policy makers, and business managers fail to consider. One faulty assumption made by the macro view is that workers are fungible, that they can be freely interchanged with other workers in order to achieve the same result. I know this to be false just by having worked on numerous projects where a small percentage of the workers did the great majority of the work (a tendency which I believe to be the case in most organizations). But even assuming an equal level of skill, the fungibility of workers across national and cultural divisions is undermined by the simple and basic fact of communication barriers. Information technology is not only about solving business problems, but about communicating how those problems have been solved. Language, locality, vernacular, all play an important role. Ignoring the obvious impact language has upon call center outsourcing, the problem turns up in possibly unforseen ways.
For example, communication barriers have a direct and significant impact upon the general maintainability of software code. Most of the expense involved with software production, and the greater part of most IT departments' spending, is maintenace: around 60 to 70 percent of total IT spending is consumed by its operating budget, of which maintenance consumes the bulk. Maintence includes tasks like correcting bugs, expanding functionality, refactoring for additional constraints or changed business conditions, as well as the staff required to perform them. Apart from initial design, the main factors impacting code maintainability concerns communication. How well is the software documented? How clearly commented is the source code? How logical and expressive are the plethora of names involved in any large system (source files, modules, methods, classes, functions, variables, packages, etc). These are concerns that cannot be satisfied by managers; they depend upon the ability of the individual programmer to clearly document his work, to communicate with another, future maintenance programmer, what the code does, how, and why. Now consider the very plausible scenario that the code is written by someone with little or no English, to be maintained in the future by someone part of the company's domestic IT staff. The degree of difficulty involved in the maintenance of that code increases exponentially. I know, I've seen it.
As the maintainability of software code decreases, the cost of maintenance increases. The maintenance programmer must take more time to understand the code, and must very likely refactor it into something approaching legibility once he does understand it. Now suppose the IT department faces a deadline on the maintenance tasks. Additional staff must be allocated to help. One resource requirement turns into 1.5. And the original author of the code cannot be consulted because he's 1) nameless, 2) somewhere in Bangalore, 3) fluent in six dialects of Hindi but zero in English, and/or 4) lacking in any incentive to help because he's already been paid for the project and is now involved with something completely different. What has been gained by offshoring the service in the first place has suddenly -- and unexpectedly -- been lost.
The allure of offshoring for company directors and investors may lie in short term gains to their bottom line. This is the brand of economic philosophy that kept the national economy far afloat in the late nineties, and offshoring seems to subscribe to the that same bubble economics that contributed to the
[to be continued]
§ Television: 24 has become odd for an odd reason: everybody in the A plot is white, and everybody in the B plot is black. It's the most segregated tv show since Leave it to Beaver.