Slashdot Mirror


User: dkf

dkf's activity in the archive.

Stories
0
Comments
3,983
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 3,983

  1. Re:That was just terrible... on How to Keep Your Code From Destroying You · · Score: 1

    Test-driven development is OK, but it is very hard to do right. The problem is, writing a good set of tests that specify the functionality you require is actually pretty much identical to formally specifying the semantics of the code required to solve the problem. That's very difficult. (If you can do it, it's a really good plan.)

    Myself, when doing development I tend to write black-box tests to show the correctness of the core of what I'm doing before writing code, and then write white-box tests afterwards to show the correctness of any tricky cases I discover during implementation (resource cleanup can get complex, and it can take a lot of thought to figure out a good way of testing threaded code for races). When doing maintenance, I don't touch code until the bug is characterized by at least one reproducible test case.

  2. Re:That was just terrible... on How to Keep Your Code From Destroying You · · Score: 1

    ... unless a constant is going to change frequently ...
    A constant that changes frequently is called a variable. HTH!
  3. Re:Summary: Beginners need tips too. on How to Keep Your Code From Destroying You · · Score: 1
    For more expert programmers, there are fewer tips.
    1. Name your functions sensibly and consistently
    2. Make sure every function has coherent semantics
    3. Avoid premature optimization
    4. Clarity is better than cleverness
    Funnily enough, those last two were on the previous list too. But then I've found that even experts tend to struggle with their dictums. ;-)
  4. Re:Mostly agreed on How to Keep Your Code From Destroying You · · Score: 1

    If you've got a 'const int' there's no guarantee that even if you cast the constness away that you'll be able to write to it. The compiler could well have decided to put it in read-only memory.

  5. Re:and 10,000 OSS developers.... on Microsoft Cancels Major Developers' Conference · · Score: 1

    My experiences with eclipse have largely painful.
    That's a shame, since it does make quite a big difference when programming in Java (speaking as an old hand at emacs). The big gain I found was from three things:
    1. It's management of your package imports
    2. It's language-aware searching (especially when combined with good doc comments)
    3. It's refactoring (good way to clean up inconsistently-named methods and classes)

    It's also pretty nice for people working with XML Schema or WSDL, so much so that it makes it just about possible to work with those formats...
  6. Re:Not a second iPhone, but a widescreen iPod? on Second-gen iPhone Confirmed? · · Score: 1

    A widescreen iPod? Will that be like 50 inches wide? That would be so awesome! I'd need a bigger pocket to put it in though...

  7. Re:Progress, sort of on 850K RegisterFly Domains Moved To GoDaddy · · Score: 1

    There are some interesting implications to this deal. For one thing, domain owners whose domains are now administered by GoDaddy have no contractual obligations to GoDaddy. So they should be able to transfer those domains anywhere, immediately.
    Hmm, that really depends on the nature of their original contract with RegisterFly. From what I remember of contract law, it will be the terms of that contract that GoDaddy will have to enforce, at least initially. Of course, the big bonus to the domain owners is that they can now act themselves to clean up the parts of the mess that still affect them, and GoDaddy will probably manage to retain a fair proportion of the accounts (so boosting their business).

    On the other hand, IANAL and this area of contract law (what happens when a part of a business is transferred to another) is one of the more complicated ones. It quite possibly varies between jurisdictions too.
  8. Re:Too much emphasis on instruction flow on Is Parallel Programming Just Too Hard? · · Score: 1

    All you have to do is forget about the UNIX process model really
    No. It's more like going from a monolithic "do everything" process into a world with pipelines. Guess what? Unix systems have been doing that sort of thing for decades. That sort of parallelism works.
  9. Re:Too much emphasis on instruction flow on Is Parallel Programming Just Too Hard? · · Score: 1

    The same applies to perl, and other scripting languages. You still have to fight with locks ciritical regions etc...
    Nope. Not all scripting languages expose that level to you. Some stick exclusively to the dataflow/message passing domain.
  10. Re:Yes and No on Is Parallel Programming Just Too Hard? · · Score: 1

    What we need is more advanced primitives. Here are my 2 or 3 top likely suspects:
    I think you'll find that while they work well for some parallel problems, for others they suck. The problem is that there are quite a few different general parallel computing model problems and it's not at all clear that the same approach will work well for all of them. Indeed, there remain problems that are "embarrassingly serial" and there are also a great many other things where working out how to parallelise them is itself an open research question; it's not even sure whether the list of "dwarfs" in that article is itself complete...
  11. Re:Patience is not a goal here. on Is Parallel Programming Just Too Hard? · · Score: 1

    1. Parallel code is being written, agreed, but it is specialty engines that are getting it. General purpose parallel code isnt out there.. we just have pet projects that include parallelism but for the most part are ported serial code
    There is a lot of parallel code out there. Most of it is distributed code. It's called the internet. Biggest. Parallel. System. Ever.

    OK, it's made from lots of bits of serial code. Good reason for that; it works. And if you want to make working parallel code without pulling out your hair, design to not use a shared memory model, but instead stick to message passing. It's a bit slower (but not that much) and yet it is far easier to debug, since messaging semantics is pretty easy to understand on the level of individual systems.

    2. Parallel code is a monster to write. I'm not talking simple scatter-gather data spreaders. Imaging Adobe photoshop running across a 400 machine cluster, handling hundreds of users at a time. The data concurency issues, data residence, locking, message handling, message reordering Total bloody nightmare...., If youve parallelized a markov model it doesn't really compare.
    Either you're using shared memory model parallelism (a freaking nightmare) or you're using message passing parallelism. If you're using message passing, the main problem is message ordering (though it's pretty simple to ensure that the order of messages between any two endpoints is preserved). Anyone writing serious internet apps needs to deal with this anyway, so the experience is more widespread than you seem to think.

    3. The tools arent adequate. tracing a data race, or deadlock in a cluster is a beast. MPI and PVM are nice but are really narrow in the scope that they handle problems.
    Sounds like you're trying to use a shared-memory model. Good luck keeping your hair in tracking down those bugs...

    4. It isnt just non-programmers.. Parallel is a whole different scale of complexity... Almost everything I see is a "parallelize the brute zones of a specialty engine once it works in serial"..... Its an important baby step and it really blows non-programmers for a loop. But we are a far sight from having an implicitly parallel version of MS-word.
    Out of curiosity, what on earth would Word get from parallel programming? (I can see what it would gain from distributed programming though; I've worked on shared documents over the web and that's often really productive.) Here's a little secret: not everything needs to be parallel, and lots of stuff is actually already fast enough (it gets back to waiting for user input long before the user notices that the computer was doing anything).

    However, if you're seriously wanting to do parallel programming, it really helps to have a proper CS education. Understanding parallel and distributed programming is hard, but there have been quite a lot of basic conceptual tools for working with these things for a long time now. But CS is not in itself enough; a practical appreciation of just how many things can go wrong in practice is also needed. Parallel programming is not a practice that suits people who like to cut corners. Time to jettison those bad habits!

    5. Parallel isnt new, dual cpu boxes have been in userspace since the late 90's, it has been mostly ignored by applications. The use of network resources is horribly behind the times. The ability to aggregate resources on the fly is a total joke compared to where it should be.
    Have you actually tried doing this? Or are you just mouthing off with no experience? If you ever want to scale up beyond specialized dedicated clusters, there are whole new classes of problem that have to be addressed. (For example, security becomes suddenly all encompassing, and many of the cheap hacks like SSL and VPNs either don't really apply or need a lot of enhancements.) Of course, there are people working on dealing with these problems; there's at least 4 different standards bodies dealing with various aspects. Some you will even have heard of (IETF, W3C)...
  12. Re:Just what we need...another VM.. on VM Enables 'Write-Once, Run Anywhere' Linux Apps · · Score: 1

    I don't own a Mac - (until very recently I didn't own a Windows machine either) - so even though I work hard to write portable code, I can't compile or test it on the Mac - so I can't provide an executable for people to download and run. Sure I can (and do) hand out source code - but most Mac users don't know how to use a compiler and most Windows users don't own a compiler.
    You are aware that this is a solved problem for many people?
  13. Re:hmmm, very incorrect on 8 Reasons Not To Use MySQL (And 5 To Adopt It) · · Score: 1

    If you want to handle terabytes of data you can put it in [...] SQLite [...]
    You could, but the author of it doesn't recommend it (it's designed for smaller embedded databases, not massive data warehouses). He reckons that if you're doing that sort of thing, a good upgrade path is first to PostgreSQL and then Oracle.

    Myself, I work in an Oracle shop anyway; since we have DBAs on staff and all the licenses we'll ever need, why use anything else? :-)
  14. Re:Holland style Hurricane Protection? on "Jericho" Fans Send Over Nine Tons of Nuts to CBS · · Score: 1

    While Holland hardly ever gets hurricanes, it does get European windstorms from time to time, which can be just as bad. Indeed, the storm of 1953 is infamous, with total deaths estimated at over 2400; it prompted the construction of the comprehensive flood barrier system that the citizens of NO have been envying since Katrina...

  15. Re:Funny enough submission on "Jericho" Fans Send Over Nine Tons of Nuts to CBS · · Score: 1

    But on the other hand RIAA and MPAA may not want to see [Max Headroom]...
    Yes they will! Good crib sheet for new nefarious ideas.
  16. Re:It's a TV Show on "Jericho" Fans Send Over Nine Tons of Nuts to CBS · · Score: 1

    Do you really want these people trying to fix government?

    As opposed to the current incumbents? It's gotta be worth a try...
  17. Re:*GASP* on BBC Kicked out of School Over Wi-Fi Scaremongering · · Score: 1

    That is that public school is not about learning the three 'R's, but a social program.
    That's because public schools seem to be totally fucked up in the US. Some bunch of citizens need to fix that. But you can't generalize from "public schools are fscked in the US" to "public schools are fscked" without a great deal more evidence, and in fact if you look in other countries, public schools are in a lot better condition. (OK, people there also worry about education - that's reasonable because it is important - but they should be aware that it could be far worse; witness the USA...)

    Parents of America, unite! Demand good education in your schools, for it is what your children need and deserve! And remember, if you think that a school is just a government baby-sitting service, what you're really asking for is for your kids to be only able to get the sorts of jobs that China and India will be outsourcing back to the USA when they grow up. When it comes to teaching, "substandard" is (or ought to be) criminal negligence.
  18. Re:WiFi is microwaves on How Bad Can Wi-fi Be? · · Score: 1

    This means that high frequency EM sources like [...] beta rays
    You are aware that beta radiation is something totally different (high energy electrons)?

    So this explains why ultraviolet light is carcinogenic, it is just over the threshold of ionizing radiation, while [visible] light [is] perfectly safe.
    Technically, visible light is also capable of changing molecular configurations, and a good thing this is true. Why? Because it's the key to how you can see and how plants photosynthesise. OTOH, it does require very specialized molecules (e.g. rhodopsins and chlorophyll) so it's not like there's risk for everything else. It's the higher frequency (i.e. more energy per photon) that is the real troublemaker.
  19. Re:What crap. on How Bad Can Wi-fi Be? · · Score: 1

    The worst of it all is that my PC is as we speak radiating heat.

    That's the same kind of radiation that is used in conventional ovens!

    It can cook stuff to death!
    If that's a problem, you might want to stop overclocking your GPU quite so much. Either that or get better aircon.
  20. Re:Naturally on MS-Funded Study Attacks GPL3 Draft Process · · Score: 1

    What they probably did was find someone whose own prejudices were inclined to give the results they wanted and gave him a bit of money to carry out a survey of a developer community likely to be hostile. A careful bit of encouragement, a little investment (not as much as would be needed for outright lies) and you've got yourself one meaningless study. FUD value: high. General value: zero.

    The only thing worth discussing is which developer community was hostile. Who are those that aren't being reached out to properly by the free software community? Is there something we can do to close whatever gulf exists without abandoning our principles?

  21. Re:Authors on The Case For Perpetual Copyright · · Score: 1

    How about travelling to somewhere amazing with a nice camera and *click*, you've got a photograph.
    And I scribble some stuff down on the back of an envelope, and I've got a piece of creative writing. Your point?

    A key difference between different forms of copyrightable things is that with some it is the copyrighted entity itself that is valuable (e.g. books, photographs) and with others it is more the access to the creator that is valuable (e.g. music, drama). Of course, there are other things that fall between these extremes. Perhaps the real problem is that we (as a society) are trying to fit the copyright terms for all these forms into a single length of protection; maybe the right thing would instead be to press for differential terms?
  22. Re:Calls are often free, though; it makes no sense on Texting Teens Generating OMG Phone Bills · · Score: 1

    In many other countries, monthly plans weren't as popular, so you actually paid less to text, which really made more sense.
    In yet other countries, monthly plans were popular and it is still cheaper to text, despite not having significantly more major providers. Let's face it, the high costs of cellular calls in the US is because your regulatory structure is shit.
  23. Re:It's about time texting caught on in the US on Texting Teens Generating OMG Phone Bills · · Score: 1

    At least you can keep your eyes on the road whilst yapping.
    You'd think so, but there's quite a bit of evidence now that shows that while your eyes might be on the road, your mind most certainly isn't. Indeed, being on the phone while driving is similarly dangerous to DUI! Scary stuff. (A hands-free kit helps a bit, but not very much; concentration is still not there.) For the sake of yourself and everyone else on the road, let calls received when driving go to voicemail; it will wait...
  24. Re:Romania? on Blogger Threatened For Publishing JS Hack · · Score: 1

    [Romania is] Kinda like Idaho, but with lettuce instead of potatoes.
    And with added seaside resorts (and vampire kitsch) too.
  25. Re:well on Firefox Going the Big and Bloated IE Way? · · Score: 1

    The disk cache is something that is pretty easy even for non-computer people to set: Tools->Options->Advanced->Network->Cache.