Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: Using the D Programming Language

Hmm, what to write about - my recipe for clam-sauce pasta casserole? Clever ways to feed the cats so one won't steal food from another? Touchy-feely poetry about flowers? Hmmm.. hey this is Slashdot - how about software development? Okay. I don't actually write code that much, or write anything bigger than five or six lines of curve-fitting code in Python, or image processing filters in IDL or C++. Ew, C++. That is a topic!

Where I currently work (fill in the blank, any company in 2013 will do), Almost everything is written in C or C++, some Python and Java in certain places. This is for the company's product, and half their in-house stuff. Web apps and services use the usual technologies, but aren't the focus of the company's market or my interests, so beside the point.

Large C++ projects take hours to compile. A few weeks ago, someone complained about a build taking too long - about 11 hours, iirc, instead of the expected 5 hours. Huh? Is it really okay for an allegedly intelligent carbon-based species to be needing 5 hours to compile and link a large piece of software. Yes, I heard, it's "large". But still... I know we can do much better.

Ten years ago, or thereabouts, I wrote some stuff in Ada95. It compiled fast. It ran fast. The execution speed wasn't different enough from C++ or C to concern me. And I do image processing, scientific simuations, 3D graphics, stuff like that where speed *is* important. Developer time is expensive. Ada95 all the way! I thought then. But there are other languages. In the last few years we now have Google's Go programming language, and Walter Bright's excellent D programming language, and if you like things that have faded from glory, the Modula3 language had some nice features (and some show-stopper lapses in syntax.)

Why is C++ so heavily used? It's popular, and an example of "nothing succeeds like success", and has had an infinite number of developer tools(*) on the market since the late 1980s. It allowed (almost) OO style thinking and designs in a tight pointer-based C-style world. It provided enough power to enough different programmers in enough different fields, including large fields such as business infrastructure and consumer products, that it caught on.

But C++ dragged in #include headers, certain syntax peculiarities that annoy compilers but please Humans, and a lack of useful complex data types except as defined through headers and templates (such as STL). There are oddities of the C++ language that prevent the easy and reliable development of tools for easy and reliable procedures such as static analysis, and automatic creation of interface code for connecting to other modules/libraries/whatnot in other languages. Yeah, pre-compiled headers help, but still, the lack of a real module system in C++ puts it way in back for compile time compared to almost any other language in widespread use today. Slow for compilers, and difficult for Humans who never master all the aspects of the language. ("Just use the features you like!" No, most of us work on code others wrote, so must know all aspects of the language.) Remember also that C++ took a lot from C, where it's easy to forget "break" in switch statements, and many other syntax errors trip us up every day.

C++ development is slow, and C++ builds are slow, yet projects written in Go, D, Ada95, Java, C#, Modula3, ..., can be written in half the time, and compile and link in seconds instead of minutes. Why does this not translate into financial pressure for most companies who develop software in-house or as product? Developer time is expensive. (Oh, I said that already.) Seems like executives and project managers would be pushing hard for everyone to switch to D, or something. Anything but C++. Wouldn't faster edit-compile-test-think cycles go faster and therefore result in better products and therefore better profits?

It can't be mass-think or institutional inertial holding C++ in place. Such forces aren't a match for profit, but beside that, just look at how fast Java became popular, and C# (after some initial wobbles), and other new tools are being adopted all the time.

Studies have been done showing other languages beating C++ for developer time, for compile time (obvious from personal experience), and occasionally even execution time, though that's pretty hard these days. Many languages and their toolsets can meet C++ execution times, but not beat. That is a minor issue - it is developer time that costs businesses and other organizations.

So far, few programmers use D but all say it's quicker to get the code written correctly, compiles blazingly fast, and overall have a better experience with it. It allows use of existing libraries with C-style APIs. I don't think it can be used to write a *nix kernel or device drivers, yet, but there's no reason in principle preventing that. You cannot reject a language due to lacking some feature - someone will add it! If D cannot be big right now, it's in a great position to become big.

Note that I care nothing for web app tools, big-time enterprise business tools, databases and their tools, beyond what I need to deal with for my science, engineering, animation and art projects. Someone who has a foot in those other worlds should think about and comment on this from their point of view.

(*) - some exaggeration may be involved.

User Journal

Journal Journal: Big Move

Phasing out Cassini work. A number of reasons conspire, but primarily concerns involving family/relatives. After working on a zillion Saturn images, i won't mind doing something different for a while. Though i expect to be working hard on advanced scientific software, Python development, physics research, and such, i also should have in my new situation more time to work on photography. Will be moving to Florida. Not saying just where or why, not just yet... It has been a massive effort brain-dumping my know-how and enhancement tricks, recording some how-to demos, and organizing the move, etc. This will involve a change of email address. New addr TBD; i have no idea what ISPs are available at the new location. So i'm using a gmail account for now, and probably should figure out how to get an email address working on my home website's server... if i weren't lazy/busy/tired....
User Journal

Journal Journal: A Word for Cheaters Like Me

My brief self-description describes myself as "a vegetarian who cheats a lot". I stick to a mostly plant-based diet, with a good variety of salads, veggie soups, fruits, pepperoni-and-veggie pizza, and occasional turkey pot pie - but only if it's loaded with veggies. Never a thick slab of steak, or a mound of meat. Ugh! I've heard of vegetarians, vegans, and even fructarians, but no term to categorize weirdos like me - just "vegetarian who cheats".

While web-surfing today i discovered there *is* a word for this eating preference: flexitarian. it's in wikipedia, so its official! Found The Word in a recent article on American-style eating and health by Michael Pollan in the NY Times (link to page 11 of 12:
http://www.nytimes.com/2007/01/28/magazine/28nutritionism.t.html?pagewanted=11&ei=5090&en=a18a7f35515014c7&ex=1327640400&partner=rssuserland&emc=rss)

User Journal

Journal Journal: Marvels of Subversion

Cold, snowy, windy....more so tomorrow. To work from home tomorrow becomes appealing. Thanks to Subversion, i can check out files from various projects and crank away. No mucking aroun in a telnet or SSH session, making tarballs, tapping in long URLs that i dont' get right the first time. just a dumb-simple "svn update". Many use subversion every day, as we all make use of indoor plumbing, artificial lighting, and other marvels of modern invention, thinking of our task at hand but hardly ever thinking of these technologies themselves. Except, of course, for plumbers, electricians, and software developers.

I am very glad for Subversion and look forward to working from home tomorrow.

Space

Journal Journal: Fountains of Enceladus

Well, this was worth getting up early for - Enceladus plume images, spectacular ones, released from CICLOPS today. http://ciclops.org/view.php?id=1688. There's definitely something going on there at Enceladus' south pole. Seeing this heavenly orb with what appears in overexposed images like rocket exhaust reminded me of a painting - Frank Kelly Freas' illustration of the Earth boosted by a giant rocket engine embedded in Antarctica (hmm, the south pole...) - art for the story "Sins of the Fathers", Stan Schmidt, published in Analog 1973, and reproduced in Frank Kelly Freas: The Art of Science Fiction, publ. in 1977.
User Journal

Journal Journal: Tethys and Hyperion

We are being slashdotted! The intriguing new images of Hyperion and Tethys went online (ciclops.org) and we watch the apparent sluggishness of our http server. It's actually a quite powerful machine set up as right as can be by our talented sysadmin, a machine that never breaks a sweat with even the biggest spikes of traffic, but i guess we need to convince the boss to upgrade from the 300 baud modem as our link to the outside world....

It has been fun watching these images appear in the media, but now it is late and i must sleep well so I can help make more of these magnificent images - i think it is Dione getting the next flyby. So many great images have been made, every target we image in the Saturn system has had surprises - Cassini scientists are having more fun than cats at the tuna cannery.

User Journal

Journal Journal: This *IS* required!

Though this will go down on my permanent record, i must create at least one admittedly lame Entry, just to see what happens... (in fact i didn't know /. had a Journal feature til i started poking around just now)

Slashdot Top Deals

Were there fewer fools, knaves would starve. - Anonymous

Working...