Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
What's the story with these ads on Slashdot? Check out our new blog post to find out. ×

Comment Fix the documentation (Score 3, Insightful) 584

We have Googling and trial&error because documentation of APIs is universally deficient.

I just spent two days trying to figure out why my OpenGL 3.2 context would not initialize on Linux. In the end I found it was because I was not using a private colormap. It doesn't make any kind of sense to me, even now, and even knowing what to look for I wasn't able to find any kind of warning in what is laughably called a "manual" (it sure looks like a quick list of function calls without any structure and barely any explanation to me, but YMMV).

How many times do we have to see this:

int CreateContext (int, void*)

"this function creates a context. The first parameter is flags. The second is used to pass additional information."

and are left wondering:

- what _is_ a 'context', what do I need one for, and what is its lifetime?
- what flags can I pass? What do they do, _in detail_?
- what "additional information" can I pass? Is it mandatory? Is it flag-dependent? What structure should it have?
- can there be errors? How do I see them? How do I decode them into something human-readable?
- if I delete the context, will it take any associated items with it, or do I need to free those manually?
- what sort of thread-safety can I expect?

The problem is not skill level, although it certainly helps to be equipped with knowledge of other APIs and the right level of paranoia. It is, for a very large part, badly designed and even badlier documented APIs. And it really doesn't matter where it comes from, amateurs or pros, open source or closed, it's all painfully bad. The best you can usually hope for is a list of function calls, but almost never any sense of how it hangs together, good explanations of parameters and return codes, and let's not even start about thread safety...

As an example of good documentation, I'd like to point out Postgres. These guys really work hard on documentation, and it shines as a result. MSDN, assuming you can find what you were looking for to begin with, is not bad either. And on the other end of the scale we have things like OpenSSL, where I believe lack of documentation is in fact part of their business model. That alone should be reason to avoid it...

Comment Re:BINGO (Score 1) 125

Your solutions are not solutions at all. You are basing everything on a combination of trust, and techniques of dubious real-world value. That's fine for a few very specific domains, but in the real world things like "time to market" also matter.

Whitelisting is bullshit. I should not have to rely on a "trusted" list of applications; I should trust that the OS has containers that stop any damage from being done in the first place. And I don't want to give an application either nothing, or the keys to the kingdom, which is essentially what UAC or sudo ask you to do. Let me choose what it gets on a case by case basis: network access, full screen access, access to specific devices and directories, etc.

Can you write malicious software in Ada or Java? Of course, and it's trivial. Can a person with a CS degree write bad software? Don't make me laugh, I see it every day. Those are not solutions at all.

The answer is not trust, it is containers with specific, easily understood access rights.

Comment The final straw (Score 4, Funny) 125

The software Checkpoint makes already prevents any kind of useful work from being done on a machine. Now it takes the logical final step, and just completely stops the CPU from doing anything at all! Our IT department will love it for sure. Anything they can do to slow down actual business processes.

Seriously. We use Checkpoint at work. On a fast machine with an SSD, compiling takes longer than on machines with a normal harddisk...

Comment Re:Doesn't Predate Mohammed (Score 1) 613

Well, for one thing, because I'm not in fact under a rock. I'm not saying there aren't any muslims that aren't good, honest, and peaceful, but if they are, it is _despite_ their religion, not because of it. It is because they are, in all but name, apostate - they have left the core tenets of their faith behind and are living, by any non-islamic standard, decent lives. Great, more power to them!

But there are other muslims who are perfectly happy to do all those bad things I've mentioned and more, in the name of their faith, and they have ample support in the holy texts of islam. All that text is publicly available, you know - we can read it too, and it is really easy to understand where ISIS gets its inspiration when it burns a few prisoners or destroys ancient monuments.

The discovery of this document is actually a great opportunity for islam. It removes just one single fact - the absolute authority of mohamed. If he was so clearly 'mistaken' about the origin of the texts, maybe he was also making the rest up? Maybe he is in fact not a prophet at all, but an imposter, who took an earlier, gentler islam and transformed it into the warlike monstrosity it is today. If you are a muslim, wouldn't you want to know?

At least the world is not going to blame the muslims for shaving some of the sharper edges of their religion, I can tell you that.

Why, by the way, do you assume I'm Christian, and not for example hindu, Jewish, shintoist, Buddhist, or atheist?

Comment Re:C++, hands down (Score 1) 427

I agree on the templates, but I thought we were discussing issues that were specific to C++11 (and later). In general, I find that auto, the range-based for loop, lambdas, deleted functions, override, etc. as well as the new additions to STL all vastly improve code quality. Move semantics, once I understood what it was, felt like a hole I never knew was there that was finally filled.

Comment Re:Doesn't Predate Mohammed (Score 1) 613

And that's such a shame. There's just so much to love in islam: bombings, beheadings, mutilation, pedophilia, apartheid, racism - if it offends human decency, you can be sure islam promotes it. How dare anyone speak out against it... It's one great strength is its ability to take a diverse group of poor, illiterate, angry people and bring them together under the umbrella of arab superiority, against the west and anyone else unlucky enough to be perceived as an enemy. And it's only through violence and mob rule that islam has managed to gain and retain any ground in the world.

Comment Re:The consortium needs to finish human languages (Score 1) 264

That guy needs to get off his high horse. White people designed computers. White people designed unicode in an effort to allow non-white people to use computers. White people apparently made an honest mistake when creating the code points for a complex, and to them largely unknown language. And apparently white people must fix it, because I don't see this guy doing anything but bitching about it.

Oh, and I'm a white person whose family name contains a character that is not in ASCII either, a situation that has pretty much forced my family to adopt a different spelling (using either 'y' or 'ij' instead of Dutch lange-ij, a character I cannot even write here). So much for white superiority, then...

Comment Re:The Onion had it right (Score 1) 118

Of course, no one in their right mind would even consider the possibility that black people invest in research to stop a disease that is rampant in their own countries... Black people shouldn't have any kind of responsibility for their own lives. They _need_ white people to provide them with food, medicine, etc. And to think otherwise is racist.

While food and medicine is ok, please keep in mind that white people shouldn't attempt to provide free transportation and jobs. That's also racist.

Comment Remove features as well (Score 1) 133

Pruning the tree, so to speak. I regularly identify features that are candidates for pruning:

- Because they are disruptive in the code base (needing an inordinate amount of developer effort to keep them working in a changing environment, or because they make testing much more difficult, etc.)
- Because they are disruptive in the user interface (needing a lot of screen space while barely being used)
- Because they are disruptive in the user manual (if you cannot properly explain it, perhaps because it relies too deeply on internal knowledge, or because the set of conditions that cause the feature to work is just too large)

Some of these I propose to the customers for removal (I work on a rather specialized industrial application, so the number of customers is not that large). Others I break in a subtle way and wait to see if anybody complains. If they don't, the feature is gone in the next version.

Writing software is a lot like gardening. You shouldn't let your garden grow wild, it's ugly.

Comment Re:The joys of youth (Score 1) 149

Agreed.

My comment on being locked in specifically referred to the long train of Microsoft technologies that arrived, flowered for a short while, and then whithered over the years while I was working on this thing. One of my first choices as a young engineer was to use the win32 API instead of MFC. MFC proved to be a dead-end, so I feel fully justified in choosing what was (officially) the more difficult option. I forget the names of the others... Silverlight is a good example. I feel for anyone who invested in that. And .NET is on the way out, _in my opinion_ (feel free to disagree) - relying on that is a good way to be obsolete a few years from now. But there certainly were others. Who is using COM now, except to interface with specific Microsoft APIs? DCOM? ATL? OLE?

Modernisation is something I've always done during quiet periods. None of my customers needed (or need, even today) IPv6 support, but since adding it was fairly straightforward I've done so anyway. None of my customers needed unicode when I introduced it either, but we have since added a German customer who certainly appreciates being able to use that German S character. Could they have lived without it? Probably. Could we have built in unicode support while already under high load to tailor the software to their site? I very much doubt it. And consider this: the competition for this bid was a package I also happen to know, that crashes when you feed it any character that has the high bit set, so that was one point in our favor then. IPv6 will eventually make sense, and when some customer convenes a Tiger Team for Emergency Network Migration to IPv6 they will call me in, and I will nod sagely and say "click that checkbox over there, and it uses IPv6 instead."

My language of choice is C++. I find the hatred that language gets on /. astonishing - it is not only a powerful language that results in very fast programs, but also a well-established standard supported by multiple vendors with multiple compilers. Over the years I've compiled this project with Visual C++ 5, 6, 2008, 2012, 2013, and now 2015 (see me chase those versions!), acc, and uncounted GCC versions. I'd truly hate to be stuck with a single-compiler language.

We rely on plenty of external packages as well. The underlying database is currently Postgres. Before it used to be Oracle. Our SQL usage is not so arcane that we coulnd't run it on other SQL-compliant databases - a few specialty functions for things like checking database sizes would have to be rewritten, but the bulk of the software would run out of the box.

We have our own drawing API (about 7 primitives, nothing too fancy). It used to do win32 only. Then it got the ability to do X11 as well. Then we changed it to Cairo. We print using the same API - originally through xprint, and now through Cairo + CUPS. It may sound like a lot of change, but it was all confined to a handful of classes, with the rest of the software never knowing the difference.

Anyway, just rambling on now ;-)

Comment Re:The joys of youth (Score 4, Insightful) 149

Your advice means I would be stuck using Visual Studio 5, and GCC 2.8.0. Hope you don't mind me 'chasing versions'...

I have, however, refrained from chasing every Microsoft fad over the years, meaning I'm now in charge of a modern C++11 application, happily running on Linux and Windows, in 32-bit and 64-bit mode, and with full support for things like unicode and IPv6. Instead of hoping that Microsoft would get off their lazy ass and finally update MFC, or something...

There was a question here on slashdot on how to plan for 20 year development cycles the other day. I'm almost at that point now, and let me tell you what keeps an application alive:

- don't get locked in to single-vendor technology that might disappear on a moment's notice.
- hide API's inside your own classes. That makes ripping them out and replacing them with something else so much easier.
- stick to standards.
- invest in regular modernisation. Do it when reasonably can, not when you absolutely must.
- refactor whatever stinks.
- keep your own skills up to date. Apply as needed.

Just my two cents, of course...

Comment Re:In favor of paid copyright protection (Score 1) 93

Their lobbying clearly indicates they want indefinite copyright. I'm simply asking them to put their money where their mouth is - and in the process stop bothering the rest of us with ridiculous copyrights on ancient works that have no economic value whatsoever. It is not at all an unreasonable request that the user pays, so to speak - that copyright holders who want protection beyond a reasonable timeframe, also get to pay for enjoying that protection.

It is precisely those continuous extensions that I want to put an end to. Instead of extending copyright for _every_ work, do it my way: let the copyright holder choose, but also let them pay for the privilege. Mickey Mouse will be under copyright for a long time to come, but works that are no longer economically viable shouldn't simply be locked into a cupboard and forgotten. My proposal sets them free.

"I have not the slightest confidence in 'spiritual manifestations.'" -- Robert G. Ingersoll

Working...