Slashdot Mirror


User: fnj

fnj's activity in the archive.

Stories
0
Comments
5,577
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 5,577

  1. Re:Design flaws in QT? on C++ GUI Programming with Qt 4 · · Score: 1

    "Throwing exceptions is poor style, especially for normal error conditions. Exceptions hould only occur when something totally unpredictable and unrecoverable like out of memory occurs. Exceptions are performance bottlenecks, lead to ugly, verbose code, and spaghetti like error handling. They should never be used for anything that can be anticipated and handled in other manners."

    Bzzzt. Wrong. Thank you for playing.

    Like most dogmatic, arbitrary, rigid, "I have seen the light" rules, this one has poor applicability to C++, which is a many-sided non-theological programming language. Unlike many other recent languages which have been promoted as panaceas, C++ gives you a variety of paradigms. You have not only object oriented programming using classes, you also have procedural, free-standing functions and variables. You have not only references, but also pointers. You can use bare naked pointers, or wrappered "smart" pointers. You have "new/delete", which are very structured, but still also "malloc/free", which are free form.

    And you have exceptions.

    Use these tools in each case where they offer you advantages in whatever programming problem you are tackling. Dogma will not help you as much as free thinking and willingness to explore various approaches.

    There are three particularly important and valuable properties of exceptions:

    (1) They allow directly handling the exceptional condition at the point best suited to handle it: not necessarily the caller, but maybe several levels above. With proper coding discipline, you can readily ensure via methodology - not tedium - that all the intermediate levels in the call chain are cleaned up perfectly when the exception is thrown. This is far from spaghetti coding; it is much more straightforward than laboriously passing an exceptional condition up through layer after layer of calls. Not much is more depressing (and error prone) than writing code where the caller checks a return value, and if an error condition is indicated, returns to his own caller, who then does the same thing, for who knows how many levels.

    (2) They are an out of band reporting mechanism. In case the return code is an unsigned integer type, which counts from 0 to +n, where every one of those values is valid for the quantity being returned, you can't very well reserve any of the possible values for an error report. Well, you can do so, but then you have a suboptimal solution like the one being discussed, where you can't tell if 0 is an error or the actual valid value. Absent exceptions, you must then resort to returning a structure containing the value plus an error code, or you must return one or the other separately via a reference parameter.

    (3) The user is protected against ignoring the exceptional condition. If it's just a return code, the caller may not check it, and no one will ever know when the exceptional condition occurs. There is no chance to fix code when you have no indication that it is wrong. Exceptions, on the other hand, if ignored, will by default terminate the thread or process. That will get noticed, particularly if you use set_terminate to arrange for logging and then making sure the entire process terminates. Better yet, put a try/catch (...) at the very top level of each thread.

  2. Committees, sigh on Net Neutrality Voted Down in U.S. House Committee · · Score: 1

    Interestingly, the word "committee" does not appear in the US Constitution (neither does the word "party" in the context of political party). I highly doubt the designers envisioned a bunch of committees having a stranglehold on the entire operation of the legislative branch of the government (nor but two rigidly disciplined political parties, disguising the fact that they are Tweedledum and Tweedledee, having unassailable joint rule of the entire nation for an eternity).

  3. Re:Laptop, I don't think so... on Apple Announced 17" MacBook Pro · · Score: 1

    I am waiting for someone to up the clockspeeds to "normal" (since Apple apparently purposely slows things down), burns their thighs and other sensitive areas, then sues Apple, just like that chic sued MacDonalds...

    No offense, but dumb analogy. The analogy that would make sense would be to a hypothetical case where someone bought coffee heated to a customary, comparatively moderate, temperature at McDonalds, then took it home and nuked it, and then burned themselves. That never happened, and they would have no case, just like your stupid hypothetical Mac user would have no case.

    In the infamous real McDonalds case, the coffee was delivered by McDonalds at an extremely high temperature, well beyond what is customary or what makes sense for any drink.

  4. Clueless on Bunk Camp - Apple Gets It Wrong? · · Score: 1

    Could Cnet.com.au possibly be any more clueless? Boot camp is what it is. Virtualized guest OS solutions are already starting to appear (Parallels Workstation for Intel Macs is currently in beta and close to release; VMware is also semi-officially working on it). Both solutions have their uses. A virtual machine is no good for running games. Dual boot is no good for cutting and pasting between simultaneously running sessions. Doesn't mean they both don't have their uses.

    As for Apple getting into the business of supporting the jungle of commodity PC hardware out there - they are not that stupid, and Cnet is an ass for even suggesting it. The reasons why this would be a fool's errand are well appreciated by anyone with a clue.

  5. Jeeze, misinformatrion from sales droids on DRM and the Myth of the Analog Hole · · Score: 1

    Your sales droid is an idiot. DVD recorders do not place region codes in the DVDs they record. There would be no reason to. Region codes are about controlling marketing costs for commercial videos. That's the only reason they exist. So you can record your own videos and anyone will be able to play them (subject to the NTSC vs PAL issue - and that is a real issue for North America vs Europe). What you would have some trouble doing is copying commercial VHS tapes or DVDs - but you clearly state that isn't your purpose.

    So just go ahead and buy the gosh darn recorder. Players and TVs which can show both NTSC and PAL are readily available in Europe.

  6. Re:What about the limited number of writes? on 32 GB Flash Storage Drive Announced · · Score: 1

    Hard drives also have the same limitation (You can only change the [magnetic pole] of a bit on the hard drive a certain amout of times).

    Do you have a reference for this?

    Its just you will never reach it before the mechanics of the drive fail.

    If it doesn't limit anybody, then by definition it's not a limitation.

  7. Re:Advanced GNOME configuration on A Look at GNOME 2.14 · · Score: 3, Insightful

    Well said.

    I should be able to explore the majority of the useful functionality just by opening the application and clicking through it.

    You should bloody well be able to explore ALL of the functionality, PERIOD. There is simply no excuse for ANY of the configuration options not to be exposed within easy/obvious reach and explorable in as much or as little detail as desired. Don't want to put off beginners? It's dead simple to cater to both beginners and in depth users. It's as simple as putting an "Advanced Preferences" line under the "Preferences" line in the "Edit" menu on the app. Hello? Gnome? Anybody home? How hard is that, damnit!?

  8. Re:long-term occupation... on Lockheed Martin Plans Unmanned Aircraft · · Score: 1

    I see that the British has just recently reduced their occupying troop strength below 20,000 troops...

    In Germany.

    It's a quagmire, I tell you! I blame Churchill for not having an exit strategy.


    Thos are not occupation troops. They are there as part of a cooperative agreement between both sides. This change occurred a long time ago. One other leeeeeeetle thing. No one is shooting at NATO troops in Germany, or trying to blow them up.

    A quagmire is when the years roll by and you're not accomplishing anything whatsoever in terms of eliminating, demoralizing, or dissuading the opposing forces.

  9. Re:"international disaster" on Challenger Tragedy - In Depth, and Deeply Felt · · Score: 1

    ... implying that they should have been able to see it coming. It's easy to talk like that afterwards but obviously they did not know or it wouldn't have happened.

    Thankfully we have the knowledge and insight of others than you, oh clueless twit. People like Dr. Richard Feynman, who contributed his fine analytical skills to the investigative commission. You should read the Rogers Commission report. It's very lucid. The prose is not turgid nor impenetrably technical.

    It is absolutely incontrovertible that the engineers saw the specific danger. They were overruled by managers who had built a wall of denial. Everyone who paid any casual attention whatsoever to the investigation knows this.

  10. Re:Exactly - but what is the basis of rights on GPL 3 to Take Hard Line on DRM · · Score: 1

    I think thou shalt not kill codifies a right to live and a consequence should you sin against it.

    It is a prohibition against man killing man, though without a clearly specified consequence for the violator. It says nothing about a right to life in general. For example, it does not bar beasts from killing man. It does not do anything about birth defects.

  11. Exactly - but what is the basis of rights on GPL 3 to Take Hard Line on DRM · · Score: 3, Interesting

    To me, rights are something every person is born with -- inherent, God-given, natural, you call it what you want.

    The Creator doesn't give anybody any rights. They can't be inalienable because they don't exist. Does the lamb have a right not to be eaten by the lion? The caveman by the bear? The woolly mammoth not to be slain by the caveman? Nope. Quite the contrary. The setup in the natural world is carefully designed or naturally evolved (take your pick) to confer benefit to the strong, the clever, and the ruthless. Everywhere there is competition for scarce resources.

    If the whale is to have a right not to be processed by man for food and other products, it can only be because man chooses to confer and protect this right. No deity has ever done so.

    The baby born with a heart defect has no right to life conferred by nature or Creator. Without man's interest and intervention, it will die quickly.

    If man is to enjoy rights, it can only be because man promulgates and protects these rights.

    Knowledge "wants" to be free in a metaphysical sense, but it's not going to happen without the efforts of men to undo the efforts of other men to chain knowledge.

  12. All right, thinking even more about this... on Two New WMF Bugs Found · · Score: 2, Interesting

    As much fun as it is to lambast Microsoft for this kind of thing, the types of exploit that have been "exposed" recently are very difficult to predict in advance

    Oh, do you really believe that it is difficult to predict that failure to check for null pointers in C code might lead to serious problems? Criticizing coding and QC practices that don't measure up to professional standards is hardly facile or unworthy. It's sort of like criticizing rampant fraud, waste, and abuse in our government. Never excuse the inexcusable.

  13. Re:Burn less fuel.... on N.Y. Governor Pushing for Alternate Fuels · · Score: 1

    I see you are a citizen of a nation which has not taken leave of its senses.

    Even as the entire world embraces extremely efficient diesel passenger car technology, it is impossible to buy a new diesel automobile in Pataki's state (and my own state of Massachusetts and a growing number of others as well). Luckily I bought my Golf TDI before these insane regulations came into effect, and am enjoying mpg in the 40s and an extremely pleasant driving experience. My other car is a Corrado VR6, but I find the Golf just as fun to drive due to the immense diesel torque and responsiveness.

  14. Clueless goofball on N.Y. Governor Pushing for Alternate Fuels · · Score: 4, Interesting

    Pataki is a twit. He says he wants biodiesel to be made available, yet he has let the moronic authorities in his state make it IMPOSSIBLE TO PURCHASE A NEW DIESEL AUTOMOBILE THERE (as is the case in a growing number of other states as well). Talk about transparent lip service. What a doofus.

    The entire rest of the world outside of North America is embracing diesel passenger car technology, as it dramatically improves fuel economy, lowering greenhouse gas production in the process - even before you consider biodiesel, which is an essentially neutral carbon cycle participant which produces no net CO2.

  15. Re:Pfffft on A Kilowatt of Power · · Score: 1

    Anyways, 20 watts, even a SFF or mac mini uses more then 20 watts,

    Actually, no. I have measured them with a wattmeter in the AC supply line. The figure is accurate. Well, unless you're using a P4 or amd64 blowtorch. I specified Pentium M SFF, and my Pentium M SFF is indeed 20 watts.

  16. Re:Pfffft on A Kilowatt of Power · · Score: 1

    20 Watt Machine?? Wtf are you running a Pentium 75 Packard Bell?

    Or maybe, just maybe, he has the common sense to choose a notebook or a Mac Mini or a Pentium M SFF. Nothing makes me crazier than to see people surfing the web with a P4 or AMD furnace ruinning full bore, and a 3D video card sucking down power like it's going out of style when you could save 90% of that waste without the slightest impact on performance in that usage mode.

  17. Re:Pfffft on A Kilowatt of Power · · Score: 1

    a Mac Mini draws about 22 watts/hr when in use

    From the small niggles dept...
    A watt is an instantaneous power measurement. The concept of power per unit time is not meaningful. Just say, a Mac Mini draws about 22 watts. A 100 watt light bulb draws 100 watts.

    For the rest, I couldn't agree more. I have a Pentium M SFF that takes about 20 watts, and a Pentium M ATX that takes about 50 watts. They're more than capable of almost anything I want to do. I only run the heavy iron occasionally.

    Not only that, but all the lights I use a lot are compact fluorescents. That saves about 80% over incandescants. Now, if there was only a refrigerator that took advantage of the fact that there is all knds of free air outside that is below 40 degrees most of the time for 5 months of the year, I'd be a lot better off. And something better than LCD monitors and TVs that shine an intense backlight all the time during viewing, only to cut off probably 98% or more of the light on average to produce the desired image.

  18. Re:Australians... on Australian Senator Wants to Censor the Net · · Score: 1

    She was thrown out after two years when it was obvious what an idiot she was. You re-elected Bush. Who's dumb?

    Well, there is plenty of dumbness to go around, and that one really cuts home, but you should have seen the other guy. Kerry was a retard/lunatic walking free of the asylum.

    I always say the system is wrong, no candidates should be picked and then the voting be limited to these candidates. Everyone should just write the name of anyone they please. The winner is the one with the highest number of votes who actually accepts the job.

    Ironically, this is just what we do have, though. Anyone can write in anyone's name. We could have elected George Carlin (name picked at random). We have the power. We never use it. So it always comes back to the "who's dumb" thing, sigh.

  19. Re:"Billions and billions" on How Things Will Change Under IPv6 · · Score: 2, Insightful

    Repeat after me for the 34253456345324th time: NAT is not a security measure. NAT is not a security measure. NAT is not..

    You can repeat some mindless drivel endlessly, but that does not make it so. All the small users like me who have Netgear or Linksys NAT routers have thereby a very significant measure of security. With the default setup with no port forwarding, no WAN packet containing ANY destination address in the header is going to get routed to the LAN side except as part of a connection established FROM THE LAN SIDE, except by stumbling into an established translation state sequence, which is exceedingly unlikely.

    Cool it with the misdirection. It is POSSIBLE to use NAT and still permit inbound routing, but only a statistically insignificant proportion of NAT users would do so.

  20. Re:Google fix on Google Corrects Gmail Security Flaw · · Score: 1

    no no, they fixed this problem on the server side. Even if you give hackers your credentials, they still can't get in. I'd really like to see their code for this fix.

    I've got a bridge in Brooklyn to sell you. Maybe you'd really like to see that too.

  21. Garbage on LED-Based LCD Display Tested · · Score: 1

    Hasn't anyone else noticed how crappy the specs are? Brightness 230 nits, contrast 430, viewing angle 176 degrees. I have an ancient Samsung 213T 21.3" - 250/500/170 - and an ordinary 204T 20.1" - 300/700/178. The new 214T 21.3" will be 300/900/178. Any of these cost 1/10 to 1/6 as much as this overpriced clunker.

    The colors look perfectly fine to me - far better than a CRT where the 3 color guns quickly wear at differential rates.

    Sheesh, I thought this thing was supposed to IMPROVE brightness and contrast.

  22. Re:I was expecting 2.0... on OpenOffice 1.1.5 Released · · Score: 1

    Why does it take so much to release it? I've been using 1.99999999999 for half a year.

    It is exasperating. SuSE 9.3 came and went with 1.9.1. They promised an update to 2.0 real soon when SuSE 9.3 came out, but 2.0 never happened.

    Now SuSE 10.0 is about to come out, again with 1.9.x. No sign of 2.0 happening in this lifetime.

  23. Re:Ever store a pointer in a long? on OpenOffice 1.1.5 Released · · Score: 1

    I could go off on how a word processor/presentation program really should have no underlying need to address more than 2GB of memory

    I thought 640KB should be enough for anybody.

    Seriously, I knew from the beginning that the Z-80's 64KB was a joke; I was one of the first who noticed that 640KB wasn't going to cut it; THE first who realized 16MB was a straitjacket; now let me be the one to clue people in that 2GB (or 4GB if you will) is not going to be a shining mansion that lasts forever. Actually, it's starting to get grungy already.

    Get real. It's comin', baby. The future.

  24. Re:Snopes claims this to be false on What's On Your Hotel Keycard · · Score: 3, Funny

    Snopes says EVERYTHING is false. A big hurricane in New Orleans? False. Insurgency in Iraq? False. World War 2 is over? False. The earth is round? False.

  25. Re:Sal Cangeloso is a moron on Hard Drives Made for RAID Use · · Score: 1

    Damn right. For those who don't get it, RAID-0 is not even really RAID. RAID is Redundant Array of Independent Disks. RAID-0 does not have any redundancy! It should be NRAID-0 (Non Redundant Array of Independent Disks). Only an idiot would even consider RAID-0 for any purpose.