Slashdot Mirror


User: jgrahn

jgrahn's activity in the archive.

Stories
0
Comments
1,247
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,247

  1. Re:Options on Largest Ever Online Robbery Hits Swedish Bank · · Score: 1
    You think that's a toughy, wait untill they announce the people responsible are the same ones who lost money.

    This is a Swedish bank we're talking about.

    Sweden != Switzerland.
  2. Re:Fortran has some coolness on Sun Releases Fortran Replacement as OSS · · Score: 1
    [C++]
    As someone else pointed out with a slightly tongue in cheek quote, if you aren't totally on the ball you end up creating unexpected copies of your objects.
    I've been programming in C++ daily for years, and I've never seen this bug. Not even in beginner's code.

    I've seen void f(string s); when void f(const string& s); would have been more efficient, but never an actual harmful copy. If I don't want a type to be copyable, I forbid copying.

  3. Re:Performance on Lisp and Ruby · · Score: 1
    C++ compared to C
    This is just silly, you can write C programs in C++, and since the back end is usually shared you will end up with identical code. At most you can say that some of the C99 performance features have not yet found their way into C++, but that would go the opposite way of what you suggest. They used to be equally fast, but it has now (temporarily) become possible to write faster code in C.

    The idea in this case is, I guess, to compare the idiomatic solution to a problem in C to the idiomatic solution in C++. std::copy versus memcpy(), iostreams versus fgets() and so on. Anything else would be pretty pointless.

    Servlets compared to CGI
    Have no idea.

    All I know is, web interfaces (like the one I'm typing this into) are slow and brittle.

  4. Re:Don't use C++ as if it was only "C with classes on How Do You Know Your Code is Secure? · · Score: 1
    Not necessarily , all I'm saying is that the STL can introduce bugs of its own that can be a lot harder to find than old style buffer overruns so its not a solution that will get rid of obscure coding (as opposed to logic) bugs.

    STL doesn't introduce bugs, you do. Never place objects which don't meet the minimum requirements for being placed in STL containers into STL containers, and you'll be fine. (If we're talking buffer overruns, aren't we talking about strings and std::vector, anyway?)

  5. Re:You don't on How Do You Know Your Code is Secure? · · Score: 1
    Today, what some programmers do is to do FREE(lp); where FREE() is a macro or something that does if (a) { free(a); a=NULL; }. This prevents double frees, and ensures that future use of the pointer will predictably die with a null pointer exception.

    Yeah, right. How often do you think a is the only reference to that memory in the program? If you do have a problem, it's likely to be in some completely different part of the code, where there's an alias for a, with a completely different lifetime. Nothing you can do to a will change that.

    (And really, what's the if(a) part all about? free(3) has accepted NULL pointers for the last twenty years or so.)

  6. Re:Unix console text editors are annoying on The Birth of vi · · Score: 3, Interesting
    Another problem with vi (and maybe others) is their growing dependancies on system libraries. I recently tried and install of vi which complained of a gtk dependancy; sheesh. This one [0] is from an embedded arm system (debian). Why do I need gpm when running vi?

    You mean libgpmg1. That's not related to GTK in any way (thank god).

    Personally, I am happy with nvi(1), "a 'bug-for-bug compatible' clone of the original BSD vi". No strange dependencies there. But then I use emacs for all longer editing sessions.

  7. Re:What's wrong with ncurses? on Which Text-Based UI Do You Code With? · · Score: 1
    And you will then discover some of the reasons why you should have used ncurses in the first place: [---]

    You forgot the best reason: ncurses will optimize your I/O for you. "Is there already an 'a' at (10, 15)? Then don't render it again".

  8. Re:Crystal Ball time... on 2007 Java Predictions · · Score: -1, Flamebait
    That depends on what market we are talking about. Open sourcing Java will make a MASSIVE difference in terms of Java's appeal to the open source development community. Whether this translates to more Java software or not I don't know [...]

    I doubt it. There's an awful lot of Kool-Aid you have to drink to become a Java programmer. Java isn't a language, it's a family of platforms. For a Unix person like myself, something like Python will always win over Java, precisely because it doesn't attempt to be a platform. In fact, Python tries to provide the Unix APIs in a convenient and straightforward way. The same goes for all relevant task-specific libraries. (And if you don't like Python, there are a handful of other popular, free languages at an abstraction level higher than Java, which share the same platform-agnostic approach.)

    And meanwhile, Java is stuck on its own little island, and the beaches and the surfing aren't better there than anywhere else.

    [...]but there are already some very good programs in Java that are open source (Jedit http://jedit.sourceforge.net/, Jabref http://jabref.sourceforge.net/ and JaxoDraw http://jaxodraw.sourceforge.net/ come readily to mind).

    It's never a good sign when a program advertises the language it's written in by adopting the language's initial letter for its own name ...

  9. Re:Debian AMD64 is Awesome on Are You Switching to 64-bit Processors? · · Score: 2, Informative
    I built an Athlon64 machine a while back and put Debian Etch on it, and it's awesome. You have to use the testing or unstable branches to get AMD64 support until the 4.0 release, but testing (Etch) has been working perfectly for me.

    Debian Sarge for x86_64 is perfectly well supported; you don't have to run testing/unstable.

    With very little work, I've even been able to get the few 32-bit apps I need to work. Without a chroot I have Opera (with Flash), the 32-bit proprietary video codecs, and a few others working perfectly.

    Without a chroot? How? Opera is my only problem -- I don't want to bother with chroot environments, so I'm stuck with the statically linked 32-bit version. The Opera people don't make it a priority to release a 64-bit version, unfortunately.

  10. Re:Anal Unix Guy on How To Adopt 10 'Good' Unix Habits · · Score: 2, Insightful
    The title should be 10 Good Unix Hints. Not Habits.

    Yes -- and habits is what people desperately need. The people I know primarily need three habits: RTFM when they don't understand something; adjusting their behavior based on the FM; and managing their use of the current directory (i.e. you don't have to cd into a directory to use a file which lives there).

  11. Re:From the Ground Up? on Advice For Programmers Right Out of School · · Score: 1
    When I first got into programming in 1972, I never heard of a "Hello, World" program. In the 70s, I suspect it was more common to write a first program that printed out your name.

    The classic first BASIC program on micros in the 1980s, too.

    I wonder when they originated.

    Or where. Things were already fragmented back then. In the Unix community, maybe?

    And yes, the Wikipedia article blames Kernighan, in 1972.

  12. Re:In my experience... on Bjarne Stroustrup on the Problems With Programming · · Score: 1
    After all, if you know how to program, then the language with which you program doesn't matter. I would argue that if you cannot learn a new programming language for base use in, say, a week, you don't know how to program. (By base use I mean the basics - not the little tricky subtleties that every language has.)

    And you obviously don't mean the underlying concepts that make any important language unique and useful, either.

    I recognize that there are more useful skills than knowing a language, and that you shouldn't learn The One Language and then live out your career in fear that it will become a useless skill ... But I can guarantee that even with a small, elegant and extremely high-level language (say, Python) you will write significantly better programs after eighteen months than you did at twelve months.

  13. Re:Not surprising?! on Windows Vista and XP Head To Head · · Score: 1
    Generally speaking, bloat is a consequence of (poorly used) OO languages, bringing in tons of code to do one or two silly things out of a module. A basic C program compiles to a fews tens of K (or less), a basic C++ program compiles to many megabytes, and it just gets worse from there. These things can be managed, but few people bother.

    I can't agree. You might bring in some extra code with iostreams and with the templated containers, but not a lot -- and you do benefit from it.

    If we're speaking bloat, I think the two major factors are:

    1. solving simple problems in extremely convoluted, overly generic ways
    2. solving problems that aren't that important to the users, i.e. adding bells and whistles

    Only the first of them is related to object-oriented programming, and not all of us are afflicted by that kind of thinking.

  14. Re:would have been on Birmingham Drops Open Source Initiative · · Score: 1
    Unless things have changed in the council over the last 10 years I would imagine they are just as incompetent at anything they turn there hand to. I think it was only last week that we heard the manager of the streetlighting division ...
    "Panic on the streets of Birmingham", eh? Great, now I'll be humming Smiths songs for the rest of the evening.
  15. Re:Make people think to figure out your e-mail on Best Method For Foiling Email Harvesters? · · Score: 1
    Really, if all you want is your customers or prospects be able to reach you through a website, got yourself a contact form.. No way for a harvester to get your email address that way, and people usually don't mind filling in a contact form..

    I mind. Offering a contact form and nothing else tells me that they aren't interested in me being able to maintain my normal email workflow, keep a copy of the message I sent, Cc people, being able to track the mail by Message-ID, being able to sign the message, and so on. Offering a web form and an obfuscated mail address and an apology is enough to keep me happy though.

  16. Re:High(er) level languages anyone? on No More Coding From Scratch? · · Score: 1
    You now have Transistors; Digital Logic; Machine Code; Compilers; C Code Family; Dynamic Languages / Visual Languages; What next...

    In 20 years time nobody will be pissing around with C code or Java or or Lisp ( ok maybe lisp) except for historical/maintaince reasons.

    All those things were available 20--35 years ago. If nothing revolutionary has happened 1970--2006, what makes you so sure it it will happen in 2006--2025?

    Fred Brooks' "No Silver Bullet" theory seems as plausible as ever, IMHO.

  17. Re:The two biggest omissions on Great Programmers Answer Questions From Aspiring Student · · Score: 1
    Knuth is great for his theoretical work, but I don't know if he'd rank up there as an important programmer. Although I suppose someone could make an argument for it based on his work on TeX.

    Which is exactly what I'll do. TeX, MetaFont and family are major works. Apart from the huge impact and scope of the project, some of the algorithms therein were groundbreaking.

  18. Re:Canonical Terms of Academia on Advanced Data Structures? · · Score: 1
    Design patterns is a book about Object Oriented design, aimed at the C++/Java level of abstraction.

    Well, it's about generalization, loose coupling and that kind of stuff. Lots of polymorphism. Orthogonal to algorithm work, and not always something you want to invest programming time and CPU cycles info.

  19. Re:I don't understand the question... on Design by Contract in C++? · · Score: 1
    After trying dozens of languages, I still return to C++, and I still think it is my favorite strongly typed language (yeah, I know, nobody can agree on strongly typed, but you know what I mean).

    You mean "my favorite statically typed language". And yes, I know what you mean.

  20. Re:In C++ on Design by Contract in C++? · · Score: 1
    The fact that you can't use all of DbC specifications, doens't mean that using a macro/asserts in C++ won't have any utility.

    I suspect that you can do some, but not all, of the Meyer design-by-contract stuff by using clever template programming. The Boost people have a collection of assertions, but I don't know whether there's anything DBC-related. If there isn't, there should be.

    The C assert() macro should be avoided in C++ code -- destructors will not be executed when an assert() fails.

  21. Re:Ultra fast desktop, same old slow applications on FVWM-Crystal 3.0.4: Speed and Transparency · · Score: 1
    I love Linux, and I wish it all the success in the world, but it just doesn't feel as snappy to me as windows 2000/XP. Seems like lost mouse-clicks and slow window redraws are a large part of the problem. Perhaps the problem lies with X, or with my own warped sense of perception... who knows?

    Seems to me it lies at your side, because lost events and slow redraw is something I experience frequently in Windows 2000, and never in Linux. And I regularly use an old 180 MHz PC with Linux.

  22. Re:Holy crap! on Banned Books published by Google · · Score: 1
    Mein Kampf is legal to own in Germany, and existing copies may be traded. However, the Bavarian state government owns the copyright and does not allow printing of new editions in Germany. The state government has also attempted to block publication in other European countries, but without success.

    I was under the impression that they succeeded fairly well, but I see my local public library has a recent Swedish edition. There was a lot of noise about it in the press here a few years ago.

  23. Re:Pick an OS with staying power on SGI Announces MIPS and IRIX End of Production · · Score: 4, Interesting
    I feel sorry for the person that picks an OS dependent on a corporation for its existence. When there is only one "Sun" to nourish your OS "ecology" it is much more likely to wither away - eventually. I picked an popular open source OS for this very reason. RedHat may die but it will take a unprecedented disaster to also kill off Ubuntu, Debian, Slackware (especially Slackware), SUSE Linux, etc.. My intellectual investment is safest with Linux.

    This is UNIX! You're supposed to be able to take your ecology with you to Linux, or Solaris, or OpenBSD, or wherever. With some pain, admittedly---but little more pain than if you're migrating from, say, RedHat to Debian.

  24. Re:Why would one want to do this? on LDAP Authentication in Linux · · Score: 2, Insightful
    If all you need is authentication, LDAP is overkill - just use kerberos.

    Huh? Surely Kerberos is more complex than plain LDAP authentication?

  25. Re:Emacs excels at the basics... on What is the Ultimate Linux Development Environment? · · Score: 1
    gtk-key-theme-name = "Emacs"

    Huh? Not "gtk-key-theme" but "gtk-key-theme-name"? Is this some sly Lewis Carroll reference on their part or what?

    $ fortune -m "Haddocks' Eyes"

    ... the GTK+/GNOME people decided to change this as part of the quest to make GNOME more "user-friendly". Ironically, the users they strive to befriend are Windows users rather than long-time Unix / GNU users...

    Lusers.