« Peace Through Strength?: The Problem with Fighting Your Way to the Negotiating Table | Main | Happy Halloween! »

October 29, 2010

Comments

A clarion call for chilling out and getting down. Good one, Russell.

Would love to get seriously into some red, but am under the weather a bit. Maybe a glass or two, then reading and resting thru the weekend. Enjoyed the Sore Winners. Thought JD was channelling me there for a brief moment. Hope that doesn't offend Jacob. Have a great weekend, All!

8 boxes out book rate yesterday.

Huh. I'd never heard of Rusty Bryant, so I expected to get the Eddie Harris/Les McCann version of Harris's song recorded live at Montreux in 1969. Bryant does a really nice job on that wonderful piece of music.

Time for a DP and Friday Night Lights. Corn Dogs and mustard, really loud parents and tons of giggling, some kids trying hard to be great. But mostly some Marshall Tucker blues, good guitar and sad songs. Melts away the week.

Can't wait for Wednesday when I don't have to see Alex Sink or Rick Scott on tv every day anymore, talk about the lesser of two evils. I could stand to not have to see Charlie Crist ever again.

But those are my problems, So Virginia I'm off to Bob Away My Blues.

I feel for you. Me, I've been piecing together a webapp out of the client's web services, VB.NET, SQL Server, Ektron CMS, MooTools and jQuery. I pity the fool that has to maintain it when I'm done.

It's at least an hour past beer:30 here, so it's time to head out to the local dive for cheap beer and whatever's on the jukebox.

McKT: Thought JD was channelling me there for a brief moment. Hope that doesn't offend Jacob.

Not in the slightest. I disagree with you about a lot of stuff, I don't think you're History's Greatest Monster.

Here at my new office I hear cocktail shakers in the kitchen, they're getting ready for the Iron Bartender contest for the Halloween Happy Hour today that I suspect may go on for rather longer than an hour (and start earlier than the 5:30 schedule...)

I am working on what is essentially My First C#/ASP Site after half a dozen years of Java and another half-dozen of Perl. Gone to the Dark Side, etc, although C# has some nice stuff that's sorely lacking in Java.

Nervous about the national elections, but that's normal. I don't think the sky will fall if the Republicans win control of Congress, but it sure will be annoying. And if I thought the Democrats would learn anything from losing I'd say they deserve to lose, since they truly have failed to deliver on jobs & growth over the past two years - too busy working on No Banker Left Behind.

Problem is, they're surely going to decide that the real reason they lost was that they weren't conservative enough, despite the success of progressive messages in 2008. Actually that's a pretext - just as it is for Republicans - for doing the favors that garner fat bribes from business. Eh, what have The People ever done for them anyway?

I have vague fantasies that some of these Tea Party-nominated nutjobs will go rogue on the Republican Party and start voting for massive stimulus when the economy inevitably tanks later this year. I doubt it, but hope springs eternal.

This just in: Long-time reader comes out of the woodwork to make useless caffeinated comments when the talk turns to web-geekery, only to immediately sink back into lurker mode. No video at 11.

@russell: I remember the ASP days. A dark time. VBScript. :( They cut out many of the worthy parts of the VisualBasic language only to graft what almost seems like the least helpful aspects of Javascript onto the bleeding remains. I cried in PHP's arms for years. I look on in earnest pity from the safety of my current Ruby job.

@JerryN: MooTools and jQuery. Why stick with just one? Two frameworks is twice the power. At least, that's why the site I maintain uses both in places.

My wife and I are 'bout to head out to Cleveland's Beachland Tavern, where they're doing their annual Halloween show, a two-night extravaganza in which local bands "dress up" as other bands and play a set of covers. Tonight's lineup:

Covering:
Faces 9 pm
New Pornographers 9:45 pm
New York Dolls 10:30 pm
Guided By Voices 11:15 pm
The Cars 12 am
Refused 1 am

It's going to be a good night.

Speaking of beer and programming:
This is too much fun: http://99-bottles-of-beer.net/language-lolcode-1544.html

And this drives me to drink -- not that I need much help: http://99-bottles-of-beer.net/language-perl-737.html Totally awesome.

Ok trying again -- now with links -- and perhaps less beer!

http://99-bottles-of-beer.net/language-lolcode-1544.html

http://99-bottles-of-beer.net/language-perl-737.html

Having finally figured out a truly idiotic bug in some 3rd party software, I'm going to keep an eye on the new test for a little while, then decide where exactly to get dinner this evening. BBQ, I suspect.

Maybe I go out to the Raider store to pick up something to wear to Sunday's game.

Read some more of Shelby Foote's first volume on the Civil War.

Try to decide whether to drink Grand Marnier or Port while I read.

Or play through some more of Mass Effect.

Javascript

Ecmascript, surely.

But this weekend is all about the World Freaking Series. Go, Giants!

Since russell brought up programming languages, I've been relearning C++ after a 10 year hiatus that was far too short. It astonishes me how primitive and broken the language is. I used to bitch about Java, but C++ has helped clarify just how...wise the Java designers were. They made some calls that I think were wrong, but none that were completely insane; most importantly they seriously wrestled with issues instead of just ignoring them and fantasizing about super brilliant programmers solving all their problems.

C++ is the result of people who have great intelligence and absolutely zero wisdom. For better or worse, that seems like a rare combination.

I'm off to Bob Away My Blues.

I'm sorry, I thought you said something else.

C++ is the result of people who have great intelligence and absolutely zero wisdom.

So C++ is for Wizards and Java for Clerics?

So C++ is for Wizards and Java for Clerics?

I was talking more about the people who designed the languages rather than the users. For users, I'd say C++ is for people (and organizations) who are too ignorant to understand their own limitations.

There are Jews in comedy? And doing good deeds?

I'd say C++ is for people (and organizations) who are too ignorant to understand their own limitations.

Since C++ is almost universally used in embedded software on military systems, that covers a lot of territory.

Jacob Davies:

"Tea Party nutjobs will go rogue .. etc."

A sane conservative predicts fiscal Armageddon:

http://andrewsullivan.theatlantic.com/the_daily_dish/2010/10/standing-athwart-the-gop-yelling-ugh-ii.html

Cheers.

Lots of drinking is a good idea between now and Tuesday.


Lots of drinking is a good idea between now and Doomsday, but let's not quibble over time frames.

This particular weekend is unusual in many respects:
1) I have to harvest the leaf crop. If only there was an ag subsidy for that.
2) I am looking forward to watching the Stewart/Colbert rally on TV, on Saturday. Or at least listening to it, though the open window, as I rake.
3) I am dreading the prospect of costumed panhandlers knocking on my door Sunday night. Maybe I can barricade the door with piles of leaves.

I should mention, a propos of nothing, that I hate raking leaves.

--TP

Speaking of harvesting the leaf crop, I have got lots of cabbages and a whole lot of mustard greens in the ground, right now.

Since C++ is almost universally used in embedded software on military systems, that covers a lot of territory.

Ah yes, the same group of programming language geniuses who presented the world with Ada.

Of course, it is not clear to me just how many of them are using actual C++ as opposed to some sort of embedded/crippled C++; I mean, if you start removing all the "interesting" features that give the language its power, then it becomes just a crappy version of C. If enough are using crippled C++ then I'm not sure how relevant they are to the discussion.

Maybe some death metal?

Dude.

It's funny reading comments from all you SW types. I did some BASIC in high school and some Fortran and C in college. Other than that, I might as well be my 90-year-old grandmother. Well, aside from owning a PC, knowing what safe mode is, and commenting on blogs, I guess. But, still, I can only imagine WTF you guys are dealing with, and the insights I just can't possibly get at this point.

I'm drinking Flying Dog's Raging Bitch, their 20th anniversary brew, a "Belgian-style IPA" - 8.3%, um, bitches.

Hats off to you all, and happy Halloween, like it or not. I can't wait for The Walking Dead. I loves me some zombies (not the Republican-Countme?/John Thullen-hated variety, of course).

I was digging the trumpet on Cold Duck Time, myself BTW. Righteous.

I'm not sure what you mean by "crippled" C++, Turbulence.

Agree with you as regards Ada, BTW. I consider myself lucky that I never had to pick that up.

I'm completely self-taught in C and C++, so my opinions in the matter of programming with those languages should be discounted accordingly.

From my POV, though, it's not so much the programming language that's important as what you're programming the machine to do. Provided a given language doesn't emplace awkward restrictions on mechanizing a given algorithm, I couldn't much care less what language I'm programming in.

I've seen some pretty cool things done in C++ that actually flew, but my idea of pretty cool and yours probably don't match very well. We've had matrix-vector libraries that overload the * operator (even for quaternion rotations) to the point where the syntax is a bit like that of Matlab, but there are (or have been) penalties that go along with that. I personally rather like the idea of taking matrix/vector math to the operator level as opposed to the function level.

How I can tell everybody here is younger: when I hear ASP I think of the predecessor to JES3. (Cue blank looks from non-mainframe types.) At least these days I'm wrestling with TCP/IP -- networks are universal and can talk to everybody.

To say nothing of wondering what the Congress is going to look like on Wednesday morning.
With nothing to say to geeky types might I be a bit pedantic and point out that Congress on Wednesday will be identical to Congress on Tuesday. January? Not so much.
Rally time (well in 5 hours).

"I'm sorry, I thought you said something else."

Nice, thanks!

I expected to get the Eddie Harris/Les McCann version of Harris's song recorded live at Montreux in 1969.

Swiss Movement, baby. Couldn't find it on YouTube, so I went with the Bryant. Mighty mighty Idris Mohammed on drums, FTW as the kids say.

But those are my problems, So Virginia I'm off to Bob Away My Blues.

Sweet Marty. Marshall Tucker takes me back to high school and college days. I could listen to that guy sing all day long. Still get to play some MT in one of the hippy bands I work with.

I am working on what is essentially My First C#/ASP Site after half a dozen years of Java and another half-dozen of Perl. Gone to the Dark Side, etc, although C# has some nice stuff that's sorely lacking in Java.

ASP.Net is an excellent framework designed around a completely and totally inappropriate programming metaphor.

It works, and it's a nice environment to work in in that classic MS Gesamtkuntswerk way, but there's some bloat there.

Spend a couple of hours and do some homework on the Page lifecycle and event model, it'll save you days of head-banging. Not the good kind of head-banging, the other kind.

Maybe also check out the request pipeline, especially the handler and filter architecture.

It's actually a nice world once you get under the hood a bit.

C++ is the result of people who have great intelligence and absolutely zero wisdom.

LOL.

C++ is like, I really want to work in Simula, but I can't find an implementation outside of academia.

I know! I'll torture C into doing it!

All of that said, still my favorite language. Stunt programmer's paradise.

Just remember that "friend" is your enemy.

We've had matrix-vector libraries that overload the * operator (even for quaternion rotations) to the point where the syntax is a bit like that of Matlab

One place I worked we built out a library for doing algebra on grids of meterological observation data. Complete with visual editor for the UI.

Big fun, and it worked pretty well.

Try doing that in Perl!!

I am, in fact, ready for some football. And possibly some homebrew.

Also, just wrote a (work-related) Perl script for the first time in a few years, am brushing up on my (work-related) C and spend my times programming in a language most no-one's ever heard of. [Mumps, fwiw.] Although really I'm spenidng more time in meetings than anything else. And I should be formally learning C# and a slew of other Web-related funstuff next year for work -- would do it earlier on my own but, alas, Real Work intervenes.

"Nervous about the national elections, but that's normal."

Not to worry JD, the world didn't end with the Dem majority as some of my friends predicted, besides we spend our lives Flirtin with Disaster every day.

I've been spending a lot of time listening to heavy metal performed by 4 cellos (Apocalyptica). They have an excellent song which isn't too happy about Catholic Priests abusing boys (I'm Not Jesus), and their radio hit (I Don't Care) is what pulled me in initially.

At the same time I'm also listening to my biggest current guilty pleasure, Lady Gaga.


HAHAHAHAAHA. Had you going. I don't really listen to Lady Gaga.

Well not at the same time as Apocalyptica. ;)

Provided a given language doesn't emplace awkward restrictions on mechanizing a given algorithm, I couldn't much care less what language I'm programming in.

Sure, but for a given task, some languages make you spend a lot more time and expend a lot more energy and leave you with something that is a lot less maintainable than others.

We've had matrix-vector libraries that overload the * operator (even for quaternion rotations) to the point where the syntax is a bit like that of Matlab, but there are (or have been) penalties that go along with that. I personally rather like the idea of taking matrix/vector math to the operator level as opposed to the function level.

Sure, it is much more convenient, but many programming languages offer operator overloading. It is not a feature unique to C++.

Closed this link dump post, totally full of absolutely essential reads you know you'll just die and the earth will explode and and the other side will win the election if you don't read.

Ok, maybe not.

You like a little George Jones? Maybe some death metal? Old school hip hop? Bootleg board mix from that '72 Grateful Dead show in Berlin?

The new Belle and Sebastian album, of course. Duh.


UNKLE: Where Did The Night Go?

Music to write to...


A Link

http://unkle.com/music/

It is not a feature unique to C++.

Fair point. But the kinds of things I value in programming languages (ease of implementation of algorithms) are almost 180 degrees away from what computer programmers value, so it doesn't really much matter what language does what. What matters to me is: does the language I have to program in do those things?

I'm an absolutely horrible programmer, but I am fair to middling at implementation of certain kinds of algorithms, and quite good at post-test analysis. So my comments about what programming languages are good by the standards of software engineers are horribly uninformed, and I try not to comment from that direction. I'm more of a "make me some good libraries so I can do my thing" kind of guy.

I have found that I have vastly less stored in the garage here than I was afraid I did, and it in fact amounts to very little, pretty much just a toaster oven and VCR (which I'm trying to decide if it's worth bothering keeping; I'm thinking not), and the packing materials for my computer stuff, so I have much less to move than I was worried about, and am thus much further advanced than I thought I was. :-)

Still pretty damn stressful, but within reason.

Good news Gary, my VCR did not survive my recent move, however the Commodore, Atari and full stereo with turntable for vinyl still made the trip.

[OMG, JES3 and its predecessor, ASP! Please, don't remind me!]

Lately I have been working both with C# and Python. Here is a language story:

The project I'm working on involves secure communication, web services (SOAP) and the use of hardware security devices. As a proof of concept I built Python from source, along with various security components (OpenSSL, M2crypto, PyKCS11). So, then, can it be hooked to the hardware token and open a SOAP/HTTPS connection using a private key held in the token? Answer: YES! The object that the SOAP package (ZSI) uses to represent the connection is derived from the right base class, and after a fair amount of futzing around (and reading the code of course) it "just works."

So, there's something to this object oriented stuff after all. Not to mention the value of open source. It was something of a nightmare to get an analogous lash up to work in C# (although also possible after weeks of web searching -- the MS documentation of this area is pitiful).

ral, You just don't understand Microsoft documentation. They must have a special school to teach their technical writers the skill of insuring that everything IS documentated, but the documentation is organized in such a fashion that no ordinary user can find what they are searching for unless they already know enough that they do not need the information.

I was on the bus to DC at dark a.m. yesterday, and back at dark p.m. A day well spent. I recommend the pale ale at Capital City Brewery, but do go on a day when you don't have to wait half an hour at the bar to be served by people who look ready to kill you. (Colbert's crowd estimate of six billion looked about right at that moment.) Now when somebody else's grandchildren ask me where I was on that historic day, I can say, "Shoveling shit in Louisiana. No, wait, that was 2011. In 2010 I was on the Mall."

My weekend jawn lately has been the third volume of the Swing West! collection, featuring music that followed the Okies and Arkies to southern California. Guitar mostly, including Les Paul, the Merles (Travis and Haggard), Glen Campbell, and some nice stuff by Buck Owens, whom I used to sneer at when Hee Haw came on, being the snotty transplanted coastal elitist that I was. And, you know, am, also too.

Sebastian: Rasputina? Another cello band, more goth than metal, pleasantly creepy.

sad to have missed a programming discussion. but, like Hogan, i spent my weekend in DC. and there's a lot of great places to drink in Georgetown.

but, for the record: C++ is where it's at. C# is nice, in its own way. but the way MS keeps adding to it, i think it's going to end up like MS Word: perfectly capable of doing the most basic tasks, but encrusted in layers and layers of stuff that 99% of users will never touch but that the developers thought would be fun to work on.

and here's 99 Bottles in the macro language for one of my apps:

&VarSet("BOBOTW", " bottles of beer on the wall. ")
&VarSet("BOB", " bottles of beer. You take one down, pass it around,")
&VarSet("X", 99)
&VarSet("Res", "")
&Q(Join(Loop(Grtr(X, 0), 
  VarSet("Res", JoinX(8, Res, X, BOBOTW, X, BOB, 
  Sub(X,1), BOBOTW, "\n")), VarSet("X", 
  Sub(X, 1))), " Bottles Of Beer!"))
&T(Res)

Speaking of MicroS~1, their implementation of C++ is...not good. They tell you, unless you insert some #pragma compiler directives, that all sorts of functions are not "safe", and offer non-ANSI, proprietary functions as "safe" alternatives.

Which are non-portable, unless you're always going to be using a Microsoft compiler. But who could ever imagine doing that?

Still, we use it (Visual Studio .NET) at work because it's the only product that is supported.

encrusted in layers and layers of stuff that 99% of users will never touch but that the developers thought would be fun to work on.

What cleek said.

C# - now with closures! Because engineers the whole world around were clamoring for closures with their pseudo-Java.

Here IMVHO are MS's two largest problems:

1. They have thousands of smart engineers who are all itching to do the Next Big Thing. Or, at least, something useful.

Somebody somewhere wrote clippy. 'Nuff said.

2. They are pathologically intent on having every product offering corner the market in something or other.

They have a profoundly anti-competitive business model.

They are so big that neither of these things will actually bring them down, it just adds incredible layers of bloat to everything they do. And, consequently, to the lives of anyone who has to work with their stuff, which is basically 80-90% of folks who code for a living.

It does sells a hell of a lot of 800-page $75 books that have a useful shelf-life of maybe a year, and hundreds of thousands if not millions of hours of training classes a year, but it's very very annoying.

It's true, coding in plain old C++ can sometimes make you feel like you need a legal staff to negotiate with your compiler, and nothing says "verbose" like an STL error message, but once you get your head around the basics you can build a nice, tight, fast version of pretty much whatever you want.

It def gives you enough rope to hang yourself, but nobody says you have to go ahead and do so.

C# - now with closures!

and coming soon, Asynchrony !

which i can make no sense of.

which i suppose is why the follow-up post to the article linked about starts with:

I want to start by being absolutely positively clear about two things, because our usability research has shown this to be confusing.

C#: it has a keyword for everything you could possibly want - or, it will have, in the next version!

LOL.

I love the combination of this:

Asynchronous code is hard to reason about

with this:

Let the compiler generate all that stuff for you

Because totally obscuring what's going on will make asynchronous cases so much easier to understand!

No worries, if troubleshooting that stuff proves to be a challenge, in C# 6.0 they will simply roll a new keyword called "fix".

First they will have to get Intel to implement the DWIM (Do What I Mean) instruction.

C#: it has a keyword for everything you could possibly want - or, it will have, in the next version!

This sums it up extraordinarily well. In addition to syntax instability, the weakness of this model is that only one group (Microsoft) can implement first-class extensions.

As I see it, C++ has two principal problems -- which are not unrelated.
1. C++ is its own extension mechanism. This is both a strength and a weakness.
Boost has great libraries made possible by these tools.
But application programmers have used them to create unholy messes. If you don't avoid operator overloading, function overloading, placement new, operator new[], delete (or, shudder, delete[]), writing templates, and casts then you'll regret it.

2. There's a huge body of legacy code in existence. In the last 30 years, people have written billions & billions of lines of C++. As with everything else, 90% of it is crud. C++ requires programmer humility & good judgment to be used successfully -- neither of these is available in any great quantity.

If you want to (re)learn C++, look for the C++ In-Depth Series. In particular, Accelerated C++, by Koenig & Moo, seems very good.

Just to let everyone know, again, follks should most definitely not expect any posts from me here for the next 3-4 weeks. Unless I miraculously get everything done and find myself with time on my hands before I finish moving out.

Otherwise, it's possible I might squeeze in one or more very short and hasty posts if it seems worthwhile, but that's all I'll possibly be able to make time for, I'm afraid.

I've still much to pack and ship, and much to do, before I leave on the 11th, so I'm not even able to spare much time for basic keeping up with more than fleeting bits of what's going, until I get unpacked and at least minimally settled in in Oakland.

Although this link-dump and more post should hold you little basta-- offer a variety of news, entertainment, hilarious video, Brooklyn's Own Space Program, Britain's once secret nuclear governmental shelter, and, y'know, this, that, and the other, for at least a little bit of time for at least one or two of you.

Check it out. Remember, I can tell if you do or not, so it'll be going into your permanent record.

It's true, coding in plain old C++ can sometimes make you feel like you need a legal staff to negotiate with your compiler, and nothing says "verbose" like an STL error message,

Mere verbosity is not the issue. The issue is that when things go wrong, really smart people can stare at error messages that are hundreds of lines long for hours without figuring out what's going on. Systems like that are...broken. There are many programming languages that support generic types and none of them produce incomprehensible error messages like C++ does for the simplest possible errors. The reason why is that C++ is a poorly designed language that was rushed through standardization for political reasons.

Look, when developers can't understand what the compiler is telling them, that's a problem. When you have to be a language lawyer just to write code that deals with maps from a tuple to a vector of things, that's a problem. It means you're wasting time and money.

but once you get your head around the basics you can build a nice, tight, fast version of pretty much whatever you want.

This is true of all turing complete languages. Again, the problem is not that you can't do cool stuff with C++. The problem is that you can do anything with it, but only at substantial cost. Unless you refuse to use all the power features (bye bye templates!).

It def gives you enough rope to hang yourself, but nobody says you have to go ahead and do so.

I think this proves too much; you can use this excuse to justify any language, no matter how horribly broken it is.


C++ is its own extension mechanism. This is both a strength and a weakness.

I don't think that's true and that's part of the problem. If it were true, then you could execute C++ code at compile time. You can't. Instead, the closest you can get is weird template meta programming which is so bizarre and limiting that no one sane dares touch it.

But application programmers have used them to create unholy messes. If you don't avoid operator overloading, function overloading, placement new, operator new[], delete (or, shudder, delete[]), writing templates, and casts then you'll regret it.

This is ridiculous. If you can't offer application developers an easy way to make type-safe generic containers, you're not a good programming language designer. Now, if you really want to say that C++ templates are a super advanced language feature that shouldn't be touched by anyone but the cloaked technomages, that's fine, but that's tantamount to admitting that C++ is a crummy language.

This argument might have worked back in 2003. But it is not 2003 anymore. Java offers generic types and they work. Without error messages that run hundreds of lines long. And without requiring a million and one bizarre non-sensical workarounds to be useful in practice (my current favorites: (1) want to put your templated function/method definitions in a cpp file? Ha ha, you can't! They have to be in header files because frack you and (2) want to access member variables in a method body for a templated class? Ha ha, you can't, not without prefixing them with this-> because the C++ compiler is too pig-ignorant to possibly figure out what you're doing). Now Java generics are much less powerful in a narrow technical sense than C++ templates, but they're much more useful because you can actually use them in practice; they're simple enough that smart people can correctly reason about them in most cases.

Instead, the closest you can get is weird template meta programming which is so bizarre and limiting that no one sane dares touch it.

i do a lot of templated C++ programming. it's very handy in image processing where you want to write functions which can handle data of different bit depths without having to write a separate function for each data type.

and speed-wise, in image processing, C++ blows the socks off C#.

want to put your templated function/method definitions in a cpp file? Ha ha, you can't

you can if you only access them from the same module, which is a limitation, but not a crippling one - for my purposes, at least.

besides, you don't even have headers in C#. it's always in the same file!

Turb, I'm hearing everything you're saying, and I also have participated in building a lot of pretty useful code in C++. I mean stuff that gets used every day, a lot, by lots of people.

Not to take this even further down the nerd rabbit hole, but WRT to elm's links, has anyone ever used the Alexandrescu stuff on actual project work?

Just asking.

i do a lot of templated C++ programming. it's very handy in image processing where you want to write functions which can handle data of different bit depths without having to write a separate function for each data type.

I'm not sure if we're talking about the same thing. I'm talking about template meta programming which is different from just using templates to specialize your image processing code algorithms for different bit depths. If you can easily imagine converting your template code into Java or C# generics, then it is almost certainly not TMP.


you can if you only access them from the same module, which is a limitation, but not a crippling one - for my purposes, at least.

That doesn't work in g++.

besides, you don't even have headers in C#. it's always in the same file!

I haven't written anything about C#. And I don't see the relevance here. The point is, splitting things into header and implementation files is a common C++ practice. That you have to abandon if you use templates on the most widely used C++ compilers. C++ templates are incompatible with common C++ practice because C++ is poorly designed; C# doesn't enter into it.


Not to take this even further down the nerd rabbit hole, but WRT to elm's links, has anyone ever used the Alexandrescu stuff on actual project work?

Can you elaborate? We use bits of boost, but not the most extreme template meta programming magic.

Can you elaborate?

I'm referring to the Alexandrescu book in elm's link, "Modern C++ Design". He basically takes common design patterns a la gang of four stuff and provides generic implementations in C++. To do so, he apparently pushes the envelope of the generic implementations in C++.

I've been living in C# world for a while so I'm no longer as on top of what's happening now in C++ as I once might have been. I've looked at Alexandrescu's stuff but have never used it in project work, or seen it used in actual project work. By "project work" I mean code that was shipped as part of a deliverable that somebody somewhere paid money for and used in some real-world application.

So, I was curious if it was just kind of very very cool academic stunt programming, or if it had made it's way into the field in any significant way.

The template metaprogramming stuff actually sounds like a step beyond the stuff in "Modern C++ Design", could be that stuff (Modern C++ Design) is all old hat at this point.

I'm talking about template meta programming

ah, yes. no, i don't write that stuff. that stuff looks like functional, academic, compiler-abuse.

I haven't written anything about C#. And I don't see the relevance here

C# has become part of this discussion.

That you have to abandon if you use templates on the most widely used C++ compilers.

are there stats showing which compilers are the most used? because using a templated class in a .CPP is something all versions of MS's C++ compiler (since at least VC6) can do - and i know MS's compilers are pretty widely used.

The issue is that when things go wrong, really smart people can stare at error messages that are hundreds of lines long for hours without figuring out what's going on.

I've never run into anything like "hundreds of lines", but I kind of get where you're coming from. Instead of saying something succinct and useful, it says...something else.

Rare is the occasion that I couldn't figure out what the problem was, given the error message as a cue. Mostly what happens to me is it'll say something to the effect that it couldn't find a definition for some function or other that is absolutely defined. I always solve that one, but I can't for the life of me recall what the real issue is, or how to fix it. Also, my C++ programming is more on the level of "basic, C-like C++" than anything more advanced, so I can well imagine that as code sophistication increases, so does the complexity of interpreting the error messages.

So: yes, this is a time-waster, all right.

Not to take this even further down the nerd rabbit hole, but WRT to elm's links, has anyone ever used the Alexandrescu stuff on actual project work?

Alexandrescu, et. al, developed a library called Loki. I never made use of it myself, Boost implements many of the proposals in Modern C++ Design, though not the big GoF pattern pieces (no Singleton, Visitor, Observer, or Multimethods in Boost).

WRT template metaprogramming, it's used for a lot of under-the-covers implementation in Boost. There are also a number of libraries in Boost that exist to make metaprogramming easier, like Fusion, MPL, Static Assert, Type Traits, Call Traits, Enable If, and Concept Check.

This is ridiculous. If you can't offer application developers an easy way to make type-safe generic containers, you're not a good programming language designer.

We're discussing a language that comes with a good set of generic type-safe containers as part of its standard implementation. If you implement a new container in terms of standard containers, you'll find your job easy.

If you insist on starting from scratch, with dynamically-allocated arrays, in-place construction, and pointer manipulation, then it's going to be somewhat complicated. Approximately as complicated as the same things were in C.

Nobody forces you to do it the hard way. I wouldn't encourage you to do it the hard way. If you're an application developer, you shouldn't be reinventing the std::deque<T>.

Regardless, if you want to hate C++, be my guest. There's plenty that I don't like about it. If not for the Boost libraries, I wouldn't use it.

The limitations of Java's NIO library limited Java's usefulness to me. I hear they're planning to fix that in the next year or so.

I've never run into anything like "hundreds of lines", but I kind of get where you're coming from.

Visual C++ 6 and 7.0 (and probably some gcc) produced awful error messages for anything template-related, they also had a badly-broken template implementation and would ICE at the drop of a hat.

produced awful error messages for anything template-related

Oh. That explains my dearth of enormous error messages.

slarti, I would bet that you would get a lot of value out of the STL stuff if you ever had the time and inclination to learn it.

It's actually (IMVHO) a very well designed and written library. Compiler errors can be very verbose but if you're just using the built-in stuff you probably will not run into too many of those.

For basic workaday data structures and algorithms it's a real time saver. As always, IMVHO.

russell: ASP.Net is an excellent framework designed around a completely and totally inappropriate programming metaphor.

Yeah, no kidding. I've spent the last few years doing client-side GWT code, where a click event is actually a click event, and server-side REST code, where representations of resources are exchanged using a small set of verbs. The ASP model where a click event is something that happens to a control on the server is just ... wrong. That is not how the internets work.

Spend a couple of hours and do some homework on the Page lifecycle and event model, it'll save you days of head-banging. Maybe also check out the request pipeline, especially the handler and filter architecture.

Done that, and so far my inclination is to put a REST handler that manages all requests, and use ASP pages purely as view templates. Which is kinda how ASP.NET MVC does it, but I don't believe in MVC for this kind of site. But I also don't believe in "This is just like a Windows form, but magically appearing in a web browser!" either. If you're gonna do that, you have to do it all in the browser, like GWT.

Anyway, that was all pretty nerdy, and presumably incomprehensible to everyone else. Sorry.

The ASP model where a click event is something that happens to a control on the server is just ... wrong. That is not how the internets work.

That was my reaction as well.

I discussed this at some length with a colleague at a shop I used to work at, and his thought was as follows:

There are millions of folks who've spent the last several years making a living coding Windows apps.

MS would like to take all of those folks along with them into the web world.

So, in classic MS fashion, MS responds by making "web development" look a hell of a lot like "Windows development". Even though making "tab A" fit into "slot B" involves some seriously hideous arm-twisting and bloat.

It probably makes sense from their point of view. And, that of their customers, who are largely the folks who hired all of those Win developers.

But technically it's seriously ill.

Visual C++ 6 and 7.0 (and probably some gcc) produced awful error messages for anything template-related,

yep.

but later versions of VC have gotten much better at giving useful error message.

speaking of MS and web dev...

hope nobody here spent a lot of time learnign Silverlight.

looks like it's going the same direction as countless other MS techs: to the scrapheap.

MS hates to play in any sandbox they don't own and/or can't control.

They're big enough to get away with it some of the time, but the web is too big of a sandbox for that to work.

I'm glad they're stepping back from Silverlight.

The comments to this entry are closed.