Slashdot Mirror


User: woggo

woggo's activity in the archive.

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

Comments · 187

  1. Re:Now if only I could do this for my windoze game on Bootable Game CDROMs Using Linux · · Score: 2

    UT works pretty well under linux. See http://lokigames.com for a free (beer) binary and look at the FAQs on openUT

  2. taxes on A Minor Political Screed · · Score: 3

    Actually, the top 1% of wealthiest Americans provide 37% of the US' income tax revenue.

    This is the most ridiculous thing about Gore's recent "apples-to-rocks" comparisons: he is comparing Bush's 33% tax cut for the wealthiest 1% (i.e. 12% of all revenue) to Bush's education spending (very likely to be less than 12% of all total revenue), instead of comparing Bush's education spending to his own education spending.

    That's a little like me saying "You are clearly more thrifty than I am, because you spend less on Coke in a week than I did on a set of Nordic skis." (Actually, it's closer to "I am deciding to bill for two fewer hours this week, but my cubemate is more responsible because she is buying six cups of coffee every day and working a full week," but I digress...)

    I'm not a fan of either of them, though.

    WRT the death tax: Why not allow greater deductions for charitable contributions now? Instead of assuming that the recently deceased would rather donate money to universities, libraries, etc. than to Uncle Sam, why not let them do it while they're alive for a tax break? Then they can see the results of their philanthropy, which will (I'll assume) motivate further giving. I paid 42% taxes at my last consulting gig (I'm a grad student now, so I'm paying a lot less....). I would have gladly donated that money and more to impoverished schools, soup kitchens, free clinics or any number of charities instead of sending it to a monolithic federal government.

    ~wog

  3. POOF! There goes any possible pretense of fair use on Forget Napster & Gnutella: Enter Mojo Nation · · Score: 2

    Great. There's no possibility that those using this service are legally protected, because it adds a profit motive to its "information sharing". Now the RIAA will be going after YOU, not Shawn Fanning's uncle. Even if courts rule that Napster is legal, this service doesn't have a prayer.


    ~wog

  4. 90% of PC buyers don't care about OS on Would You Pay $1000 For Windows? · · Score: 4
    Liebowitz relies on the flawed assumption that the "windows standard" is something comforting to consumers, and that without the promise of that standard, that balkanization will ensue. Yeah, I remember when I couldn't run VIC-20 BASIC programs on my TI/99-4A, and I remember when my Amiga couldn't share files with a Mac. However, those were 18 and 15 years ago, respectively.

    PC buyers don't really care about operating systems, except as far as brand loyalty (like the current inane crop of Pepsi and Coke ads in the US try and appeal to). The "average" home PC buyer really wants a web browser, e-mail, and some sort of word processor. A few want games, a few want office applications, and more than a few want some applications which replace accumulating paper (a la Quicken or a PIM). However, no one cares whether it's Microsoft or Mac or a Xerox Alto, as long as it does what they want, is fairly easy to use, and doesn't break at critical times.

    Microsoft's marketing muscle and anti-competitive tactics have increased "brand loyalty" by creating the illusion that other operating environments are somehow incompatible, less functional, or incapable of interoperability with Windows, the "market leader". Therefore, for many PC buyers, liking Microsoft is like liking the popular and unchallenged local sports team -- there's little chance they'll lose, and they never *really* disappoint. There's no compelling reason *to* like them, but it's too much work to be a fan of anyone else. Unfortunately, unlike those scenarios of a couple of decades ago, my computer is powerful enough to run Windows on top of Linux, and run all of my old Amiga software besides. Even without Windows, I can still interoperate passably with windows-using colleagues for most things. (although I do use TeX for all word processing, even musicology papers -- with musical examples)

    It's really telling that devices like the i-opener are wildly successful even though they're nothing close to Windows -- but that really proves that what draws people to computers is applications. Sure, on Windows, I can pay for seven different browsers (or get one that's inextricable from the OS kernel) and five different office suites -- but I only need one of each. Beyond that, even, the "applications" that people want are things like cnn.com, amazon.com, Napster, and e-mail -- and I can get to CNN from my mobile phone as easily as from a Windows box.

    Microsoft is riding on brand loyalty, which they create and enforce with anti-trust actions. Unfortunately, their ride is slowing, because there aren't any compelling features in their products for most users, and there are enough people reverse-engineering MSFT stuff to provide reasonable interoperability from other operating environments. Most people don't need Word to manage bibliographies or outlines -- they don't really need anything more than Works, but they keep Word around to read Word documents....



    ~wog

  5. Re:Come over to the dark side... on Computer Historian? · · Score: 2
    I'd say his best bet (outside of the history department, like you mentioned) is to do a thesis in computer architecture or operating systems; one need only read the latest Andrew "Linux is obsolete" Tanenbaum textbook to know that there is a lot of leverage for an academic computer historian in those fields.

    If he's talking about personal computer history, he might be less lucky. Most hardware courses feature a history component which is geared toward state-of-the-art-then. If he's teaching at a liberal arts school with an integrative studies program of some kind, he could probably "switch hit", teaching both operating systems and hardware in the CS department, and then teaching (or team-teaching) a "Sociology/History of Computing" class. The sociology of computing angle would be more in tune with personal computer history; the history angle would be more "Turing and the Enigma" perhaps.

    In any case, I'd say major in CS and maybe history or sociology, too. (A philosophy major probably wouldn't hurt, either, as long as you read Wittgenstein, Church/Turing, Frege, etc.) Then find a graduate program, get a Ph.D., and get a tenure-track position in a small enough (or forward-thinking enough) department so you can implement your ideas. Once you're tenured, start pushing your more radical ideas.

    It's not a fast track, but it's a good track, and will be very rewarding if you stick it out.


    ~wog

  6. hashtable size on Optimizing Java? · · Score: 2
    In 1.2.2, the default size is 101, actually. (I'd post the source, but that would be violating the "license agreement" contained in the header of Hashtable.java :-)) If you're converting from a Map (i.e. new Hashtable(new Map(...));), the default size is 11 or twice the size of the Map. Furthermore, it grows by ((size * 2) + 1). (It would be pretty slow to grow if it grew by ONE for each insert -- even Sun isn't writing code that suboptimally.)

    So I erred; mea culpa. I still maintain that it's an issue. There are a lot of applications where it is useful to create a lot of small hashtables as part of larger data structures (parsing certain kinds of languages in particular benefits from this), and if you have to allocate 101 pointers each time you make a mapping that will only use, say, 6, your performance will suffer because all that unnecessary allocation will make the GC hyperactive.


    ~wog

  7. garbage collection on Optimizing Java? · · Score: 1

    Actually, you can explicitly "suggest" that the JVM collect garbage with the System.gc() method; however, I believe that the class library spec does not require the garbage collector to heed your suggestion. :-) In any case, calling System.gc() every now and then will speed you up a little if you're creating a lot of short-lived objects and if you're in a memory-constrained environment.


    ~wog

  8. Re:hardware time is cheaper than programmer time on Java Rocks On Linux · · Score: 1
    The JVM's default optimization is quite simple-minded. That code will work like you say, but here is an example which won't be so lucky.

    That's all I'm saying. For simple, one-time one-liners, it's probably OK to use "+". However, most performance problems that need optimization arise in loops; most Java performance problems have to so with unnecessary object creation.


    ~wog

  9. Re:hardware time is cheaper than programmer time on Java Rocks On Linux · · Score: 2
    Strings are immutable. You ought to use StringBuffers and the append() method. Most JVMs will optimize a statement of the form
    System.out.println("notice: " + bar.numFrobnications() + "frobnications");

    to use a StringBuffer, but they won't do it for code within loops, like
    boolean doneYet = false;
    String foo = "";
    while(!doneYet) {
    foo = foo + String.valueOf(someObject.someMethod());
    }

    which allocates a new String object for each iteration, creates a StringBuffer for the addition, and converts that StringBuffer into a String -- leaving you with two objects that need to be created, only to be immediately garbage collected for each iteration.

    I posted some tips for optimizing Java in another thread -- many of the other replies in that thread are good as well. Have fun.


    ~wog

  10. Re:hardware time is cheaper - not true on Java Rocks On Linux · · Score: 1

    If your "Java enterprise system" needed an E10K to run acceptably, then the "disservice to the programming profession" is the person who wrote it. Nowhere in my post do I advocate writing inefficent code. I do advocate using Java; you may be arguing that it is not up to the task. However, Java performs well enough for the vast majority of server-side development, and the gains reaped from using Java -- in reduced development time and reduced maintenance time (in the real world, other people have to understand and work on our code, too) vastly outweigh any minor performance losses.

  11. Re:hardware time is cheaper than programmer time on Java Rocks On Linux · · Score: 1
    "like the + operator for Strings" Except that modern VM's will account for this. Look at the byte code sometime.

    I have, and they don't. Nice troll, though.


    ~wog

  12. hardware time is cheaper than programmer time on Java Rocks On Linux · · Score: 5
    Good points, mac.

    What a lot of people fail to realize is that a lot of "java performance problems" are caused by sub-par java programmers who don't understand how costly some operations are. Another entire class of performance problems are caused by bad algorithms. An O(n) algorithm coded in QuickBasic will outperform an O(n^2) algorithm hand-coded in assembly language for most possible inputs.

    OK, so all things being equal, using smart algorithms, and not abusing the language, java is still a bit slower than C. Big deal! In most cases, it doesn't matter. Server-side apps are blocking on I/O most of the time anyway; client-side apps are blocking on user interaction most of the time. For projects with hard real-time requirements, you have the RTJ standard; if you're really speed-hungry or are doing serious systems work, then you can write it in C.

    However, my employer could buy a middle-range Sun workstation for what he pays for my time in a week, and I'm a lot more productive in Java than I am in C. Furthermore, because I pay attention to engineering and design issues, other engineers can re-use and subclass my code without modifying it. If I've used good algorithms, avoided stepping on the GC, and steered clear of known performance problems (like the + operator for Strings and the unnecessarily synchronized Java 1 collection classes), then my code is probably fast enough. If it's not, then it's a lot cheaper for my boss to requisition a faster machine than it is for him to pay me for an extra two months to chase pointers and re-model object-oriented systems in procedural code.


    ~wog

  13. Re:Read last month's linux journal on Java Rocks On Linux · · Score: 4
    There isn't anything "rigorous" about Hirsch's "set of benchmarks", nor can you call it a "set" without qualifying; it was a "singleton set". He simply populated an array (in one for loop) with a half-million lightweight objects and then accessed those objects twice (in separate for loops). Just because he tested it with several JVMs doesn't make it a rigorous test.

    Not only is this not representative of most real-world programming tasks (it checks the gc and allocation code more than anything), but he didn't perform simple optimizations that would have helped him big-time (like loop unrolling). He also apparently didn't read the gcj docs, which point out that gcj's bounds checking is much slower than it should be, so if you don't need it, you can turn it off. Since he does 1.5 million array accesses and does all the bounds checking himself with loop termination invariants, bounds checking is a fairly important -- and unnecessary -- constant multiplier, I'd say. :-)


    ~wog

  14. K&R on optimization; tips on Optimizing Java? · · Score: 3
    K&R had two simple rules for optimization:
    1. Don't do it.
    2. (for experts only) Don't do it yet.

    With those in mind, there are a number of things you can do to improve Java performance.

    • Minimize object creation at all costs. This means, don't use the "+" operator for Strings at all in production code, if possible. Remember that Strings are immutable and that every constant string in your code is another String object. It is far (hundreds of times) cheaper to use StringBuffer.append() instead. (If you don't believe me, use javap -c and check the bytecodes!)
    • Do refactor your code. Smaller methods are not only easier to read, maintain, and reuse, but they are also more hospitable to profiling.
    • You are using a profiler, right? I've used JProbe in industry, and it's output is a lot more useful than that of java -prof but it's pretty expensive to buy if you're on your own. A profiler is a must, though, because it lets you know what to optimize.
    • Avoid unnecessary synchronization. This means (if you're using Java 2), prefer HashMap to Hashtable and ArrayList to Vector. (The newer collections classes are by default not synchronized.)
    • Memoize values you use a lot. Actually, memoize any value you use more than once. javac by default won't do a lot of optimizations (like moving loop invariants outside of a loop), and some query methods are expensive. It is also a lot cheaper to access a local variable than an instance or static variable -- so any time you can cache the result of something you're using more than once, do it.
    • Don't initialize unnecessarily. This is Java, not C++, and all variables are by default initialized (to 0 for integer and float types, false for booleans, and null for reference types); initializing integers to zero will just make object creation more costly.
    • Be careful about using default constructors. If you're creating a lot of Hashtables that don't need to hold a lot of data, you'll be paying for the 1000-item default capacity if you don't specify a size.
    • Pay for things once; pay for things all at once. If you need to look up mainly-static values from a db table (for referential integrity), read them all into a map of some kind, rather than doing a SELECT for every one. Also, prefer buffered I/O whenever sensible.
    • Most of all, never resort to dirty tricks that make your code unreadable for the sake of a few more cycles. It's just not worth it.

    You an find a lot of great performance suggestions in Peter Haggar's excellent Practical Java, a sort of Strunk and White or "Effective C++ for Java".

    Good luck.


    ~wog

  15. Re:Swahili on English Language And Its Effect On Programming? · · Score: 1

    The Swahili word for "onanism" literally translates as "to punch one's own genitals." And, according to suck.com's /. parody, onanism is more important than coding to slashdot users, anyway.


    ~wog

    PS- this is supposed to be funny, not a flame

  16. some computer languages can be expressed... on English Language And Its Effect On Programming? · · Score: 1
    concretely in more than one natural language. See for example Algol 68, the first language to have block structure and the acknowledged forebear of Scheme and Pascal. You could write Algol 68 programs in a concrete syntax based on German, French, English, whatever. And you thought deciphering COMMENTS in another language was tough. :-)

    Those of you who might scoff at mentioning such an ancient language may be interested to know that this idea of separation between abstract and concrete syntax (as part of a development environment) is an important part of Intentional Programming, which is a very new research direction. It all comes full circle.

    Maybe someday we'll even have some language which grants its users the capacity to be as productive as Lisp hackers were in the early 70s. :-)


    ~wog

  17. Re:Beating MySQL on Postgres Beats MySql, Interbase, And Proprietary DBs · · Score: 1

    Yes, but since one of those "features" omitted by MySQL is a sensical locking mechanism, MySQL (which uses table-level locking, a la the flat file dbs of 1960s) tends to grind to a halt when you have multiple readers and writers.

  18. Re:Wealth by stealth on 'Gnome Foundation' Takes Aim at MS Office · · Score: 1
    And $Oz2500 PER CPU for an "Internet Connector" licence if we want our SQL database to be web-enabled.

    If you think that's absurd, look at what Philip Greenspun has to say about RDBMS pricing. M$ $QL $erver is actually one of your cheapest options, and one of only two commercial RDBMSes that actually publishes prices. (SOLID is the other one.) M$ $QL $erver, for what it is, actually isn't that bad (they stole most of it from Sybase), although it bites big for most web stuff because it supports a laughable 256 character VARCHAR and because all of the JDBC drivers are closed-source and expensive (you can use the ODBC-JDBC bridge, but it's slow).

    Of course, I'd recommend PostgreSQL if you don't want to pay for a database, or MySQL if you don't want to pay for a filesystem. :-)


    ~wog

  19. Re:great another one on 'Gnome Foundation' Takes Aim at MS Office · · Score: 2
    There's nothing wrong with standards so long as they are not controlled by one company. I think its interesting that we have 5 big names involved in this one.

    Ever hear of the OSF? They were a "standards body", sponsored by several companies, and they produced some of the greatest dain-bramages UNIX has ever known (Motif, CDE, etc.).

    I'll agree that "there's nothing wrong with standards" (I like them myself), but design by committee can prove really problematic, especially when the committee consists of a bunch of big, competing companies who've only known how to do business with proprietary "standards".


    ~wog

  20. Re:IOW: Lisp ? on What Is The Future Of Programming Languages? · · Score: 1

    No kidding. What's new about IP is that someone has built a system (a la the lofty plans for Guile) that does the translations for you AND incorporates literate programming, and GP is a little more than "write code that will write code". However, the state of SE is just now catching up to where Symbolics was in the 70s. :-) Having used lisps for several medium-size projects, I'm always a little depressed when some new^H^H^H 30-year-old "innovation" comes out, but these will bring these ideas to a wider audience, and will eventually result in better code.


    ~wog

  21. are you looking for MakeDoc? on Orphanages For Abandoned Free Software? · · Score: 1
    This is more of a response to the poster's initial concern than to the question in general.

    If you're looking for the "free DOC encoder", it might be a little hard to find, because it got bought out by Aportis a few years ago. (For obvious reasons, they "encouraged" the author to stop distributing free software.) However, the GPL means that all distributed versions are still Free. Visit ftpsearch and look for makedoc7.cpp. Alternatively, it is included on the O'Reilly Palm book CD. (You can get ORA titles for ~40% off at bookpool, so this book and its CD is a pretty good deal.)


    ~wog

  22. OO is great -- but look at IP and GP on What Is The Future Of Programming Languages? · · Score: 1
    The future of languages lies in the future of methodologies.

    Intentional programming is a pretty neat idea. IP basically provides an environment for programmers to develop extensions to a given language and to abstract code into "intentions". (It is a little unfortunate that a technology coming from Charles Simonyi at Microsoft is called "IP".) With an IP environment, you don't edit lines of code; rather, you edit (sort of) the abstract syntax tree, and you can express code in a notation of your own devising (which later gets translated into a target language).

    Generative programming (see generative-programming.org is another new wave in SE. The idea behind generative programming is that you create metaprograms which then can generate programs or components, allowing you to build adaptable (meaning you can change their domain) or adaptive (meaning they self-adjust to a new domain) programs fairly easily.

    Also look for eXtreme Programming and refactoring to become major new forces in traditional OO SE. XP is a new way to develop software; refactoring is a new way to maintain it. XP has end-users specify the requirements of an application by talking about how they'd like to use it; then developers, working in teams, code the application, designing as they go (except for some Class-Responsibility-Collaboration cards, which they make at the beginning of the development cycle). XP involves rapid development, frequent releases, and stringent unit tests. Refactoring provides a set of rubrics for improving the design of working code without breaking it, making code easier to maintain and understand while also providing better granularity for profiling and other instrumentation.

    Out of all of these, I'm currently using XP, some GP, and refactoring -- and my productivity has soared.


    ~wog

  23. try the Advocacy-HOWTO on FAQ On Convincing Big Companies To Try Linux? · · Score: 1

    The Advocacy HOWTO has a lot of these kinds of things covered, including some tips on how to get suits, etc., to take you seriously. (Unfortunately, the community can resort to mudslinging and "Betamax"-style arguments all too often -- this document tries to put that in perspective.)


    ~wog

  24. Re:sorry, you're wrong on Anders Hejlsberg Interviewed On C# · · Score: 1

    Hey, I just try and avoid conditionals wherever possible in OO code. I've got a buddy that insists on removing all of them -- I don't know if that's realistic, but I see where he's coming from. :-) (For the record, I HATE instanceof, too.)

    ~wog

  25. sorry, you're wrong on Anders Hejlsberg Interviewed On C# · · Score: 2
    I am going to repeat what an Anonymouse Coward siad because I think its a good point:
    "Try using that class in a switch statement. You can't. It sucks."

    Why on earth are you using a switch statement in an object-oriented language, anyway? That's just poor engineering. If you have behavior that depends on a on object's type, you should polymorphize on that object, either by (in my example) subclassing InodeType or by using double-dispatch, a la the Visitor pattern. Sure, that will cause all of you VB programmers who've bought "Teach yourself Java in 21 days" a little grief, but it's the proper way to write OO code. If you really want to use switch statements, then I can't see why you care about type-safety.

    Along with that, I would like to add that if you take your argument to the extreme you could say "Why not only use Assembly Language, you can implement any feature using that!". Of course, that is true, but why bother? You did in 20 lines of code, what could be done in 1 line of code. That sort of pay-off is what so-called 'syntactic sugar' is gets you.

    This is absurd. You have clearly misunderstood my argument. I didn't say "hey, language features which make code terser are bad"; rather, I said "syntactic sugar is bad." There's a big difference there. Syntactic sugar makes your code terser, but at the expense of consistency.

    Using established patterns and idioms is the way to make code easier to write and maintain. C#'s "support for type-safe constants" defeats some serious OO ideals by allowing you to cast from one enum type to another -- basically, this means that "you're still using static final ints, but the compiler will sneeze at you if you try and abuse it." What is the possible sense of casting a "kind of shape" to a "kind of file"?

    Not to nit-pick, but it's twelve lines of code (try counting semicolons), and "what syntactic sugar is [sic] gets you" is inconsistency. The time it takes me to write 12 LOC is negligible compared to the time it saves me later by having type-safety. Anyone who tells you that "the fewest LOC is best" has never

    • engineered any significant project.
    • maintained someone else's code.
    A terse, elegant solution is great. A terse solution that relies on a fashionable language "feature" is merely the mark of a programmer who doesn't understand what it takes to become an engineer.