Slashdot Mirror


User: code_martial

code_martial's activity in the archive.

Stories
0
Comments
21
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 21

  1. Re:Don't worry about portability on Where Does the Business Logic Belong? · · Score: 1

    Also, and perhaps more relevantly, your client probably has made a substantial investment on the RDBMS, and they won't even dream of switching DB layers down the line.

    Not only does the back-end change less frequently, I find the front-end changing every now and then, depending on what's the latest you can hire cheap developers for. Often the type of reports and their mode of presentation also changes. Pushing business logic into the back-end allows you to keep up with the most appropriate front-end technology.

  2. Re:Templates are strong typed in C++ on How C# Was Made · · Score: 2, Interesting

    Constraints, however, are something that I think are a generally good idea.

    Stroustrup seems to be thinking of them for C++0x. See this paper, for example, from the C++ Standards Committee papers.

  3. Re:They should benchmark development time on Performance Benchmarks of Nine Languages · · Score: 1

    I've written hundreds of thousands of lines of Java code without needing or wanting to use a debugger more than a handful of times.

    I've written just a few tens of thousands of lines of C++ code but without needing or wanting to use a debugger more than a handful of times. And all I had to do with the debugger was gdb exe core and a bt to see which function segfaulted. My increase in productivity and economy of LoC over C was about 10 times with usage of STL, std::string and C++ iostreams.

    Solid encapsulation? Probably if one gets a high playing around with pointers and unsafe type casting but then he/she should be responsible for the hangovers too.

    Extensive class libraries? Betcha there are more class libraries for C++ than for Java. What's not there is a java.sun.com to locate them in one place.

  4. Re:notes from an artist on When Word Processors Are Out: What's The Best Pen? · · Score: 1

    Talking of German mechanical pencils, my favorite is Staedtler Polo 550 that I've been using for over six years now for mechanical drawing and drafting, and taking notes.

    Here in India, the best ball-point that I've come across is from Pierre Cardin. We get Japanese ADD gel pens that are really cheap (Rs 15/ US$ 0.35) but they are not good at writing. I found Parker to be really disappointing, more so considering its Rs 100 (> US$ 2.0) price tag.

    My favourite fountain pens in school happened to be Chinese made "Hero". They used to be a little rough when new but after a week of writing, the point used to smoothen out and the ink flow was very consistent till the end.

  5. Re:they why bother? on Practical C++ Programming, Second Edition · · Score: 1
    hashmap is available from SGI and GNU also ships it in its TL. Which means that though it isn't standard yet, it's fairly easily available.

    I would hazard a guess from the language of your post that you really don't consider usage of hashed lookups that hard. I'll give you the reasons why (red-black tree) map could be better than hashmap in some cases:
    • Though it's really cool to be able to search in constant time, hash functions are fairly more complex than the simple comparison functions that tree based implementations use. So, for small sets of data, RB tree based implementations may outperform hash based implementations.
    • Tree based implementations have a guaranteed worst case complexity of O(log(n)) whereas the worst case case complexity of a hashmap would be O(n). If your design critically depends on the performance of lookup, once in a while you may have to deal with really unexpected performance.
    • There's no defined order of iteration over the keys of a hash table.
    • Perfect hash functions (that don't result in collision) are difficult to invent, computationally intensive and require that the number of buckets available be definitely not less than the number of elements to be stored. Now think what you'll have to do if your keys are arbitrarily long strings.
  6. Re:Not being familiar with this... on Afterstep 2.0 Beta Includes XML Graphics System · · Score: 1

    Well, till recently even I couldn't see the point in using XML for config files.

    The point I see now is that for rather complex configuration files, using XML saves you the headache of writing and maintaining your own parser and cooking up an API for accessing the information within. It helps you get things done quick and not dirty. Besides, a third party who would ever need to peek at your configuration files has two less things to ask from you -- syntax and API for information extraction.

    XML syntax is a monstrosity to write but XML sepcific editors can help there :)

  7. Re:Not being familiar with this... on Afterstep 2.0 Beta Includes XML Graphics System · · Score: 1

    XML is no more difficult to screw...

    Darned double-negatives! I meant to say, XML is no more easy to screw....

  8. Re:Not being familiar with this... on Afterstep 2.0 Beta Includes XML Graphics System · · Score: 3, Informative
    • Does the typical "XML bloat" become an issue?

    It shouldn't. Since the XML is used here only as a configuration file, it's going to be interpreted only once while loading the theme. It might be that this slows down theme switching a bit but I'm skeptical. Metacity themese switch quite fast and they're all XML based.
    • And, is there much gained by using XML over some/any other scheme?

    The end user doesn't gain much since the XML is anyway hidden from him but it's much easier for someone to tweak a pre-existing theme to suit his purpose if it is written in XML. This screenshot (136 kB), for example, shows a mod of Metacity's Metabox theme. I could do it because the config file (seen in the maximized terminal) was not too difficult to understand and I didn't have to learn new syntax rules for manipulating it.
    • Is it very sensitive to errors, like most XML applications? If one XML file/tag gets corrupted, is the whole windowing system fucked until someone goes in on the command-line to fix it?

    Depends on the interpreting application. XML is no more difficult to screw than any other format. This includes breaking well-formedness of the document.
    • Overall, is it a good thing or a bad thing?

    For me it's OK. As long as I get to tweak things to my preferences without much ado, it doesn't matter.
  9. Re: Why JVM? on Fast Native Eclipse with GTK+ Looks · · Score: 1
    If the code is source portable (something achieved by many languages) what's the big deal about one compile per platform?


    The big deal is that unless you have the source, you're restricted to those platforms that the maker happens to support. Which is usually a depressingly small number, and if you're not running Windows XYZ, can be a pretty frustrating experience.

    Which is exactly the reason why Free Software is important. Why should the users have to pay a performance penalty just so that Big Bucks Inc. can hide their "Intellectual Property"?

    Flexibility. Can a secure kernel give different permissions to different parts of the same application, running in the same thread/process, based on where it was loaded from?

    Possible by breaking down applications into libraries and setting appropriate permissions on those libraries. Can't r-x a library, won't load it!

    Can such an application define its own security restrictions on the fly, to its own level of detail?

    Why can it not?
  10. That's Tanenbaum on Mailing Disks is Faster than Uploading Data · · Score: 3, Informative

    Never underestimate the bandwidth of a station wagon filled with backup tapes.

    This is a statement by Andrew S. Tanenbaum from his book titled Computer Networks. Though it's supposed to be a text book (with 4.5 stars on Amazon.com), I and most of my friends also regard it as a nice collection of stories related to computer networks and communication ;-)

  11. Re:Do younger minds absorb quicker? on Ageism in IT? · · Score: 1

    Pipelining, perhaps.

    Most CPUs today have pipelined architecture where you have multiple stages in a pipeline, each stage dealing with some part of the execution of an instruction. This allows the CPU to start executing another instruction before the first one has finished (gone out of the pipeline).

    If statements (any condition statements, for that matter) induce branches in the control flow. So when the CPU encounters a branch condition, it won't know which instruction to fetch next, till the branch condition is fully evaluated. This leads to holes in the pipeline (i.e. empty stages that are wasted without any processing being done), thereby causing a performance degradation.

    Of course, there are branch prediction algorithms run by the CPUs to pre-load the most likely branch in anticipation but the cost of a misprediction is pretty high. Besides this, good compilers try to re-arrange instructions in such a way that between the evaluation of a condition and the branch point there are other instrcutions that can be executed independent of the result of the condition evaluation.

  12. Re:Debuggers are for chimps on How Would You Improve Today's Debugging Tools? · · Score: 1

    The problem is, inserting all those printf() statements is quite time consuming, and removing them and modifying them is even more time consuming.

    It is not unfair to assume from the beginning that your code will have bugs initially. You can insert print statements as you code, rather than adding them as an afterthought. With more experience you'll start writing debug messages that require lesser amount of changing to locate a problem. AFA removing them is concerned, I follow a simple convention of printing a debug message on a line of it's own and simply grepping away all lines containing "std::cerr<<" when all's done.

    Finally, each time you update the printf() statements, you need to recompile the code.

    This can be tackled by, and indeed be an incentive for, good break-up of source into smaller, more intuitively organized translation units. I've seen single C files spanning ~ 10k lines in mature code. 10k lines of C can accomplish a lot and IMHO, it's better to break things into smaller, functionally grouped units.

  13. Re:Hypocrite on Dvorak: Linux too much like Windows · · Score: 1

    What's worse is that if you switch back to sawfish, all kinds of functionality (like logging out of an xession?!) breaks (thanks guys, real slick).

    OK, no need to despair. You can surely get sawfish to run nice in Gnome2 on Red Hat 8.0. I got sawfish working smooth as silk (ok, not exactly silk, would combed cotton do?) and I've written an account of it here. Try gnome-session-save --kill for Gnome Logout.

    HTH

  14. Re:I can say this.... on Has Software Development Improved? · · Score: 1

    I never said that Turing Machines couldn't have been built. All the existing computers are approximations of TM's and will remain so since infinte memory can't ever be provided for. Yes, the approximations will get closer and closer to the real thing.

    Please don't feel offended(?) by the "Mathematical Model" bit. It's not that mathematical models can't be implemented physically.

  15. You can run Galeon 1.2.6 with Mozilla 1.2 on Mozilla 1.2 Unleashed · · Score: 1

    Just set your MOZILLA_FIVE_HOME environment variable to the install dir of mozilla 1.2 and it works. However, don't blame me if you suffer crashes! I haven't had any problems so far (~ 60 mins).

    Here's a snippet of my .bash_profile:

    MOZILLA_FIVE_HOME='/usr/lib/mozilla-1.2'
    export MOZILLA_FIVE_HOME

    HTH

  16. Re:the proof is in the pudding on Has Software Development Improved? · · Score: 1

    oopsy, hate it when errors sneak past the preview. the latest stable version of Linux is 2.4.19.

  17. Re:the proof is in the pudding on Has Software Development Improved? · · Score: 1

    Linux 8.0 isn't out yet. Heck, even Linux 3.0 is yet to go into feature-freeze! The latest stable version of Linux is 2.5.19.

  18. Re:I can say this.... on Has Software Development Improved? · · Score: 1

    VM's, by the way, go back at least 20 years in the literature

    More like 60 years, oh my. Ever heard of a turing machine?


    Turing Machines are a mathematical model. VMs are implementations of a less general and less powerful type. BTW, no computer so far has been able to match the capability of a TM.

  19. Re:Java and GPL - slower software, less incentives on Has Software Development Improved? · · Score: 1
    loss of performance with the current obsession on over-inheritence and Java-style interpreted/P-code software overall.

    Most companies see the small performance loss from using object oriented languages does not compare to the loss in man hours maintaining non-OOP code.


    While this is true, it does not invalidate the point that there is a general obsession with over-inheritance, especially among novices. Overuse of inheritance also leads to situations where code flexibility is reduced or the implementation becomes quirky.

    I prefer to use switches where I see no significant benefit in capabilities with inheritance and I can assure myself that:
    • the switch will occur only in 1 or 2 places in the code.
    • the code that goes in the switch is trivial and easy to track.

  20. Re:Wait a Minute! on Indian State Switches to Linux · · Score: 1

    Do you know how they treat women in parts of the muslim world? Have you heard of female genital mutilation?

    Islam was the religion that abolished female infanticide among Pagan Arabs and it preaches a high degree of respect for women. You're hazarding generalization based on the acts of some lunatics / illiterates / superstitious people.

  21. Re:Nothing Keeps Me On Windows - I Switched on What's Keeping You On Windows? · · Score: 1

    The second is the fact that we receive book submissions from authors in Word format.

    I wonder what advantage book-writers gain from using Word Processors. The author has to be bothered about typesetting, something that's totally unrelated to writing; the format is non-standard and difficult to produce a camera-ready copy from; the result is of an inferior quality and the ease-of-use factor is grossly out-weighed by the amount of efforts put in.

    I decided never to use a Word Processor after having a tough time maintaining the consistency of look in my Dad's > 200 page Doctorate thesis and drawing all those chemical structures. It took me a week to understand LaTeX and start using it but it has payed me off very well.

    BTW, I've switched to Linux completely since over an year.